chore: import upstream snapshot with attribution
docs / deploy (push) Has been cancelled
docs / changes (push) Has been cancelled
docs / check-and-build (push) Has been cancelled
build container image / cpu (push) Has been cancelled
build container image / cuda (push) Has been cancelled
build container image / rocm (push) Has been cancelled
frontend checks / frontend-checks (push) Has been cancelled
frontend tests / frontend-tests (push) Has been cancelled
lfs checks / lfs-check (push) Has been cancelled
python checks / python-checks (push) Has been cancelled
python tests / py3.12: macos-default (push) Has been cancelled
python tests / py3.11: windows-cpu (push) Has been cancelled
python tests / py3.12: windows-cpu (push) Has been cancelled
python tests / py3.11: linux-cpu (push) Has been cancelled
typegen checks / typegen-checks (push) Has been cancelled
uv lock checks / uv-lock-checks (push) Has been cancelled
openapi checks / openapi-checks (push) Has been cancelled
python tests / py3.11: macos-default (push) Has been cancelled
python tests / py3.12: linux-cpu (push) Has been cancelled
docs / deploy (push) Has been cancelled
docs / changes (push) Has been cancelled
docs / check-and-build (push) Has been cancelled
build container image / cpu (push) Has been cancelled
build container image / cuda (push) Has been cancelled
build container image / rocm (push) Has been cancelled
frontend checks / frontend-checks (push) Has been cancelled
frontend tests / frontend-tests (push) Has been cancelled
lfs checks / lfs-check (push) Has been cancelled
python checks / python-checks (push) Has been cancelled
python tests / py3.12: macos-default (push) Has been cancelled
python tests / py3.11: windows-cpu (push) Has been cancelled
python tests / py3.12: windows-cpu (push) Has been cancelled
python tests / py3.11: linux-cpu (push) Has been cancelled
typegen checks / typegen-checks (push) Has been cancelled
uv lock checks / uv-lock-checks (push) Has been cancelled
openapi checks / openapi-checks (push) Has been cancelled
python tests / py3.11: macos-default (push) Has been cancelled
python tests / py3.12: linux-cpu (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
|
||||
// Plugins
|
||||
import starlightLinksValidator from 'starlight-links-validator';
|
||||
import starlightLlmsText from 'starlight-llms-txt';
|
||||
import starlightChangelogs from 'starlight-changelogs';
|
||||
import { rehypePrefixBaseToRootLinks } from './plugins/rehype-prefix-base-to-root-links.mjs';
|
||||
import starlightContextualMenu from 'starlight-contextual-menu';
|
||||
|
||||
// Configs
|
||||
import {
|
||||
createHeadConfig,
|
||||
createRedirects,
|
||||
sidebarConfig,
|
||||
socialConfig,
|
||||
} from './src/config';
|
||||
|
||||
// Deployment target: 'custom' (default, custom domain at invoke.ai) or 'ghpages'
|
||||
// (GitHub Pages project URL at invoke-ai.github.io/InvokeAI). Drive site/base from this
|
||||
// so the same source can be deployed to either target.
|
||||
const deployTarget = process.env.DEPLOY_TARGET ?? 'custom';
|
||||
const isGhPages = deployTarget === 'ghpages';
|
||||
const enableAnalytics = process.env.ENABLE_ANALYTICS === 'true';
|
||||
const base = isGhPages ? '/InvokeAI' : '';
|
||||
const site = isGhPages ? 'https://invoke-ai.github.io' : 'https://invoke.ai';
|
||||
|
||||
const redirects = createRedirects(base);
|
||||
const head = createHeadConfig({ base, enableAnalytics, isGhPages, site });
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site,
|
||||
base: base || undefined,
|
||||
markdown: {
|
||||
rehypePlugins: [[rehypePrefixBaseToRootLinks, { base }]],
|
||||
},
|
||||
integrations: [
|
||||
starlight({
|
||||
// Content
|
||||
title: {
|
||||
en: 'InvokeAI Documentation',
|
||||
},
|
||||
logo: {
|
||||
src: './src/assets/invoke-icon-wide.svg',
|
||||
alt: 'InvokeAI Logo',
|
||||
replacesTitle: true,
|
||||
},
|
||||
favicon: 'favicon.svg',
|
||||
editLink: {
|
||||
baseUrl: 'https://github.com/invoke-ai/InvokeAI/edit/main/docs',
|
||||
},
|
||||
head,
|
||||
defaultLocale: 'root',
|
||||
locales: {
|
||||
root: {
|
||||
label: 'English',
|
||||
lang: 'en',
|
||||
},
|
||||
},
|
||||
social: socialConfig,
|
||||
tableOfContents: {
|
||||
maxHeadingLevel: 4,
|
||||
},
|
||||
customCss: [
|
||||
'@fontsource-variable/inter',
|
||||
'@fontsource-variable/roboto-mono',
|
||||
'./src/styles/custom.css',
|
||||
],
|
||||
sidebar: sidebarConfig,
|
||||
components: {
|
||||
ThemeProvider: './src/lib/components/ForceDarkTheme.astro',
|
||||
ThemeSelect: './src/lib/components/EmptyComponent.astro',
|
||||
Footer: './src/lib/components/Footer.astro',
|
||||
PageFrame: './src/layouts/PageFrameExtended.astro',
|
||||
},
|
||||
plugins: [
|
||||
starlightLinksValidator({
|
||||
errorOnRelativeLinks: false,
|
||||
errorOnLocalLinks: false,
|
||||
}),
|
||||
starlightLlmsText(),
|
||||
starlightChangelogs(),
|
||||
starlightContextualMenu({
|
||||
actions: ['copy', 'view', 'chatgpt', 'claude'],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
redirects,
|
||||
});
|
||||
Reference in New Issue
Block a user