Skip to content

Commit 1043d92

Browse files
committed
Add versioned docs infrastructure and fix docs site URL
Install starlight-versions plugin (commented out until first version archive) and configure the versions content collection. Fix site URL to codeforge.core-directive.com and remove /CodeForge base path, updating all internal links and meta tag references.
1 parent 8599b58 commit 1043d92

File tree

9 files changed

+212
-22
lines changed

9 files changed

+212
-22
lines changed

.devcontainer/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Merged setup variables (`.env` flags) into the Environment Variables reference
1919
- Merged `.secrets` file authentication docs into the Configuration page
2020
- Removed `.devcontainer/docs/` directory — all content now lives in the docs site
21+
- **Versioned docs infrastructure** — installed `starlight-versions` plugin; no archived versions yet, first snapshot will be taken when v3 development begins
22+
- **Fixed docs site URL** — updated `site` to `https://codeforge.core-directive.com` and removed `/CodeForge` base path (custom domain serves from root)
2123

2224
### Fixed
2325

docs/astro.config.mjs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import starlightLinksValidator from "starlight-links-validator";
99
import starlightLlmsTxt from "starlight-llms-txt";
1010
import starlightScrollToTop from "starlight-scroll-to-top";
1111
import starlightSidebarTopics from "starlight-sidebar-topics";
12+
// Uncomment when activating versioned docs (see plugin comment below)
13+
// import starlightVersions from "starlight-versions";
1214

1315
export default defineConfig({
14-
site: "https://anexileddev.github.io",
15-
base: "/CodeForge",
16+
site: "https://codeforge.core-directive.com",
1617
integrations: [
1718
// astro-mermaid MUST be registered BEFORE starlight
1819
astroMermaid(),
@@ -44,22 +45,22 @@ export default defineConfig({
4445
tag: "meta",
4546
attrs: {
4647
name: "og:image",
47-
content: "/CodeForge/og-image.png",
48+
content: "/og-image.png",
4849
},
4950
},
5051
{
5152
tag: "link",
5253
attrs: {
5354
rel: "icon",
5455
type: "image/png",
55-
href: "/CodeForge/favicon.png",
56+
href: "/favicon.png",
5657
},
5758
},
5859
{
5960
tag: "link",
6061
attrs: {
6162
rel: "apple-touch-icon",
62-
href: "/CodeForge/apple-touch-icon.png",
63+
href: "/apple-touch-icon.png",
6364
},
6465
},
6566
{
@@ -70,6 +71,17 @@ export default defineConfig({
7071
},
7172
],
7273
plugins: [
74+
// ── Versioned docs (activate when archiving the first version) ──
75+
// starlightVersions requires at least one archived version.
76+
// When v3 development begins, uncomment and add v2 as the first entry:
77+
//
78+
// starlightVersions({
79+
// versions: [{ slug: "2.0", label: "v2.0" }],
80+
// current: { label: "v3" },
81+
// }),
82+
//
83+
// Then run `npm run dev` — the plugin archives current docs as v2.0.
84+
// See: https://github.com/HiDeoo/starlight-versions
7385
starlightSidebarTopics([
7486
{
7587
label: "Getting Started",

docs/package-lock.json

Lines changed: 163 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"starlight-scroll-to-top": "^0.4.0",
2727
"starlight-sidebar-topics": "^0.6.2",
2828
"starlight-tags": "^0.4.0",
29+
"starlight-versions": "^0.7.0",
2930
"tailwindcss": "^4.2.1"
3031
}
3132
}

docs/src/components/Header.astro

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2+
import LanguageSelect from "virtual:starlight/components/LanguageSelect";
3+
import Search from "virtual:starlight/components/Search";
4+
import SiteTitle from "virtual:starlight/components/SiteTitle";
5+
import SocialIcons from "virtual:starlight/components/SocialIcons";
6+
import ThemeSelect from "virtual:starlight/components/ThemeSelect";
27
/**
38
* Custom Header — extends Starlight's default Header with a "Docs" button.
49
*/
5-
import config from 'virtual:starlight/user-config';
6-
7-
import LanguageSelect from 'virtual:starlight/components/LanguageSelect';
8-
import Search from 'virtual:starlight/components/Search';
9-
import SiteTitle from 'virtual:starlight/components/SiteTitle';
10-
import SocialIcons from 'virtual:starlight/components/SocialIcons';
11-
import ThemeSelect from 'virtual:starlight/components/ThemeSelect';
10+
import config from "virtual:starlight/user-config";
1211
1312
const shouldRenderSearch =
14-
config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
13+
config.pagefind ||
14+
config.components.Search !== "@astrojs/starlight/components/Search.astro";
1515
---
1616

1717
<div class="header">
@@ -22,7 +22,7 @@ const shouldRenderSearch =
2222
{shouldRenderSearch && <Search />}
2323
</div>
2424
<div class="sl-hidden md:sl-flex print:hidden right-group">
25-
<a href="/CodeForge/getting-started/" class="docs-link">Docs</a>
25+
<a href="/getting-started/" class="docs-link">Docs</a>
2626
<div class="sl-flex social-icons">
2727
<SocialIcons />
2828
</div>

docs/src/components/Hero.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*
77
* Receives Starlight's Hero props but renders entirely custom content.
88
*/
9-
import FeatureCard from './FeatureCard.astro';
10-
import InstallCommand from './InstallCommand.astro';
9+
import FeatureCard from "./FeatureCard.astro";
10+
import InstallCommand from "./InstallCommand.astro";
1111
1212
/* Accept Starlight's props to satisfy the component override contract */
1313
const _props = Astro.props;
@@ -44,7 +44,7 @@ const _props = Astro.props;
4444

4545
{/* ---- CTA buttons ---- */}
4646
<div class="hero-actions">
47-
<a href="/CodeForge/getting-started/" class="hero-btn hero-btn--primary">
47+
<a href="/getting-started/" class="hero-btn hero-btn--primary">
4848
Get Started
4949
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"/></svg>
5050
</a>

docs/src/content.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { defineCollection } from 'astro:content';
2-
import { docsLoader } from '@astrojs/starlight/loaders';
3-
import { docsSchema } from '@astrojs/starlight/schema';
1+
import { defineCollection } from "astro:content";
2+
import { docsLoader } from "@astrojs/starlight/loaders";
3+
import { docsSchema } from "@astrojs/starlight/schema";
4+
import { docsVersionsLoader } from "starlight-versions/loader";
45

56
export const collections = {
67
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
8+
versions: defineCollection({ loader: docsVersionsLoader() }),
79
};

docs/src/content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hero:
66
tagline: Your AI dev environment, battle-tested.
77
actions:
88
- text: Get Started
9-
link: /CodeForge/getting-started/
9+
link: /getting-started/
1010
icon: right-arrow
1111
variant: primary
1212
- text: View on GitHub

0 commit comments

Comments
 (0)