From bf93a46eaafb31dbdb4c805eab7cc3ac044ded55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 11 Feb 2018 16:15:06 +0100 Subject: [PATCH] maintenance: Add TODO list And add the section to the menu. --- content/maintenance/_index.md | 5 ++++- layouts/maintenance/list.html | 14 +++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/content/maintenance/_index.md b/content/maintenance/_index.md index 3ad3d3863..691a5d47c 100644 --- a/content/maintenance/_index.md +++ b/content/maintenance/_index.md @@ -1,9 +1,12 @@ --- -title: Documentation Maintenance Lists +title: Maintenance description: Some lists useful for the maintenance of the Hugo docs site. date: 2018-02-09 categories: [maintenance] keywords: [maintenance] +menu: + docs: + weight: 200 slug: aliases: [] toc: true diff --git a/layouts/maintenance/list.html b/layouts/maintenance/list.html index 0cfc7302e..b0f9008c9 100644 --- a/layouts/maintenance/list.html +++ b/layouts/maintenance/list.html @@ -7,17 +7,29 @@
{{ $byLastMod := .Site.RegularPages.ByLastmod }} {{ $recent := ($byLastMod | last 10).Reverse }} - {{ $leastRecent := $byLastMod | first 10 }} + {{ $leastRecent := $byLastMod | first 10 }}

Last Updated

{{ partial "maintenance-pages-table" $recent }}

Least Recently Updated

{{ partial "maintenance-pages-table" $leastRecent }} + + {{/* Don't think this is possible with where directly. Should investigate. */}} + {{ .Scratch.Set "todos" slice }} + {{ range .Site.RegularPages }} + {{ if .HasShortcode "todo" }} + {{ $.Scratch.Add "todos" . }} + {{ end }} + {{ end }} +

Pages marked with TODO

+ {{ partial "maintenance-pages-table" (.Scratch.Get "todos") }} +