Add latest changes in new spotlight section

This commit is contained in:
Didier GEORGIEFF 2018-02-09 13:43:21 +01:00 committed by Bjørn Erik Pedersen
parent 8ccd79f612
commit e9b0c710c9
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
3 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,21 @@
---
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

@ -0,0 +1,21 @@
---
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,31 @@
{{ $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>