set up basic template and content structure
This commit is contained in:
commit
6797493ea3
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
public
|
||||||
21
config.toml
Normal file
21
config.toml
Normal file
@ -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
|
||||||
16
content/chapters/01/index.md
Normal file
16
content/chapters/01/index.md
Normal file
@ -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.
|
||||||
15
content/chapters/02/index.md
Normal file
15
content/chapters/02/index.md
Normal file
@ -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
|
||||||
|
|
||||||
8
content/chapters/03/index.md
Normal file
8
content/chapters/03/index.md
Normal file
@ -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"
|
||||||
|
+++
|
||||||
7
content/chapters/_index.md
Normal file
7
content/chapters/_index.md
Normal file
@ -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"
|
||||||
|
+++
|
||||||
10
static/style.css
Normal file
10
static/style.css
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
nav ul {
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
padding: 0;
|
||||||
|
gap: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
23
templates/base.html
Normal file
23
templates/base.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>{% block title %}Site title{% endblock title %}</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/style.css" >
|
||||||
|
{% block head %}{% endblock head %}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
<a href="/">
|
||||||
|
Site title
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<section class="section">
|
||||||
|
<div class="container">
|
||||||
|
{% block content %} {% endblock content %}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% block footer %}{% endblock footer %}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
23
templates/chapter.html
Normal file
23
templates/chapter.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<article class="chapter">
|
||||||
|
<h2>
|
||||||
|
<a href="{{ page.path }}">
|
||||||
|
{{ page.title }}
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<p>{{ page.description }}</p>
|
||||||
|
|
||||||
|
{% if page.extra.audio %}
|
||||||
|
<p>Insert audio widget here: {{page.extra.audio}}
|
||||||
|
{% endif %}
|
||||||
|
{% if page.extra.pdf %}
|
||||||
|
<p>Embed the PDF here: {{ page.extra.pdf }}
|
||||||
|
{% endif %}
|
||||||
|
</article>
|
||||||
|
|
||||||
|
{% if page.extra.debug %}
|
||||||
|
<details>
|
||||||
|
<summary>debug (`page`)</summary>
|
||||||
|
<pre>{{ page | json_encode(pretty=true) | safe }}</pre>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
{% endif %}
|
||||||
28
templates/footer.html
Normal file
28
templates/footer.html
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#todo">
|
||||||
|
Random chapter
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% if page.lower %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ page.lower.path }}">
|
||||||
|
Previous chapter
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if page.higher %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ page.higher.path }}">
|
||||||
|
Next chapter
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
29
templates/index.html
Normal file
29
templates/index.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% for section in section.subsections %}
|
||||||
|
|
||||||
|
{% set section_data=get_section(path=section) %}
|
||||||
|
|
||||||
|
{# uncomment the next <details> tag by removing the surrounding tags to
|
||||||
|
display some debug context #}
|
||||||
|
|
||||||
|
{#
|
||||||
|
<details>
|
||||||
|
<summary>section_data</summary>
|
||||||
|
<pre>{{ section_data | json_encode(pretty=true) | safe }}</pre>
|
||||||
|
</details>
|
||||||
|
{# #}
|
||||||
|
|
||||||
|
{% for page in section_data.pages %}
|
||||||
|
{% include "chapter.html" %}
|
||||||
|
<hr />
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block footer %}
|
||||||
|
{% include "footer.html" %}
|
||||||
|
{% endblock %}
|
||||||
13
templates/page.html
Normal file
13
templates/page.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ page.title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
{% include "chapter.html" %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block footer %}
|
||||||
|
{% include "footer.html" %}
|
||||||
|
{% endblock %}
|
||||||
0
templates/taxonomy_list.html
Normal file
0
templates/taxonomy_list.html
Normal file
0
templates/taxonomy_single.html
Normal file
0
templates/taxonomy_single.html
Normal file
Loading…
Reference in New Issue
Block a user