Merge pull request #21 from awinterstein/customizable-footer

This commit is contained in:
Thomas Chartron 2024-08-03 10:24:00 +02:00 committed by GitHub
commit 41743111b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -116,6 +116,17 @@ highlight_themes_css = [
] ]
``` ```
## Custom Footer Content
To overwrite the default footer (copyright notice), extend the `layout.html` template of the theme as described in the [Zola documentation](https://www.getzola.org/documentation/themes/extending-a-theme/#overriding-a-block) by creating a `layout.html` with the following content in your `templates` directory:
```jinja
{% extends "blow/templates/layout.html" %}
{% block content_footer %}
Here is my own footer with a <a href="http://example.com">link</a>.
{% endblock %}
```
## Features ## Features
- [X] Dark/Light modes (with syntax highlighting depending on selected theme) - [X] Dark/Light modes (with syntax highlighting depending on selected theme)
- [X] Customizable navbar links - [X] Customizable navbar links

View file

@ -297,7 +297,9 @@
<div class="mt-16 border-t-2 border-gray-300 flex flex-col items-center"> <div class="mt-16 border-t-2 border-gray-300 flex flex-col items-center">
<div class="sm:w-2/3 text-center py-6"> <div class="sm:w-2/3 text-center py-6">
<p class="text-sm text-black dark:text-white font-bold mb-2"> <p class="text-sm text-black dark:text-white font-bold mb-2">
{% block content_footer %}
© {{ now() | date(format="%Y") }} <a href="https://www.getzola.org/themes/blow/">blow</a> theme made with <a href="https://tailwindcss.com/" target="_blank">tailwindcss</a> for <a href="https://www.getzola.org/" target="_blank">Zola</a> © {{ now() | date(format="%Y") }} <a href="https://www.getzola.org/themes/blow/">blow</a> theme made with <a href="https://tailwindcss.com/" target="_blank">tailwindcss</a> for <a href="https://www.getzola.org/" target="_blank">Zola</a>
{% endblock %}
</p> </p>
</div> </div>
</div> </div>