Make RSS feed path configurable (#1034)
* Make RSS feed path configurable Fixes #997 Add configuration option for RSS feed path * Add `rssPath` configuration option in `exampleSite/hugo.yaml` under the `params` section to specify the desired RSS feed path. * Set the default value of `rssPath` to `/rss.xml`. * Update `layouts/_default/baseof.html` to include the RSS feed link with the configured `rssPath` value. * Use the default path `/index.xml` if `rssPath` is not specified. * Add outputFormats to hugo.yaml Signed-off-by: Emruz Hossain <hossainemruz@gmail.com> * Add reference to doc Signed-off-by: Emruz Hossain <hossainemruz@gmail.com> --------- Signed-off-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
parent
ba6bb5d369
commit
aa91957832
3 changed files with 86 additions and 67 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
baseURL: http://example.org/
|
||||
languageCode: en-us
|
||||
title: Example Site
|
||||
|
@ -64,6 +63,12 @@ outputs:
|
|||
- RSS
|
||||
- JSON
|
||||
|
||||
# Configure custom path for RSS feed. Default is "index.xml"
|
||||
# Ref: https://gohugo.io/templates/output-formats/
|
||||
outputFormats:
|
||||
rss:
|
||||
baseName: rss # default is index
|
||||
|
||||
# Enable global emoji support
|
||||
enableEmoji: true
|
||||
|
||||
|
@ -300,7 +305,6 @@ params:
|
|||
readingTime:
|
||||
enable: true
|
||||
|
||||
|
||||
# Provide footer configuration.
|
||||
footer:
|
||||
enable: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue