Skip to content

Commit

Permalink
✨ Feat: Add Follow site challenge support in RSS feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Xm798 committed Oct 1, 2024
1 parent e9edbba commit 8614ed4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,10 @@ enableEmoji = true
limit = 10
# whether to show the full text content in feed.
fullText = true
# Site Challenge for Follow: https://follow.is/
[params.feed.follow]
feedId = ""
userId = ""

# FixIt 0.3.12 | NEW Custom partials config
# Custom partials must be stored in the /layouts/partials/ directory.
Expand Down
6 changes: 6 additions & 0 deletions layouts/partials/feed/rss.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{ .Site.Params.description | default .Site.Title }}</description>
{{- if and (.Site.Params.feed.follow.feedId) (.Site.Params.feed.follow.userId) -}}
<follow_challenge>
<feedId>{{ .Site.Params.feed.follow.feedId }}</feedId>
<userId>{{ .Site.Params.feed.follow.userId }}</userId>
</follow_challenge>
{{- end -}}
<generator>Hugo {{ hugo.Version }} &amp; FixIt {{ .Version }}</generator>
<language>{{ .Site.Language.LanguageCode }}</language>{{ with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with .Site.Params.author.email }}
Expand Down

0 comments on commit 8614ed4

Please sign in to comment.