From 6d1b567a376869a33f9b14ee7c95818ef28be6c2 Mon Sep 17 00:00:00 2001 From: mido <122419606+midozen@users.noreply.github.com> Date: Mon, 4 May 2026 16:51:18 -0500 Subject: [PATCH] Enhance configuration and layout: add environment variables, improve metadata, and update content section keys for consistency Co-authored-by: Copilot --- astro.config.mjs | 7 ++++++- package-lock.json | 20 ++++++++++++++++++- package.json | 3 ++- src/config/content.ts | 4 ++-- src/content/avatar-items/index.mdx | 2 +- src/content/in-game-errors/index.mdx | 2 +- src/layouts/Layout.astro | 27 ++++++++++++++++++++++++-- src/pages/[collection]/[...slug].astro | 6 +++++- src/pages/index.astro | 7 +++++-- 9 files changed, 66 insertions(+), 12 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index cbddedd..ab6d713 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,14 +1,19 @@ // @ts-check import { defineConfig } from 'astro/config'; import tailwindcss from '@tailwindcss/vite'; +import { loadEnv } from 'vite'; import mdx from '@astrojs/mdx'; +const env = loadEnv(process.env.NODE_ENV ?? 'development', process.cwd(), 'PUBLIC_'); + // https://astro.build/config export default defineConfig({ + site: env.PUBLIC_SITE_URL, + vite: { plugins: [tailwindcss()] }, integrations: [mdx()] -}); \ No newline at end of file +}); diff --git a/package-lock.json b/package-lock.json index 7cb472b..f203ea0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "tailwindcss": "^4.2.4" }, "devDependencies": { - "@tailwindcss/typography": "^0.5.19" + "@tailwindcss/typography": "^0.5.19", + "@types/node": "^25.6.0" }, "engines": { "node": ">=22.12.0" @@ -1982,6 +1983,16 @@ "@types/unist": "*" } }, + "node_modules/@types/node": { + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.19.0" + } + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -5675,6 +5686,13 @@ "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==", "license": "MIT" }, + "node_modules/undici-types": { + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "devOptional": true, + "license": "MIT" + }, "node_modules/unified": { "version": "11.0.5", "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz", diff --git a/package.json b/package.json index c1d97ed..e8fc36c 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "tailwindcss": "^4.2.4" }, "devDependencies": { - "@tailwindcss/typography": "^0.5.19" + "@tailwindcss/typography": "^0.5.19", + "@types/node": "^25.6.0" } } diff --git a/src/config/content.ts b/src/config/content.ts index c32bb81..63d1dc9 100644 --- a/src/config/content.ts +++ b/src/config/content.ts @@ -1,8 +1,8 @@ export const contentSections = { - avatarItems: { + "avatar-items": { dir: "avatar-items", }, - inGameErrors: { + "in-game-errors": { dir: "in-game-errors", }, } as const; diff --git a/src/content/avatar-items/index.mdx b/src/content/avatar-items/index.mdx index e020de2..7c0fde7 100644 --- a/src/content/avatar-items/index.mdx +++ b/src/content/avatar-items/index.mdx @@ -13,4 +13,4 @@ Use the pages below to check the current status of avatar item categories. ## Pages - + diff --git a/src/content/in-game-errors/index.mdx b/src/content/in-game-errors/index.mdx index d7e0de7..e8a0075 100644 --- a/src/content/in-game-errors/index.mdx +++ b/src/content/in-game-errors/index.mdx @@ -13,4 +13,4 @@ Choose the error code you are seeing to learn what it usually means and what to ## Error Pages - + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 382053d..0adcd16 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -3,10 +3,20 @@ import "../styles/global.css"; import Breadcrumbs from "../components/Breadcrumbs.astro"; import type { BreadcrumbItem } from "../lib/types/breadcrum"; -const { title, breadcrumbs = [] } = Astro.props as { +const { + title, + description = "Find quick answers, setup guidance, and reference information for Radium.", + breadcrumbs = [], +} = Astro.props as { title: string; + description?: string; breadcrumbs?: BreadcrumbItem[]; }; + +const siteTitle = `Radium Help - ${title}`; +const baseUrl = Astro.site ?? Astro.url; +const pageUrl = new URL(Astro.url.pathname, baseUrl).href; +const imageUrl = new URL("/branding/banner.png", baseUrl).href; --- @@ -14,7 +24,20 @@ const { title, breadcrumbs = [] } = Astro.props as { - Radium Help - {title} + {siteTitle} + + + + + + + + + + + + +
diff --git a/src/pages/[collection]/[...slug].astro b/src/pages/[collection]/[...slug].astro index 58dc675..8362735 100644 --- a/src/pages/[collection]/[...slug].astro +++ b/src/pages/[collection]/[...slug].astro @@ -49,7 +49,11 @@ if (entry.id !== "index") { const { Content } = await render(entry); --- - +
diff --git a/src/pages/index.astro b/src/pages/index.astro index 7800dba..585804d 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,7 +1,6 @@ --- import { getCollection } from "astro:content"; import Layout from "../layouts/Layout.astro"; -import TOC from "../components/TOC.astro"; import { collectionNames } from "../config/content"; const breadcrumbs = [{ label: "Help" }]; @@ -24,7 +23,11 @@ const sections = await Promise.all( ); --- - +

Welcome to Radium's Official Help Page!