diff options
author | Zhe Zhang <neomana@gmail.com> | 2016-06-05 11:37:22 +0300 |
---|---|---|
committer | Zhe Zhang <neomana@gmail.com> | 2016-06-05 11:37:22 +0300 |
commit | 8780f8e82275fd708d684377f9de6c37f2192ab0 (patch) | |
tree | 818146119921d3d505ead83bc66a1a2df129d00e | |
parent | fc4110b564fabc44020eaa128c3de604e6b7b403 (diff) | |
parent | e9f43e50204ffa3811b27066167d956f6dce5ee7 (diff) |
Merge pull request #4 from inexist3nce/master
Allow custom footer
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 |
4 files changed, 10 insertions, 4 deletions
@@ -29,6 +29,7 @@ You could add `params` into your site's `config.toml` file: Summary = true # takes true or false Content = false # takes true or false # if both are set to true, summary is shown. + # FooterMsg = "Copyright Me 2016. Powered by Hugo." ``` if you use `config.yaml`, it could look like: @@ -43,6 +44,7 @@ params: Summary: true # takes true or false Content: false # takes true or false # if both are set to true, summary is shown + # FooterMsg: "Custom footer message. Powered by Hugo." ``` ### Enable Disqus to your post diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ef39b79..91bdc41 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -17,7 +17,7 @@ {{ if .Params.tags }} <span class="post-tags"> {{ range .Params.tags }} - #<a href="/tags/{{ . | urlize }}">{{ . }}</a> + #<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a> {{ end }} </span> {{ end }} @@ -43,4 +43,4 @@ </body> -</html>
\ No newline at end of file +</html> diff --git a/layouts/index.html b/layouts/index.html index ef39b79..91bdc41 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,7 +17,7 @@ {{ if .Params.tags }} <span class="post-tags"> {{ range .Params.tags }} - #<a href="/tags/{{ . | urlize }}">{{ . }}</a> + #<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a> {{ end }} </span> {{ end }} @@ -43,4 +43,4 @@ </body> -</html>
\ No newline at end of file +</html> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index b186f8c..73f1af3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,7 @@ <div class="footer"> + {{if isset .Site.Params "FooterMsg"}} + <p>{{.Site.Params.FooterMsg}}</p> + {{else}} <p>Powered by <a href="http://gohugo.io">Hugo</a>. This theme—Slim—is open sourced on <a href="https://github.com/zhe/hugo-theme-slim">Github</a>.</p> + {{end}} </div> |