All Projects → kaushalmodi → hugo-atom-feed

kaushalmodi / hugo-atom-feed

Licence: GPL-3.0 License
Hugo theme component for ATOM feed custom Output Format

Projects that are alternatives of or similar to hugo-atom-feed

hugo-search-fuse-js
Hugo theme component for implementing static site search using Fuse.js
Stars: ✭ 52 (+79.31%)
Mutual labels:  hugo, hugo-theme-component, custom-output-format
hugo-cloak-email
A Hugo theme component to cloak email adresses
Stars: ✭ 71 (+144.83%)
Mutual labels:  hugo, hugo-theme-component
hugo-component-matomo
Matomo user tracking and optout scripts for Hugo
Stars: ✭ 38 (+31.03%)
Mutual labels:  hugo, hugo-theme-component
hugo-shortcodes-netlify-cms
Shortcodes of Hugo for Netlify CMS Text Editor
Stars: ✭ 50 (+72.41%)
Mutual labels:  hugo, hugo-theme-component
hugo-notice
A Hugo theme component to display nice notices
Stars: ✭ 138 (+375.86%)
Mutual labels:  hugo, hugo-theme-component
vanilla-bootstrap-hugo-theme
A vanilla Bootstrap theme for Hugo
Stars: ✭ 63 (+117.24%)
Mutual labels:  hugo
hugo-geekdoc
Hugo theme made for documentation
Stars: ✭ 284 (+879.31%)
Mutual labels:  hugo
hugo-travelify-theme
Port of Aigars Silkalns's Wordpress theme Travelify to Hugo. Demo -
Stars: ✭ 34 (+17.24%)
Mutual labels:  hugo
hugo-starter-tailwind-basic
A basic and simple to set up Hugo with TailwindCSS starter project.
Stars: ✭ 80 (+175.86%)
Mutual labels:  hugo
hugo-wrapper
The universal way to include Hugo binary to your project.
Stars: ✭ 27 (-6.9%)
Mutual labels:  hugo
feed-nim
A feed parsing module for Nim
Stars: ✭ 21 (-27.59%)
Mutual labels:  atom-feed
hugo jupyter
Publish Jupyter notebooks with Hugo
Stars: ✭ 69 (+137.93%)
Mutual labels:  hugo
hugo-bare-min-theme
A bare minimum theme for Hugo (https://gohugo.io) to help develop and debug Hugo sites -- https://hugo-bare-min.netlify.com/,
Stars: ✭ 71 (+144.83%)
Mutual labels:  hugo
simple-a
Minimalistic Hugo theme
Stars: ✭ 52 (+79.31%)
Mutual labels:  hugo
tikz favorites
collection of favorite TikZ graphics
Stars: ✭ 62 (+113.79%)
Mutual labels:  hugo
robjhyndman.com
Source files for robjhyndman.com
Stars: ✭ 38 (+31.03%)
Mutual labels:  hugo
hugo-gh-pages
🚀 Build and Publish Your Hugo Site to GitHub Pages 🚀
Stars: ✭ 37 (+27.59%)
Mutual labels:  hugo
huge
This is HUGE! A Hugo framework.
Stars: ✭ 17 (-41.38%)
Mutual labels:  hugo
Binario
Responsive card-based & code-light Hugo theme
Stars: ✭ 79 (+172.41%)
Mutual labels:  hugo
bookworm-light
Bookworm is a clean and modern Hugo blog theme focused on high speed and support multiple authors.
Stars: ✭ 59 (+103.45%)
Mutual labels:  hugo

This is not a standalone theme. This is a Hugo theme component.

This component enables ATOM feeds for your site.

Requirements

You need to install the latest version of Go from https://go.dev/doc/install because this theme component requires ~hugo mod ..~ commands to work.

This update on switch to using Hugo Modules was last tested with Hugo v0.92.0.

Installing

  1. Add this component as a new module to your site’s TOML config file:
    [module]
      [[module.imports]]
        path = "github.com/kaushalmodi/hugo-atom-feed"
        
  2. Add “ATOM” to all the Page Kinds for which you want to create ATOM feeds:
    [outputs]
      # <domain>/atom.xml
      home = ["HTML", "RSS", "ATOM"]     # default = ["HTML", "RSS"]
      # <domain>/posts/atom.xml
      section = ["HTML", "RSS", "ATOM"]  # default = ["HTML", "RSS"]
      # <domain>/tags/mytag/atom.xml, <domain>/categories/mycat/atom.xml
      taxonomy = ["HTML", "RSS", "ATOM"] # default = ["HTML", "RSS"]
        

Selectively excluding pages from the feed

For the pages that you would like to exclude from the feed, set the disable_feed parameter in its front-matter to true.

disable_feed = true

Pay attention to web server MIME type

To fully comply with web standards, make sure your web server will send the correct /Content-Type/ HTTP response header for the feed file name atom.xml. The correct response header looks like this:

Content-Type: application/atom+xml; charset=UTF-8

Note that even though the feed file extension is .xml, the MIME type here is slightly adjusted from application/xml to application/atom+xml.

While this might not be important for many feed readers, it could still be a source of error. So it is a good idea to play safe. How you could achieve this depends on the type of web server software you are running your website on.

Specifying the correct Content-Type for Netlify

You can specify the Content-Type of atom.* and *.atom files to be application/atom+xml; charset=UTF-8 using the below in your site’s netlify.toml:

[[headers]]
  for = "atom.*"
  [headers.values]
    Content-Type = "application/atom+xml; charset=UTF-8"
[[headers]]
  for = "*.atom"
  [headers.values]
    Content-Type = "application/atom+xml; charset=UTF-8"

References

Note about Google Chrome

Note that Google Chrome currently still features a bug for such MIME types so that automatic XML rendering is not performed. You may decide what is more important for you: watching the rendered source in your browser once in a while, or maximum feed reader compatibility 😉.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].