From e55e3f607d69b1258a53ee28c7f684a98f708aea Mon Sep 17 00:00:00 2001 From: bytedream Date: Sat, 31 Oct 2026 02:00:14 +0100 Subject: [PATCH] update opengraph even more --- src/layouts/BaseLayout.astro | 4 ++-- src/pages/video/[name].astro | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index fe7f024..e662f81 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -28,9 +28,9 @@ const { title, description, keywords, openGraph, viewTransition } = Astro.props; <> {description && } - + - + )} diff --git a/src/pages/video/[name].astro b/src/pages/video/[name].astro index 18e67d6..3385633 100644 --- a/src/pages/video/[name].astro +++ b/src/pages/video/[name].astro @@ -2,6 +2,7 @@ import WebsiteLayout from '@layouts/website/WebsiteLayout.astro'; import VideoPlayer from '@app/website/video/VideoPlayer.svelte'; import { getVideoMetadata, resolveVideo } from '@util/video.ts'; +import { BASE_HOST, BASE_PATH } from 'astro:env/server'; const { name } = Astro.params; @@ -12,8 +13,7 @@ const metadata = await getVideoMetadata(video); if (!metadata) return new Response(null, { status: 404 }); const { title, description, width, height, duration } = metadata; -const basePath = import.meta.env.BASE_URL.replace(/\/$/, ''); -const streamPath = `${basePath}/video/${encodeURIComponent(video.name)}/stream`; +const streamPath = `${BASE_HOST}/${BASE_PATH}/video/${encodeURIComponent(video.name)}/stream`; ---