File tree 1 file changed +6
-0
lines changed
packages/astro/src/default/pages
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1
1
---
2
+ import MetaTags from ' ../components/MetaTags.astro' ;
2
3
import { getTutorial } from ' ../utils/content' ;
3
4
import { joinPaths } from ' ../utils/url' ;
4
5
@@ -9,11 +10,16 @@ const part = lesson.part && tutorial.parts[lesson.part.id];
9
10
const chapter = lesson .chapter && part ?.chapters [lesson .chapter .id ];
10
11
11
12
const slug = [part ?.slug , chapter ?.slug , lesson .slug ].filter (Boolean ).join (' /' );
13
+ const meta = lesson .data ?.meta ?? {};
14
+
15
+ meta .title ?? = [lesson .part ?.title , lesson .chapter ?.title , lesson .data .title ].filter (Boolean ).join (' / ' );
16
+ meta .description ?? = ' A TutorialKit interactive lesson' ;
12
17
13
18
const redirect = joinPaths (import .meta .env .BASE_URL , ` /${slug } ` );
14
19
---
15
20
16
21
<!doctype html >
17
22
<link rel =" icon" type =" image/svg+xml" href =" /favicon.svg" />
18
23
<title >Redirecting to { redirect } </title >
24
+ <MetaTags slot =" meta" meta ={ meta } />
19
25
<meta http-equiv =" refresh" content =`0;url=${redirect }` />
You can’t perform that action at this time.
0 commit comments