From 4a2275dfe6c7756c865991f3669ab32cb0bcafe9 Mon Sep 17 00:00:00 2001 From: jultty Date: Sat, 16 Nov 2024 15:32:14 -0300 Subject: [PATCH] Extract footer to a 'content' template --- content/posts/_index.md | 2 +- content/posts/_index.pt.md | 2 +- templates/content.html | 24 ++++++++++++++++++++++++ templates/link-page.html | 2 +- templates/post-page.html | 24 ------------------------ 5 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 templates/content.html delete mode 100644 templates/post-page.html diff --git a/content/posts/_index.md b/content/posts/_index.md index cfa53d1..17af5f4 100644 --- a/content/posts/_index.md +++ b/content/posts/_index.md @@ -2,6 +2,6 @@ title = "Posts" sort_by = "date" template = "posts.html" -page_template = "post-page.html" +page_template = "content.html" generate_feeds = true +++ diff --git a/content/posts/_index.pt.md b/content/posts/_index.pt.md index cfa53d1..17af5f4 100644 --- a/content/posts/_index.pt.md +++ b/content/posts/_index.pt.md @@ -2,6 +2,6 @@ title = "Posts" sort_by = "date" template = "posts.html" -page_template = "post-page.html" +page_template = "content.html" generate_feeds = true +++ diff --git a/templates/content.html b/templates/content.html new file mode 100644 index 0000000..26327f1 --- /dev/null +++ b/templates/content.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block content %} +
+

{{ page.title }}

+ + {{ page.content | safe }} +
+{%- endblock content -%} + +{%- block footer %} +
+ +{% endblock footer -%} diff --git a/templates/link-page.html b/templates/link-page.html index ac32f28..ab94876 100644 --- a/templates/link-page.html +++ b/templates/link-page.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "content.html" %} {%- block content %}

{{ page.title }}

diff --git a/templates/post-page.html b/templates/post-page.html deleted file mode 100644 index 1f66da9..0000000 --- a/templates/post-page.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -
-

{{ page.title }}

- - {{ page.content | safe }} -
-{%- endblock content -%} - -{%- block footer %} -
- -{% endblock footer %}