From b53294f7fb8afbb9565dcd46f2985257c8075e5c Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 18 Jul 2023 09:24:20 -0700 Subject: Additional Copyright Configuration --- config.toml | 7 +++++-- templates/base.html | 7 ++++++- 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 = '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 CC BY-ND 3.0 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="©") %} + {%- 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")) %} -
+ {%- 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 %} + {#- Copyright END #} {%- if config.extra.menu_footer %}