docs: Don't use binary version in docs site
authorCameron Moore <moorereason@gmail.com>
Mon, 2 Jan 2017 13:08:36 +0000 (07:08 -0600)
committerdigitalcraftsman <digitalcraftsman@users.noreply.github.com>
Mon, 2 Jan 2017 13:08:36 +0000 (14:08 +0100)
Adds a "release" Site param that will be need to be updated for each
release.

Fixes #2857

docs/config.toml
docs/layouts/partials/footer.html
docs/layouts/partials/header.html

index 17161dd5ebf99748af510799787b5060ed885c89..882e3c8b7229bbf3d614fa78fc23660a5be6dcc6 100644 (file)
@@ -10,6 +10,7 @@ enableGitInfo = true
 [params]
   description = "Documentation of Hugo, a fast and flexible static site generator built with love by spf13, bep and friends in Go"
   author = "Steve Francia (spf13) and friends"
+  release = "0.18.1"
 
 [taxonomies]
   tag = "tags"
index 92a7912e7d3bad2704337f72c41cdd8ec4c91b63..99a0eaf5918ce91d9d5927d4f9be06c255a36520 100644 (file)
@@ -1,7 +1,7 @@
                     <div class="row">
                         <div class="footer-panel">
                          <p>Last revision: {{ .Lastmod.Format "January 2, 2006" }}{{ if .IsPage }}{{ with .GitInfo }} | <a href="https://github.com/spf13/hugo/commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>{{end }}{{ end }}
-                          <span style="float: right;">Hugo v{{ .Hugo.Version }} documentation</span>
+                          <span style="float: right;">Hugo v{{ .Site.Params.release }} documentation</span>
                         </p>
                         </div>
                     </div>
index f9b10d8433cfd81845c7c5a563590b71ad18023e..78e7e3c4c6fa580dbfd4e813005b1b040aafe325 100644 (file)
@@ -35,7 +35,7 @@
             </div>
 
             <!--logo start-->
-            <a href="/" class="logo"><img src="/img/hugo-logo.png" style="height: 40px; vertical-align: bottom;"> <span style="font-size: small; text-transform: none;">v{{ .Hugo.Version }}</span></a>
+            <a href="/" class="logo"><img src="/img/hugo-logo.png" style="height: 40px; vertical-align: bottom;"> <span style="font-size: small; text-transform: none;">v{{ .Site.Params.release }}</span></a>
             <!--logo end-->
             <div class="top-nav notification-row">
                 <!-- notification dropdown end-->