commit 6797493ea37a37e928ea6e99d11a357b5d0ea062 Author: John Chesley Date: Sun Sep 7 22:57:11 2025 -0400 set up basic template and content structure diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a48cf0d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +public diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..6841f4d --- /dev/null +++ b/config.toml @@ -0,0 +1,21 @@ +# The URL the site will be built for +base_url = "https://example.com" + +# Whether to automatically compile all Sass files in the sass directory +compile_sass = false + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = true + +taxonomies = [ + { name = "author" }, +] + +[markdown] +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = false + + +[extra] +# Put all your custom variables here diff --git a/content/chapters/01/index.md b/content/chapters/01/index.md new file mode 100644 index 0000000..99a715d --- /dev/null +++ b/content/chapters/01/index.md @@ -0,0 +1,16 @@ ++++ +title = "The firstmost chapter" +date = "2025-09-01" +description = "This is a short chapter about the information in the first chapter." + +[taxonomies] +author = ["Smart person"] + +[extra] +audio = "/path/to/file.mp3" +pdf = "/path/to/file.pdf" ++++ + +# Chapter 1 + +This is the first chapter. diff --git a/content/chapters/02/index.md b/content/chapters/02/index.md new file mode 100644 index 0000000..c949b46 --- /dev/null +++ b/content/chapters/02/index.md @@ -0,0 +1,15 @@ ++++ +title = "The second chapter" +date = "2025-09-01" +description = "Another chapter, neat." + +[taxonomies] +author = ["Another smart person"] + +[extra] +audio = "/path/to/chapter-2.mp3" +pdf = "/path/to/chapter-2.pdf" ++++ + +# Chapter 2 + diff --git a/content/chapters/03/index.md b/content/chapters/03/index.md new file mode 100644 index 0000000..865fa87 --- /dev/null +++ b/content/chapters/03/index.md @@ -0,0 +1,8 @@ ++++ +title = "Chapter 3" +date = "2025-09-07" +description = "More chapters. Three is enough for a basic proof of concept; beginning, middle, and here the end?" + +[extra] +audio = "/path/to/chapter-3.mp3" ++++ diff --git a/content/chapters/_index.md b/content/chapters/_index.md new file mode 100644 index 0000000..6fa15a6 --- /dev/null +++ b/content/chapters/_index.md @@ -0,0 +1,7 @@ ++++ +# Sorting by "slug" boils down to sorting lexicographically by the +# directory name of each chapter. For numberd directories, include +# a leading "0" on # single-digit chapters to ensure chapter 2, 3, 4, etc +# are not sorted _after_ chapter 19, 29, 39, etc. +sort_by = "slug" ++++ diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..6c2a7e0 --- /dev/null +++ b/static/style.css @@ -0,0 +1,10 @@ +nav ul { + list-style: none; + display: flex; + padding: 0; + gap: 1.25rem; +} + +nav ul li { + display: inline-block; +} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..c068265 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,23 @@ + + + {% block title %}Site title{% endblock title %} + + + {% block head %}{% endblock head %} + + +

+ + Site title + +

+ +
+
+ {% block content %} {% endblock content %} +
+
+ + {% block footer %}{% endblock footer %} + + diff --git a/templates/chapter.html b/templates/chapter.html new file mode 100644 index 0000000..73ed87f --- /dev/null +++ b/templates/chapter.html @@ -0,0 +1,23 @@ +
+

+ + {{ page.title }} + +

+

{{ page.description }}

+ + {% if page.extra.audio %} +

Insert audio widget here: {{page.extra.audio}} + {% endif %} + {% if page.extra.pdf %} +

Embed the PDF here: {{ page.extra.pdf }} + {% endif %} +

+ +{% if page.extra.debug %} +
+ debug (`page`) +
{{ page | json_encode(pretty=true) | safe }}
+ +
+{% endif %} diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..4b27095 --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,28 @@ + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..64b1413 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} + +{% block content %} + {% for section in section.subsections %} + + {% set section_data=get_section(path=section) %} + + {# uncomment the next
tag by removing the surrounding tags to + display some debug context #} + + {# +
+ section_data +
{{ section_data | json_encode(pretty=true) | safe }}
+
+ {# #} + + {% for page in section_data.pages %} + {% include "chapter.html" %} +
+ {% endfor %} + + + {% endfor %} +{% endblock %} + +{% block footer %} + {% include "footer.html" %} +{% endblock %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..0f60a25 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}{{ page.title }}{% endblock %} + +{% block content %} + + {% include "chapter.html" %} + +{% endblock %} + +{% block footer %} + {% include "footer.html" %} +{% endblock %} diff --git a/templates/taxonomy_list.html b/templates/taxonomy_list.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html new file mode 100644 index 0000000..e69de29