diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 3172c09..b61d8fe 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -14,14 +14,15 @@ interface Props { } const defaultTitle = siteConfig.title -const formattedPath = defaultTitle.toLowerCase().replace(/\s+/g, '-'); +const formattedRootPath = defaultTitle.toLowerCase().replace(/\s+/g, '-'); +const relativePath = Astro.url.pathname +const path = formattedRootPath + (relativePath === '/' ? '' : relativePath) const navBarItems = siteConfig.navBarItems const customFooter = siteConfig.customFooter const nekoType = siteConfig.neko?.type -const { title, path = formattedPath, description = siteConfig.description, ogImage = "" } = Astro.props; -// TODO: make the path dynamic +const { title, description = siteConfig.description, ogImage = "" } = Astro.props; --- diff --git a/src/pages/rss.xml.js b/src/pages/rss.xml.js index 77e0091..c3ba18d 100644 --- a/src/pages/rss.xml.js +++ b/src/pages/rss.xml.js @@ -52,7 +52,7 @@ export async function GET(context) { }, sanitize({ dropElements: ["script", "style"] }), ]); - feedItems.push({ ...post.data, link: `/blog/${post.slug}/`, content }); + feedItems.push({ ...post.data, link: `/post/${post.slug}/`, content }); } // Return our RSS feed XML response.