diff --git a/config.toml b/config.toml index 164d039..60be93c 100644 --- a/config.toml +++ b/config.toml @@ -3,6 +3,7 @@ languageCode = "en-us" title = "Brandon Rozek" theme = "pulp" enableGitInfo = true +ignoreErrors = ["error-remote-getjson"] [taxonomies] series = "series" diff --git a/content/postroll.md b/content/postroll.md new file mode 100644 index 0000000..a9bcf96 --- /dev/null +++ b/content/postroll.md @@ -0,0 +1,7 @@ +--- +title: Postroll +description: Recently enjoyed blog posts +layout: postroll +--- + +Inspired by [Jedda's Postroll](https://notes.jeddacp.com/postroll/), here is a rolling list of 30 blog posts that I've recently read and enjoyed. This list refreshes daily. \ No newline at end of file diff --git a/layouts/_default/postroll.html b/layouts/_default/postroll.html new file mode 100644 index 0000000..4362bfa --- /dev/null +++ b/layouts/_default/postroll.html @@ -0,0 +1,23 @@ +{{ define "main" }} +{{ partial "header.html" . }} +
+
+ + {{ .Content }} + + {{ $items := getJSON "https://api.brandonrozek.com/postroll"}} + + {{ if not $items }} + {{ warnf "Failed to fetch postroll items from API." }} + {{ $items = dict }} + {{ end }} + + {{ with $items.Ok }}{{ range . }} +
+

{{ .title }} by {{ .author }}

+

{{ .comment }}

+
+ {{ end }}{{ end }} +
+
+{{ end }} diff --git a/layouts/_default/stats.html b/layouts/_default/stats.html index 6c8a18f..31ffd6e 100644 --- a/layouts/_default/stats.html +++ b/layouts/_default/stats.html @@ -21,7 +21,6 @@ {{ $postCount := len $posts }} -

My most recent blog post was written on {{ $scratch.Get "latestDate" }} with my first ever one written on {{ $scratch.Get "firstDate" }}. diff --git a/layouts/robots.txt b/static/robots.txt similarity index 100% rename from layouts/robots.txt rename to static/robots.txt