summaryrefslogtreecommitdiff
path: root/examples/blog
diff options
context:
space:
mode:
Diffstat (limited to 'examples/blog')
-rw-r--r--examples/blog/public/global.scss (renamed from examples/blog/public/global.css)0
-rw-r--r--examples/blog/src/components/MainHead.astro7
-rw-r--r--examples/blog/src/pages/index.astro6
3 files changed, 12 insertions, 1 deletions
diff --git a/examples/blog/public/global.css b/examples/blog/public/global.scss
index a6007631a..a6007631a 100644
--- a/examples/blog/public/global.css
+++ b/examples/blog/public/global.scss
diff --git a/examples/blog/src/components/MainHead.astro b/examples/blog/src/components/MainHead.astro
index bff812b0c..dfeb9dfb4 100644
--- a/examples/blog/src/components/MainHead.astro
+++ b/examples/blog/src/components/MainHead.astro
@@ -4,6 +4,9 @@ export let title: string;
export let description: string;
export let image: string | undefined;
export let type: string | undefined;
+export let next: string | undefined;
+export let prev: string | undefined;
+export let canonicalURL: string | undefined;
// internal data
const OG_TYPES = {
@@ -17,6 +20,10 @@ const OG_TYPES = {
<title>{title}</title>
<meta name="description" content={description} />
<link rel="stylesheet" href="/global.css" />
+<link rel="sitemap" href="/sitemap.xml" />
+<link rel="canonical" href={canonicalURL} />
+{next && <link rel="next" href={next} />}
+{prev && <link rel="prev" href={prev} />}
<!-- OpenGraph -->
<meta property="og:title" content={title} />
diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro
index 2af3a1a03..19ea4ebf9 100644
--- a/examples/blog/src/pages/index.astro
+++ b/examples/blog/src/pages/index.astro
@@ -21,7 +21,11 @@ let firstThree = allPosts.slice(0, 3);
<html>
<head>
<title>{title}</title>
- <MainHead title={title} description={description} />
+ <MainHead
+ title={title}
+ description={description}
+ canonicalURL={Astro.request.canonicalURL.href}
+ />
</head>
<body>