Get archived versions of the site working in the new Hugo world.

This commit is contained in:
mtail 2018-06-02 11:21:42 -07:00
parent fccf3688df
commit 4be9f2986a
3 changed files with 13 additions and 11 deletions

View File

@ -52,7 +52,7 @@
{{ end }}
{{ .Site.Data.args.version }}<br>&copy; 2018 Istio Authors, <a href="https://policies.google.com/privacy">Privacy Policy</a><br>
{{ if .Site.Data.args.archive }}
Archived on {{ .Site.Data.args.archive_date.Format "January 2, 2006"}}
Archived on {{ dateFormat "January 2, 2006" .Site.Data.args.archive_date }}
{{ else }}
This page was last modified on {{ .Page.Lastmod.Format "January 2, 2006" }}
{{ end }}

View File

@ -55,11 +55,11 @@
<a class="dropdown-item" id="light-theme-item" href="" onclick="setActiveStyleSheet('light');return false;">Light Theme</a>
<a class="dropdown-item" id="dark-theme-item" href="" onclick="setActiveStyleSheet('dark');return false;">Dark Theme</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://github.com/istio/istio.github.io/issues/new?title=Issue%20with%20{{ .Page.Path}}">Report Site Bugs</a>
{{ if not .Site.Data.args.archive }}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="https://github.com/istio/istio.github.io/issues/new?title=Issue%20with%20{{ .Page.Path}}">Report Site Bugs</a>
{{ if not .Page.Params.generator }}
<a class="dropdown-item" href="https://github.com/istio/istio.github.io/edit/master/content/{{ .Page.Path }}">Edit this Page on GitHub</a>
{{ end }}

View File

@ -27,12 +27,14 @@
{{ end }}
{{ end }}
{{ if eq $section.Title "Istio Blog Posts" }}
<div class="text-center subscribe" >
<a href="/feed.xml">
<img style="width: 1.4em;" src="/img/rss.svg" alt="RSS"/> Subscribe
</a>
</div>
{{ if not .Site.Data.args.archive }}
{{ if eq $section.Title "Istio Blog Posts" }}
<div class="text-center subscribe" >
<a href="/feed.xml">
<img style="width: 1.4em;" src="/img/rss.svg" alt="RSS"/> Subscribe
</a>
</div>
{{ end }}
{{ end }}
</div>
</nav>