From ba51fe66dd0d7de35e8ee4efc9cff10cbf1afa0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 11 Feb 2018 13:30:06 +0100 Subject: [PATCH] Finish the Maintenance section Closes #339 --- content/maintenance/_index.md | 11 +++++++ content/readfiles/index.md | 3 ++ content/spotlight/_index.md | 21 ------------- content/spotlight/latest-updated.md | 21 ------------- layouts/maintenance/list.html | 14 +++++++++ layouts/partials/maintenance-pages-table.html | 24 ++++++++++++++ layouts/shortcodes/latest-updated.html | 31 ------------------- 7 files changed, 52 insertions(+), 73 deletions(-) create mode 100644 content/maintenance/_index.md create mode 100644 content/readfiles/index.md delete mode 100644 content/spotlight/_index.md delete mode 100644 content/spotlight/latest-updated.md create mode 100644 layouts/maintenance/list.html create mode 100644 layouts/partials/maintenance-pages-table.html delete mode 100644 layouts/shortcodes/latest-updated.html diff --git a/content/maintenance/_index.md b/content/maintenance/_index.md new file mode 100644 index 000000000..3ad3d3863 --- /dev/null +++ b/content/maintenance/_index.md @@ -0,0 +1,11 @@ +--- +title: Documentation Maintenance Lists +description: Some lists useful for the maintenance of the Hugo docs site. +date: 2018-02-09 +categories: [maintenance] +keywords: [maintenance] +slug: +aliases: [] +toc: true +--- + diff --git a/content/readfiles/index.md b/content/readfiles/index.md new file mode 100644 index 000000000..3d65eaa0f --- /dev/null +++ b/content/readfiles/index.md @@ -0,0 +1,3 @@ +--- +headless: true +--- \ No newline at end of file diff --git a/content/spotlight/_index.md b/content/spotlight/_index.md deleted file mode 100644 index f849f1f60..000000000 --- a/content/spotlight/_index.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Documentation spotlight -linktitle: Spotlight overview -description: Documentation spotlight -date: 2018-02-09 -publishdate: 2018-02-09 -lastmod: 2018-02-09 -categories: [spotlight] -keywords: [] -menu: - docs: - parent: "Spotlight" - weight: 01 -weight: 01 #rem -draft: false -slug: -aliases: [] -toc: false ---- - -Bla bla spotlight diff --git a/content/spotlight/latest-updated.md b/content/spotlight/latest-updated.md deleted file mode 100644 index d17b7b02d..000000000 --- a/content/spotlight/latest-updated.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Latest changes to the Hugo Docs -linktitle: Latest changes -description: The latest changes on Hugo documentation. -date: 2018-02-09 -publishdate: 2018-02-09 -lastmod: 2018-02-09 -categories: [spotlight] -keywords: [docs,documentation,community, spotlights] -menu: - docs: - parent: "Spotlight" - weight: 20 -weight: 20 -sections_weight: 20 -draft: false -aliases: [] -toc: true ---- - -{{% latest-updated 20 %}} diff --git a/layouts/maintenance/list.html b/layouts/maintenance/list.html new file mode 100644 index 000000000..b09ff43cf --- /dev/null +++ b/layouts/maintenance/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} +
+ {{ $byLastMod := .Site.RegularPages.ByLastmod }} + {{ $recent := $byLastMod | last 10 }} + {{ $leastRecent := $byLastMod.Reverse | last 10 }} + +

Last Updated

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

Least Recently Updated

+ {{ partial "maintenance-pages-table" $leastRecent }} + +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/maintenance-pages-table.html b/layouts/partials/maintenance-pages-table.html new file mode 100644 index 000000000..dc9d15f10 --- /dev/null +++ b/layouts/partials/maintenance-pages-table.html @@ -0,0 +1,24 @@ + + + + + + + + + + {{ range . }} + + + + + + {{ end }} + +
LastModLinkGitHub
{{ .Lastmod.Format "Jan, 02 2006" }} + {{ .Title }} + + {{ with .GitInfo }} + GI: {{ .Subject }} + {{ else }} + Source{{ end }}
\ No newline at end of file diff --git a/layouts/shortcodes/latest-updated.html b/layouts/shortcodes/latest-updated.html deleted file mode 100644 index 5f661bc14..000000000 --- a/layouts/shortcodes/latest-updated.html +++ /dev/null @@ -1,31 +0,0 @@ -{{ $nombre_md := .Get 0 }} - -

Here are the latest {{ $nombre_md }} changes.

- - - - - - - - - - - - - - {{ range first $nombre_md (sort .Site.RegularPages.ByLastmod ".Lastmod" "desc") }} - - - - - - - - - {{ end }} - -
DateDirect accessLocationCommit message
{{.Lastmod.Format "Jan, 02 2006"}} - {{ .Title }} - {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $url }}TODO : can't succed to have .GitInfo. It is nil