Skip to content
Draft
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
49 changes: 49 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Docs to Github Pages

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Install, build, and upload site output
uses: withastro/action@fc88a7002f0c62327f26fb1b15f2a1d581249278 # v5.1.0
with:
path: docs # The root location of your Astro project inside the repository. (optional)
# node-version: 22 # The specific version of Node that should be used to build your site. Defaults to 22. (optional)
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# build-cmd: pnpm run build # The command to run to build your site. Runs the package build script/task by default. (optional)

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
78 changes: 78 additions & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Crowdin Translations

on:
# Allow manual runs from the Actions tab
workflow_dispatch:
inputs:
upload_sources:
description: 'Upload source strings to Crowdin'
type: boolean
default: true
download_translations:
description: 'Download translations from Crowdin'
type: boolean
default: true

# Upload sources & download translations when source files change on main
push:
branches:
- main
paths:
- 'invokeai/frontend/web/public/locales/en.json'
- 'docs/src/content/i18n/en.json'
- 'docs/src/content/docs/**/*.md'
- 'docs/src/content/docs/**/*.mdx'
- '!docs/src/content/docs/[a-z][a-z]/**'
- '!docs/src/content/docs/[a-z][a-z]-*/**'
- 'crowdin.yml'

permissions:
contents: write
pull-requests: write

jobs:
crowdin-sync:
name: Sync with Crowdin
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Crowdin Sync
uses: crowdin/github-action@v2
with:
# Upload sources on push to main or when manually requested
upload_sources: ${{ github.event_name != 'workflow_dispatch' || inputs.upload_sources }}
upload_translations: false

# Download translations on push to main or when manually requested
download_translations: ${{ github.event_name != 'workflow_dispatch' || inputs.download_translations }}

# PR settings for downloaded translations
create_pull_request: true
pull_request_title: 'i18n: update translations from Crowdin'
pull_request_body: |
Automated pull request from [Crowdin](https://crowdin.com).

This PR updates translations for:
- **Web App UI** (`invokeai/frontend/web/public/locales/`)
- **Documentation UI Strings** (`docs/src/content/i18n/`)
- **Documentation Content** (`docs/src/content/docs/<locale>/`)
pull_request_base_branch_name: main
pull_request_labels: 'i18n'

# Commit settings
localization_branch_name: crowdin/translations
commit_message: 'i18n: update translations from Crowdin'

# Use the config file at the repo root
config: crowdin.yml

# Skip untranslated strings/files to keep partial translations clean
download_translations_args: '--skip-untranslated-strings'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
30 changes: 30 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Crowdin Configuration
# https://developer.crowdin.com/configuration-file/

project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN

preserve_hierarchy: true

# Map Crowdin's zh-TW to zh-Hant to match the existing file convention
languages_mapping:
locale:
zh-TW: zh-Hant

files:
# Web App UI Translations
- source: /invokeai/frontend/web/public/locales/en.json
translation: /invokeai/frontend/web/public/locales/%locale%.json

# Documentation - Starlight UI Strings
- source: /docs/src/content/i18n/en.json
translation: /docs/src/content/i18n/%locale%.json

# Documentation - Content Pages (MD and MDX)
- source: /docs/src/content/docs/**/*.{md,mdx}
translation: /docs/src/content/docs/%locale%/**/%original_file_name%
# Exclude translations directory to avoid re-uploading them as source files
ignore:
- /docs/src/content/docs/%locale%/**/*
# Translate full paragraphs rather than splitting into sentences
content_segmentation: 0
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Invoke AI Documentation
103 changes: 103 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

// Plugins
import starlightLlmsText from 'starlight-llms-txt';

// https://astro.build/config
export default defineConfig({
site: 'https://invoke-ai.github.io',
// base: '/InvokPeAI',
integrations: [
starlight({
// Content
title: {
en: 'InvokeAI Documentation',
},
logo: {
src: './src/assets/invoke-icon-wide.svg',
alt: 'InvokeAI Logo',
replacesTitle: true,
},
favicon: './src/assets/invoke-icon.svg',
editLink: {
baseUrl: 'https://github.com/invoke-ai/InvokeAI/edit/main/docs',
},
defaultLocale: 'root',
locales: {
root: {
label: 'English',
lang: 'en',
},
},
social: [
{
icon: 'github',
label: 'GitHub',
href: 'https://github.com/invoke-ai/InvokeAI',
},
{
icon: 'discord',
label: 'Discord',
href: 'https://discord.gg/ZmtBAhwWhy',
},
{
icon: 'youtube',
label: 'YouTube',
href: 'https://www.youtube.com/@invokeai',
},
],
tableOfContents: {
maxHeadingLevel: 4,
},
customCss: [
'@fontsource-variable/inter',
'@fontsource-variable/roboto-mono',
'./src/styles/custom.css',
],
sidebar: [
{
label: 'Start Here',
autogenerate: { directory: 'start-here' },
},
{
label: 'Configuration',
autogenerate: { directory: 'configuration' },
},
{
label: 'Concepts',
autogenerate: { directory: 'concepts' },
},
{
label: 'Features',
autogenerate: { directory: 'features' },
},
{
label: 'Workflows',
autogenerate: { directory: 'workflows' },
},
{
label: 'Development',
autogenerate: { directory: 'development', collapsed: true },
},
{
label: 'Contributing',
autogenerate: { directory: 'contributing' },
collapsed: true,
},
{
label: 'Troubleshooting',
autogenerate: { directory: 'troubleshooting' },
},
],
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: [starlightLlmsText()],
}),
],
});
Empty file added docs/invoke-config.json
Empty file.
23 changes: 0 additions & 23 deletions docs/nodes/overview.md

This file was deleted.

28 changes: 28 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/markdoc": "^0.15.10",
"@astrojs/starlight": "^0.37.6",
"@astrojs/starlight-markdoc": "^0.5.1",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/roboto-mono": "^5.2.8",
"astro": "^5.17.3",
"mermaid": "^11.12.3",
"rehype-external-links": "^3.0.0",
"sharp": "^0.34.2",
"starlight-llms-txt": "^0.7.0"
},
"devDependencies": {
"node-addon-api": "^8.5.0",
"node-gyp": "^12.2.0"
}
}
Loading