diff --git a/README.md b/README.md index f37dc81..5452231 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/assets/_utils.scss b/assets/_utils.scss index 92fad0f..49e9d2d 100644 --- a/assets/_utils.scss +++ b/assets/_utils.scss @@ -14,6 +14,10 @@ flex-wrap: wrap; } +.flex-gap { + gap: $padding-16; +} + .justify-start { justify-content: flex-start; } diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index 34af293..f95a202 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -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/' diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 3fd0c40..81102b2 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -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/ diff --git a/layouts/_partials/docs/footer.html b/layouts/_partials/docs/footer.html index 77e96d8..3bf3cde 100644 --- a/layouts/_partials/docs/footer.html +++ b/layouts/_partials/docs/footer.html @@ -1,4 +1,4 @@ -
+
{{ if and .GitInfo .Site.Params.BookRepo }}
@@ -19,6 +19,22 @@
{{ end }} +{{ if and .File .Site.Params.BookContentLicenseText }} +
+ {{ if and .File .Site.Params.BookContentLicenseLink }} + + + {{ .Site.Params.BookContentLicenseText }} + + {{ else }} + + + {{ .Site.Params.BookContentLicenseText }} + + {{ end }} +
+{{ end }} +
{{ $script := resources.Get "clipboard.js" | resources.Minify }} diff --git a/static/svg/license.svg b/static/svg/license.svg new file mode 100644 index 0000000..8e0b32a --- /dev/null +++ b/static/svg/license.svg @@ -0,0 +1,4 @@ + + + +