Explorar o código

feat(footer): add ability to auto update the copyright year

To use, add `{year}` to `Copyright` option in `config.toml`. Displays
current year.

Close #976
George Cushen %!s(int64=6) %!d(string=hai) anos
pai
achega
5358dd00ad
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      layouts/partials/footer_section.html

+ 1 - 1
layouts/partials/footer_section.html

@@ -6,7 +6,7 @@
   {{ end }}
 
   <p class="powered-by">
-    {{ with .Site.Copyright }}{{ . | markdownify}} &middot; {{ end }}
+    {{ with .Site.Copyright }}{{ replace . "{year}" now.Year | markdownify}} &middot; {{ end }}
 
     Powered by the
     <a href="https://sourcethemes.com/academic/" target="_blank" rel="noopener">Academic theme</a> for