soupault.toml (3367B)
1 [settings] 2 strict = true 3 verbose = false 4 debug = false 5 site_dir = "site" 6 build_dir = "build" 7 caching = true 8 default_template_file = "templates/main.html" 9 plugin_discovery = true 10 plugin_dirs = ["plugins"] 11 page_file_extensions = ["html", "md"] 12 ignore_extensions = ["draft"] 13 pretty_print_html = true 14 clean_urls = true 15 16 # Treat files as content to insert in the template, 17 # unless they have an <html> element in them. 18 generator_mode = true 19 complete_page_selector = "html" 20 21 # The content will be inserted into its <main> element, 22 # after its last already existing child. 23 default_content_selector = "main" 24 default_content_action = "append_child" 25 26 # Set the document type to HTML5, unless the page already has 27 # a doctype declaration. 28 doctype = "<!DOCTYPE html>" 29 keep_doctype = true 30 31 [preprocessors] 32 md = 'pandoc -f commonmark+smart -t html --no-highlight --lua-filter=helpers/cmark-code-blocks.lua' 33 34 [custom_options] 35 site_url = "https://beauhilton.com" 36 37 38 [index] 39 index = true 40 sort_descending = true 41 sort_by = "date" 42 strip_tags = false 43 dump_json = "index.json" 44 section = "posts" 45 date_formats = ["%F"] 46 47 [index.fields.title] 48 selector = ["h1"] 49 50 [index.fields.date] 51 selector = ["time#post-date", "time"] 52 extract_attribute = "datetime" 53 fallback_to_content = true 54 55 [index.fields.excerpt] 56 selector = ["p#post-excerpt", "p"] 57 58 [index.views.posts] 59 index_selector = "#posts-index" 60 sort_by = "date" 61 sort_type = "calendar" 62 63 paginate = true 64 items_per_page = 5 65 66 page_navigation_template = """ 67 <hr> 68 {% if prev_url %} 69 <a href="{{prev_url}}">← newer</a> 70 {% endif %} 71 {# There may not be a next page #} 72 {% if next_url %} 73 <a href="{{next_url}}">older →</a> 74 {% endif %} 75 </div> 76 """ 77 page_navigation_selector = "#page-navigation" 78 79 index_template = """ 80 {% for e in entries %} 81 <h2><a href="{{e.url}}">{{e.title}}</a></h2> 82 <p><strong>Last update:</strong> {{e.date}}.</p> 83 <p>{{e.excerpt}}</p> 84 <a href="{{e.url}}">Read more</a> 85 <hr style="opacity:0.2; margin-top: 3em"> 86 <br> 87 {% endfor %} 88 """ 89 90 91 [widgets.escape-html-in-pre] 92 widget = "escape-html" 93 selector = ".raw-html" 94 95 [widgets.highlight] 96 after = "escape-html-in-pre" 97 widget = "preprocess_element" 98 selector = '*[class^="language-"]' 99 command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed -e "s/language-//")' 100 101 # Add tabindex="0" to code snippets to aid keyboard, screen reader navigation 102 [widgets.set-tab-index-for-code-snippets] 103 widget = "set-tab-index" 104 selectors = ["pre"] 105 tab_index = 0 106 107 [widgets.footnotes] 108 widget = "footnotes" 109 selector = "div#footnotes" 110 footnote_selector = ["fn", ".footnote"] 111 footnote_link_class = "footnote" 112 back_links = true 113 link_id_prepend = "footnote-" 114 back_link_id_append = "-ref" 115 116 [widgets.header] 117 widget = "include" 118 file = "templates/header.html" 119 selector = "head" 120 121 [widgets.nav] 122 widget = "include" 123 file = "templates/nav.html" 124 selector = "nav" 125 126 [widgets.footer] 127 widget = "include" 128 file = "templates/footer.html" 129 selector = "footer" 130 131 [widgets.highlight-active-link] 132 after = ["footer"] 133 widget = "section-link-highlight" 134 selector = "nav" 135 active_link_class = "nav-active" 136 137 [widgets.atom] 138 widget = "atom" 139 page = "posts/index.html" 140 use_section = "posts" 141 142 delete_elements = [".footnote", "a"] 143 144 feed_file = "atom.xml" 145 feed_author = "beau hilton" 146 feed_author_email = "beau@beauhilton.com" 147 feed_title = "beauhilton" 148 feed_subtitle = "beau's website"