support rssnext/follow to claim feed

This commit is contained in:
Weaxs 2024-11-15 17:54:44 +08:00
parent cf6c0ab6cc
commit 369812f77f
7 changed files with 44 additions and 0 deletions

View file

@ -161,3 +161,7 @@ forgejoDefaultServer = "https://v8.next.forgejo.org"
# pinterest = "" # pinterest = ""
# yandex = "" # yandex = ""
# fediverse = "" # fediverse = ""
[rssnext]
# feedId = ""
# userId = ""

View file

@ -156,3 +156,7 @@ smartTOCHideUnfocusedChildren = false
# bing = "" # bing = ""
# pinterest = "" # pinterest = ""
# yandex = "" # yandex = ""
[rssnext]
# feedId = ""
# userId = ""

View file

@ -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. | | `verification.yandex` | _Not set_ | The site verification string provided by Yandex to be included in the site metadata. |
<!-- prettier-ignore-end --> <!-- 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 ## 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. 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.

View file

@ -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. | | `verification.yandex` | _Not set_ | The site verification string provided by Yandex to be included in the site metadata. |
<!-- prettier-ignore-end --> <!-- 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 ## 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. 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.

View file

@ -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. `@you@instanceaddress.tld`. | | `verification.fediverse` | _Not set_ | The fediverse handle to include in the site metadata. Include the server domain in the username, e.g. `@you@instanceaddress.tld`. |
<!-- prettier-ignore-end --> <!-- 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 ## 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. 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.

View file

@ -356,6 +356,14 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
| `verification.yandex` | 无 | Yandex 提供的网站验证字符串,用于在网站元数据中包含。 | | `verification.yandex` | 无 | Yandex 提供的网站验证字符串,用于在网站元数据中包含。 |
<!-- prettier-ignore-end --> <!-- 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 创建的网站。 Blowfish 主题还包括 `markup.toml` 配置文件。这个文件包含了一些重要参数,来确保 Hugo 正确配置以生成使用 Blowfish 创建的网站。

View file

@ -27,6 +27,12 @@
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}} {{- 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 }} {{ range $pages }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>