1
0
mirror of https://github.com/actix/actix-website synced 2024-11-27 18:12:57 +01:00

Fix nextup links (#153)

* Fix page weights

* Fix nextup link generation
This commit is contained in:
Elliot Jackson 2020-02-01 21:22:11 +01:00 committed by GitHub
parent 8c8de9f7fb
commit 69145efc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 12 deletions

View File

@ -1,7 +1,7 @@
--- ---
title: Connection Lifecycle title: Connection Lifecycle
menu: docs_architecture menu: docs_architecture
weight: 20 weight: 1030
--- ---

View File

@ -1,7 +1,7 @@
--- ---
title: Http Server Initialization title: Http Server Initialization
menu: docs_architecture menu: docs_architecture
weight: 10 weight: 1020
--- ---
## Architecture overview ## Architecture overview

View File

@ -1,7 +1,7 @@
--- ---
title: Testing title: Testing
menu: docs_advanced menu: docs_advanced
weight: 210 weight: 215
--- ---
# Testing # Testing

View File

@ -103,10 +103,18 @@
<div class="github-edit"> <div class="github-edit">
<a class="fa fa-github" href="https://github.com/actix/actix-website/tree/master/content/{{ .File.Path }}"> Edit on GitHub</a> <a class="fa fa-github" href="https://github.com/actix/actix-website/tree/master/content/{{ .File.Path }}"> Edit on GitHub</a>
</div> </div>
<!-- Yes, we have to use *Prev* to get the next content, because the
weights are sorted inversely to how they are actually displayed... --> {{ if eq (len .Pages) 0 }}
{{ with .PrevInSection }}<div class="actix-next"><b>Next up</b>: <a href = {{ .URL }}>{{ end }} {{ .Scratch.Set "Docs" .Parent.Pages.ByWeight }}
{{ with .PrevInSection }} {{ .Title }}</a></div>{{ end }} {{ else }}
{{ .Scratch.Set "Docs" .Pages.ByWeight }}
{{ end }}
{{ .Scratch.Set "CurrentWeight" .Weight }}
{{ range first 1 (where (.Scratch.Get "Docs") ".Weight" ">" (.Scratch.Get "CurrentWeight")) }}
<div class="actix-next"><b>Next up</b>: <a href = {{ .URL }}>{{ .Title }}</a></div>
{{ end }}
</div> </div>
</div> </div>
</div> </div>