Skip to content

Commit 4c59285

Browse files
committed
feat(site): replace static go-get redirects with Astro Starlight
Wholesale restructure: existing per-package go-get redirect HTML moves into public/ (still served pass-through), Astro Starlight scaffolds at the root with /go/ as the first real docs page. Layout: src/content/docs/index.mdx / — splash hero src/content/docs/go.mdx /go/ — core/go overview src/styles/styles.css Cruip-flavoured palette overlay (slate-900, purple-500, Aspekta+PT Mono) public/{agent,api,...}/ go-get redirects, replaced one at a time as Starlight content lands .github/workflows/deploy.yml GH Pages via Actions Per-package migration story: drop src/content/docs/<pkg>.mdx in to override the corresponding public/<pkg>/index.html redirect. No code changes. go-import / go-source meta tags injected via Starlight head config so go-get keeps resolving on every Starlight-rendered page. Co-Authored-By: Virgil <virgil@lethean.io>
1 parent a13342a commit 4c59285

78 files changed

Lines changed: 6657 additions & 33 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: npm
26+
- run: npm ci
27+
- run: npm run build
28+
- uses: actions/configure-pages@v5
29+
- uses: actions/upload-pages-artifact@v3
30+
with:
31+
path: ./dist
32+
33+
deploy:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: github-pages
38+
url: ${{ steps.deployment.outputs.page_url }}
39+
steps:
40+
- uses: actions/deploy-pages@v4
41+
id: deployment

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
11
.idea/
22
.DS_Store
3+
4+
# Astro
5+
dist/
6+
.astro/
7+
8+
# Node
9+
node_modules/
10+
npm-debug.log*
11+
pnpm-debug.log*
12+
yarn-debug.log*
13+
14+
# Environment
15+
.env
16+
.env.production
17+
18+
# Editor
19+
*.swp

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Starlight Starter Kit: Basics
2+
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4+
5+
```
6+
npm create astro@latest -- --template starlight
7+
```
8+
9+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
10+
11+
## 🚀 Project Structure
12+
13+
Inside of your Astro + Starlight project, you'll see the following folders and files:
14+
15+
```
16+
.
17+
├── public/
18+
├── src/
19+
│ ├── assets/
20+
│ ├── content/
21+
│ │ └── docs/
22+
│ └── content.config.ts
23+
├── astro.config.mjs
24+
├── package.json
25+
└── tsconfig.json
26+
```
27+
28+
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
29+
30+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
31+
32+
Static assets, like favicons, can be placed in the `public/` directory.
33+
34+
## 🧞 Commands
35+
36+
All commands are run from the root of the project, from a terminal:
37+
38+
| Command | Action |
39+
| :------------------------ | :----------------------------------------------- |
40+
| `npm install` | Installs dependencies |
41+
| `npm run dev` | Starts local dev server at `localhost:4321` |
42+
| `npm run build` | Build your production site to `./dist/` |
43+
| `npm run preview` | Preview your build locally, before deploying |
44+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
45+
| `npm run astro -- --help` | Get help using the Astro CLI |
46+
47+
## 👀 Want to learn more?
48+
49+
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

astro.config.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
5+
// dappco.re — docs for the dappcore Go ecosystem.
6+
//
7+
// Static site, served at https://dappco.re/. Existing per-package go-get
8+
// redirect HTML lives in `public/<pkg>/index.html` and is served untouched;
9+
// Starlight content under `src/content/docs/` overrides any matching path
10+
// once written. Migration is one package at a time.
11+
export default defineConfig({
12+
site: 'https://dappco.re',
13+
integrations: [
14+
starlight({
15+
title: 'dappco.re',
16+
description: 'Zero-dependency Go primitives for the dappcore ecosystem.',
17+
social: [
18+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/dappcore/go' },
19+
],
20+
customCss: ['./src/styles/styles.css'],
21+
head: [
22+
// Default go-import / go-source for the umbrella module. Per-package
23+
// MDX pages override these in their own `head` frontmatter.
24+
{
25+
tag: 'meta',
26+
attrs: {
27+
name: 'go-import',
28+
content: 'dappco.re/go git https://github.com/dappcore/go.git',
29+
},
30+
},
31+
{
32+
tag: 'meta',
33+
attrs: {
34+
name: 'go-source',
35+
content: 'dappco.re/go https://github.com/dappcore/go https://github.com/dappcore/go/tree/main{/dir} https://github.com/dappcore/go/blob/main{/dir}/{file}#L{line}',
36+
},
37+
},
38+
],
39+
sidebar: [
40+
{
41+
label: 'core/go',
42+
items: [
43+
{ label: 'Overview', slug: 'go' },
44+
],
45+
},
46+
],
47+
}),
48+
],
49+
});

go/core/build/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

index.html

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)