Fix Notes feeds + rel links on template

This commit is contained in:
2026-02-28 13:02:05 -06:00
parent 648ea36fd0
commit 70179fe7d8
6 changed files with 147 additions and 38 deletions

View File

@@ -38,6 +38,12 @@ html(lang="en")
meta(name='author' content='Garrett Mills') meta(name='author' content='Garrett Mills')
meta(name='robots' content='index, follow') meta(name='robots' content='index, follow')
link(rel='author' href='/humans.txt') link(rel='author' href='/humans.txt')
link(rel="alternate" href="/feed/atom.xml" title="Garrett Mills - Notes (Atom)" type="application/atom+xml")
link(rel="alternate" href="/feed/rss.xml" title="Garrett Mills - Notes (RSS)" type="application/rss+xml")
link(rel="alternate" href="/feed/json.json" title="Garrett Mills - Notes (JSON)" type="application/feed+json")
link(rel="alternate" href="/blog/atom.xml" title="Garrett's Blog (Atom)" type="application/atom+xml")
link(rel="alternate" href="/blog/rss2.xml" title="Garrett's Blog (RSS)" type="application/rss+xml")
link(rel="alternate" href="/blog/json.json" title="Garrett's Blog (JSON)" type="application/feed+json")
include meta.html include meta.html
block title block title
@@ -90,39 +96,6 @@ html(lang="en")
} }
link(rel='stylesheet' href='/bundle.css') link(rel='stylesheet' href='/bundle.css')
//link(rel='stylesheet' href=asset('normalize.css'))
//link(rel='stylesheet' href=asset('main-bam.css'))
//script.
// window.glmdev = window.glmdev || {}
// window.glmdev.themeStats = window.glmdev.themeStats || []
// window.glmdev.themeStats.push('Default Theme: !{themeDisplayName}')
//link(rel='stylesheet' href=asset('main-70s.css'))
//link(rel='stylesheet' href=`/theme/${themeName}.css` title=themeDisplayName)
//if themeStylesheets
// each sheet in themeStylesheets
// link(rel='alternate stylesheet' href=sheet.url title=sheet.displayName)
link(rel='author' href='/humans.txt')
//link(rel="alternate" href="/links.mark.md" title="Garrett Mills - My Bookmarks" type="text/markdown;variant=markmark")
//link(rel="alternate" href="/links" title="Garrett Mills - My Bookmarks" type="text/html")
//link(rel="alternate" href="/links/atom.xml" title="Garrett's Bookmarks (Atom)" type="application/atom+xml")
//link(rel="alternate" href="/links/rss2.xml" title="Garrett's Bookmarks (RSS)" type="application/rss+xml")
//link(rel="alternate" href="/links/json.json" title="Garrett's Bookmarks (JSON)" type="application/feed+json")
//link(rel="alternate" href="/feed/atom.xml" title="Garrett Mills - Posts & Updates (Atom)" type="application/atom+xml")
//link(rel="alternate" href="/feed/rss.xml" title="Garrett Mills - Posts & Updates (RSS)" type="application/rss+xml")
//link(rel="alternate" href="/feed/json.json" title="Garrett Mills - Posts & Updates (JSON)" type="application/feed+json")
//link(rel="alternate" href="/blog/atom.xml" title="Garrett's Blog (Atom)" type="application/atom+xml")
//link(rel="alternate" href="/blog/rss2.xml" title="Garrett's Blog (RSS)" type="application/rss+xml")
//link(rel="alternate" href="/blog/json.json" title="Garrett's Blog (JSON)" type="application/feed+json")
//link(rel='apple-touch-icon' sizes='180x180' href=asset('favicon/apple-touch-icon.png'))
//link(rel='manifest' href=asset('favicon/site.webmanifest'))
//link(rel='icon' type='image/png' sizes='32x32' href=asset('favicon/favicon-32x32.png'))
//link(rel='icon' type='image/png' sizes='16x16' href=asset('favicon/favicon-16x16.png'))
//link(rel='shortcut icon' href=asset('favicon/favicon.ico'))
body body
.wrapper .wrapper
@@ -146,9 +119,6 @@ html(lang="en")
footer footer
.obsidian glm. .obsidian glm.
p &copy 2015-#{(new Date).getFullYear()} Garrett Mills — <a href="/technical">Technical Info</a> p &copy 2015-#{(new Date).getFullYear()} Garrett Mills — <a href="/technical">Technical Info</a>
//if user()
//p &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
//a(href="/dash") Dashboard
block script block script

View File

@@ -26,7 +26,7 @@ metadata:
<subtitle>{{ metadata.description }}</subtitle> <subtitle>{{ metadata.description }}</subtitle>
<logo>{{ metadata.base }}/assets/favicon/apple-touch-icon.png</logo> <logo>{{ metadata.base }}/assets/favicon/apple-touch-icon.png</logo>
<icon>{{ metadata.base }}/assets/favicon/favicon.ico</icon> <icon>{{ metadata.base }}/assets/favicon/favicon.ico</icon>
<rights>Copyright (c) 2025 Garrett Mills. See website for licensing details.</rights> <rights>Copyright (c) 2026 Garrett Mills. See website for licensing details.</rights>
<category term="Technology"/> <category term="Technology"/>
<category term="Software Development"/> <category term="Software Development"/>
{%- for post in collections.blog %} {%- for post in collections.blog %}

View File

@@ -25,7 +25,7 @@ metadata:
<url>{{ metadata.base }}/assets/favicon/apple-touch-icon.png</url> <url>{{ metadata.base }}/assets/favicon/apple-touch-icon.png</url>
<link>{{ metadata.base }}/blog</link> <link>{{ metadata.base }}/blog</link>
</image> </image>
<copyright>Copyright (c) 2025 Garrett Mills. See website for licensing details.</copyright> <copyright>Copyright (c) 2026 Garrett Mills. See website for licensing details.</copyright>
<category>Technology</category> <category>Technology</category>
<category>Software Development</category> <category>Software Development</category>
<atom:link href="permalink | htmlBaseUrl(metadata.base)" rel="self" type="application/rss+xml"/> <atom:link href="permalink | htmlBaseUrl(metadata.base)" rel="self" type="application/rss+xml"/>

View File

@@ -0,0 +1,47 @@
---
permalink: /feed/atom.xml
eleventyExcludeFromCollections: true
metadata:
title: "Garrett Mills - Notes"
description: "Misc notes, posts, links, and updates from garrettmills.dev."
language: en
base: "https://garrettmills.dev"
author:
name: "Garrett Mills"
email: "shout@garrettmills.dev"
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://garrettmills.dev/blog/feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ metadata.base }}/#about</id>
<title>{{ metadata.title }}</title>
<updated>{{ collections.feedDesc | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
<uri>{{ metadata.base }}/#about</uri>
</author>
<link rel="alternate" href="{{ metadata.base }}/feed"/>
<link rel="self" href="{{ metadata.base }}/feed/atom.xml"/>
<subtitle>{{ metadata.description }}</subtitle>
<logo>{{ metadata.base }}/assets/favicon/apple-touch-icon.png</logo>
<icon>{{ metadata.base }}/assets/favicon/favicon.ico</icon>
<rights>Copyright (c) 2026 Garrett Mills. See website for licensing details.</rights>
<category term="Technology"/>
<category term="Software Development"/>
{%- for post in collections.feedDesc %}
{%- set absolutePostUrl = post.url | htmlBaseUrl(metadata.base) %}
<entry>
<title type="html"><![CDATA[{{ post.data.title }}]]></title>
<id>{{ absolutePostUrl }}</id>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | dateToRfc3339 }}</updated>
<author>
<name>{{ metadata.author.name }}</name>
<email>{{ metadata.author.email }}</email>
<uri>{{ metadata.base }}/#about</uri>
</author>
<content type="html">{{ post.content | renderTransforms(post.data.page, metadata.base) }}</content>
</entry>
{%- endfor %}
</feed>

View File

@@ -0,0 +1,45 @@
---
permalink: /feed/json.json
eleventyExcludeFromCollections: true
metadata:
title: "Garrett Mills - Notes"
description: "Misc notes, posts, links, and updates from garrettmills.dev."
language: en
base: "https://garrettmills.dev"
author:
name: "Garrett Mills"
email: "shout@garrettmills.dev"
---
{
"version": "https://jsonfeed.org/version/1.1",
"title": "{{ metadata.title }}",
"language": "{{ metadata.language }}",
"home_page_url": "{{ metadata.base | addPathPrefixToFullUrl }}",
"feed_url": "{{ permalink | htmlBaseUrl(metadata.base) }}",
"description": "{{ metadata.description }}",
"icon": "{{ metadata.base }}/assets/favicon/apple-touch-icon.png",
"authors": [
{
"name": "{{ metadata.author.name }}",
"url": "{{ metadata.base }}/#about"
}
],
"items": [
{%- for post in collections.feedDesc %}
{%- set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.base) }}{% endset %}
{
"id": "{{ absolutePostUrl }}",
"url": "{{ absolutePostUrl }}",
"title": "{{ post.data.title }}",
"content_html": {% if post.content %}{{ post.content | renderTransforms(post.data.page, metadata.base) | dump | safe }}{% else %}""{% endif %},
"date_published": "{{ post.date | dateToRfc3339 }}",
"date_modified": "{{ post.date | dateToRfc3339 }}",
"author": {
"name": "{{ metadata.author.name }}",
"url": "{{ metadata.base }}/#about"
}
}
{% if not loop.last %},{% endif %}
{%- endfor %}
]
}

View File

@@ -0,0 +1,47 @@
---
permalink: /feed/rss.xml
eleventyExcludeFromCollections: true
metadata:
title: "Garrett Mills - Notes"
description: "Misc notes, posts, links, and updates from garrettmills.dev."
language: en
base: "https://garrettmills.dev"
author:
name: "Garrett Mills"
email: "shout@garrettmills.dev"
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://garrettmills.dev/blog/feed.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ metadata.title }}</title>
<link>{{ metadata.base }}/feed</link>
<description>{{ metadata.description }}</description>
<lastBuildDate>{{ collections.feedDesc | getNewestCollectionItemDate | dateToRfc822 }}</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<language>{{ metadata.language }}</language>
<image>
<title>{{ metadata.title }}</title>
<url>{{ metadata.base }}/assets/favicon/apple-touch-icon.png</url>
<link>{{ metadata.base }}/feedDesc</link>
</image>
<copyright>Copyright (c) 2026 Garrett Mills. See website for licensing details.</copyright>
<category>Technology</category>
<category>Software Development</category>
<atom:link href="permalink | htmlBaseUrl(metadata.base)" rel="self" type="application/rss+xml"/>
{%- for post in collections.feedDesc %}
{%- set absolutePostUrl = post.url | htmlBaseUrl(metadata.base) %}
<item>
<title><![CDATA[{{ post.data.title }}]]></title>
<link>{{ absolutePostUrl }}</link>
<guid>{{ absolutePostUrl }}</guid>
<pubDate>{{ post.date | dateToRfc822 }}</pubDate>
<author>{{ metadata.author.name }}</author>
<dc:creator>{{ metadata.author.name }}</dc:creator>
<description>{{ post.content | renderTransforms(post.data.page, metadata.base) }}</description>
<content:encoded>{{ post.content | renderTransforms(post.data.page, metadata.base) }}</content:encoded>
</item>
{%- endfor %}
</channel>
</rss>