Skip to content

Commit aaef327

Browse files
committed
Adding site
1 parent 77951ae commit aaef327

File tree

24 files changed

+2314
-1
lines changed

24 files changed

+2314
-1
lines changed

.github/workflows/docs.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: docs
2+
3+
on:
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [master]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
11+
# Allow this job to clone the repo and create a page deployment
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout your repository using git
22+
uses: actions/checkout@v4
23+
- name: Install, build, and upload your site
24+
uses: withastro/action@v3
25+
with:
26+
path: www
27+
28+
deploy:
29+
needs: build
30+
runs-on: ubuntu-latest
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
steps:
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4
38+
with:
39+
path: www
40+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
/node_modules
2+
.DS_Store
23
.sst
34
.env
45
dist
56
persist.json
67
.DS_Store
78
notes
89
.nvim.lua
9-
.svelte-kit
10+
.svelte-kit

www/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
# doc output
6+
output/
7+
8+
# dependencies
9+
node_modules/
10+
11+
# logs
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
pnpm-debug.log*
16+
17+
# environment variables
18+
.env
19+
.env.production
20+
21+
# macOS-specific files
22+
.DS_Store
23+

www/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
10+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
11+
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
12+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
13+
14+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
15+
16+
## 🚀 Project Structure
17+
18+
Inside of your Astro + Starlight project, you'll see the following folders and files:
19+
20+
```
21+
.
22+
├── public/
23+
├── src/
24+
│ ├── assets/
25+
│ ├── content/
26+
│ │ ├── docs/
27+
│ │ └── config.ts
28+
│ └── env.d.ts
29+
├── astro.config.mjs
30+
├── package.json
31+
└── tsconfig.json
32+
```
33+
34+
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.
35+
36+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
37+
38+
Static assets, like favicons, can be placed in the `public/` directory.
39+
40+
## 🧞 Commands
41+
42+
All commands are run from the root of the project, from a terminal:
43+
44+
| Command | Action |
45+
| :------------------------ | :----------------------------------------------- |
46+
| `npm install` | Installs dependencies |
47+
| `npm run dev` | Starts local dev server at `localhost:4321` |
48+
| `npm run build` | Build your production site to `./dist/` |
49+
| `npm run preview` | Preview your build locally, before deploying |
50+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
51+
| `npm run astro -- --help` | Get help using the Astro CLI |
52+
53+
## 👀 Want to learn more?
54+
55+
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).

www/astro.config.mjs

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import theme from "toolbeam-docs-theme"
2+
import starlight from "@astrojs/starlight"
3+
import { defineConfig } from "astro/config"
4+
import { rehypeHeadingIds } from "@astrojs/markdown-remark"
5+
import rehypeAutolinkHeadings from "rehype-autolink-headings"
6+
import config from "./config"
7+
8+
const url = "https://opencontrol.ai"
9+
10+
// https://astro.build/config
11+
export default defineConfig({
12+
site: url,
13+
trailingSlash: 'always',
14+
devToolbar: {
15+
enabled: false,
16+
},
17+
integrations: [
18+
starlight({
19+
plugins: [theme()],
20+
title: "OpenControl",
21+
description: "Self-hosted AI context protocol gateway.",
22+
head: [
23+
{
24+
tag: "link",
25+
attrs: {
26+
rel: "icon",
27+
href: "/favicon.ico",
28+
sizes: "48x48",
29+
},
30+
},
31+
// Add light/dark mode favicon
32+
{
33+
tag: "link",
34+
attrs: {
35+
rel: "icon",
36+
href: "/favicon.svg",
37+
media: "(prefers-color-scheme: light)",
38+
},
39+
},
40+
{
41+
tag: "link",
42+
attrs: {
43+
rel: "icon",
44+
href: "/favicon-dark.svg",
45+
media: "(prefers-color-scheme: dark)",
46+
},
47+
},
48+
{
49+
tag: "meta",
50+
attrs: {
51+
property: "og:image",
52+
content: `${url}/social-share.png`,
53+
},
54+
},
55+
{
56+
tag: "meta",
57+
attrs: {
58+
property: "twitter:image",
59+
content: `${url}/social-share.png`,
60+
},
61+
},
62+
],
63+
logo: {
64+
light: "./src/assets/logo-light.svg",
65+
dark: "./src/assets/logo-dark.svg",
66+
replacesTitle: true,
67+
},
68+
social: {
69+
github: config.github,
70+
discord: config.discord,
71+
},
72+
lastUpdated: true,
73+
editLink: {
74+
baseUrl: `${config.github}/edit/master/www/`,
75+
},
76+
components: {
77+
Hero: "./src/components/Hero.astro",
78+
},
79+
customCss: [
80+
"./src/custom.css",
81+
"./src/styles/lander.css",
82+
],
83+
sidebar: [
84+
{ label: "Intro", slug: "docs" },
85+
],
86+
}),
87+
],
88+
markdown: {
89+
rehypePlugins: [
90+
rehypeHeadingIds,
91+
[rehypeAutolinkHeadings, { behavior: "wrap" }],
92+
],
93+
},
94+
})

0 commit comments

Comments
 (0)