Added canonical URL
This commit is contained in:
parent
7eff3fde57
commit
536956f0f3
@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from "astro/config";
|
import { defineConfig } from "astro/config";
|
||||||
|
|
||||||
// https://astro.build/config
|
export default defineConfig({
|
||||||
export default defineConfig({});
|
site: "https://popov.link",
|
||||||
|
});
|
||||||
|
5
src/components/CanonicalURL.astro
Normal file
5
src/components/CanonicalURL.astro
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
|
||||||
|
---
|
||||||
|
|
||||||
|
<link href={canonicalURL} rel="canonical" />
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
import CanonicalURL from "../components/CanonicalURL.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
<link href="#" rel="alternate" title="RSS" type="application/atom+xml" />
|
<link href="#" rel="alternate" title="RSS" type="application/atom+xml" />
|
||||||
|
|
||||||
<!-- Canonical URL -->
|
<!-- Canonical URL -->
|
||||||
<link href="#" rel="canonical" />
|
<CanonicalURL />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
Reference in New Issue
Block a user