File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/astro/src/default/pages Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11---
2+ import MetaTags from ' ../components/MetaTags.astro' ;
23import { getTutorial } from ' ../utils/content' ;
34import { joinPaths } from ' ../utils/url' ;
45
@@ -9,11 +10,16 @@ const part = lesson.part && tutorial.parts[lesson.part.id];
910const chapter = lesson .chapter && part ?.chapters [lesson .chapter .id ];
1011
1112const 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' ;
1217
1318const redirect = joinPaths (import .meta .env .BASE_URL , ` /${slug } ` );
1419---
1520
1621<!doctype html >
1722<link rel =" icon" type =" image/svg+xml" href =" /favicon.svg" />
1823<title >Redirecting to { redirect } </title >
24+ <MetaTags slot =" meta" meta ={ meta } />
1925<meta http-equiv =" refresh" content =`0;url=${redirect }` />
You can’t perform that action at this time.
0 commit comments