File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ import { cn } from "@/lib/utils"
1717import remarkUnwrapImages from "remark-unwrap-images"
1818
1919// Helper to make hrefs work with GitHub Pages / subdirectory deployment
20+ const repoName = process . env . NEXT_PUBLIC_REPO_NAME || "VibeCoding_Tutorial" ;
21+ const basePath = `/${ repoName } ` ;
22+
2023const processHref = ( href ?: string ) => {
21- const basePath = "/vibecoding_tutorial"
2224 return href ?. startsWith ( "/" ) && ! href . startsWith ( basePath )
2325 ? `${ basePath } ${ href } `
2426 : href
@@ -333,13 +335,13 @@ export default async function LessonPage({ params }: LessonPageProps) {
333335 if ( ! inline && language === "video" ) {
334336 try {
335337 const content = JSON . parse ( contentStr )
338+ const videoSrc = processHref ( content . src )
336339 return (
337340 < div className = "my-10 not-prose" >
338341 < video
339- src = { content . src }
342+ src = { videoSrc }
340343 controls = { content . controls !== false }
341344 className = "w-full rounded-xl shadow-lg border border-border/50 bg-black"
342- { ...content }
343345 />
344346 { content . caption && (
345347 < p className = "text-center text-sm text-muted-foreground mt-3 italic" >
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ export default function RootLayout({
3131 >
3232 < ThemeProvider
3333 attribute = "class"
34- defaultTheme = "system "
35- enableSystem
34+ defaultTheme = "light "
35+ enableSystem = { false }
3636 disableTransitionOnChange
3737 >
3838 { children }
You can’t perform that action at this time.
0 commit comments