From f89104343c98c977657e84363dc9d770297f6d2f Mon Sep 17 00:00:00 2001 From: creberust Date: Fri, 21 Mar 2025 22:33:17 +0100 Subject: [PATCH] test: theme `terminimal` --- .gitmodules | 3 ++ config.toml | 75 ++++++++++++++++++++++++++++++++++++- content/blog/_index.md | 8 ++-- content/blog/first.md | 6 --- content/blog/hello-world.md | 8 ++++ content/pages/_index.md | 3 ++ content/pages/about.md | 6 +++ templates/base.html | 18 --------- templates/blog-page.html | 9 ----- templates/blog.html | 13 ------- templates/footer.html | 25 ------------- templates/index.html | 8 ---- themes/terminimal | 1 + 13 files changed, 99 insertions(+), 84 deletions(-) create mode 100644 .gitmodules delete mode 100644 content/blog/first.md create mode 100644 content/blog/hello-world.md create mode 100644 content/pages/_index.md create mode 100644 content/pages/about.md delete mode 100644 templates/base.html delete mode 100644 templates/blog-page.html delete mode 100644 templates/blog.html delete mode 100644 templates/footer.html delete mode 100644 templates/index.html create mode 160000 themes/terminimal diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3a07023 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/terminimal"] + path = themes/terminimal + url = https://github.com/pawroman/zola-theme-terminimal.git diff --git a/config.toml b/config.toml index 65bff82..d27fea4 100644 --- a/config.toml +++ b/config.toml @@ -7,16 +7,89 @@ description = "Personal Blog made with love for Rustaceans" author = "Benjamin \"creberust\" Peter" +theme = "terminimal" + +default_language = "en" + # Whether to automatically compile all Sass files in the sass directory compile_sass = true # Whether to build a search index to be used later on by a JavaScript library build_search_index = true +# The theme supports feeds (RSS and ATOM) +generate_feeds = true + +# Use `rss.xml` for RSS feeds and `atom.xml` for ATOM. +feed_filenames = ["rss.xml", "atom.xml"] + +taxonomies = [{ name = "tags" }] + [markdown] # Whether to do syntax highlighting # Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola highlight_code = true [extra] -# Put all your custom variables here + +# One of: blue, green, orange, pink, red. +# Defaults to blue. +# Append -light for light themes, e.g. blue-light +# Or append -auto, e.g. blue-auto +accent_color = "orange" + +# One of: blue, dark, green, orange, pink, red, light, auto +# Enabling dark background will also modify primary font color to be darker. +# Defaults to accent color (or, if not accent color specified, to blue). +background_color = "dark" + + +# The logo text - defaults to "Terminimal theme" +logo_text = "Creberust Blog" + +# Author name: when specified, modifies the default +# copyright text. Apart from author, it will +# contain current year and a link to the theme. +author = "Benjamin \"creberust\" Peter" + + +# Copyright text in HTML format. If specified, +# entirely replaces default copyright and author. +#copyright_html = "My custom copyright" + +# menu is enabled by adding menu_items (optional) +menu_items = [ + # each of these is optional, name and url are required + # $BASE_URL is going to be substituted by base_url from configuration + { name = "blog", url = "$BASE_URL/blog" }, + + # tags should only be enabled if you have "tags" taxonomy + # see documentation below for more details + { name = "tags", url = "$BASE_URL/tags" }, + { name = "archive", url = "$BASE_URL/archive" }, + { name = "about", url = "$BASE_URL/about" }, + + # set newtab to true to make the link open in new tab + { name = "github", url = "https://github.com/creberust", newtab = true }, + { name = "bluesky", url = "https://bsky.app/profile/bpeter98.bsky.social", newtab = true }, +] + +# Whether to show links to earlier and later posts +# on each post page (defaults to true). +enable_post_view_navigation = true + +# The text shown at the bottom of a post, +# before earlier/later post links. +# Defaults to "Thanks for reading! Read other posts?" +post_view_navigation_prompt = "Read more" + +# Optional: Set how elements are rendered. +# Values: +# - "main_only" -- only the main title (`config.title`) is rendered. +# - "page_only" -- only the page title (if defined) is rendered, +# falling back to `config.title` if not defined or empty. +# - "combined" -- combine like so: "page_title | main_title", +# or if page_title is not defined or empty, fall back to `main_title` +# +# Note that the main (index) page only has the main title. +page_titles = "combined" diff --git a/content/blog/_index.md b/content/blog/_index.md index ca5be15..a02a53f 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,6 +1,6 @@ +++ -title = "List of blog posts" +# number of pages to paginate by +paginate_by = 2 +# sorting order for pagination sort_by = "date" -template = "blog.html" -page_template = "blog-page.html" -+++ \ No newline at end of file ++++ diff --git a/content/blog/first.md b/content/blog/first.md deleted file mode 100644 index b7d60a1..0000000 --- a/content/blog/first.md +++ /dev/null @@ -1,6 +0,0 @@ -+++ -title = "My first post" -date = 2024-03-16 -+++ - -This is my first example post. diff --git a/content/blog/hello-world.md b/content/blog/hello-world.md new file mode 100644 index 0000000..f53f0c7 --- /dev/null +++ b/content/blog/hello-world.md @@ -0,0 +1,8 @@ ++++ +title = "Hello World!" +date = 2025-03-21 +[taxonomies] +tags = ["zola", "theme", "blog"] ++++ + +Hello World! diff --git a/content/pages/_index.md b/content/pages/_index.md new file mode 100644 index 0000000..800a244 --- /dev/null +++ b/content/pages/_index.md @@ -0,0 +1,3 @@ ++++ +render = false ++++ diff --git a/content/pages/about.md b/content/pages/about.md new file mode 100644 index 0000000..054e57c --- /dev/null +++ b/content/pages/about.md @@ -0,0 +1,6 @@ ++++ +title = "About Me" +path = "about" ++++ + +Hello, World! diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index 05a4a62..0000000 --- a/templates/base.html +++ /dev/null @@ -1,18 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>Creberust Blog - - - -
-
- {% block content %} {% endblock %} -
-
- {% block footer %} - {% include "footer.html" %} - {% endblock %} - - \ No newline at end of file diff --git a/templates/blog-page.html b/templates/blog-page.html deleted file mode 100644 index 4072083..0000000 --- a/templates/blog-page.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -

- {{ page.title }} -

-

{{ page.date }}

-{{ page.content | safe }} -{% endblock content %} \ No newline at end of file diff --git a/templates/blog.html b/templates/blog.html deleted file mode 100644 index 67bacc9..0000000 --- a/templates/blog.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -

- {{ section.title }} -

- - -{%endblock content %} \ No newline at end of file diff --git a/templates/footer.html b/templates/footer.html deleted file mode 100644 index 21e8450..0000000 --- a/templates/footer.html +++ /dev/null @@ -1,25 +0,0 @@ - \ No newline at end of file diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 178d8e9..0000000 --- a/templates/index.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -

- This is my blog made with Zola. -

-

Click here to see my posts.

-{% endblock content %} diff --git a/themes/terminimal b/themes/terminimal new file mode 160000 index 0000000..7f630a4 --- /dev/null +++ b/themes/terminimal @@ -0,0 +1 @@ +Subproject commit 7f630a4e319c089f27b6704e622b38d874406381