diff --git a/packages/@statusfy/core/client/components/mixins/head.js b/packages/@statusfy/core/client/components/mixins/head.js index 68809730b..01c504da0 100644 --- a/packages/@statusfy/core/client/components/mixins/head.js +++ b/packages/@statusfy/core/client/components/mixins/head.js @@ -1,5 +1,5 @@ export default { - head () { + head() { const favicons = this.$statusfy.iconSizes.map(size => { return { hid: `favicon-${size}`, @@ -11,11 +11,41 @@ export default { const canonical = `${this.$statusfy.baseUrl}${this.$route.path}` + // Atom and RSS + let linksFeeds = [] + if (this.$statusfy.notifications && this.$statusfy.notifications.feeds) { + const feedsBaseUrl = this.$statusfy.baseUrl === '/' + ? '/feeds' + : `${this.$statusfy.baseUrl}/feeds` + + linksFeeds = [{ + rel: 'alternate', + type: 'application/rss+xml', + hid: 'alternate-feed-rss', + title: '', + href: `${feedsBaseUrl}/incidents.${this.$i18n.locale}.xml` + }, + { + rel: 'alternate', + type: 'application/atom+xml', + hid: 'alternate-feed-atom', + title: '', + href: `${feedsBaseUrl}/incidents.${this.$i18n.locale}.atom`, + }, + ] + } + return { link: [ ...favicons, - { rel: 'canonical', href: canonical, hid: 'canonical' } - ] + ...linksFeeds, + { + rel: 'canonical', + href: canonical, + hid: 'canonical' + }, + ], + } } }