diff --git a/src/components/layouts/Base/Head.astro b/src/components/layouts/Base/Head.astro index 83fe323c3..1c0eb165e 100644 --- a/src/components/layouts/Base/Head.astro +++ b/src/components/layouts/Base/Head.astro @@ -23,7 +23,7 @@ const descriptionFinal = description const canonicalURL = Astro.url.pathname === '/' ? Astro.site?.origin - : `${Astro.site?.origin}${Astro.url.pathname.replace}` + : `${Astro.site?.origin}${Astro.url.pathname}` const imageFinal = `${Astro.site?.origin}${ image diff --git a/test/e2e/post.spec.ts b/test/e2e/post.spec.ts index d09a0e440..262c0c746 100644 --- a/test/e2e/post.spec.ts +++ b/test/e2e/post.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test' import siteConfig from '@config/blog.config' const postSlug = 'gatsby-redirect-from' -const canonical = `${siteConfig.siteUrl}/${postSlug}` +const canonical = `${siteConfig.siteUrl}/${postSlug}/` test.beforeEach(async ({ page }) => { await page.goto(`/${postSlug}/`) diff --git a/test/vitest.config.ts b/test/vitest.config.ts index 21b5f43f7..4bd854540 100644 --- a/test/vitest.config.ts +++ b/test/vitest.config.ts @@ -26,7 +26,8 @@ export default getViteConfig({ 'src/images/components', 'src/pages', '**/content', - 'public' + 'public', + '**/tmp/**/*' ] } }