✨ feat(footer): add configurable copyright notice (#112)
This commit is contained in:
parent
1601fbf30c
commit
5ae21b5335
@ -230,6 +230,15 @@ socials = [
|
|||||||
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
|
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Enable a copyright notice for the footer, shown between socials and the "Powered by" text.
|
||||||
|
# You can use $CURRENT_YEAR to automatically insert the current year.
|
||||||
|
# Markdown is supported (links, emphasis, etc).
|
||||||
|
# copyright = "© $CURRENT_YEAR Your Name • Unless otherwise noted, the content in this website is available under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license."
|
||||||
|
|
||||||
|
# For multi-language sites, you can set a different copyright for each language.
|
||||||
|
# If this is set to true, ensure you have a `copyright` translation for each language.
|
||||||
|
translate_copyright = false
|
||||||
|
|
||||||
# Custom security headers. What urls should your website be able to connect to?
|
# Custom security headers. What urls should your website be able to connect to?
|
||||||
# You need to specify the CSP and the URLs associated with the directive.
|
# You need to specify the CSP and the URLs associated with the directive.
|
||||||
# Useful if you want to load remote content safely (embed YouTube videos, which needs frame-src, for example).
|
# Useful if you want to load remote content safely (embed YouTube videos, which needs frame-src, for example).
|
||||||
|
@ -72,4 +72,9 @@ footer nav {
|
|||||||
.credits {
|
.credits {
|
||||||
font-size: 0.88rem;
|
font-size: 0.88rem;
|
||||||
color: var(--meta-color);
|
color: var(--meta-color);
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,17 +50,25 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
<div class="credits">
|
<div class="credits">
|
||||||
{# Shows "Powered by Zola & tabi" #}
|
|
||||||
{# Shows link to remote repository if repository is set and `show_remote_source` is not false #}
|
|
||||||
{% set show_source = config.extra.show_remote_source | default(value=true) %}
|
|
||||||
<small>
|
<small>
|
||||||
|
{# Shows optional Copyright notice #}
|
||||||
|
{%- if config.extra.copyright -%}
|
||||||
|
{% set current_year = now() | date(format="%Y") %}
|
||||||
|
{# Translate the copyright if set in the config #}
|
||||||
|
{%- if config.extra.translate_copyright and lang != config.default_language -%}
|
||||||
|
<p>{{ trans(key="copyright", lang=lang) | replace(from="$CURRENT_YEAR", to=current_year) | markdown | safe }}</p>
|
||||||
|
{%- else -%}
|
||||||
|
<p>{{ config.extra.copyright | replace(from="$CURRENT_YEAR", to=current_year) | markdown | safe }}</p>
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
|
||||||
|
{# Shows "Powered by Zola & tabi" notice #}
|
||||||
{%- if lang != config.default_language -%}
|
{%- if lang != config.default_language -%}
|
||||||
{{ trans(key="powered_by" | safe, lang=lang) }}
|
{{ trans(key="powered_by" | safe, lang=lang) }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Powered by
|
Powered by
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<a href="https://www.getzola.org" target="_blank">Zola</a>
|
<a href="https://www.getzola.org" target="_blank">Zola</a>
|
||||||
|
|
||||||
{%- if lang != config.default_language -%}
|
{%- if lang != config.default_language -%}
|
||||||
{{ trans(key="and" | safe, lang=lang) }}
|
{{ trans(key="and" | safe, lang=lang) }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
@ -68,6 +76,8 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<a href="https://github.com/welpo/tabi" target="_blank">tabi</a>
|
<a href="https://github.com/welpo/tabi" target="_blank">tabi</a>
|
||||||
|
|
||||||
|
{# Shows link to remote repository if repository is set and `show_remote_source` is not false #}
|
||||||
|
{% set show_source = config.extra.show_remote_source | default(value=true) %}
|
||||||
{%- if config.extra.remote_repository_url and show_source -%}
|
{%- if config.extra.remote_repository_url and show_source -%}
|
||||||
{{ separator }}
|
{{ separator }}
|
||||||
<a href="{{ config.extra.remote_repository_url }}" target="_blank">
|
<a href="{{ config.extra.remote_repository_url }}" target="_blank">
|
||||||
|
34
theme.toml
34
theme.toml
@ -19,23 +19,24 @@ homepage = "https://osc.garden"
|
|||||||
# be merged with user data, some kind of prefix or nesting is preferable
|
# be merged with user data, some kind of prefix or nesting is preferable
|
||||||
# Use snake_casing to be consistent with the rest of Zola
|
# Use snake_casing to be consistent with the rest of Zola
|
||||||
[extra]
|
[extra]
|
||||||
# Languages of your site.
|
|
||||||
# You'll need to add the language translations for each non-English language.
|
|
||||||
# See the config.toml file for an example.
|
|
||||||
language_name.ca = "Català"
|
language_name.ca = "Català"
|
||||||
language_name.en = "English"
|
language_name.en = "English"
|
||||||
language_name.es = "Español"
|
language_name.es = "Español"
|
||||||
|
|
||||||
# Remote repository for your Zola site.
|
# Remote repository for your Zola site.
|
||||||
# Only used to link to the commit history of updated posts, right next to the updated date.
|
# Used for `show_remote_changes` and `show_remote_source` (see below).
|
||||||
# Supports GitHub, GitLab, Gitea, and Codeberg.
|
# Supports GitHub, GitLab, Gitea, and Codeberg.
|
||||||
remote_repository_url = "https://github.com/welpo/tabi"
|
remote_repository_url = "https://github.com/welpo/tabi"
|
||||||
# Set this to "auto" to try and auto-detect the platform based on the repository URL.
|
# Set this to "auto" to try and auto-detect the platform based on the repository URL.
|
||||||
# Accepted values are "github", "gitlab", "gitea", and "codeberg".
|
# Accepted values are "github", "gitlab", "gitea", and "codeberg".
|
||||||
# Defaults to "auto".
|
remote_repository_git_platform = "auto" # Defaults to "auto".
|
||||||
remote_repository_git_platform = "auto"
|
# Branch in the repo hosting the Zola site.
|
||||||
# Branch in the repo hosting the Zola site. Defaults to "main".
|
remote_repository_branch = "main" # Defaults to "main".
|
||||||
remote_repository_branch = "main"
|
# Show a link to the commit history of updated posts, right next to the last updated date.
|
||||||
|
show_remote_changes = true # Defaults to true.
|
||||||
|
# Show a link to the repository of the site, right next to the "Powered by Zola & tabi" text.
|
||||||
|
show_remote_source = true # Defaults to true.
|
||||||
|
|
||||||
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
|
# Enable JavaScript theme toggler to allow users to switch between dark/light mode.
|
||||||
# Also enables automatic switching based on user's OS-level theme settings.
|
# Also enables automatic switching based on user's OS-level theme settings.
|
||||||
@ -97,6 +98,14 @@ menu = [
|
|||||||
# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true.
|
# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true.
|
||||||
feed_icon = true
|
feed_icon = true
|
||||||
|
|
||||||
|
# Email address for footer's social section.
|
||||||
|
# Protect against spambots:
|
||||||
|
# 1. Use base64 for email (convert at https://www.base64encode.org/ or `printf 'your@email.com' | base64`).
|
||||||
|
# 2. Or, set 'encode_plaintext_email' to true for auto-encoding (only protects on site, not in public repos).
|
||||||
|
email = "bWFpbEBleGFtcGxlLmNvbQ==" # base64 encoded version of "mail@example.com"
|
||||||
|
# Decoding requires ~400 bytes of JavaScript. If JS is disabled, the email won't be displayed.
|
||||||
|
encode_plaintext_email = true # Setting is ignored if email is already encoded.
|
||||||
|
|
||||||
# The icons available can be found in "social_icons" in the "static" folder.
|
# The icons available can be found in "social_icons" in the "static" folder.
|
||||||
socials = [
|
socials = [
|
||||||
{ name = "github", url = "https://github.com/welpo/", icon = "github" },
|
{ name = "github", url = "https://github.com/welpo/", icon = "github" },
|
||||||
@ -106,6 +115,15 @@ socials = [
|
|||||||
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
|
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Enable a copyright notice for the footer, shown between socials and the "Powered by" text.
|
||||||
|
# You can use $CURRENT_YEAR to automatically insert the current year.
|
||||||
|
# Markdown is supported (links, emphasis, etc).
|
||||||
|
# copyright = "© $CURRENT_YEAR Your Name • Unless otherwise noted, the content in this website is available under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license."
|
||||||
|
|
||||||
|
# For multi-language sites, you can set a different copyright for each language.
|
||||||
|
# If this is set to true, ensure you have a `copyright` translation for each language.
|
||||||
|
translate_copyright = false
|
||||||
|
|
||||||
# Custom security headers. What urls should your website be able to connect to?
|
# Custom security headers. What urls should your website be able to connect to?
|
||||||
# You need to specify the CSP and the URLs associated with the directive.
|
# You need to specify the CSP and the URLs associated with the directive.
|
||||||
# Useful if you want to load remote content safely (embed YouTube videos, which needs frame-src, for example).
|
# Useful if you want to load remote content safely (embed YouTube videos, which needs frame-src, for example).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user