commit 695ade091e761ee67103490cfa6f3da7be2725c2
parent f8357179625be7d6c8c286284fd15178c4637075
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 11 Apr 2023 23:01:48 +0200
Add test page
Diffstat:
8 files changed, 90 insertions(+), 0 deletions(-)
diff --git a/test_page/config.toml b/test_page/config.toml
@@ -0,0 +1,16 @@
+# 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 = false
+
+[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/test_page/content/blog/_index.md b/test_page/content/blog/_index.md
@@ -0,0 +1,6 @@
++++
+title = "List of blog posts"
+sort_by = "date"
+template = "blog.html"
+page_template = "blog-page.html"
++++
+\ No newline at end of file
diff --git a/test_page/content/blog/first.md b/test_page/content/blog/first.md
@@ -0,0 +1,8 @@
++++
+title = "My first post"
+date = 2019-11-27
++++
+
+This is my first blog post.
+
+This has a [broken internal link](@/blog/third.md) though
diff --git a/test_page/content/blog/second.md b/test_page/content/blog/second.md
@@ -0,0 +1,8 @@
++++
+title = "My second post"
+date = 2020-11-27
++++
+
+This is my second post after [first post](@/blog/first.md).
+
+This has a [broken external link](https://github.com/blog/11111) though
diff --git a/test_page/templates/base.html b/test_page/templates/base.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <meta charset="utf-8">
+ <title>MyBlog</title>
+</head>
+
+<body>
+ <section class="section">
+ <div class="container">
+ {% block content %} {% endblock %}
+ </div>
+ </section>
+</body>
+
+</html>
+\ No newline at end of file
diff --git a/test_page/templates/blog-page.html b/test_page/templates/blog-page.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1 class="title">
+ {{ page.title }}
+</h1>
+<p class="subtitle"><strong>{{ page.date }}</strong></p>
+{{ page.content | safe }}
+{% endblock content %}
+\ No newline at end of file
diff --git a/test_page/templates/blog.html b/test_page/templates/blog.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1 class="title">
+ {{ section.title }}
+</h1>
+<ul>
+ <!-- If you are using pagination, section.pages will be empty. You need to use the paginator object -->
+ {% for page in section.pages %}
+ <li><a href="{{ page.permalink | safe }}">{{ page.title }}</a></li>
+ {% endfor %}
+</ul>
+{% endblock content %}
+\ No newline at end of file
diff --git a/test_page/templates/index.html b/test_page/templates/index.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+
+{% block content %}
+<h1 class="title">
+ This is my blog made with Zola.
+</h1>
+<p>Click <a href="{{ get_url(path='@/blog/_index.md') }}">here</a> to see my posts.</p>
+{% endblock content %}
+\ No newline at end of file