Skip to content

Add Nolebase enhanced readabilities plugin#338

Merged
jinzhongjia merged 2 commits into
mainfrom
enhanced-readabilities
Jun 24, 2026
Merged

Add Nolebase enhanced readabilities plugin#338
jinzhongjia merged 2 commits into
mainfrom
enhanced-readabilities

Conversation

@jinzhongjia

Copy link
Copy Markdown
Member

Integrates @nolebase/vitepress-plugin-enhanced-readabilities to enhance documentation readability.

Changes

  • Added @nolebase/vitepress-plugin-enhanced-readabilities dependency
  • Configured SSR settings to handle uncompiled Vue components from the plugin
  • Integrated the plugin into the VitePress theme with:
    • Layout Switch feature enabled (Spotlight disabled)
    • Navigation bar menu component
    • Mobile/screen navigation menu component
  • Chinese translations automatically applied via site's lang: zh-CN configuration

Why

Improves documentation readability and user experience by providing layout switching and related readability features that benefit all site visitors.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates the @nolebase/vitepress-plugin-enhanced-readabilities plugin into the VitePress project, configuring Vite's SSR settings to process the plugin and registering its menu components in the theme. The feedback recommends explicitly adding less to devDependencies in package.json to avoid potential build failures, as the plugin uses Less for styling and is compiled on the fly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread package.json
"epub": "bun run course/.vitepress/epub/build.ts"
},
"devDependencies": {
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.18.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since @nolebase/vitepress-plugin-enhanced-readabilities and @nolebase/ui use Less for styling and are configured under ssr.noExternal (meaning Vite compiles their Vue components and styles on the fly), Vite requires the less preprocessor to be available in the host project. Relying on transitive dependencies for Vite preprocessors can lead to build failures in environments with strict package managers (like pnpm) or certain CI/CD pipelines. It is highly recommended to explicitly add less to your devDependencies.

Suggested change
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.18.2",
"@nolebase/vitepress-plugin-enhanced-readabilities": "^2.18.2",
"less": "^4.6.7",

@jinzhongjia jinzhongjia merged commit d682ae7 into main Jun 24, 2026
5 checks passed
@jinzhongjia jinzhongjia deleted the enhanced-readabilities branch June 24, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant