diff options
author | Qiushi Pan <17402261+qqhann@users.noreply.github.com> | 2019-02-17 04:54:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-17 04:54:21 +0300 |
commit | efdadd24e6fb291ba69dd1e60d2a0dcec2cda230 (patch) | |
tree | 55ff0dd23301990845ca8d0d2bfeb4aa2e74db64 | |
parent | 0df6b6735b69ff808af1055fd540c0463acfa62a (diff) | |
parent | 2b1738d54d07910170622b2756641b557bff29f5 (diff) |
Merge pull request #23 from qqhann/qqhann/fix/copyrightv1.0.1
Update copyright to use config
-rw-r--r-- | README.md | 14 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 6 | ||||
-rw-r--r-- | layouts/partials/copyright.html | 4 | ||||
-rw-r--r-- | layouts/partials/footer.html | 10 |
4 files changed, 22 insertions, 12 deletions
@@ -38,14 +38,18 @@ hasCJKLanguage = true pygmentsCodeFences = true pygmentsUseClasses = true +# Enter a copyright notice to display in the site footer. +# To display a copyright symbol, type `©`. +copyright = "" + [params] # Chose Social Sharing Buttons you want to use. shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"] # You may disable copyright sentence by setting this to false. -creditHugoPrimer = true +showFooterCredits = true ``` -That being said, below is all recommended configurations. +That being said, below is all recommended configuration example. ```config.toml # config.toml @@ -61,6 +65,10 @@ pygmentsCodeFences = true pygmentsUseClasses = true googleAnalytics = "U-12345678-0" +# Enter a copyright notice to display in the site footer. +# To display a copyright symbol, type `©`. +copyright = "©Your Name 2019" + [frontmatter] # update sitemap.xml's lastmod datetime by file change time, instead of git. lastmod = ["lastmod", ":fileModTime", ":default"] @@ -73,7 +81,7 @@ useIcon = true useTwitterCard = true shareTo = ["Twitter", "Hatena", "Facebook", "Pocket"] -creditHugoPrimer = true +showFooterCredits = true ``` #### archetypes/default.md diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index baa72f5..e62a374 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -68,11 +68,7 @@ </div> <div id="footer" class="pt-2 pb-3 bg-white text-center"> - {{ if (default true .Site.Params.CreditHugoPrimer) }} - <span class="text-small text-gray"> - {{ partial "copyright.html" . }} - </span> - {{ end }} + {{ partial "footer.html" . }} </div> </div> diff --git a/layouts/partials/copyright.html b/layouts/partials/copyright.html index 0f132d6..e69de29 100644 --- a/layouts/partials/copyright.html +++ b/layouts/partials/copyright.html @@ -1,4 +0,0 @@ -©Qiushi Pan 2018. -Generated with -<a href="https://gohugo.io" class="link-gray-dark">Hugo</a> and -<a href="https://github.com/qqhann/hugo-primer" class="link-gray-dark">Hugo-Primer</a> theme. diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e69de29..bea94a8 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ +{{/* Credits and Copyright */}} +{{ if (default true .Site.Params.ShowFooterCredits) }} + <span class="text-small text-gray"> + {{ with .Site.Copyright }}{{ . | markdownify }} · {{ end }} + + Powered by the + <a href="https://github.com/qqhann/hugo-primer" class="link-gray-dark">Hugo-Primer</a> theme for + <a href="https://gohugo.io" class="link-gray-dark">Hugo</a>. + </span> +{{ end }} |