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 }} {{ end }}
{{ .Site.Data.args.version }}<br>&copy; 2018 Istio Authors, <a href="https://policies.google.com/privacy">Privacy Policy</a><br> {{ .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 }} {{ 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 }} {{ else }}
This page was last modified on {{ .Page.Lastmod.Format "January 2, 2006" }} This page was last modified on {{ .Page.Lastmod.Format "January 2, 2006" }}
{{ end }} {{ 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="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> <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 }} {{ 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 }} {{ 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> <a class="dropdown-item" href="https://github.com/istio/istio.github.io/edit/master/content/{{ .Page.Path }}">Edit this Page on GitHub</a>
{{ end }} {{ end }}

View File

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