kaushalmodi / hugo-atom-feed

Hugo theme component for ATOM feed custom Output Format
GNU General Public License v3.0
39 stars 13 forks source link

Allow rename of the feed file name #15

Open jpawlowski opened 4 years ago

jpawlowski commented 4 years ago

This will make it easier for people to rename the feed file name.

  1. Adding manual actions to be done by the user to README
  2. Adding a symlink from list.atom to list.atom.xml so that it will be transparent for regular users
jpawlowski commented 4 years ago

FYI, I was not able to define a secondary outputFormat and media type so that the user could simply switch between the names just by using a different name in site.outputs:

[outputs]
  home = [ "HTML", "JSON", "RSS", "AtomExt" ]
  section = [ "HTML", "RSS", "AtomExt" ]
  taxonomy = [ "HTML", "RSS", "AtomExt" ]
  taxonomyTerm = [ "HTML", "RSS", "AtomExt" ]

[mediaTypes."application/atom+xml"]
  suffixes = ["atom", "xml"]

[outputFormats.Atom]
  name = "Atom"
  mediaType = "application/atom+xml"
  baseName = "atom"
  isPlainText = false
  rel = "alternate"
  isHTML = false
  noUgly = true
  permalinkable = false

[outputFormats.AtomExt]
  name = "Atom"
  mediaType = "application/atom+xml"
  baseName = "feed"
  isPlainText = false
  rel = "alternate"
  isHTML = false
  noUgly = true
  permalinkable = false
kaushalmodi commented 4 years ago

FYI, I was not able to define a secondary outputFormat

Can you please open a bug report for this in the Hugo repo?

May be first ask in the Hugo Discourse.

jpawlowski commented 4 years ago

External conversation: https://discourse.gohugo.io/t/defining-a-second-output-format-for-the-same-media-type/20078

jpawlowski commented 4 years ago

Based on the feedback from the Hugo community page, I don't think there can be any other solution besides providing the symlink and instruct the user how to replace/overwrite default settings, like I am suggesting with this PR.