summaryrefslogtreecommitdiff
path: root/soupault.toml
blob: eb15151c3b50fed1d83509eea5eefba682e340e9 (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
[settings]
  verbose = true
  debug = false

  # Where input files (pages and assets) are stored.
  site_dir = "site"
  build_dir = "build"

  # Files with other extensions are considered static assets
  # and copied to build/ unchanged.
  page_file_extensions = ["htm", "html", "md", "rst", "adoc"]

  # Files with these extensions are ignored.
  ignore_extensions = ["draft", "priv"]

  # Treat files as content to insert in the template,
  # unless they have an <html> element in them.
  generator_mode = true
  complete_page_selector = "html"

  # Use templates/main.html file for the page template.
  default_template_file = "templates/main.html"

  # The content will be inserted into its <main> element,
  # after its last already existing child.
  default_content_selector = "main"
  default_content_action = "append_child"

  # Set the document type to HTML5, unless the page already has
  # a doctype declaration.
  doctype = "<!DOCTYPE html>"
  keep_doctype = true

  # Indent HTML tags for readability
  pretty_print_html = true

  # Translate site/about.html to build/about/index.html
  # If set to false, then site/about.html will become build/about.html
  clean_urls = true

  # Look for plugin files in plugins/
  plugin_discovery = true
  plugin_dirs = ["plugins"]


[preprocessors]
  md = 'pandoc -f commonmark+smart -t html'


[widgets.insert-sakura-css]
  widget = 'insert_html'
  selector = 'head'
  html = """ <link rel="stylesheet" href="/sakura.css" type="text/css"> """

[widgets.insert-custom-css]
  widget = 'insert_html'
  selector = 'head'
  html = """ <link rel="stylesheet" href="/style.css" type="text/css"> """

[widgets.highlight]
  # after = 'escape-html-in-pre'
  widget = 'preprocess_element'
  selector = '*[class^="language-"]'
  command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed "s/language-//")'


[index]
  sort_descending = true
  sort_type = 'calendar'
  sort_by = 'upload-date'

  date_formats = ['%F']

[index.fields.title]
  selector = ['h1']

[index.fields.uploaddate]
  selector = ['time#post-upload-date']
  extract_attribute = 'datetime'
  fallback_to_content = true

[index.fields.updatedate]
  selector = ['time#post-update-date']
  extract_attribute = 'datetime'
  fallback_to_content = true

[index.views.blog]
  index_selector = "#blog-index"
  index_item_template = """
    <h2><a href="{{url}}">{{title}}</a></h2>
    <p><strong>Uploaded:</strong> {{uploaddate}}</p>
    <p><strong>Last update:</strong> {{updatedate}}.</p>
  """