ATOM feeds from Hugo

Created on 2021-01-11T02:06:27-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Add to config.toml:

[mediaTypes]
[mediaTypes."application/atom"]
suffix = "xml"

[outputFormats.Atom]
mediaType = "application/atom"
baseName = "index"
isPlainText = false

[outputs]
home = [ "HTML", "Atom" ]

Create layouts/index.atom.xml


  {{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}
  
  {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
  
    YOUR NAME HERE
    YOUR EMAIL ADDRESS
    DEFINITIVE URI OF YOUR WEB SITE
  
  {{ .Permalink }}
  {{ range first 15 .Data.Pages }}
  
    {{ .Title }}
    
    {{ .Permalink }}
    {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}
    {{ .Lastmod.Format "2006-01-02T15:04:05-0700" | safeHTML }}
    {{ .Summary | html }}
  
  {{ end }}