huge documentaton restructure for docusaurus

This commit is contained in:
Codex Agent
2025-11-20 10:44:29 +01:00
parent 0127114e59
commit 6afa44d947
87 changed files with 18867 additions and 4102 deletions

4
docs/site/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Local node dependencies and build artifacts for the docs site
node_modules
build
.docusaurus

31
docs/site/README.md Normal file
View File

@@ -0,0 +1,31 @@
# Fotospiel Docs Site
This directory hosts a standalone [Docusaurus](https://docusaurus.io/) project that renders everything inside the main `/docs` tree as a browsable internal website. Keeping the static-site tooling here isolates all Node dependencies from the Laravel/Vite application.
## Structure
- `../` — existing Markdown sources (PRP, ops runbooks, etc.). These stay untouched.
- `./package.json` — dependencies and scripts for the docs site only.
- `./docusaurus.config.js` — points the docs plugin at `path: '../'` and excludes this `site/` directory.
- `./sidebars.js` — auto-generates the sidebar from the folder hierarchy.
- `./src/css/custom.css` — brand overrides for the default theme.
## Usage
```bash
cd docs/site
npm install
npm run start # Dev server at http://localhost:3100
npm run build # Outputs to docs/site/build
npm run serve # Serves built assets for preview
```
Because `routeBasePath` is `/`, the docs front page is the PRP index (or whichever document you place at `docs/README.md`). Update nav/footer links in `docusaurus.config.js` as needed.
## Deployment
1. `npm run build` creates the static site under `docs/site/build`.
2. Publish that directory to your static host (S3 + CloudFront, Dokploy static app, etc.).
3. Automate via CI by running installs/builds only inside this folder so the main app pipeline remains unchanged.
If you add new Markdown files anywhere under `/docs`, they automatically appear in the sidebar. To hide files, add ignore patterns to `include/exclude` in `docusaurus.config.js`.

View File

@@ -0,0 +1,97 @@
// @ts-check
const path = require('path');
const { themes } = require('prism-react-renderer');
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Fotospiel Ops & Product Docs',
tagline: 'Single source of truth for the platform',
url: 'https://docs.fotospiel.local',
baseUrl: '/',
favicon: 'img/favicon.ico',
organizationName: 'fotospiel',
projectName: 'fotospiel-docs-site',
onBrokenLinks: 'warn',
trailingSlash: false,
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
markdown: {
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: path.resolve(__dirname, '..'),
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
include: ['**/*.md', '**/*.mdx'],
exclude: ['site/**', 'archive/**', '**/_drafts/**'],
editUrl: undefined,
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
blog: false,
pages: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themes: [],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Fotospiel Docs',
items: [
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/fotospiel',
label: 'Git',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Architecture PRP',
to: '/',
},
{
label: 'Ops Playbooks',
to: '/ops',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Fotospiel. Internal use only.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;

18268
docs/site/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

27
docs/site/package.json Normal file
View File

@@ -0,0 +1,27 @@
{
"name": "fotospiel-docs-site",
"private": true,
"version": "0.1.0",
"description": "Docusaurus wrapper for the Fotospiel internal documentation.",
"scripts": {
"start": "docusaurus start",
"dev": "docusaurus start --host 0.0.0.0 --port 3100",
"build": "docusaurus build",
"serve": "docusaurus serve",
"clean": "rimraf build .docusaurus"
},
"dependencies": {
"@docusaurus/core": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"clsx": "^2.1.1",
"prism-react-renderer": "^2.3.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"rimraf": "^5.0.7"
},
"engines": {
"node": ">=18.0.0"
}
}

10
docs/site/sidebars.js Normal file
View File

@@ -0,0 +1,10 @@
/**
* Sidebar configuration for the Fotospiel docs site.
*/
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docsSidebar: [{ type: 'autogenerated', dirName: '.' }],
};
module.exports = sidebars;

View File

@@ -0,0 +1,18 @@
:root {
--ifm-color-primary: #ff5a5f;
--ifm-color-primary-dark: #e44f54;
--ifm-color-primary-darker: #cc4449;
--ifm-color-primary-darkest: #b23a3f;
--ifm-color-primary-light: #ff7376;
--ifm-color-primary-lighter: #ff8c8f;
--ifm-color-primary-lightest: #ffa5a8;
--ifm-code-font-size: 95%;
}
.navbar__brand {
font-weight: 600;
}
.footer--dark {
background-color: #1b1f23;
}