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