jk.nipponalba.scot website https://jk.nipponalba.scot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
jk 36766eccea Scripted auto-commit on change (2020-07-27 19:08:52) by gitwatch.sh 4 years ago
..
i18n corrected the image taxonomy and enabled atom feeds 5 years ago
layouts/_default corrected the image taxonomy and enabled atom feeds 5 years ago
LICENSE corrected the image taxonomy and enabled atom feeds 5 years ago
README.org corrected the image taxonomy and enabled atom feeds 5 years ago
config.toml corrected the image taxonomy and enabled atom feeds 5 years ago
theme.toml corrected the image taxonomy and enabled atom feeds 5 years ago

README.org

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

To enable ATOM feeds for your site:

  1. Clone this repo to <your-site-dir>/themes/hugo-atom-feed directory.

  2. Add these your site's config.toml:

    • Add "hugo-atom-feed" as the left-most element of the theme list variable. For example:

      theme = ["hugo-atom-feed", "my-theme"]
      
    • 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"

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 😉.