Finish the Maintenance section

Closes #339
This commit is contained in:
Bjørn Erik Pedersen 2018-02-11 13:30:06 +01:00
parent e9b0c710c9
commit ba51fe66dd
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
7 changed files with 52 additions and 73 deletions

View File

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

View File

@ -0,0 +1,3 @@
---
headless: true
---

View File

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

View File

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

View File

@ -0,0 +1,14 @@
{{ define "main" }}
<div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
{{ $byLastMod := .Site.RegularPages.ByLastmod }}
{{ $recent := $byLastMod | last 10 }}
{{ $leastRecent := $byLastMod.Reverse | last 10 }}
<h2>Last Updated</h2>
{{ partial "maintenance-pages-table" $recent }}
<h2>Least Recently Updated</h2>
{{ partial "maintenance-pages-table" $leastRecent }}
</div>
{{ end }}

View File

@ -0,0 +1,24 @@
<table class="collapse ba br2 b--black-10 pv2 ph3">
<thead>
<tr>
<th class="pv2 ph3 tl f6 fw6 ttu">LastMod</th>
<th class="pv2 ph3 tl f6 fw6 ttu">Link</th>
<th class="pv2 ph3 tl f6 fw6 ttu">GitHub</th>
</tr>
</thead>
<tbody>
{{ range . }}
<tr class="striped--light-gray">
<td class="pv2 ph3">{{ .Lastmod.Format "Jan, 02 2006" }}</td>
<td class="pv2 ph3">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</td>
<td class="pv2 ph3"><a href="{{.Site.Params.ghrepo}}blob/master/content/{{.Path}}">
{{ with .GitInfo }}
GI: {{ .Subject }}
{{ else }}
Source{{ end }}</a></td>
</tr>
{{ end }}
</tbody>
</table>

View File

@ -1,31 +0,0 @@
{{ $nombre_md := .Get 0 }}
<h3><i>Here are the latest {{ $nombre_md }} changes.</i></h3>
<table >
<thead>
<tr>
<th>Date</th>
<th>Direct access</th>
<th>Location</th>
<th>Commit message</th>
</tr>
</thead>
<tbody>
<!-- this may be need some tweeking -->
{{ range first $nombre_md (sort .Site.RegularPages.ByLastmod ".Lastmod" "desc") }}
<tr>
<time datetime="{{ ".Lastmod" }}">
<td>{{.Lastmod.Format "Jan, 02 2006"}}</td>
</time>
<td>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</td>
<td>{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} {{ $url }}</td>
<td>TODO : can't succed to have .GitInfo. It is nil </td>
</tr>
{{ end }}
</tbody>
</table>