Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiushi Pan <17402261+qqhann@users.noreply.github.com>2019-02-17 04:54:21 +0300
committerGitHub <noreply@github.com>2019-02-17 04:54:21 +0300
commitefdadd24e6fb291ba69dd1e60d2a0dcec2cda230 (patch)
tree55ff0dd23301990845ca8d0d2bfeb4aa2e74db64
parent0df6b6735b69ff808af1055fd540c0463acfa62a (diff)
parent2b1738d54d07910170622b2756641b557bff29f5 (diff)
Merge pull request #23 from qqhann/qqhann/fix/copyrightv1.0.1
Update copyright to use config
-rw-r--r--README.md14
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/partials/copyright.html4
-rw-r--r--layouts/partials/footer.html10
4 files changed, 22 insertions, 12 deletions
diff --git a/README.md b/README.md
index 49f5d4a..1cf1f78 100644
--- a/README.md
+++ b/README.md
@@ -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 `&copy;`.
+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 `&copy;`.
+copyright = "&copy;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 }} &middot; {{ 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 }}