feat(docs): add syntax highlighting + restructure community contributing section#728
Open
ss-o wants to merge 10 commits into
Open
feat(docs): add syntax highlighting + restructure community contributing section#728ss-o wants to merge 10 commits into
ss-o wants to merge 10 commits into
Conversation
Deploying zsh with
|
| Latest commit: |
282ec52
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://faf79aa0.zsh.pages.dev |
| Branch Preview URL: | https://feature-syntax-highlighting.zsh.pages.dev |
- Create community/00_contributing/ as first-priority section - index.mdx: overview with banner SVG + card grid layout - 01_getting_started.mdx: org-wide fork/branch/commit/PR guide - 02_contributing_to_zi.mdx: zi-specific contributing guide - 03_zsh_plugin_standard.mdx: moved from community root (slug preserved) - 04_contributing_docs.mdx: wiki MDX authoring and Crowdin guide - 05_project_management.mdx: absorbs project tracker + labels content - Add six SVG illustrations to static/img/svg/community/: - contributing-banner.svg: wide workflow diagram (fork→code→PR→merge) - contributing-getting-started.svg: git branch tree (120×120) - contributing-zi.svg: gear with zi logo (120×120) - contributing-plugin-standard.svg: plug/socket icon (120×120) - contributing-docs.svg: document with pen (120×120) - contributing-project-management.svg: kanban board (120×120) - Renumber community top-level: - 02_zsh_plugin_standard.mdx removed (moved into 00_contributing/) - 03_zsh_native_scripting_handbook.mdx → 02_ - 04_zunit/ → 03_zunit/ (update _category_.json position + doc link) - Fix ZUnit broken links in index.mdx, 01_installation.mdx, 04_running-tests.mdx by adding .mdx extension (forces correct file-based resolution) - Update community/index.mdx with contributing CTA section Closes: docs/project-tracker-and-labels branch (content absorbed)
- Expand zsh grammar: adds zsh-builtin (30+ builtins), zsh-expansion-flag, zsh-special-parameter, zsh-glob-qualifier alongside existing zi/zunit tokens - Simplify prism-include-languages.ts to swizzle delegation pattern - Add comprehensive CSS token palette (9 token types, light + dark themes) - Fix dead link in zsh_startify.mdx (z-shell/zsh-startify repo is gone) - Migrate 44 MDX files from shell to zsh/zi/zunit language fences
Contributor
There was a problem hiding this comment.
Pull request overview
Adds custom Prism languages for Zsh/Zi/ZUnit and updates docs/community content to use them, while restructuring the Community “Contributing” area into a dedicated hub section.
Changes:
- Add Prism language registration (zsh/zi/zunit) and wire it into Docusaurus’ Prism language loading.
- Update many docs code fences from
shellto more specific languages (zsh,zi,zunit) to improve highlighting. - Create a new
community/00_contributing/hub (overview page + subpages) and renumber/move Community sections (incl. ZUnit).
Reviewed changes
Copilot reviewed 71 out of 82 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| static/img/svg/community/contributing-zi.svg | Add Zi contributing icon SVG |
| static/img/svg/community/contributing-project-management.svg | Add project management icon SVG |
| static/img/svg/community/contributing-plugin-standard.svg | Add plugin standard icon SVG |
| static/img/svg/community/contributing-getting-started.svg | Add getting started icon SVG |
| static/img/svg/community/contributing-docs.svg | Add docs contributing icon SVG |
| static/img/svg/community/contributing-banner.svg | Add contributing banner SVG |
| src/theme/prism-include-languages.ts | Include Prism additional languages + register custom Zsh/Zi/ZUnit languages |
| src/prism/z-shell-languages.ts | Define Prism grammars for zsh, zi, zunit |
| package.json | Add prismjs + @types/prismjs dependencies |
| pnpm-lock.yaml | Lockfile update for Prism deps |
| ecosystem/plugins/zzcomplete.mdx | Update code fence language to zsh |
| ecosystem/plugins/zui.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_unique_id.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_startify.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_select.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_navigation_tools.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_modules.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_editing_workbench.mdx | Update code fence language to zsh |
| ecosystem/plugins/zsh_comand_architect.mdx | Update code fence language to zsh |
| ecosystem/plugins/zprompts.mdx | Update code fence language to zsh |
| ecosystem/plugins/zi_console.mdx | Update code fence language to zsh |
| ecosystem/plugins/zconvey.mdx | Update code fence language to zsh |
| ecosystem/plugins/zbrowse.mdx | Update code fence language to zsh |
| ecosystem/plugins/h-s-mw.mdx | Update code fence language to zsh |
| ecosystem/plugins/f-sy-h.mdx | Update code fence language to zsh |
| ecosystem/plugins/diff-so-fancy.mdx | Update code fence language to zsh |
| ecosystem/packages/01_synopsis.mdx | Update code fence language to zsh |
| ecosystem/packages/02_usage.mdx | Update code fence language to zsh |
| ecosystem/annexes/0_overview.mdx | Update Zi-related fences to zi |
| ecosystem/annexes/1_bin_gem_node.mdx | Update code fence language to zsh |
| ecosystem/annexes/2_meta_plugins.mdx | Update code fence language to zsh |
| ecosystem/annexes/3_default_ice.mdx | Update code fence language to zsh |
| ecosystem/annexes/4_patch-dl.mdx | Update code fence language to zsh |
| ecosystem/annexes/5_readurl.mdx | Update code fence language to zsh |
| ecosystem/annexes/6_submods.mdx | Update code fence language to zsh |
| ecosystem/annexes/7_unscope.mdx | Update code fence language to zsh |
| ecosystem/annexes/8_linkbin.mdx | Update code fence language to zsh |
| ecosystem/annexes/9_rust.mdx | Update code fence language to zsh |
| ecosystem/annexes/19_eval.mdx | Update code fence language to zsh |
| ecosystem/annexes/20_test.mdx | Update code fence language to zsh |
| docs/getting_started/01_installation.mdx | Update code fence language to zsh |
| docs/getting_started/02_overview.mdx | Update code fence language to zsh |
| docs/getting_started/03_migration.mdx | Update code fence language to zsh |
| docs/guides/01_commands.mdx | Update Zi-related fences to zi |
| docs/guides/02_customization.mdx | Update code fence language to zsh |
| docs/guides/03_benchmark.mdx | Update code fence language to zsh |
| docs/guides/syntax/01_standard.mdx | Update code fence language to zsh (and adjust one snippet URL) |
| docs/guides/syntax/02_for.mdx | Update code fence language to zsh |
| docs/guides/syntax/10_bindkey.mdx | Update code fence language to zsh |
| community/index.mdx | Add “Contributing” entry point link from Community landing page |
| community/gallery/collection/01_collection.mdx | Update code fence language to zsh |
| community/gallery/collection/02_completions.mdx | Update code fence language to zsh |
| community/gallery/collection/03_programs.mdx | Update code fence language to zsh |
| community/gallery/collection/04_snippets.mdx | Update code fence language to zsh |
| community/gallery/collection/05_services.mdx | Update code fence language to zsh |
| community/gallery/collection/06_plugins.mdx | Update code fence language to zsh |
| community/gallery/collection/07_themes.mdx | Update code fence language to zsh |
| community/04_zunit/category.json | Remove old ZUnit category metadata (section moved/renumbered) |
| community/03_zunit/category.json | Add new ZUnit category metadata (new position/link type) |
| community/03_zunit/index.mdx | Update ZUnit index links to new file layout |
| community/03_zunit/01_installation.mdx | Update internal links to new section docs |
| community/03_zunit/02_test-syntax.mdx | Use zunit fence for ZUnit file syntax examples |
| community/03_zunit/03_assertions.mdx | Use zunit fence for assertion examples |
| community/03_zunit/04_running-tests.mdx | Update CI integration link reference |
| community/03_zunit/05_configuration.mdx | Add new ZUnit configuration reference page |
| community/03_zunit/06_ci.mdx | Add new ZUnit CI integration page |
| community/02_zsh_native_scripting_handbook.mdx | Renumber in sidebar + update fences to zsh |
| community/01_zsh_guide/01_roadmap/10_expansion.mdx | Update fences to zsh |
| community/00_contributing/category.json | Add new “Contributing” category for Community docs |
| community/00_contributing/index.mdx | Add new contributing hub landing page |
| community/00_contributing/01_getting_started.mdx | Add org-wide contributing basics page |
| community/00_contributing/02_contributing_to_zi.mdx | Add Zi-specific contributing guide page |
| community/00_contributing/03_zsh_plugin_standard.mdx | Move/adjust plugin standard page (preserve slug) + update fences |
| community/00_contributing/04_contributing_docs.mdx | Add wiki contribution/how-to page |
| community/00_contributing/05_project_management.mdx | Add org project tracker + labels documentation |
| .github/instructions/docs-authoring.instructions.md | Document preferred code fence languages (zsh, zi, zunit, sh, etc.) |
| AGENTS.md | Add repo-wide guidelines file |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
AGENTS.md:75
- This repo already documents that AI-specific global instruction files (including
AGENTS.md) should not be introduced unless explicitly requested, but this PR addsAGENTS.mdat the repo root. Please remove this file (or relocate the content into the existing.github/instructions/*docs where it belongs).
## Agent Notes
- Prefer small, scoped edits that match surrounding MDX and TypeScript style.
- Link to existing docs rather than duplicating long guidance.
- Scoped instruction files in `.github/instructions/` are auto-applied by file glob — prefer updating those for domain-specific guidance over modifying this file.
- Do not introduce new global instruction files (e.g., `AGENTS.md`) unless explicitly requested.
- ecosystem/plugins/zsh_startify.mdx: remove link to z-shell/zsh-startify (404) and remove FontAwesome icon from heading (FA kit removed from wiki) - community/gallery/collection/06_plugins.mdx: remove hyperlink from zsh-startify heading (repo no longer exists) - community/00_contributing/index.mdx: fix broken CODE_OF_CONDUCT link (z-shell/zi repo has no CODE_OF_CONDUCT.md) — use contributor-covenant.org - community/00_contributing/02_contributing_to_zi.mdx: fix same broken CODE_OF_CONDUCT link; remove link to z-shell/community guidelines (repo 404)
- z-shell-languages.ts: rewrite grammar using named capture groups for ESLint prefer-named-capture-group compliance; expand zsh-builtin list to 50+ builtins; rename zsh-keyword → zsh-builtin; add zsh-expansion-flag token; reorganize insertBefore calls for correct priority ordering - prism-include-languages.ts: replace manual additionalLanguages loop with clean swizzle delegation to @theme-original/prism-include-languages - custom.css: add 9-token semantic color palette (light + dark) for zsh-builtin, zsh-expansion-flag, zsh-special-parameter, zsh-glob-qualifier, zi-command keyword, zi-command subcommand function, zi-ice, zunit-command, zunit-directive, zunit-assertion; uses CSS custom properties and nested rules
- Convert space-separated admonition titles to bracket syntax (MDX v3 requirement): :::note Title -> :::note[Title] in 4 files - Add z-shell/zsh-startify to lychee exclude list — repo is archived/removed and is referenced in existing docs on the target (next) branch; Trunk checks both PR and base versions, causing false CI failures
The action prepends 'pnpm run' to the build-script value, so passing 'pnpm build:en' ran 'pnpm run pnpm build:en' — a non-existent script. Change to the bare script name 'build:en' so the action runs 'pnpm run build:en' correctly.
Contributor
|
Size Change: +257 kB (+4.09%) Total Size: 6.54 MB
ℹ️ View Unchanged
|
…colors prism-react-renderer applies inline style="color:..." to token spans using the Dracula/GitHub theme's alias colors, which beats plain CSS rules. Two fixes: - Selector: token colors were targeting <code> but Docusaurus puts language-* on <pre>; change to pre.language-* selectors. - Override: add !important to all custom token color declarations so they win over the inline styles. Also migrate z-shell/community membership links to z-shell/.github (community repo is private; .github has the same 05_membership.yml template and public issues enabled).
…S nesting Nested rules inside :is() and block selectors were mangled by the build, producing invalid CSS like `.language-zsh,...) .token.zsh-builtin` with the `pre` and `:is(` prefix stripped. Flattened all token color rules to standard descendant selectors which the pipeline processes correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syntax highlighting
src/prism-zshell.jsCommunity contributing section restructure
Creates
community/00_contributing/as the first-priority section — a comprehensive contributing hub for the Z-Shell ecosystem.New pages:
index.mdx— overview with banner SVG + 3-column card grid01_getting_started.mdx— org-wide fork/branch/commit/PR guide02_contributing_to_zi.mdx— Zi-specific contributing guide03_zsh_plugin_standard.mdx— moved from community root (slug preserved)04_contributing_docs.mdx— wiki MDX authoring and Crowdin guide05_project_management.mdx— absorbs tracker + labels branch contentSVG illustrations added to
static/img/svg/community/:contributing-banner.svg— wide fork→code→PR→merge workflow diagramHousekeeping:
03_zsh_native_scripting_handbook→02_,04_zunit/→03_zunit/.mdxextension approach)docs/project-tracker-and-labelsbranch (now deleted)Closes #727 follow-up (ZUnit links)