mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-08-29 01:53:47 +08:00
feat: 2 rules for feed validation (#2825)
This commit is contained in:
@@ -57,6 +57,7 @@ module.exports = async (ctx, next) => {
|
||||
lastBuildDate: new Date().toUTCString(),
|
||||
updated: new Date().toISOString(),
|
||||
ttl: routeTtl,
|
||||
atomlink: ctx.request.header.host + ctx.request.path,
|
||||
...ctx.state.data,
|
||||
};
|
||||
if (template) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<generator>RSSHub</generator>
|
||||
<webMaster>i@diygod.me</webMaster>
|
||||
<webMaster>i@diygod.me (DIYgod)</webMaster>
|
||||
<language>{{ language || 'zh-cn' }}</language>
|
||||
<id>{{ id || link }}</id>
|
||||
<title><![CDATA[{{@ title || 'RSSHub' }}]]></title>
|
||||
|
||||
+3
-2
@@ -2,14 +2,15 @@
|
||||
{{ if itunes_author }}
|
||||
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
|
||||
{{else}}
|
||||
<rss version="2.0">
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
{{ /if }}
|
||||
<channel>
|
||||
<title><![CDATA[{{@ title || 'RSSHub' }}]]></title>
|
||||
<link>{{ link || 'https://github.com/DIYgod/RSSHub' }}</link>
|
||||
<atom:link href="{{ atomlink }}" rel="self" type="application/rss+xml" />
|
||||
<description><![CDATA[{{@ description || title }} - Made with love by RSSHub(https://github.com/DIYgod/RSSHub)]]></description>
|
||||
<generator>RSSHub</generator>
|
||||
<webMaster>i@diygod.me</webMaster>
|
||||
<webMaster>i@diygod.me (DIYgod)</webMaster>
|
||||
{{ if itunes_author }}<itunes:author>{{ itunes_author}}</itunes:author>{{ /if }}
|
||||
{{ if itunes_category }}<itunes:category text="{{ itunes_category }}"/>{{ /if }}
|
||||
<language>{{ language || 'zh-cn' }}</language>
|
||||
|
||||
Reference in New Issue
Block a user