added feature license in footer

This commit is contained in:
Stephan Hadan 2025-04-21 15:53:01 +02:00
parent 780ad7617b
commit d2e2e6bb89
Signed by: stephan.hadan
GPG key ID: B2F9DCEB3DA700D5
3 changed files with 18 additions and 2 deletions

View file

@ -1,3 +1,8 @@
## [v1.4](https://git.hadan-it.com/stiebke/hugo-internet-weblog/releases/tag/v1.4) - 2025-04-21
* ENHANCEMENTS
* Add optional license text and AI opt-out-text to footer (#40)
## [v1.3.3](https://git.hadan-it.com/stiebke/hugo-internet-weblog/releases/tag/v1.3.3) - 2025-03-03 ## [v1.3.3](https://git.hadan-it.com/stiebke/hugo-internet-weblog/releases/tag/v1.3.3) - 2025-03-03
* ENHANCEMENTS * ENHANCEMENTS

View file

@ -173,6 +173,10 @@ If you want to enable a dark appearance, there is limited support for that. Curr
| `[params]`- `statuspageenabled` | `true` or `false` | No. If true an all parameters are set a link to your status page is shown in the page_footer. | | `[params]`- `statuspageenabled` | `true` or `false` | No. If true an all parameters are set a link to your status page is shown in the page_footer. |
| `[params]`- `statuspage` | `Your Statuspage-URL`| No. i.e. `https://status.example.com`. | | `[params]`- `statuspage` | `Your Statuspage-URL`| No. i.e. `https://status.example.com`. |
| `[params]`- `statuspagename` | `Name your Statuspage` | No. Set a specific name for your statuspage in de page_footer. | | `[params]`- `statuspagename` | `Name your Statuspage` | No. Set a specific name for your statuspage in de page_footer. |
| `[params]`- `showlicense` | `true` or `false` | No. Show license in footer. |
| `[params]`- `license` | `Name your license` | No. i.e. `CC BY NC SA 4.0` |
| `[params]`- `licensepage` | `Your license-url` | No. i.e. `https://example.com/license` |
| `[params]`- `tdmurl` | `Your AI/ML-Opt-Out-URL` | No. i.e. `https://example.com/imprint/` |
Here is an example `hugo.toml`: Here is an example `hugo.toml`:
@ -203,6 +207,10 @@ SectionPagesMenu = "main"
statuspageenabled = true statuspageenabled = true
statuspage = "https://status.example.com/status/preview-demo" statuspage = "https://status.example.com/status/preview-demo"
statuspagename = "Statusseite" statuspagename = "Statusseite"
showlicense = true
licensepage = "https://example.com/license/"
tdmurl = "https://example.com/imprint/"
license= "CC BY NC SA 4.0"
[taxonomies] [taxonomies]
tag = "tags" tag = "tags"

View file

@ -18,7 +18,10 @@
{{ if .Site.Params.showcopyright }} {{ if .Site.Params.showcopyright }}
<div class="footer_copyright"> <div class="footer_copyright">
&copy; {{ now.Format "2006" }} <a href="{{ .Site.Params.Author.aboutpage }}">{{ .Site.Params.Author.firstname }} {{ .Site.Params.Author.lastname }}</a> &copy; {{ now.Format "2006" }} <a href="{{ .Site.Params.Author.aboutpage }}">{{ .Site.Params.Author.firstname }} {{ .Site.Params.Author.lastname }}</a>
{{ with .Site.Params.Author.location }} - Made in {{ . }}{{ end }} {{ if .Site.Params.statuspageenabled }}| <a href="{{ .Site.Params.statuspage }}" target="_blank">{{ .Site.Params.statuspagename }}</a>{{ end }} {{ with .Site.Params.Author.location }} - Made with ❤️ in {{ . }}{{ end }} {{ if .Site.Params.statuspageenabled }}| <a href="{{ .Site.Params.statuspage }}" target="_blank">{{ .Site.Params.statuspagename }}</a>{{ end }}<br />
{{ if .Site.Params.showlicense }}
Lizensiert unter <a href="{{ .Site.Params.licensepage }}" target="_blank">{{ .Site.Params.license }}</a> mit <a href="{{ .Site.Params.tdmurl }}" target="_blank">mit Opt-out für kommerzielles Text-Data-Mining</a>
{{ end }}
</div> </div>
{{ end }} {{ end }}
</footer> </footer>