Skip to content

Commit f597623

Browse files
author
mikebofs
committed
perf: add docs
1 parent e02dcbe commit f597623

111 files changed

Lines changed: 10689 additions & 41 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
docs/node_modules
3+
docs/.next
4+
5+

‎AGENTS.md‎

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,37 @@
11
# Repository Guidelines
22

33
## Project Structure & Module Organization
4-
- Root contains the primary content: `JumpServer-whitepaper.md` (source) and `index.html` (rendered site).
5-
- Assets live under `images/` (generated from embedded images in the Markdown).
6-
- Utility script: `extract_images.py` (extracts base64 images from the Markdown to `images/`).
7-
- Other: `CNAME` for GitHub Pages custom domain, `LICENSE`, `README.md`.
4+
- Root contains `JumpServer-whitepaper.html` and its asset folder `JumpServer-whitepaper.fld/` (images, header, theme files).
5+
- Keep relative paths intact: the HTML references assets by filename inside `.fld`.
6+
- If adding assets, place them in `JumpServer-whitepaper.fld/` and reference with relative paths.
87

98
## Build, Test, and Development Commands
10-
- Extract images from Markdown:
11-
- `python3 extract_images.py` — saves decoded images into `images/` and logs counts.
12-
- Preview locally:
13-
- `python3 -m http.server 8000` then open `http://localhost:8000/index.html`.
14-
- Regenerate assets after editing `JumpServer-whitepaper.md`:
15-
- Re-run `python3 extract_images.py` and verify `images/` updates.
9+
- View locally: `open JumpServer-whitepaper.html` (macOS) or double‑click in a file browser.
10+
- Optional local server (helps with some browser policies): `python3 -m http.server` then open `http://localhost:8000/JumpServer-whitepaper.html`.
11+
- No build step; this is a static export.
1612

1713
## Coding Style & Naming Conventions
18-
- Python (`extract_images.py`):
19-
- Python 3.8+; PEP 8; 4-space indentation; snake_case for variables/functions.
20-
- Keep scripts stateless and idempotent; avoid hardcoding paths beyond project root.
21-
- HTML/CSS (`index.html`):
22-
- Two-space indentation; semantic tags where possible; descriptive class names.
23-
- Assets:
24-
- Images generated as `images/<sanitized-alt>.<ext>`; prefer meaningful alt text in Markdown.
14+
- HTML: keep semantic tags where possible; avoid inline styles unless necessary for fidelity.
15+
- Assets: follow existing pattern `imageNNN.(jpg|png)` to keep ordering clear (e.g., `image063.jpg`).
16+
- Indentation: 2 spaces for HTML; wrap lines at ~120 chars.
17+
- Do not rename or move `JumpServer-whitepaper.html` or the `.fld` directory.
2518

2619
## Testing Guidelines
27-
- Manual checks:
28-
- Run `python3 extract_images.py` and confirm the reported image count matches expectations.
29-
- Open `index.html` locally; verify images render and links work.
30-
- Optional validation:
31-
- Validate HTML via an online validator when making structural changes.
20+
- Visual check: open the HTML and verify all images render and links work.
21+
- Links: ensure internal anchors resolve; use relative paths only.
22+
- Accessibility spot check: provide alt text for new images where feasible.
23+
- If large edits: test in at least two browsers (e.g., Safari/Chrome).
3224

3325
## Commit & Pull Request Guidelines
34-
- Commit messages: prefer Conventional Commits (e.g., `feat: ...`, `fix: ...`, `perf: ...`, `docs: ...`).
35-
- Scope small, atomic commits; explain “why” in the body if non-obvious.
36-
- Pull Requests should include:
37-
- Summary of changes, screenshots for visual changes, and any manual test notes.
38-
- Reference related issues (e.g., `Closes #123`).
26+
- Commit messages: use concise prefixes like `docs:`, `assets:`, `fix:` (e.g., `docs: update section 3 wording`).
27+
- One logical change per commit; keep diffs focused on content you touched.
28+
- PRs should include: short description, before/after screenshots for visual changes, and any manual test notes.
3929

40-
## Security & Configuration Tips
41-
- Do not commit secrets; this site is static. Review diffs for large/binary additions.
42-
- `CNAME` config must remain at repo root for Pages; update only when the domain changes.
30+
## Security & Maintenance Notes
31+
- Do not embed secrets or tracking scripts.
32+
- Keep external dependencies out of the repo; prefer self‑contained assets inside `.fld`.
33+
- Large images: compress before adding to keep repo small.
34+
35+
## Agent-Specific Instructions
36+
- When editing files, preserve file names and relative links in `JumpServer-whitepaper.fld/`.
37+
- Avoid restructuring; prioritize minimal diffs to maintain link integrity.

‎docs/README.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Nextra Docs Site
2+
3+
This folder contains a Nextra (Next.js) docs site that restructures the Word-exported whitepaper into clean MDX pages with a left sidebar.
4+
5+
Quick start
6+
7+
- Install: `npm i`
8+
- Dev: `npm run dev` → http://localhost:3000
9+
- Build: `npm run build && npm start`
10+
11+
Content
12+
13+
- Pages live under `pages/` as `.mdx` files.
14+
- Sidebar is defined by `pages/_meta.json`.
15+
- Images should be placed in `public/whitepaper/` and referenced as `/whitepaper/<file>`.
16+

‎docs/next-env.d.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

‎docs/next.config.mjs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import nextra from 'nextra'
2+
3+
const withNextra = nextra({
4+
theme: 'nextra-theme-docs',
5+
themeConfig: './theme.config.tsx',
6+
})
7+
8+
export default withNextra({
9+
reactStrictMode: true
10+
})

0 commit comments

Comments
 (0)