Skip to content

Commit c3692ce

Browse files
committed
new site, new model hub, new website
1 parent 421f763 commit c3692ce

File tree

361 files changed

+1482
-44567
lines changed

Some content is hidden

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

361 files changed

+1482
-44567
lines changed

.github/workflows/docs.yml

+40-11
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,33 @@ on:
44
push:
55
branches:
66
- dev
7+
- main
78
paths:
89
- 'docs/**'
10+
- 'docs-astro/**'
911
- '.github/workflows/docs.yml'
1012
pull_request:
1113
paths:
1214
- 'docs/**'
15+
- 'docs-astro/**'
1316
- '.github/workflows/docs.yml'
14-
# Review gh actions docs if you want to further define triggers, paths, etc
15-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
1617
schedule:
1718
- cron: "0 22 * * 1,2,3,4,5,6"
19+
workflow_dispatch:
20+
21+
permissions:
22+
contents: write
23+
deployments: write
24+
pull-requests: write
25+
pages: write
26+
id-token: write
1827

1928
jobs:
20-
deploy:
21-
name: Deploy to Cloudflare Pages
29+
deploy-docusaurus:
30+
name: Deploy Docusaurus to Cloudflare Pages
2231
env:
2332
CLOUDFLARE_PROJECT_NAME: cortex-docs
2433
runs-on: ubuntu-latest
25-
permissions:
26-
contents: write
27-
deployments: write
28-
pull-requests: write
2934
steps:
3035
- uses: actions/checkout@v3
3136
- uses: actions/setup-node@v3
@@ -72,15 +77,14 @@ jobs:
7277
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
7378
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
7479
directory: ./docs/build
75-
# Optional: Enable this if you want to have GitHub Deployments triggered
7680
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
7781
id: deployCloudflarePages
7882

7983
- uses: mshick/add-pr-comment@v2
8084
if: github.event_name == 'pull_request'
8185
with:
8286
message: |
83-
Preview URL: ${{ steps.deployCloudflarePages.outputs.url }}
87+
Docusaurus Preview URL: ${{ steps.deployCloudflarePages.outputs.url }}
8488
8589
- name: Publish to Cloudflare Pages Production
8690
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/dev' && github.event.pull_request.head.repo.full_name != github.repository
@@ -91,5 +95,30 @@ jobs:
9195
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
9296
directory: ./docs/build
9397
branch: main
94-
# Optional: Enable this if you want to have GitHub Deployments triggered
9598
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
99+
100+
build-astro:
101+
name: Build Astro Site
102+
runs-on: ubuntu-latest
103+
steps:
104+
- name: Checkout repository
105+
uses: actions/checkout@v4
106+
- name: Install, build, and upload Astro site
107+
uses: withastro/action@v3
108+
with:
109+
path: ./docs-astro
110+
# node-version: 20 # Uncomment to specify Node version
111+
# package-manager: pnpm@latest # Uncomment to specify package manager
112+
113+
deploy-astro:
114+
name: Deploy Astro to GitHub Pages
115+
needs: build-astro
116+
runs-on: ubuntu-latest
117+
if: github.ref == 'refs/heads/main'
118+
environment:
119+
name: github-pages
120+
url: ${{ steps.deployment.outputs.page_url }}
121+
steps:
122+
- name: Deploy to GitHub Pages
123+
id: deployment
124+
uses: actions/deploy-pages@v4

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ docs/.yarn/
2929
docs/.yarnrc.yml
3030
docs/bun.lockb
3131
docs/yarn.lock
32+
archive/

docs/.env.example

-3
This file was deleted.

docs/.gitignore

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
# Dependencies
2-
/node_modules
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
35

4-
# Production
5-
/build
6-
7-
# Generated files
8-
.docusaurus
9-
.cache-loader
10-
11-
# Misc
12-
.DS_Store
13-
.env.local
14-
.env.development.local
15-
.env.test.local
16-
.env.production.local
6+
# dependencies
7+
node_modules/
178

9+
# logs
1810
npm-debug.log*
1911
yarn-debug.log*
2012
yarn-error.log*
13+
pnpm-debug.log*
2114

22-
.env
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store

docs/.prettierignore

-2
This file was deleted.

docs/README.md

+35-36
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
1-
# Website
1+
# Starlight Starter Kit: Basics
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4-
5-
### Installation
6-
7-
```
8-
$ yarn
9-
```
10-
11-
### Local Development
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
124

135
```
14-
$ yarn start
6+
bun create astro@latest -- --template starlight
157
```
168

17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18-
19-
### Build
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)
2013

21-
```
22-
$ yarn build
23-
```
24-
25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
14+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
2615
27-
### Deployment
16+
## 🚀 Project Structure
2817

29-
Using SSH:
18+
Inside of your Astro + Starlight project, you'll see the following folders and files:
3019

3120
```
32-
$ USE_SSH=true yarn deploy
21+
.
22+
├── public/
23+
├── src/
24+
│ ├── assets/
25+
│ ├── content/
26+
│ │ ├── docs/
27+
│ └── content.config.ts
28+
├── astro.config.mjs
29+
├── package.json
30+
└── tsconfig.json
3331
```
3432

35-
Not using SSH:
33+
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.
3634

37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
35+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
4036

41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
37+
Static assets, like favicons, can be placed in the `public/` directory.
4238

43-
## Changelog Generator
39+
## 🧞 Commands
4440

45-
To generate a changelog post, run:
41+
All commands are run from the root of the project, from a terminal:
4642

47-
```bash
48-
yarn create:changelog
49-
```
43+
| Command | Action |
44+
| :------------------------ | :----------------------------------------------- |
45+
| `bun install` | Installs dependencies |
46+
| `bun dev` | Starts local dev server at `localhost:4321` |
47+
| `bun build` | Build your production site to `./dist/` |
48+
| `bun preview` | Preview your build locally, before deploying |
49+
| `bun astro ...` | Run CLI commands like `astro add`, `astro check` |
50+
| `bun astro -- --help` | Get help using the Astro CLI |
5051

51-
- **Title & Slug**: Generate changelog post files with a title and a slug.
52-
- **Description**: Add a description for the changelog post.
53-
- **Version**: Add a version for the changelog post.
52+
## 👀 Want to learn more?
5453

55-
The pages will be generated in `changelog/${slug}`. You can start writing your changelog post here.
54+
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).

docs/astro.config.mjs

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
import starlight from "@astrojs/starlight";
4+
import starlightUtils from "@lorenzo_lewis/starlight-utils";
5+
import starlightVideos from 'starlight-videos'
6+
7+
8+
// https://astro.build/config
9+
export default defineConfig({
10+
site: 'https://cortex.so',
11+
integrations: [
12+
starlight({
13+
title: "Cortex",
14+
logo: { src: "./src/assets/logos/cortex.svg" },
15+
favicon: "./src/assets/logos/cortex.svg",
16+
social: {
17+
github: "https://github.com/menloresearch/cortex.cpp",
18+
discord: "https://discord.gg/FTk2MvZwJH",
19+
"x.com": "https://x.com/cortex_so",
20+
youtube: "https://www.youtube.com/@menloresearch",
21+
linkedin: "https://www.linkedin.com/company/menloresearch/",
22+
},
23+
sidebar: [
24+
{
25+
label: "Title Bar",
26+
items: [
27+
{ label: "Docs", link: "overview" },
28+
{ label: "Model Hub", link: "/model-hub" },
29+
],
30+
},
31+
{ label: "Welcome", slug: "overview" },
32+
{
33+
label: "How-To",
34+
items: [
35+
{ label: "Get Started", slug: "how-to/quickstart" },
36+
{ label: "Install Cortex", slug: "how-to/installation" },
37+
{ label: "Use Models", slug: "how-to/using-models" },
38+
{ label: "Troubleshoot", slug: "how-to/troubleshooting" },
39+
{ label: "Configuration",
40+
items: [
41+
{ label: "Overview", slug: "how-to/configurations" },
42+
{ label: "CORS", slug: "how-to/configurations/cors" },
43+
{ label: "Proxy", slug: "how-to/configurations/proxy" },
44+
{ label: "Token", slug: "how-to/configurations/token" },
45+
],
46+
},
47+
],
48+
},
49+
{
50+
label: "Explanation",
51+
items: [
52+
{ label: "Architecture",
53+
items: [
54+
// { label: "Overview", slug: "explanation/architecture" },
55+
{ label: "Cortex DB", slug: "explanation/architecture/cortex-db" },
56+
{ label: ".cortexrc", slug: "explanation/architecture/cortexrc" },
57+
{ label: "Data Folder", slug: "explanation/architecture/data-folder" },
58+
{ label: "Updater", slug: "explanation/architecture/updater" },
59+
],
60+
},
61+
{
62+
label: "Models",
63+
items: [
64+
{ label: "Overview", slug: "explanation/models" },
65+
{ label: "Model YAML", slug: "explanation/models/model-yaml" }
66+
// { label: "Hardware", slug: "capabilities/hardware" },
67+
],
68+
},
69+
{
70+
label: "Engines",
71+
items: [
72+
{ label: "Overview", slug: "explanation/models" },
73+
{ label: "Model YAML", slug: "explanation/models/model-yaml" }
74+
// { label: "Hardware", slug: "capabilities/hardware" },
75+
],
76+
},
77+
],
78+
},
79+
{
80+
label: "Tutorials",
81+
items: [
82+
{ label: "Function Calling", slug: "tutorials/function-calling" },
83+
{ label: "Structured Outputs", slug: "tutorials/structured-outputs" },
84+
],
85+
},
86+
{
87+
label: "Reference",
88+
items: [
89+
{
90+
label: "CLI",
91+
collapsed: true,
92+
items: [
93+
{ label: "cortex", slug: "reference/cli" },
94+
{ label: "cortex start", slug: "reference/cli/start" },
95+
{ label: "cortex run", slug: "reference/cli/run" },
96+
{ label: "cortex config", slug: "reference/cli/config" },
97+
{ label: "cortex pull", slug: "reference/cli/pull" },
98+
{ label: "cortex stop", slug: "reference/cli/stop" },
99+
{ label: "cortex ps", slug: "reference/cli/ps" },
100+
{ label: "cortex serve", slug: "reference/cli/serve" },
101+
{ label: "cortex update", slug: "reference/cli/update" },
102+
{ label: "cortex hardware", slug: "reference/cli/hardware" },
103+
]
104+
},
105+
{
106+
label: "Models",
107+
collapsed: true,
108+
items: [
109+
{ label: "Overview", slug: "reference/cli/models" },
110+
{ label: "cortex models list", slug: "reference/cli/models/list" },
111+
{ label: "cortex models get", slug: "reference/cli/models/get" },
112+
{ label: "cortex models pull", slug: "reference/cli/models/pull" },
113+
{ label: "cortex models start", slug: "reference/cli/models/start" },
114+
{ label: "cortex models stop", slug: "reference/cli/models/stop" },
115+
{ label: "cortex models update", slug: "reference/cli/models/update" },
116+
{ label: "Remove", slug: "reference/cli/models/remove" },
117+
],
118+
},
119+
{
120+
label: "Configs",
121+
collapsed: true,
122+
items: [
123+
{ label: "Overview", slug: "reference/cli/configs" },
124+
{ label: "List", slug: "reference/cli/configs/list" },
125+
{ label: "Get", slug: "reference/cli/configs/get" },
126+
{ label: "Set", slug: "reference/cli/configs/set" },
127+
],
128+
},
129+
{
130+
label: "Engines",
131+
collapsed: true,
132+
items: [
133+
{ label: "Overview", slug: "reference/cli/engines" },
134+
{ label: "List", slug: "reference/cli/engines/list" },
135+
{ label: "Get", slug: "reference/cli/engines/get" },
136+
{ label: "Init", slug: "reference/cli/engines/init" },
137+
],
138+
},
139+
],
140+
},
141+
],
142+
plugins: [
143+
starlightUtils({
144+
navLinks: {
145+
leading: { useSidebarLabelled: "Title Bar" },
146+
},
147+
}),
148+
starlightVideos(),
149+
],
150+
}),
151+
],
152+
});

docs/babel.config.js

-3
This file was deleted.

0 commit comments

Comments
 (0)