fix rss feeds; move stuff around

main
Jef Roosens 2024-06-06 09:54:26 +02:00
parent cd10df9d32
commit 323b9e2e3c
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
9 changed files with 16 additions and 60 deletions

View File

@ -40,3 +40,6 @@ pygmentsUseClasses = true
[markup.goldmark.renderer]
# Allows HTML in Markdown
unsafe = true
[services.rss]
limit = 15

View File

@ -1,17 +0,0 @@
---
title: "Blogroll"
---
Below you can find some other blogs that I follow!
* [Jan-Lukas Else](https://jlelse.blog/)
* [Rubenerd](https://rubenerd.com/)
* [Björn Wärmedal](https://warmedal.se/~bjorn/)
* [Henrique Dias](https://hacdias.com/)
* [Brain Baking](https://brainbaking.com/)
* [Ru Singh](https://rusingh.com/)
* [Hey Georgie](https://hey.georgie.nu/)
* [James' Coffee Blog](https://jamesg.blog/)
* [Kev Quirk](https://kevq.uk/)
* [Oh Hello Ana](https://ohhelloana.blog/)
* [astrid.tech](https://astrid.tech/)

View File

@ -0,0 +1,7 @@
---
title: "Alex"
summary: "Minecraft server wrapper that automates world backups"
type: "project"
---

View File

Before

Width:  |  Height:  |  Size: 593 KiB

After

Width:  |  Height:  |  Size: 593 KiB

View File

@ -0,0 +1,5 @@
---
title: "Lander"
summary: "URL shortener, pastebin & file-sharing service, built from the ground up in C"
type: "project"
---

View File

@ -1,41 +0,0 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range where .Site.Pages "Kind" "page" }}
{{ if or (eq .Section "posts") (eq .Section "post") }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
{{ end }}
</channel>
</rss>

View File

@ -2,9 +2,8 @@
{{ .Content }}
<h3>Latest blog posts</h3>
<ul id="posts">
{{ range .Site.RegularPages }}
{{ range first 15 .Site.RegularPages }}
{{ .Render "li" }}
{{ end }}
</ul>
<a href="{{ .Permalink }}">Older</a>
{{ end }}