Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run check
pnpm run check
8 changes: 7 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"name": "Docs development server (Astro)",
"request": "launch",
"type": "node-terminal"
}
},
{
"command": "./node_modules/.bin/astro check --watch",
"name": "Watch Astro checks",
"request": "launch",
"type": "node-terminal"
}
]
}
172 changes: 107 additions & 65 deletions astro.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightHeadingBadgesPlugin from 'starlight-heading-badges';
import { BASE_GITHUB_URL, MARKETPLACE_URL } from './consts/links';
import starlightSidebarTopicsPlugin from 'starlight-sidebar-topics';

import { BASE_GITHUB_ORG, MARKETPLACE_URL } from './consts/links'; // typescript aliasing doesn't work here for some reason (it does in the mdx pages tho)

/** @todo https://starlight.astro.build/resources/plugins/#plugins */

Expand All @@ -12,30 +14,125 @@ export default defineConfig({
base: '/docs',
integrations: [
starlight({
plugins: [starlightHeadingBadgesPlugin()],
plugins: [starlightHeadingBadgesPlugin(), starlightSidebarTopicsPlugin([ // todo: Should API & web be in a separate section?
{
label: 'Base Extension',
link: '/client/',
icon: 'laptop',
items: [
{
label: 'Guides',
autogenerate: {
directory: 'client/guides',
collapsed: true
}
},
{
label: 'Reference',
autogenerate: {
directory: 'client/reference',
collapsed: true
}
},
{
label: "MCP",
autogenerate: {
directory: "client/mcp",
collapsed: true
}
}
]
},
{
label: 'Server Extension',
link: '/server/',
badge: { text: 'Coming later!', variant: 'danger' },
icon: 'vscode',
items: [
{
label: 'Guides',
autogenerate: {
directory: 'server/guides',
collapsed: true
}
},
{
label: 'Reference',
autogenerate: {
directory: 'server/reference',
collapsed: true
}
}
]
},
{
label: 'Container Presets',
link: '/images/',
icon: 'seti:docker',
items: [
{
label: 'Python',
autogenerate: {
directory: 'images/python',
collapsed: true
}
},
{
label: 'JavaScript',
autogenerate: {
directory: 'images/javascript',
collapsed: true
}
}
]
},
{
label: 'Meta',
link: '/meta/',
badge: { text: 'Contributors' },
icon: 'list-format',
items: [
'meta/assets',
{
label: 'Contributors',
autogenerate: {
directory: 'meta/contributors',
collapsed: true
}
}
],
},
{
label: 'Unit tests',
icon: 'approve-check-circle',
badge: { text: 'External', variant: 'note' },
link: 'https://vsc-neuropilot.github.io/unit-tests'
}
],
)],
favicon: '/heart-pink.svg',
customCss: [
'./src/styles/icons.css',
'./src/styles/starlight.css'
],
head: [
/*{
{
tag: 'link',
attrs: {
rel: 'icon',
href: '/docs/heart-pink.svg'
}
}*/
}
],
title: 'NeuroPilot Docs',
editLink: {
baseUrl: BASE_GITHUB_URL + '/edit/master/docs'
baseUrl: BASE_GITHUB_ORG + '/docs/edit/master/'
},
lastUpdated: true,
pagination: false,
logo: {
dark: './src/assets/evilpilot.svg',
light: './src/assets/neuropilot.svg',
alt: 'NeuroPilot and EvilPilot icons'
src: './public/heart-xaendril.png',
alt: 'v2 NeuroPilot logo'
},
social: [
{
Expand All @@ -45,63 +142,8 @@ export default defineConfig({
},
{
icon: 'github',
label: 'NeuroPilot GitHub',
href: BASE_GITHUB_URL,
},
],
sidebar: [
{
label: 'Guides',
items: [
{
label: 'Setup NeuroPilot',
badge: { text: 'Start here!', variant: 'tip' },
slug: 'guides/setup',
},
{
label: 'Pilot modes',
slug: 'guides/pilot',
},
{
label: 'Sandboxing',
badge: { text: 'WIP', variant: 'caution' },
slug: 'guides/sandboxing'
}
],
},
{
label: 'Reference',
items: [
{
label: 'Features',
autogenerate: {
directory: 'reference/features',
collapsed: true
}
},
{ label: 'Safety', slug: 'reference/safety', badge: { text: 'Important', variant: 'danger' } },
{ label: 'Commands', slug: 'reference/commands' },
{ label: 'Context', slug: 'reference/auto-context', badge: { text: 'Stub', variant: 'caution' } },
{ label: 'Cookies', slug: 'reference/cookies', badge: { text: 'Stub', variant: 'caution' } },
{ label: 'Cursor', slug: 'reference/cursor', badge: { text: 'Conditional', variant: 'success' } },
{ label: 'Permissions', slug: 'reference/permissions', badge: { text: 'Important', variant: 'danger' } },
{ label: 'RCE', slug: 'reference/rce', badge: { text: 'Core', variant: 'note' } },
{ label: 'Settings', slug: 'reference/settings' },
{ label: 'Dependencies', slug: 'reference/dependencies' },
],
},
{
label: 'NeuroPilot Assets',
badge: { text: 'Meta', variant: 'note' },
slug: 'assets'
},
{
label: 'Contributors',
badge: { text: 'Meta', variant: 'note' },
autogenerate: {
directory: 'contributors',
collapsed: true
}
label: 'VSC-NeuroPilot organization',
href: BASE_GITHUB_ORG
}
],
components: {
Expand Down
5 changes: 3 additions & 2 deletions consts/links.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const BASE_GITHUB_URL: string = "https://github.com/VSC-NeuroPilot/neuropilot"
export const BASE_GITHUB_ORG: string = "https://github.com/VSC-NeuroPilot"
type MarketplaceLinks = "page" | "direct"
export const MARKETPLACE_URL = (type: MarketplaceLinks) => {
if (type === "page") {
Expand All @@ -7,4 +7,5 @@ export const MARKETPLACE_URL = (type: MarketplaceLinks) => {
return "vscode:extension/Pasu4.neuropilot"
} else
return "/"
}
}
export const SHOWCASE_IGNORES: string[] = ["actions-user", "dependabot[bot]", "Copilot"]
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
"compile": "astro build",
"preview": "astro preview",
"check": "astro check",
"astro": "astro"
"astro": "astro",
"postinstall": "astro sync"
},
"dependencies": {
"@astrojs/starlight": "~0.35.2",
"astro": "~5.13.4",
"sharp": "~0.32.5",
"starlight-contributor-list": "~0.3.0",
"starlight-heading-badges": "~0.6.0"
"starlight-heading-badges": "~0.6.0",
"starlight-showcases": "~0.3.0",
"starlight-sidebar-topics": "~0.6.0"
},
"devDependencies": {
"@astrojs/check": "~0.9.4",
Expand Down
Loading