Browse Source

Link to version-specific writer's guide

tags/v0.9.0
Matt Baer 5 years ago
parent
commit
4cad074b44
3 changed files with 8 additions and 3 deletions
  1. +5
    -0
      page/page.go
  2. +2
    -2
      templates/include/footer.tmpl
  3. +1
    -1
      templates/user/include/footer.tmpl

+ 5
- 0
page/page.go View File

@@ -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]
}

+ 2
- 2
templates/include/footer.tmpl View File

@@ -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>


+ 1
- 1
templates/user/include/footer.tmpl View File

@@ -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