aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-04-08 17:01:55 +0200
committerEddy Pedroni <epedroni@pm.me>2025-04-08 17:02:46 +0200
commit83d175b7b069bc3bbc0d600c2fab4d082e04b521 (patch)
tree9d1b7975ad16f7d5433285d3fab0a7cc38d24564 /test
parent38b40d8c5a8915716b3aa46aac4a0a84d0113b25 (diff)
Python implementation with better multi-entry page support
Diffstat (limited to 'test')
-rw-r--r--test/generation/config.toml10
-rw-r--r--test/generation/template.html18
2 files changed, 14 insertions, 14 deletions
diff --git a/test/generation/config.toml b/test/generation/config.toml
index 1e83ebc..e21890f 100644
--- a/test/generation/config.toml
+++ b/test/generation/config.toml
@@ -1,14 +1,14 @@
# This is where the logbook entries are actually stored
-docsRoot = "/tmp/godocs-test/content"
+docs_root = "/tmp/godocs-test/content"
# All pages are generated from this template
-templateFile = "/tmp/godocs-test/generation/template.html"
+template_file = "/tmp/godocs-test/generation/template.html"
# This is the location where the final product is located (the directory specified here is deleted and re-created with the new files)
-targetDir = "/tmp/godocs-test/output"
+output_dir = "/tmp/godocs-test/output"
# This CSS file is copied to the root of the generated site
-cssFile = "/tmp/godocs-test/generation/style.css"
+css_file = "/tmp/godocs-test/generation/style.css"
# This is the base URL for all generated links
-baseUrl = "file:///tmp/godocs-test/output"
+base_url = "file:///tmp/godocs-test/output"
diff --git a/test/generation/template.html b/test/generation/template.html
index 1e56d6f..c211cd8 100644
--- a/test/generation/template.html
+++ b/test/generation/template.html
@@ -1,28 +1,28 @@
<!DOCTYPE html>
<html>
<head>
- <title>{{.SiteTitle}} - Docs</title>
- <link rel="stylesheet" href="{{.StylesheetUrl}}" />
+ <title>{{site_title}} - Docs</title>
+ <link rel="stylesheet" href="{{stylesheet_url}}" />
<meta charset="UTF-8">
<meta name="author" content="Eduardo Pedroni">
</head>
<body>
- <header>{{.SiteTitle}}</header>
+ <header>{{site_title}}</header>
<nav>
<ul>
- {{range .Nav}}
+ {% for item in navigation %}
<li>
- <a href="{{.AbsoluteUrl}}">{{.Text}}</a>
+ <a href="{{item.url}}">{{item.text}}</a>
</li>
- {{end}}
+ {% endfor %}
</ul>
</nav>
<main>
- {{range .Content}}
+ {% for entry in entries %}
<article>
- {{.}}
+ {% markdown %}{{ entry }}{% endmarkdown %}
</article>
- {{end}}
+ {% endfor %}
</main>
</body>
</html>