Explorar el Código

Update footer to be optional (#20)

* Update footer to be optional

* Update example with optional footer

* Update README with optional footer
Jan Baudisch hace 7 años
padre
commit
d69c5cfef3
Se han modificado 3 ficheros con 8 adiciones y 1 borrados
  1. 4 0
      README.md
  2. 3 0
      exampleSite/config.toml
  3. 1 1
      layouts/partials/footer.html

+ 4 - 0
README.md

@@ -28,6 +28,10 @@ theme = "coder" # set the theme
     info = "Full Stack DevOps and Magician" # author's job title or info
     description = "John Doe's personal website" # site description
     keywords = "blog,developer,personal" # site keywords
+
+    # wether you want to hide copyright and credits in the footer
+    hideCredits = false
+    hideCopyright = false
     
 # Social links
 [[params.social]]

+ 3 - 0
exampleSite/config.toml

@@ -20,6 +20,9 @@ disqusShortname = "yourdiscussshortname"
     keywords = "blog,developer,personal"
     info = "Full Stack DevOps and Magician"
 
+    hideCredits = false
+    hideCopyright = false
+
 [[params.social]]
     name = "Github"
     weight = 1

+ 1 - 1
layouts/partials/footer.html

@@ -1,5 +1,5 @@
 <footer class="footer">
   <section class="container">
-    © {{ .Site.LastChange.Format "2006" }} · Powered by <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/luizdepra/hugo-coder/">Coder</a>.
+    {{ if not .Site.Params.hideCopyright }} © {{ .Site.LastChange.Format "2006" }} {{ end }} {{ if not .Site.Params.hideCredits}} {{ if not .Site.Params.hideCopyright }} · {{ end }} Powered by <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/luizdepra/hugo-coder/">Coder</a>. {{ end }}
   </section>
 </footer>