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.
This commit is contained in:
parent
ba6bb5d369
commit
3fcdc6c4b5
2 changed files with 4 additions and 1 deletions
|
@ -16,6 +16,8 @@
|
|||
{{ .Content | safeJS }}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ $rssPath := .Site.Params.rssPath | default "/index.xml" }}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="{{ $rssPath | relURL }}">
|
||||
</head>
|
||||
|
||||
<body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue