File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 11---
22import " @/styles/globals.css" ;
3- import { getEntryBySlug } from ' astro:content' ;
43import { CONFIG } from " @/config" ;
54
65export type Props = {
@@ -15,18 +14,9 @@ const {
1514 image = CONFIG .meta .image ,
1615 pageType = " website" ,
1716} = Astro .props ;
18-
19- const getTitle = async (slug ) => {
20- if (Astro .props .title ) return Astro .props .title ;
21-
22- if (! slug ) return CONFIG .meta .title ; // Fallback if no slug is provided
23-
24- const post = await getEntryBySlug (' blog' , slug );
25- return post ?.data .title || CONFIG .meta .title ;
26- };
27-
28- const title = await getTitle (Astro .params ?.slug );
29-
17+ const title = Astro .props .title
18+ ? ` ${Astro .props .title } - ${CONFIG .meta .title } `
19+ : CONFIG .meta .title ;
3020const resolvedImage = image ?.src
3121 ? {
3222 src: new URL (image .src , Astro .site ).toString (),
You can’t perform that action at this time.
0 commit comments