Web Feeds
Share RSS feeds with full-content and optional enclosures.
After Dark provides RSS web feeds conforming with the RSS 2.0 Specification and enhanced semantically using the following custom extensions:
- Content Module to convey the full content of pages and posts
- Dublin Core to give authorship credit on individual pages
- Atom for improved compatibility with Atom feeds
Feeds are generated automatically on a per-section basis, in addition to a consolidated site-wide feed combining content from across the site:
- /index.xml site-wide feed
- /feature/index.xml features feed
- /module/index.xml modules feed
- /shortcode/index.xml shortcodes feed
- /extra/index.xml extras feed
Add multimedia attachments to pages and posts using RSS enclosures. Enclosures will output automatically to feeds when supplied. To supply an enclosure create a Page Bundle as described in Post Images and shown here for a blog post:
├── archetypes
├── content
│ └── post
│ └── backup-restore-macos-mojave
│ ├── assets
│ │ └── macos_v10.14.3-upgrade-fail.mp4
│ ├── images
│ └── index.md
├── layouts
Then reference the resource from front matter as shown here:
[[resources]]
src = "assets/macos_v10.14.3-upgrade-fail.mp4"
name = "enclosure"
title = "Software Update Malfunction: Mojave 10.14.3"
[resources.params]
length = "3705578"
wc -c < /path/to/file
.
Enclosures may be output to page content by creating a custom shortcode or using a Custom Layout with content like:
{{ with .Resources.GetMatch "enclosure" }}{{ if .Params.length }}
<svg id="i-paperclip" viewBox="0 0 32 32" width="16" height="16" fill="none" stroke="var(--accent-color)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<path d="M10 9 L10 24 C10 28 13 30 16 30 19 30 22 28 22 24 L22 6 C22 3 20 2 18 2 16 2 14 3 14 6 L14 23 C14 24 15 25 16 25 17 25 18 24 18 23 L18 9" />
</svg>
<a href="{{ .Permalink }}" title="{{ with .Title }}{{ . }} {{ end }}[{{ .Params.length }} byte {{ .MediaType }}]">Enclosure</a>
{{ end }}{{ end }}
Use the W3C Feed Validation Service to validate your feed. For help creating custom shortcodes see Create Your Own Shortcodes on the Hugo docs site.
See RSS Templates in Hugo for additional information.