Link to version-specific writer's guide

pull/95/head
Matt Baer 6 years ago
parent a850fa14cd
commit 4cad074b44
  1. 5
      page/page.go
  2. 4
      templates/include/footer.tmpl
  3. 2
      templates/user/include/footer.tmpl

@ -37,3 +37,8 @@ func (sp *StaticPage) SanitizeHost(cfg *config.Config) {
sp.Host = cfg.Server.HiddenHost
}
}
func (sp StaticPage) OfficialVersion() string {
p := strings.Split(sp.Version, "-")
return p[0]
}

@ -4,7 +4,7 @@
{{if .SingleUser}}
<nav>
<a class="home" href="/">{{.SiteName}}</a>
<a href="https://writefreely.org/guide" target="guide">writer's guide</a>
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>
<a href="https://developers.write.as/" title="Build on Write Freely with our open developer API.">developers</a>
<a href="https://github.com/writeas/writefreely">source code</a>
<a href="https://writefreely.org">writefreely {{.Version}}</a>
@ -23,7 +23,7 @@
<div class="half">
<h3><a href="https://writefreely.org" style="color:#444;text-transform:lowercase;">WriteFreely</a></h3>
<ul>
<li><a href="https://writefreely.org/guide" target="guide">writer's guide</a></li>
<li><a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a></li>
<li><a href="https://developers.write.as/" title="Build on Write Freely with our open developer API.">developers</a></li>
<li><a href="https://github.com/writeas/writefreely">source code</a></li>
<li style="margin-top:0.8em">{{.Version}}</li>

@ -10,7 +10,7 @@
<a class="home" href="/">{{.SiteName}}</a>
<a href="/about">about</a>
{{if and (not .SingleUser) .LocalTimeline}}<a href="/read">reader</a>{{end}}
<a href="https://writefreely.org/guide" target="guide">writer's guide</a>
<a href="https://writefreely.org/guide/{{.OfficialVersion}}" target="guide">writer's guide</a>
<a href="/privacy">privacy</a>
<a href="https://writefreely.org">writefreely {{.Version}}</a>
</nav>

Loading…
Cancel
Save