summaryrefslogtreecommitdiff
path: root/soupault.conf
blob: 4cd2a342fc407d2a97e574994894a07691c17ca3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Configuration file for the soupault static site generator (https://soupault.app)

[settings]
  # Enable build progress (info level) logs
  verbose = true

  # Enable debug level logs
  debug = true

  # Fail on page processing errors
  strict = true

  default_template_file = "templates/main.html"

  # CSS selector of the element inside the template
  # where page content is inserted
  default_content_selector = "div#content"

[preprocessors]
  # Preprocess *.md Markdown pages with cmark (github.com/commonmark/cmark) before parsing.
  # --smart = smart punctuation, --unsafe = don't remove HTML tags
  md = "cmark --smart --unsafe"

[widgets]

# Moves all elements with class="footnote" or tag name <fn> to <div id="footnotes"> 
# and replaces them with numbered links.
[widgets.footnotes]
  widget = "footnotes"
  selector = "div#footnotes"
  footnote_selector = [".footnote", "fn"]
  footnote_link_class = "footnote"
  back_links = true
  link_id_prepend = "footnote-"
  back_link_id_append = "-ref"

# Inserts the banner in main page only
[widgets.insert-banner]
  widget = "include"
  page = "index.html"
  file = "templates/banner.html"
  selector = "main"
  action = "insert_before"

# Inserts a scary warning banner in preview versions
[widgets.insert-staging-warning]
  widget = "include"
  file = "templates/staging-warning.html"
  selector = "header"
  action = "prepend_child"
  profile = "staging"

# Generates a list of available snapshots from S3
[widgets.list-snapshots]
  widget = "exec"
  command = "scripts/list-snapshots.py"
  selector = "div#content"
  action = "append_child"
  
  page = "get/snapshots.md"

## Nightly build image listing generator ##

# Inserts containers for current and equuleus lists
# This is done here rather than inside the page so that
# we can change the branches by editing just the config.
[widgets.insert-nightly-build-containers]
  widget = "insert_html"
  html = """
    <div id="rolling-current">
      <h3>Current/sagitta (future 1.4.0)</h3>
    </div>
    <div id="rolling-equuleus">
      <h3>Equuleus (upcoming 1.3.0)</h3>
    </div>
  """
  selector = "div#content"
  action = "append_child"
  page = "get/nightly-builds.md"

# Generates a list of the "current" branch builds from S3
[widgets.list-nightly-builds-current]
  widget = "exec"
  command = "scripts/list-nightly-builds.py rolling/current"
  selector = "div#rolling-current"
  action = "append_child"

  page = "get/nightly-builds.md"
  after = "insert-nightly-build-containers"

# Generates a list of the "equuleus" branch builds from S3
[widgets.list-nightly-builds-equuleus]
  widget = "exec"
  command = "scripts/list-nightly-builds.py rolling/equuleus"
  selector = "div#rolling-equuleus"
  action = "append_child"

  page = "get/nightly-builds.md"
  after = "insert-nightly-build-containers"