Skip to content

Commit 4703652

Browse files
committed
Improve blog feed; remove unused files
1 parent d31055c commit 4703652

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

hugo.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ minify:
3333
keepWhitespace: false
3434

3535
params:
36+
ShowFullTextinRSS: true
3637
projectRepo: https://github.com/e13-dev/website
3738
analytics:
3839
google:
@@ -46,7 +47,7 @@ params:
4647
description: Your website description
4748
math: false
4849
images:
49-
- "/uploads/og.webp"
50+
- "/images/e13.png"
5051
label:
5152
title:
5253
lightNavIcon: /images/e13_path.svg

layouts/blog/rss.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{{- $pctx := . -}}
2+
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
3+
{{- $pages := slice -}}
4+
{{- if or $.IsHome $.IsSection -}}
5+
{{- $pages = $pctx.RegularPages -}}
6+
{{- else -}}
7+
{{- $pages = $pctx.Pages -}}
8+
{{- end -}}
9+
{{- $limit := .Site.Config.Services.RSS.Limit -}}
10+
{{- if ge $limit 1 -}}
11+
{{- $pages = $pages | first $limit -}}
12+
{{- end -}}
13+
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
14+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
15+
<channel>
16+
<title>E13 Capital &amp; Technology Blog</title>
17+
<link>{{ .Permalink }}</link>
18+
<description>Blog on everything technology, Kubernetes, software engineering and software operations.</description>
19+
{{- with $.Site.Params.images }}
20+
<image>
21+
<url>{{ index . 0 | absURL }}</url>
22+
<link>{{ index . 0 | absURL }}</link>
23+
<title>E13 Capital &amp; Technology Blog</title>
24+
</image>
25+
{{- end }}
26+
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
27+
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
28+
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
29+
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
30+
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
31+
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
32+
{{- with .OutputFormats.Get "RSS" -}}
33+
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
34+
{{- end -}}
35+
{{ range $pages }}
36+
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
37+
<item>
38+
<title>{{ .Title }}</title>
39+
<link>{{ .Permalink }}</link>
40+
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
41+
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
42+
<guid>{{ .Permalink }}</guid>
43+
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
44+
{{- if .Site.Params.ShowFullTextinRSS }}
45+
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
46+
{{- end }}
47+
</item>
48+
{{- end }}
49+
{{ end }}
50+
</channel>
51+
</rss>

static/images/e13_dark.png

-22.2 KB
Binary file not shown.

static/images/e13_light.png

-27.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)