aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.toml7
-rw-r--r--templates/base.html7
2 files changed, 11 insertions, 3 deletions
diff --git a/config.toml b/config.toml
index 9b818e0..8dd0442 100644
--- a/config.toml
+++ b/config.toml
@@ -133,11 +133,14 @@ footer_credit = true
textlogo = '<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#f90" viewBox="0 0 96 96" width="32" height="32"><path stroke-width="14" d="M14 99 46 7h4l32 92"/><path stroke-width="9" d="M-3 82c43-26 59-26 102 0"/><path stroke-linecap="round" stroke-width="1.5" d="M94 72v7m-5-9.8v7m-5-9.8v7.1M79 64v7M63 57.7v7m-5-8.2v7m-5-7.8v7m-5-7.2v7m-5-6.7v7m-5-6.3v7m-5-5.8v7M17 64v7m-5-4.6v7m-5-4.2v7M2 72v7"/></svg>bridge'
sitedesc = false # enables or disables the display of the site description below the logo.
-#copyright_start_year = 2019 # optional
-#copyright_end_year = 2020 # optional, recommend leaving unset, zola build will set this to current year by default
headhr = false # show or hide horizontal rule below header
foothr = true # show or hide horizontal rule above footer
+#copyright_start_string = "©"
+#copyright_start_year = 2019 # optional
+#copyright_end_year = "" # optional, recommend leaving unset, zola build will set this to current year by default, can use empty string to omit the year.
+#copyright_entity = "MyName." # optional, if ommited then the config.title is used.
+#copyright_end_string = 'Unless otherwise noted, the content in this website is available under the <a href="http://creativecommons.org/licenses/by-nd/3.0/">CC BY-ND 3.0</a> license.'
###############################################################################
### meta/seo/analytic tags
diff --git a/templates/base.html b/templates/base.html
index e8706a6..b39bbc0 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -120,10 +120,15 @@
{{- social_macros::social_links(config=config) }}
{#- Copyright START #}
+ {%- set copyright_start_string=config.extra.copyright_start_string | default(value="&copy;") %}
+ {%- if copyright_start_string %}{%- set copyright_start_string=copyright_start_string ~ " " %}{%- endif %}
{%- set copyright_start_year=config.extra.copyright_start_year | default(value="") %}
{%- if copyright_start_year %}{%- set copyright_start_year=copyright_start_year ~ "-" %}{%- endif %}
{%- set copyright_end_year=config.extra.copyright_end_year | default(value=now() | date(format="%Y")) %}
- <p{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %}> &copy; {{ copyright_start_year ~ copyright_end_year }} {{ config.title }}</p>
+ {%- if config.extra.copyright_entity %}{%- set copyright_entity= " " ~ config.extra.copyright_entity %}{%- else %}{%- set copyright_entity= " " ~ config.title %}{%- endif %}
+ {%- set copyright_end_string=config.extra.copyright_end_string | default(value="") %}
+ {%- if copyright_end_string %}{%- set copyright_end_string= " " ~ copyright_end_string %}{%- endif %}
+ <p{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %}> {{ copyright_start_string ~ copyright_start_year ~ copyright_end_year ~ copyright_entity ~ copyright_end_string }}</p>
{#- Copyright END #}
{%- if config.extra.menu_footer %}
<nav>