feat: support markdown for copyright text (#25)

* feat: support markdown for copyright text

* docs: add info about supporting markdown in copyright
This commit is contained in:
Xin 2023-09-01 17:38:49 -04:00 committed by GitHub
parent 34c6f6c7f3
commit 5b71912ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -129,8 +129,11 @@ params:
### Copyright ### 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"} ```yaml {filename="i18n/en.yaml"}
copyright: "© 2023 YOUR TEXT HERE" 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.

View File

@ -16,7 +16,7 @@
> >
<div class="flex w-full flex-col items-center sm:items-start"> <div class="flex w-full flex-col items-center sm:items-start">
{{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="font-semibold">{{ template "theme-credit" . }}</div>{{ end }} {{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="font-semibold">{{ template "theme-credit" . }}</div>{{ end }}
{{- if .Site.Params.footer.displayCopyright }}<p class="mt-6 text-xs">{{ $copyright }}</p>{{ end }} {{- if .Site.Params.footer.displayCopyright }}<p class="mt-6 text-xs">{{ $copyright | markdownify }}</p>{{ end }}
</div> </div>
</div> </div>
</footer> </footer>