From 5b71912ab2b67e8484d54f6254a9e3d54e2d0a7b Mon Sep 17 00:00:00 2001 From: Xin Date: Fri, 1 Sep 2023 17:38:49 -0400 Subject: [PATCH] feat: support markdown for copyright text (#25) * feat: support markdown for copyright text * docs: add info about supporting markdown in copyright --- exampleSite/content/docs/guide/configuration.md | 5 ++++- layouts/partials/footer.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/docs/guide/configuration.md b/exampleSite/content/docs/guide/configuration.md index ff120ae..1d10f70 100644 --- a/exampleSite/content/docs/guide/configuration.md +++ b/exampleSite/content/docs/guide/configuration.md @@ -129,8 +129,11 @@ params: ### Copyright -To edit the copyright text, create file `en.yaml` in the `i18n/` directory with content: +To modify the copyright text displayed in your website's footer, you'll need to create a file named `i18n/en.yaml`. +In this file, specify your new copyright text as shown below: ```yaml {filename="i18n/en.yaml"} copyright: "© 2023 YOUR TEXT HERE" ``` + +For your reference, an example [`i18n/en.yaml`](https://github.com/imfing/hextra/blob/main/i18n/en.yaml) file can be found in the GitHub repository. Additionally, you could use Markdown format in the copyright text. diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index c81b7d4..5f4fd11 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -16,7 +16,7 @@ >
{{- if (.Site.Params.footer.displayPoweredBy | default true) }}
{{ template "theme-credit" . }}
{{ end }} - {{- if .Site.Params.footer.displayCopyright }}

{{ $copyright }}

{{ end }} + {{- if .Site.Params.footer.displayCopyright }}

{{ $copyright | markdownify }}

{{ end }}