9
9
Anchovy is a minimal, unopinionated file-processing framework equipped with a
10
10
complete static website generation toolkit.
11
11
12
- * ** Minimal:** Anchovy' s core is around a thousand lines of code and has no
12
+ * ** Minimal:** Anchovy’ s core is around a thousand lines of code and has no
13
13
mandatory dependencies. Plus, Anchovy can be used for real projects with just
14
14
a few pip-installable extras, even if you want to preprocess CSS.
15
15
16
16
* ** Unopinionated:** Anchovy offers a set of components which can be easily
17
- configured to your site' s exact requirements, without tediously ripping out
17
+ configured to your site’ s exact requirements, without tediously ripping out
18
18
or overriding entrenched behaviors. Anchovy does not assume you are building
19
19
a blog or that you wish to design your templates in a specific way. You can
20
- even build things that aren' t websites! Plus, Anchovy operates on files, so
21
- it' s simple to integrate tools like imagemagick, dart-sass, or less.js if you
20
+ even build things that aren’ t websites! Plus, Anchovy operates on files, so
21
+ it’ s simple to integrate tools like imagemagick, dart-sass, or less.js if you
22
22
need them.
23
23
24
24
* ** Complete:** Anchovy comes with a dependency auditing system, allowing you
25
25
to grab any component you want without installing anything but Anchovy and
26
26
find out what you * will* need to run your build. Choose from a wealth of
27
- Steps, Anchovy' s modular file processors, for everything from rendering Jinja
27
+ Steps, Anchovy’ s modular file processors, for everything from rendering Jinja
28
28
templates and minifying CSS to unpacking archives and thumbnailing images.
29
29
Plus, add a few extra parameters or lines of configuration to get automatic
30
30
intelligent minimum builds based on input checksums, and get a reproducible
31
31
run artifact to boot— even if you want to fetch HTTP resources or write your
32
- own Steps.
32
+ own Steps. Iterate quickly by launching a lightweight development-grade web
33
+ server once the build is complete.
33
34
34
35
## Installation
35
36
36
37
Anchovy has no essential prerequisites and can be installed with
37
38
` pip install anchovy ` to get just the framework and a few built-in components,
38
39
but for typical usage ` pip install anchovy[base] ` is recommended. This will
39
- pull in support for Jinja2 templating, markdown, minification, and Anchovy' s
40
+ pull in support for Jinja2 templating, markdown, minification, and Anchovy’ s
40
41
CSS preprocessor. A full list of available extras may be found in the
41
42
[ pyproject.toml] ( ./pyproject.toml ) file.
42
43
@@ -52,6 +53,17 @@ Anchovy operates on config files written in Python, or even modules directly.
52
53
* ` anchovy -m mypackage.anchovyconf -o ../release/ `
53
54
* ` python -m anchovy mysite/anchovy_site.py -- -h `
54
55
56
+ ### Show Me
57
+
58
+ Run ` anchovy examples/code_index.py -s -p 8080 ` , then open a browser to
59
+ localhost:8080 (or click the link in the console). This example offers the most
60
+ extensive demonstration of Anchovy’s functionality as of version 1.0.
61
+
62
+ ### What’s the Baseline?
63
+
64
+ Here’s minimal example performing about what the ` staticjinja ` markdown example
65
+ offers:
66
+
55
67
``` python
56
68
from pathlib import Path
57
69
@@ -96,8 +108,10 @@ RULES = [
96
108
]
97
109
```
98
110
99
- This example is very simple, but is legitimately enough for a small website.
100
- If we stored the configuration in ` config.py ` and added a raw site like this:
111
+ This example is very simple, but it’s legitimately enough to start with for a
112
+ small website, and offers an advantage over other minimal frameworks by putting
113
+ additional batteries within an arm’s reach. If we stored the configuration in
114
+ ` config.py ` and added a raw site like this:
101
115
```
102
116
site/
103
117
static/
0 commit comments