This commit is contained in:
Christian Heusel 2025-05-30 23:35:37 +02:00 committed by GitHub
commit f8b249176e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 34 additions and 0 deletions

View File

@ -186,6 +186,13 @@ disableKinds = ['taxonomy', 'taxonomyTerm']
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
BookServiceWorker = true
# (Optional) Specifies a License that applies to the content of the page
# BookContentLicenseText = 'CC-BY-SA-4.0'
# (Optional) Specifies a Link for the License that applies to the content of the page
# Requires 'BookContentLicenseText' param.
# BookContentLicenseLink = 'https://creativecommons.org/licenses/by-sa/4.0/'
```
### Multi-Language Support

View File

@ -117,3 +117,10 @@ enableGitInfo = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
BookTranslatedOnly = false
# (Optional) Specifies a License that applies to the content of the page
# BookContentLicenseText = 'CC-BY-SA-4.0'
# (Optional) Specifies a Link for the License that applies to the content of the page
# Requires 'BookContentLicenseText' param.
# BookContentLicenseLink = 'https://creativecommons.org/licenses/by-sa/4.0/'

View File

@ -113,3 +113,10 @@ params:
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
BookTranslatedOnly: false
# (Optional) Specifies a License that applies to the content of the page
# BookContentLicenseText: CC-BY-SA-4.0
# (Optional) Specifies a Link for the License that applies to the content of the page
# Requires 'BookContentLicenseText' param.
# BookContentLicenseLink: https://creativecommons.org/licenses/by-sa/4.0/

View File

@ -19,6 +19,19 @@
</div>
{{ end }}
{{ if and .File .Site.Params.BookContentLicenseText }}
<div class="flex align-center">
<span class="book-icon" alt="" />📖&nbsp;</span>
{{ if and .File .Site.Params.BookContentLicenseLink }}
<a href="{{ .Site.Params.BookContentLicenseLink }}" title='License' target="_blank" rel="noopener">
<span>{{ .Site.Params.BookContentLicenseText }}</span>
</a>
{{ else }}
<span>{{ .Site.Params.BookContentLicenseText }}</span>
{{ end }}
</div>
{{ end }}
</div>
{{ $script := resources.Get "clipboard.js" | resources.Minify }}