Skip to content

Commit

Permalink
Merge pull request #1850 from Weaxs/dev
Browse files Browse the repository at this point in the history
support rssnext/follow to claim feed as your own
  • Loading branch information
nunocoracao authored Dec 1, 2024
2 parents fa33a77 + 369812f commit b58bbbe
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,7 @@ forgejoDefaultServer = "https://v8.next.forgejo.org"
# pinterest = ""
# yandex = ""
# fediverse = ""

[rssnext]
# feedId = ""
# userId = ""
4 changes: 4 additions & 0 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,7 @@ smartTOCHideUnfocusedChildren = false
# bing = ""
# pinterest = ""
# yandex = ""

[rssnext]
# feedId = ""
# userId = ""
7 changes: 7 additions & 0 deletions exampleSite/content/docs/configuration/index.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `verification.yandex` | _Not set_ | The site verification string provided by Yandex to be included in the site metadata. |
<!-- prettier-ignore-end -->

## RSSNext

| Name | Default | Description |
| ------------------------ | --------- |--------------------------------------------------------------------------------------------------------------------------------------|
| `rssnext.feedId` | _Not set_ | The rss `feedId` string provided by [RSSNext/Follow](https://follow.is/) to be included in the `rss.xml`, which can helps to claim rss feed as your own. |
| `rssnext.userId` | _Not set_ | The rss `userId` string provided by [RSSNext/Follow](https://follow.is/) to be included in the `rss.xml`, which can helps to claim rss feed as your own. |

## Other configuration files

The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish.
Expand Down
7 changes: 7 additions & 0 deletions exampleSite/content/docs/configuration/index.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,13 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `verification.yandex` | _Not set_ | The site verification string provided by Yandex to be included in the site metadata. |
<!-- prettier-ignore-end -->

## RSSNext

| Name | Default | Description |
| ------------------------ | --------- |--------------------------------------------------------------------------------------------------------------------------------------|
| `rssnext.feedId` | _Not set_ | The rss `feedId` string provided by [RSSNext/Follow](https://follow.is/) to be included in the `rss.xml`, which can helps to claim rss feed as your own. |
| `rssnext.userId` | _Not set_ | The rss `userId` string provided by [RSSNext/Follow](https://follow.is/) to be included in the `rss.xml`, which can helps to claim rss feed as your own. |

## Other configuration files

The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish.
Expand Down
8 changes: 8 additions & 0 deletions exampleSite/content/docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,14 @@ Many of the article defaults here can be overridden on a per article basis by sp
| `verification.fediverse` | _Not set_ | The fediverse handle to include in the site metadata. Include the server domain in the username, e.g. `@[email protected]`. |
<!-- prettier-ignore-end -->

## RSSNext

| Name | Default | Description |
| ------------------------ | --------- |--------------------------------------------------------------------------------------------------------------------------------------|
| `rssnext.feedId` | _Not set_ | The rss `feedId` string provided by [RSSNext/Follow](https://follow.is/) to be included in the `rss.xml`, which can helps to claim rss feed as your own. |
| `rssnext.userId` | _Not set_ | The rss `userId` string provided by [RSSNext/Follow](https://follow.is/) to be included in the `rss.xml`, which can helps to claim rss feed as your own. |


## Other configuration files

The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Blowfish.
Expand Down
8 changes: 8 additions & 0 deletions exampleSite/content/docs/configuration/index.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `verification.yandex` || Yandex 提供的网站验证字符串,用于在网站元数据中包含。 |
<!-- prettier-ignore-end -->

## RSSNext

| Name | Default | Description |
| ------------------------ | --------- |---------------------------------------------------------------------------------------------|
| `rssnext.feedId` | _Not set_ | [RSSNext/Follow](https://follow.is) 提供的 `feeId`,这将被自动添加在 `rss.xml` 中以便完成订阅源所有权验证,证明该源属于你自己。 |
| `rssnext.userId` | _Not set_ | [RSSNext/Follow](https://follow.is) 提供的 `userId`,这将被自动添加在 `rss.xml` 中以便完成订阅源所有权验证,证明该源属于你自己 |


## 别的配置文件

Blowfish 主题还包括 `markup.toml` 配置文件。这个文件包含了一些重要参数,来确保 Hugo 正确配置以生成使用 Blowfish 创建的网站。
Expand Down
6 changes: 6 additions & 0 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ if and (.Site.Params.rssnext.feedId) (.Site.Params.rssnext.userId) }}
<follow_challenge>
<feedId>{{ .Site.Params.rssnext.feedId }}</feedId>
<userId>{{ .Site.Params.rssnext.userId }}</userId>
</follow_challenge>
{{ end }}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
Expand Down

0 comments on commit b58bbbe

Please sign in to comment.