Skip to content

Commit

Permalink
✨feat(footer/copyright): replace "$SEPARATOR" to separator
Browse files Browse the repository at this point in the history
Expands on #112
  • Loading branch information
welpo committed Aug 18, 2023
1 parent 12b9184 commit f1edbba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ socials = [

# 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.
# $SEPARATOR will be replaced by the `separator` variable.
# 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."
# copyright = "© $CURRENT_YEAR Your Name $SEPARATOR 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.
Expand Down
4 changes: 2 additions & 2 deletions templates/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
{% 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>
<p>{{ trans(key="copyright", lang=lang) | replace(from="$CURRENT_YEAR", to=current_year) | replace(from="$SEPARATOR", to=separator) | markdown | safe }}</p>
{%- else -%}
<p>{{ config.extra.copyright | replace(from="$CURRENT_YEAR", to=current_year) | markdown | safe }}</p>
<p>{{ config.extra.copyright | replace(from="$CURRENT_YEAR", to=current_year) | replace(from="$SEPARATOR", to=separator) | markdown | safe }}</p>
{%- endif -%}
{%- endif -%}

Expand Down
3 changes: 2 additions & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ socials = [

# 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.
# $SEPARATOR will be replaced by the `separator` variable.
# 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."
# copyright = "© $CURRENT_YEAR Your Name $SEPARATOR 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.
Expand Down

0 comments on commit f1edbba

Please sign in to comment.