Add a couple of new possible locations for feeds

- Hugo likes to generate index.xml
- feed.atom and feed.rss are used by enterprise-scale/old-school gigantic CMS
This commit is contained in:
jvoisin 2024-02-26 16:58:39 +01:00 committed by Frédéric Guillot
parent 4a943b722d
commit ecd59009fb

View file

@ -196,11 +196,14 @@ func (f *SubscriptionFinder) FindSubscriptionsFromWebPage(websiteURL, contentTyp
func (f *SubscriptionFinder) FindSubscriptionsFromWellKnownURLs(websiteURL string) (Subscriptions, *locale.LocalizedErrorWrapper) { func (f *SubscriptionFinder) FindSubscriptionsFromWellKnownURLs(websiteURL string) (Subscriptions, *locale.LocalizedErrorWrapper) {
knownURLs := map[string]string{ knownURLs := map[string]string{
"atom.xml": parser.FormatAtom, "atom.xml": parser.FormatAtom,
"feed.xml": parser.FormatAtom, "feed.xml": parser.FormatAtom,
"feed/": parser.FormatAtom, "feed/": parser.FormatAtom,
"rss.xml": parser.FormatRSS, "rss.xml": parser.FormatRSS,
"rss/": parser.FormatRSS, "rss/": parser.FormatRSS,
"index.rss": parser.FormatRSS,
"index.xml": parser.FormatRSS,
"feed.atom": parser.FormatAtom,
} }
websiteURLRoot := urllib.RootURL(websiteURL) websiteURLRoot := urllib.RootURL(websiteURL)