diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-25 17:57:24 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-25 17:57:24 +0100 |
| commit | f3574b604b35d2e7c027b79c9c05c4b81d753390 (patch) | |
| tree | 341b373dfd5bf2037dd2b1768905ee340da5ff9e /src/layouts | |
| parent | 40921a489269e84f6930eaab7df955c4afd5ce7f (diff) | |
Adds machine-readable <link> to RSS feed in page layout
Diffstat (limited to 'src/layouts')
| -rw-r--r-- | src/layouts/Layout.astro | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 9e49ac8..6da5c0a 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -2,6 +2,7 @@ import Footer from '$components/Footer.astro'; import Navbar from '$components/Navbar/Navbar.astro'; import translate from '$i18n/translate'; +import tFeed from '$i18n/translations/pages/rss.xml'; import site from '$i18n/translations/site'; import getLocaleFromPath from '$lib/getLocaleFromPath'; @@ -24,6 +25,12 @@ const t = translate(locale); <link rel="sitemap" href="/sitemap-index.xml" /> <link rel="stylesheet" href="/normalize.css" /> <link rel="stylesheet" href="/main.css" /> + <link + rel="alternate" + type="application/rss+xml" + title={t(tFeed, { key: 'title' })} + href={`/${locale}/rss.xml`} + /> <meta name="generator" content={Astro.generator} /> <title>{title} | {t(site, { key: 'title' })}</title> </head> |
