diff options
| author | Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> | 2025-01-20 13:39:52 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <94913521+arielcostas@users.noreply.github.com> | 2025-01-20 13:39:52 +0100 |
| commit | 2b13e3d12cac732500ab1364358b33eeff9d361d (patch) | |
| tree | 03fb447eb73837fcb43b0776d2b0e49d8f26f11e /src | |
| parent | a20afcb783cece9496240a9444855f1475dc4244 (diff) | |
Fix canonical URLs with .html extension
Diffstat (limited to 'src')
| -rw-r--r-- | src/layouts/Layout.astro | 2 | ||||
| -rw-r--r-- | src/partials/Header.astro | 16 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index e1ab283..6eff088 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -19,7 +19,7 @@ const { title, description } = Astro.props; <meta name="description" content={description} /> <meta name="viewport" content="width=device-width" /> - <link rel="canonical" href={Astro.url} /> + <link rel="canonical" href={Astro.url.toString().replace(/\.html$/, '')} /> <link rel="alternate" type="application/rss+xml" href="/blog.xml" /> <link rel="sitemap" type="application/xml" href="/sitemap-index.xml" /> diff --git a/src/partials/Header.astro b/src/partials/Header.astro index 489dc47..4378ddc 100644 --- a/src/partials/Header.astro +++ b/src/partials/Header.astro @@ -1,15 +1,9 @@ ---- -import Favicon from "../assets/Favicon.astro"; ---- - <header> - - <a href="/">Inicio</a> - <a href="/trajectory">Trayectoria</a> - <a href="/portfolio">Portfolio</a> - <a href="/blog">Blog</a> - <a href="/contact">Contacto</a> - + <a href="/">Inicio</a> + <a href="/trajectory">Trayectoria</a> + <a href="/portfolio">Portfolio</a> + <a href="/blog">Blog</a> + <a href="/contact">Contacto</a> </header> <style lang="scss"> |
