Added rss for blog.

This commit is contained in:
Warwick 2024-05-10 16:16:14 +01:00
parent fb857ab458
commit f62929e031
9 changed files with 74 additions and 11 deletions

16
config.toml Normal file
View file

@ -0,0 +1,16 @@
baseURL = "https://warwicknew.co.uk"
languageCode = "en-us"
title = "Warwick New"
theme = "warwick_portfolio"
pluralizeListTitles = false
[Author]
name = "Warwick New"
email = "wytau@sdf.org"
[outputs]
home = ['html']
section = ['html', 'rss']
taxonomy = ['html']
term = ['html']

View file

@ -1,5 +0,0 @@
baseURL: https://warwicknew.co.uk
languageCode: en-us
title: Warwick New
theme: warwick_portfolio
pluralizeListTitles: false

View file

@ -2,7 +2,7 @@
title: "Graphics: Nothing to PBR"
date: 2023-11-07T15:17:49Z
thumbnail: /thumbnails/graphics.png
tags: ["c++", "opengl", "glsl","cmake", "3d maths","games"]
tags: ["c/c++", "opengl", "glsl","cmake", "3d maths","games"]
---
I am someone who is fascinated by graphics programming, the creation of game engines and all things low-level. Here I've taken the time to create a proper graphics pipeline in order to create a PBR rendering system. I'll likely reuse the shaders and model loading classes in future projects but for my next personal graphics project I'm tempted to pick up some Vulkan and make greater use of namespaces and more modern general C++ programming paradigms to make something more robust to build on top of.

View file

@ -3,6 +3,6 @@ title: "Playing With C and Sockets"
date: 2023-11-07T15:19:57Z
thumbnail: /thumbnails/c-socks.png
draft: true
tags: ["c", "web-development", "Sockets"]
tags: ["c/c++", "web-development", "Sockets"]
---

View file

@ -2,7 +2,7 @@
title: "University Graphics Project"
date: 2023-10-25T11:56:20+01:00
thumbnail: /thumbnails/uni-graphics.png
tags: ["c++", "opengl", "glsl","cmake", "3d maths","games"]
tags: ["c/c++", "opengl", "glsl","cmake", "3d maths","games"]
---
{{< video "/projects/videos/uni-graphics.mp4" >}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,39 @@
{{- $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 ne .Title .Site.Title }}{{ .Site.Title }}&apos;s {{.Title}}{{ else }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>{{ if ne .Title .Site.Title }}{{ .Site.Title }}&apos;s {{.Title}}{{ else }}{{ .Site.Title }}{{ end }}</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 $pages }}
<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 }}
</channel>
</rss>

View file

@ -11,9 +11,13 @@
</a>
<span style="margin-left: auto;">
{{ range .Site.Sections.Reverse }}
<a href="{{ .Permalink }}"><h4 style="display: inline-block; padding-left:.75em;">{{ .Title }}</h4></a>
<a href="{{ .Permalink }}"><h4 style="display: inline-block; padding-left:.375em;padding-right:.375em;">{{ .Title }}</h4></a>
{{ end }}
</span>
{{ $rss := (resources.Get "/img/rss.png").Resize "30x30" }}
<a type="application/rss+xml" href="/blog/index.xml" target="_blank">
<img style="padding-right: 1em" src="{{ $rss.RelPermalink }}" alt="rss icon">
</a>
</div>
</header>

View file

@ -1,7 +1,8 @@
{{ $logo := (resources.Get "/img/logo.png").Resize "100x100" }}
{{ $rss := (resources.Get "/img/rss.png").Resize "30x30" }}
<header id="header" class="header">
<div class="flex-wrap-container" style="align-items:center">
{{ $logo := (resources.Get "/img/logo.png").Resize "100x100" }}
<a href="/">
<img style="padding-right: 1em" src="{{ $logo.RelPermalink }}" alt="logo">
</a>
@ -21,8 +22,16 @@
</div>
<span style="margin-left: auto;">
{{ range .Site.Sections.Reverse }}
<a href="{{ .Permalink }}"><h4 style="display: inline-block; padding-left:.75em;">{{ .Title }}</h4></a>
<a href="{{ .Permalink }}"><h4 style="display: inline-block; padding-left:.75em;padding-right:.75em;">{{ .Title }}</h4></a>
{{ end }}
</span>
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }}
<a type="application/rss+xml" href="/blog/index.xml" target="_blank">
<img style="padding-right: 1em" src="{{ $rss.RelPermalink }}" alt="rss icon">
</a>
</div>
</header>