-
Notifications
You must be signed in to change notification settings - Fork 22
docs: extract shared Plane docs theme (plane/) and align toolchain with docs #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,15 +18,17 @@ pnpm preview # Preview production build | |
| pnpm check:format # Check Prettier formatting | ||
| pnpm fix:format # Auto-fix Prettier formatting | ||
| pnpm check:types # Type-check the VitePress config and theme | ||
| pnpm check:theme-sync # Verify docs/.vitepress/theme/plane/ is identical to makeplane/docs (THEME_SIBLING_PATH=../docs for a local checkout) | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| **CI checks on PRs** (to `master`): Prettier formatting + VitePress build must pass. | ||
| **CI checks on PRs** (to `master`): Prettier formatting, type-check, VitePress build, and the shared-theme sync check must pass. | ||
|
|
||
| ## Architecture | ||
|
|
||
| - **`docs/`** — All documentation content and VitePress config | ||
| - **`docs/.vitepress/config.mts`** — Main VitePress config: navigation, sidebar structure, SEO, Algolia search, analytics. This is a large file that defines the entire site structure. | ||
| - **`docs/.vitepress/theme/`** — Custom theme (extends `@voidzero-dev/vitepress-theme` via `extendConfig`) with Vue components and global styles | ||
| - **`docs/.vitepress/theme/`** — `index.ts` calls `createPlaneTheme({...})` from `./plane` (this site's branding + API components); `site.css` holds site-only CSS | ||
| - **`docs/.vitepress/theme/plane/`** — **shared Plane docs theme**, byte-identical with `makeplane/docs` (tokens, fonts, header, layout, Card/CardGroup/Tags, Copy page menu, cookie consent). Edit in one repo, copy the folder to the sibling, run `pnpm check:theme-sync` in both; add new files to `plane/manifest.json`. Header buttons come from `themeConfig.nav` items flagged `planeButton: "primary" | "secondary"`. | ||
|
Comment on lines
+30
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Document the shared-theme formatting exception. The general rule at Line 106 says 🤖 Prompt for AI Agents |
||
| - **`docs/api-reference/`** — REST API endpoint docs (180+ endpoints across 30+ resource categories) | ||
| - **`docs/self-hosting/`** — Deployment and configuration guides | ||
| - **`docs/dev-tools/`** — Webhooks, OAuth apps, agents, MCP server docs | ||
|
|
@@ -69,15 +71,15 @@ docs/ | |
|
|
||
| ## Custom Vue Components | ||
|
|
||
| Used directly in markdown files — defined in `docs/.vitepress/theme/components/`: | ||
| Used directly in markdown files — API components in `docs/.vitepress/theme/components/`, shared ones in `docs/.vitepress/theme/plane/components/`: | ||
|
|
||
| | Component | Usage | | ||
| | ---------------------- | ----------------------------------------------------------------- | | ||
| | `<ApiParam>` | API parameter with name, type, required badge, expandable details | | ||
| | `<CodePanel>` | Multi-language code tabs (cURL, Python, JavaScript) | | ||
| | `<ResponsePanel>` | Syntax-highlighted API response JSON | | ||
| | `<Card>` | Feature card with icon, title, description | | ||
| | `<CardGroup cols="N">` | Responsive grid layout (2, 3, or 4 columns) | | ||
| | Component | Usage | | ||
| | ---------------------- | ---------------------------------------------------------------------------------------------------- | | ||
| | `<ApiParam>` | API parameter with name, type, required badge, expandable details | | ||
| | `<CodePanel>` | Multi-language code tabs (cURL, Python, JavaScript) | | ||
| | `<ResponsePanel>` | Syntax-highlighted API response JSON | | ||
| | `<Card>` | Card: `title`, `icon` (brand key or Lucide), `href`/`link`, `description` or slot, `cta`/`link-text` | | ||
| | `<CardGroup cols="N">` | Responsive grid layout (2, 3, or 4 columns) | | ||
|
|
||
| ## API Documentation Pattern | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,4 @@ | ||
| /// <reference types="vitepress/client" /> | ||
| /// <reference types="vite/client" /> | ||
| /// <reference path="./types/ambient-modules.d.ts" /> | ||
|
|
||
| import type {} from "vitepress"; | ||
|
|
||
| declare module "vitepress" { | ||
| namespace DefaultTheme { | ||
| interface Config { | ||
| variant?: "voidzero" | "viteplus" | "vite" | "vitest" | "rolldown" | "oxc"; | ||
| } | ||
| } | ||
| } | ||
| /// <reference path="./theme/plane/types/shims.d.ts" /> | ||
| /// <reference path="./theme/plane/types/vitepress-augment.d.ts" /> |
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: makeplane/developer-docs
Length of output: 870
🏁 Script executed:
Repository: makeplane/developer-docs
Length of output: 6791
🌐 Web query:
actions/checkout@v4 persist-credentials default token local git config pull_request workflow permissions contents read💡 Result:
The actions/checkout@v4 action is designed to facilitate authenticated git operations within GitHub Actions workflows by managing credentials in the local git configuration [1][2]. Key details regarding your query include: Default Behavior: The
persist-credentialsinput defaults totrue[3][4]. When enabled, the action configures the authentication token (or SSH key) in the local git config [1][5]. This allows subsequent steps in the same job to execute authenticated git commands (e.g., git fetch, git push) without needing to manually re-authenticate [1][6]. Security and Cleanup: The persisted token is removed during the post-job cleanup process [1][2]. Because the token is written to the local git configuration (often as an http.extraheader in.git/config), it is recommended to setpersist-credentials: falseif your workflow does not require further git operations [1][6]. This prevents the credential from being included if the workspace (including the.git directory) is uploaded as an artifact, which could pose a security risk [6]. Workflow Permissions: - By default, theGITHUB_TOKENtypically hascontents: readpermissions [7][8]. - If you intend to perform git operations that require write access (such as a git push), you must explicitly grantcontents: writepermissions in your workflow configuration [9][8]. - If the token lacks the necessary permissions, git operations may fail with a 403 error despite credentials being persisted [9][8]. Summary of Implementation: - To keep default behavior: No action needed (persist-credentials is true by default) [1][3]. - To opt-out: Setpersist-credentials: falsein the with block [1][6]. - For push operations: Ensure your workflow permissions includepermissions: contents: write[9][8].Citations:
persist-credentials: falseon checkout steps cli/go-gh#225Disable checkout credential persistence in the theme-sync job.
The job executes pull request code, while
actions/checkout@v4persists the workflow token by default. Setpersist-credentials: false.The workflow already grants
contents: read, so a job-level permission block is unnecessary.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 55-55: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
🤖 Prompt for AI Agents
Source: Linters/SAST tools