Show latest news post on home page

This commit is contained in:
Luca 2021-11-06 18:26:03 +01:00
parent 8936e495ae
commit fa16b84741
3 changed files with 15 additions and 0 deletions

View File

@ -6,3 +6,7 @@ menu:
---
{{<video mp4=`/franconia_animated.mp4` webm=`/franconia_animated.webm` alt=`Ein Router in Form des Frankenrechens mit der Aufschrift "franconian.net" und einem "Fenster" in die Welt des rC3. Daran angeschlossen sind die Hackspaces backspace, Hackzogtum und Nerd2Nerd.`>}}
# Aktuelles
{{<latest in="news">}}

View File

@ -6,3 +6,7 @@ menu:
---
{{<video mp4=`/franconia_animated.mp4` webm=`/franconia_animated.webm` alt=`A router labelled "franconian.net" with a "window" to the world of rC3 and the hackspaces backspace, Hackzogtum, and Nerd2Nerd connected to it.`>}}
# Latest news
{{<latest in="news">}}

View File

@ -0,0 +1,7 @@
{{ with .Site.GetPage (.Get "in") }}
{{ range first 1 .Pages }}
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
<p class="date">{{ .Date.Format "2006-01-02 15:04" }}</p>
{{ .Content }}
{{ end }}
{{ end }}