Skip to content

Commit f6fcbc0

Browse files
committed
fix(astro): add meta tags to redirect page too
1 parent 084ffa9 commit f6fcbc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/astro/src/default/pages/index.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import MetaTags from '../components/MetaTags.astro';
23
import { getTutorial } from '../utils/content';
34
import { joinPaths } from '../utils/url';
45
@@ -9,11 +10,13 @@ const part = lesson.part && tutorial.parts[lesson.part.id];
910
const chapter = lesson.chapter && part?.chapters[lesson.chapter.id];
1011
1112
const slug = [part?.slug, chapter?.slug, lesson.slug].filter(Boolean).join('/');
13+
const meta = lesson.data?.meta ?? {};
1214
1315
const redirect = joinPaths(import.meta.env.BASE_URL, `/${slug}`);
1416
---
1517

1618
<!doctype html>
1719
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
1820
<title>Redirecting to {redirect}</title>
21+
<MetaTags slot="meta" meta={meta} />
1922
<meta http-equiv="refresh" content=`0;url=${redirect}` />

0 commit comments

Comments
 (0)