@@ -8,6 +8,7 @@ type Props = {
88};
99
1010const { title, description, containerClass = ' max-w-6xl' } = Astro .props ;
11+ const base = import .meta .env .BASE_URL ;
1112const siteName = " Vikram's Focushours" ;
1213const metaTitle = title ? ` ${title } | ${siteName } ` : siteName ;
1314const metaDescription = description ?? ' Writing and notes.' ;
@@ -109,9 +110,9 @@ const metaDescription = description ?? 'Writing and notes.';
109110 })();
110111 </script >
111112
112- <link rel =" icon" href =" / favicon.svg" type =" image/svg+xml" sizes =" any" />
113- <link rel =" shortcut icon" href =" / favicon.svg" />
114- <link rel =" apple-touch-icon" href =" / favicon.svg" />
113+ <link rel =" icon" href ={ ` ${ base } favicon.svg` } type =" image/svg+xml" sizes =" any" />
114+ <link rel =" shortcut icon" href ={ ` ${ base } favicon.svg` } />
115+ <link rel =" apple-touch-icon" href ={ ` ${ base } favicon.svg` } />
115116
116117 <link rel =" preconnect" href =" https://fonts.googleapis.com" />
117118 <link rel =" preconnect" href =" https://fonts.gstatic.com" crossorigin />
@@ -121,28 +122,29 @@ const metaDescription = description ?? 'Writing and notes.';
121122 />
122123
123124 <title >{ metaTitle } </title >
125+ <style is:inline >{`:root{--base-url:${base};}`}</style >
124126 </head >
125127 <body class =" min-h-screen font-sans flex flex-col bg-zinc-50 text-zinc-900 transition-colors duration-300 dark:bg-zinc-950 dark:text-zinc-50" >
126128 <header class =" sticky top-0 z-50 border-b border-zinc-200 bg-white/70 backdrop-blur transition-colors duration-300 dark:border-zinc-800 dark:bg-zinc-950/70" >
127129 <div class ={ ` mx-auto flex ${containerClass } flex-wrap items-center justify-between gap-4 px-4 py-4 ` } >
128- <a href =" / " class =" flex min-w-0 items-center gap-3 no-underline" >
130+ <a href ={ base } class =" flex min-w-0 items-center gap-3 no-underline" >
129131 <picture >
130- <source srcset =" / mascot.png" type =" image/png" />
131- <img src =" / mascot.svg" alt =" Vikram mascot" class =" h-[75px] w-[75px]" />
132+ <source srcset ={ ` ${ base } mascot.png` } type =" image/png" />
133+ <img src ={ ` ${ base } mascot.svg` } alt =" Vikram mascot" class =" h-[75px] w-[75px]" />
132134 </picture >
133135 <span class =" truncate text-[32px] leading-none font-semibold tracking-tight text-black dark:text-zinc-50" >
134136 { siteName }
135137 </span >
136138 </a >
137139 <nav class =" flex shrink-0 items-center gap-4 text-sm" >
138140 <a
139- href =" / "
141+ href ={ base }
140142 class =" no-underline text-zinc-700 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white"
141143 >
142144 Blog
143145 </a >
144146 <a
145- href =" / about/"
147+ href ={ ` ${ base } about/` }
146148 class =" no-underline text-zinc-700 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white"
147149 >
148150 About
0 commit comments