aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrack3 <pengliabc@live.cn>2018-12-13 16:20:03 +0800
committerTrack3 <pengliabc@live.cn>2018-12-13 16:20:03 +0800
commit561dc2ae87f31835410cefa673a79bbe28dd3c6d (patch)
treed5e45b2960992bd6162cec3380207d385150e020
parent3876e51665111ef17f921c5e55986db55c282def (diff)
downloadhermit-561dc2ae87f31835410cefa673a79bbe28dd3c6d.tar.gz
Output year based on the current local time
For footer copyright message
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/footer.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html
index d2754dc..8e15967 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -20,7 +20,7 @@
</nav>
</div>
<div id="home-footer">
- <p>&copy; 2018 <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>. <a href="{{ "posts/index.xml" | absURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></p>
+ <p>&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>. <a href="{{ "posts/index.xml" | absURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></p>
</div>
</div>
{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 423ef8f..b2813d7 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,4 +1,4 @@
<footer id="site-footer" class="section-inner thin animated fadeIn faster">
- <p>&copy; 2018 <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}</p>
+ <p>&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}</p>
<p>Made with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> &#183; Theme <a href="https://github.com/Track3/hermit" target="_blank" rel="noopener">Hermit</a> &#183; <a href="{{ "posts/index.xml" | absURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></p>
</footer>