Skip to content

Commit

Permalink
Make RSS feed path configurable (#1034)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Add reference to doc

Signed-off-by: Emruz Hossain <[email protected]>

---------

Signed-off-by: Emruz Hossain <[email protected]>
  • Loading branch information
hossainemruz authored Feb 6, 2025
1 parent ba6bb5d commit aa91957
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 67 deletions.
8 changes: 6 additions & 2 deletions exampleSite/hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

baseURL: http://example.org/
languageCode: en-us
title: Example Site
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -300,7 +305,6 @@ params:
readingTime:
enable: true


# Provide footer configuration.
footer:
enable: true
Expand Down
143 changes: 79 additions & 64 deletions exampleSite/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exampleSite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"imagesloaded": "^5.0.0",
"include-media": "^1.4.10",
"ityped": "^1.0.3",
"katex": "^0.16.21",
"katex": "^0.16.11",
"mark.js": "^8.11.1",
"mermaid": "^11.4.1",
"plyr": "^3.7.2",
Expand Down

0 comments on commit aa91957

Please sign in to comment.