Skip to content

Commit

Permalink
Parameterize the copyright line and the credits footer. Add option to…
Browse files Browse the repository at this point in the history
… display current year in copyright
  • Loading branch information
nnja committed Apr 17, 2018
1 parent ed9689a commit f80ee05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 8 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ disqusShortname = "bilberry-hugo-theme"
# always display the top navigation (with pages and search) on non-mobile screens
permanentTopNav = false

# credits line configuration
copyrightBy = "by Lednerb"
copyrightUseCurrentYear = false # set to true to always display the current year in the copyright
copyrightYearOverride = "2017"
copyrightUrl = "https://github.com/Lednerb"
creditsText = "Bilberry Hugo Theme"
creditsUrl = "https://github.com/Lednerb/bilberry-hugo-theme"

# social media profile urls for the footer links
facebook = ""
twitter = "https://twitter.com/TheRealLednerb"
Expand Down
12 changes: 10 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,18 @@
<div class="credits">
<div class="container">
<div class="copyright">
<a href="https://github.com/Lednerb" target="_blank">&copy; 2017 by Lednerb </a>
<a href="{{ .Site.Params.copyrightUrl }}" target="_blank">
&copy;
{{ if .Site.Params.copyrightUseCurrentYear }}
{{ now.Year }}
{{ else }}
{{ .Site.Params.copyrightYearOverride }}
{{ end }}
{{ .Site.Params.copyrightBy }}
</a>
</div>
<div class="author">
<a href="https://github.com/Lednerb/bilberry-hugo-theme" target="_blank">Bilberry Hugo Theme</a>
<a href="{{ .Site.Params.creditsUrl }}" target="_blank">{{ .Site.Params.creditsText }}</a>
</div>
</div>
</div>

0 comments on commit f80ee05

Please sign in to comment.