From 75c413f5cf5cd1a7143a2a8dceff59b8b8ad3504 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Thu, 13 Jan 2022 10:23:18 -0300 Subject: [PATCH] Fixed a bunch of things on Hyde, by extending inside the blog itself --- config.toml | 6 +++ templates/index.html | 93 +++++++++++++++++++++++++++++++++++++++++++ templates/macros.html | 7 ++++ templates/page.html | 13 ++++++ 4 files changed, 119 insertions(+) create mode 100644 templates/index.html create mode 100644 templates/macros.html create mode 100644 templates/page.html diff --git a/config.toml b/config.toml index cde2ac8..1ba30a3 100644 --- a/config.toml +++ b/config.toml @@ -49,5 +49,11 @@ menu_items = [ {url = "$BASE_URL/quotes", name = "Quotes"}, {url = "$BASE_URL/research", name = "Research Notes"}, ] +hyde_links = [ + {url = "$BASE_URL", name = "English"}, + {url = "$BASE_URL/pt", name = "Português"}, + {url = "$BASE_URL/tags", name = "Tags (EN)"}, + {url = "$BASE_URL/pt/tags", name = "Tags (PT)"}, +] after_dark_title = "JulioBiason.Net 4.1" enable_post_view_navigation = false diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e109c17 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,93 @@ +{% import "macros.html" as macros -%} + + + + + + + + + + + + {% block title %}{{ config.title }}{% endblock title %} + + + + + + + + {% if config.generate_feed %} + + {% endif %} + + {% block extra_head %} + {% endblock extra_head %} + + + + {% block sidebar %} + + {% endblock sidebar %} + +
+ {% block content %} +
+ {%- if paginator %} + {%- set show_pages = paginator.pages -%} + {% else %} + {%- set show_pages = section.pages -%} + {% endif -%} + + {% for page in show_pages %} +
+

+ + {{ page.title }} + +

+ + + + {%- if page.summary %} +
+ {{ page.summary | safe }} +
+ + Read more... + + {% endif -%} +
+ {% endfor %} +
+ {% endblock content %} +
+ + + + diff --git a/templates/macros.html b/templates/macros.html new file mode 100644 index 0000000..e8398c0 --- /dev/null +++ b/templates/macros.html @@ -0,0 +1,7 @@ +{% macro tags(page) %} + {%- if page.taxonomies and page.taxonomies.tags %} + {%- for tag in page.taxonomies.tags %} + #{{ tag }} + {% endfor -%} + {% endif -%} +{% endmacro tags %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..ec0d9c5 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,13 @@ +{% extends "index.html" %} + +{% block content %} +
+

{{ page.title }}

+ + {{ page.content | safe }} +
+{% endblock content %} +