docs: improve doucmentation
improve doucmentation and fix small store changes
This commit is contained in:
65
docs-site/docs/developer/docusaurus-site.md
Normal file
65
docs-site/docs/developer/docusaurus-site.md
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Docusaurus Site
|
||||
|
||||
The Docusaurus documentation lives in `docs-site/` and builds to static files in `docs-site/build/`.
|
||||
|
||||
## Structure
|
||||
|
||||
```text
|
||||
docs-site/
|
||||
docusaurus.config.ts
|
||||
sidebars.ts
|
||||
docs/
|
||||
intro.md
|
||||
user-guide/
|
||||
developer/
|
||||
plugin-development/
|
||||
src/css/custom.css
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
Use the Docusaurus development server while writing docs:
|
||||
|
||||
```bash
|
||||
cd docs-site
|
||||
npm run start
|
||||
```
|
||||
|
||||
Build the static site:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
From the repo root, use:
|
||||
|
||||
```bash
|
||||
npm run build:docs
|
||||
```
|
||||
|
||||
## Electron Hosting
|
||||
|
||||
Electron serves the built site through the local API server when Docusaurus docs are enabled.
|
||||
|
||||
| Route | Purpose |
|
||||
| --- | --- |
|
||||
| `/docusaurus` | Docusaurus entrypoint. |
|
||||
| `/docusaurus/*` | Static Docusaurus assets and generated pages. |
|
||||
|
||||
The endpoint is off until the user opens documentation from the desktop app or enables it through local API settings. Electron serves static files only; it does not run `docusaurus start`.
|
||||
|
||||
## Sidebar Rules
|
||||
|
||||
Navigation is controlled by `docs-site/sidebars.ts`. Add every new page there unless it is intentionally hidden. Use categories for larger sections so non-technical users can find the user guide separately from developer material.
|
||||
|
||||
## Content Rules
|
||||
|
||||
- User docs should avoid implementation jargon.
|
||||
- Developer docs should name exact files, commands, routes, capabilities, and data shapes.
|
||||
- Plugin API examples should use literal sample input data.
|
||||
- REST docs should stay aligned with `electron/api/openapi.ts` and `electron/api/router.ts`.
|
||||
- DOM docs should stay aligned with Angular routes and component selectors.
|
||||
Reference in New Issue
Block a user