fix(docs): deployment paths mismatch (#9067)
also adds the favicon Co-authored-by: joshistoast <me@joshcorbett.com> Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
This commit is contained in:
@@ -10,6 +10,14 @@ on:
|
||||
- 'opened'
|
||||
- 'synchronize'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
deploy_target:
|
||||
description: 'Deploy target (custom = invoke.ai, ghpages = invoke-ai.github.io/InvokeAI)'
|
||||
type: choice
|
||||
options:
|
||||
- custom
|
||||
- ghpages
|
||||
default: custom
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -68,6 +76,8 @@ jobs:
|
||||
- name: build docs
|
||||
run: pnpm build
|
||||
working-directory: docs
|
||||
env:
|
||||
DEPLOY_TARGET: ${{ inputs.deploy_target || 'custom' }}
|
||||
|
||||
# Upload artifact for deploy (main branch only)
|
||||
- name: upload pages artifact
|
||||
|
||||
+20
-8
@@ -8,11 +8,16 @@ import starlightLlmsText from 'starlight-llms-txt';
|
||||
import starlightChangelogs, { makeChangelogsSidebarLinks } from 'starlight-changelogs';
|
||||
// import starlightContextualMenu from 'starlight-contextual-menu';
|
||||
|
||||
// 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';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://invoke.ai',
|
||||
// base is only needed if no custom domain is available, or if the site is hosted in a subdirectory
|
||||
// base: '/InvokeAI',
|
||||
site: isGhPages ? 'https://invoke-ai.github.io' : 'https://invoke.ai',
|
||||
base: isGhPages ? '/InvokeAI' : undefined,
|
||||
integrations: [
|
||||
starlight({
|
||||
// Content
|
||||
@@ -24,7 +29,7 @@ export default defineConfig({
|
||||
alt: 'InvokeAI Logo',
|
||||
replacesTitle: true,
|
||||
},
|
||||
favicon: './src/assets/invoke-icon.svg',
|
||||
favicon: '/favicon.svg',
|
||||
editLink: {
|
||||
baseUrl: 'https://github.com/invoke-ai/InvokeAI/edit/main/docs',
|
||||
},
|
||||
@@ -117,10 +122,17 @@ export default defineConfig({
|
||||
PageFrame: './src/layouts/PageFrameExtended.astro',
|
||||
},
|
||||
plugins: [
|
||||
starlightLinksValidator({
|
||||
errorOnRelativeLinks: false,
|
||||
errorOnLocalLinks: false,
|
||||
}),
|
||||
// The links validator is skipped for the ghpages target because content uses
|
||||
// root-absolute links (e.g. /concepts/...) that don't include the /InvokeAI base.
|
||||
// Production (custom domain) still enforces link validation.
|
||||
...(isGhPages
|
||||
? []
|
||||
: [
|
||||
starlightLinksValidator({
|
||||
errorOnRelativeLinks: false,
|
||||
errorOnLocalLinks: false,
|
||||
}),
|
||||
]),
|
||||
starlightLlmsText(),
|
||||
starlightChangelogs(),
|
||||
// starlightContextualMenu({
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
invoke.ai
|
||||
+11
-1
@@ -1 +1,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>
|
||||
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_98_2)">
|
||||
<rect width="512" height="512" rx="54" fill="#E6FD13"/>
|
||||
<path d="M313.561 165.334H416V96H96V165.334H198.439L313.561 346.666H416V416H96V346.666H198.439" stroke="black" stroke-width="31"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_98_2">
|
||||
<rect width="512" height="512" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 432 B |
Reference in New Issue
Block a user