You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert

6
6
7
-
Soupault is an HTML manipulation tool. It can be:
8
-
9
-
* a static site generator,
10
-
* an HTML processor,
11
-
* a metadata extractor,
12
-
13
-
or all of the above.
7
+
Soupault is an HTML manipulation tool. It can be a static site generator
8
+
or an HTML (post-)processor for existing websites and allows you to define
14
9
15
10
Soupault works with the HTML element tree of the page, so it can do many things that traditionally could be done with client-side JS:
16
-
inject new HTML into existing complete pages, create a table of contents that preserves the `id` elements of HTML headings and more.
11
+
inject new HTML into existing complete pages, create a table of contents that respects and uses `id`'s of HTML headings and more.
12
+
13
+
It also doesn't use front matter but extracts metadata from HTML instead: you tell it what to extract using CSS3 selectors,
14
+
so even hand-written static pages can be indexed rather than treated as opaque assets.
17
15
18
-
It also doesn't use front matter and extracts metadata from HTML instead, using a CSS3 selector to metadata field mapping,
19
-
so even hand-written static pages can be indexed rather than treated as assets. For example:
16
+
For example, here's what a content model for a blog may look like:
20
17
21
18
```toml
19
+
# Post title
22
20
[index.fields.title]
23
-
# Try to find <h1 id="post-title"> if it exists,
21
+
# Try to find <h1 id="post-title">,
24
22
# else use the first <h1>
25
23
selector = ["h1#post-title", "h1"]
26
24
25
+
# Fail the build if post title cannot be found
26
+
required = true
27
+
28
+
# Post excerpt
27
29
[index.fields.excerpt]
30
+
# Use <p id="post-excerpt"> if a page has it,
31
+
# else use the first paragraph.
32
+
# This allows using a paragraph other than the first one
33
+
# as the post excerpt.
28
34
selector = ["p#post-excerpt", "p"]
29
35
36
+
# Post date
30
37
[index.fields.date]
31
38
selector = ["time#post-date", "time"]
39
+
40
+
# Extract the datetime="" attribute from the <time> element,
41
+
# if it's set.
32
42
extract_attribute = "datetime"
43
+
44
+
# If there's no datetime attribute in <time>,
45
+
# then use that element's content
33
46
fallback_to_content = true
34
47
```
35
48
@@ -50,22 +63,33 @@ Extracted metadata can then be rendered and injected into pages:
50
63
Soupault is...
51
64
52
65
* Durable and easy to upgrade or roll back: it's available as a statically-linked binary with no dependencies.
53
-
* Extensible: you can bring your own [page preprocessors](https://soupault.app/reference-manual/#page-preprocessors) (e.g. Markdown to HTML convertors), pipe HTML elements through [external programs](https://soupault.app/reference-manual/#preprocess-element-widget), and load [Lua plugins](https://soupault.app/plugins/).
54
-
* Flexible: most options are configurable, most built-in features can be reimplemented as Lua plugins, and there are [page processing hooks](https://soupault.app/reference-manual/#page-processing-hooks).
55
-
56
-
Soupault is named after the French dadaist and surrealist writer [Philippe Soupault](https://en.wikipedia.org/wiki/Philippe_Soupault)
57
-
because it's based on the [lambdasoup](http://aantron.github.io/lambdasoup/) library.
66
+
* Extensible: you can bring your own [page preprocessors](https://soupault.app/reference-manual/#page-preprocessors)
67
+
(e.g., Markdown to HTML convertors), define [asset processors](https://soupault.app/reference-manual/#asset-processing)
68
+
(e.g., a Sass/Less compiler, an image optimizer),
69
+
pipe HTML elements through [external programs](https://soupault.app/reference-manual/#preprocess-element-widget),
70
+
and load [Lua plugins](https://soupault.app/plugins/).
71
+
* Flexible: most options are configurable, most built-in features can be reimplemented as Lua plugins,
72
+
and there are [page processing hooks](https://soupault.app/reference-manual/#page-processing-hooks).
73
+
74
+
Soupault is named after [Philippe Soupault](https://en.wikipedia.org/wiki/Philippe_Soupault),
75
+
a French dadaist and surrealist writer and poet,
76
+
because it uses [lambdasoup](http://aantron.github.io/lambdasoup/) library to work with tag soups.
58
77
59
78
Visit [soupault.app](https://www.soupault.app) for details.
60
79
61
80
For support and discussion, write a message to the [mailing list](https://lists.sr.ht/~dmbaturin/soupault).
62
81
63
82
# Installation
64
83
65
-
Pre-built binaries are available for Linux, Windows, and macOS. You can download them from https://files.baturin.org/software/soupault
66
-
and from Github releases (https://github.com/PataphysicalSociety/soupault/releases).
84
+
Prebuilt binaries are available for Linux (x86-64 and Aarch64), Windows, and macOS (x86-64).
85
+
You can download them from https://files.baturin.org/software/soupault
86
+
and from GitHub releases (https://github.com/PataphysicalSociety/soupault/releases).
87
+
88
+
You can verify release archive integrity using this minisign key:
67
89
68
-
You can verify release archive integrity using this signify/minisign key: `RWRfW+gkhk/+iA7dOUtTio6G6KeJCiAEp4Zfozw7eqv2shN90+5z20Cy`.
0 commit comments