Jekyll VitePress Theme
A reusable Jekyll theme gem that reproduces the VitePress default docs experience.
What it includes
- VitePress-style layout structure (top nav, sidebar, outline, doc footer)
- Appearance toggle with
auto -> dark -> light - Local search modal (
/,Ctrl/Cmd+K,Cmd+K) - Code block copy button, language labels, file-title bars and icons
- Rouge-native syntax theme config (
vp_theme.rouge_theme.light/dark) - Last-updated hook via plugin
- Slot includes for lightweight theme extension (
_includes/vp_slots/head.html,doc_footer.html,layout_bottom.html)
Installation
- Add the gem to your
Gemfile:
gem "jekyll-vitepress-theme"- Enable it in
_config.yml:
theme: jekyll-vitepress-theme
plugins:
- jekyll-vitepress-theme- Add
vp_themeconfiguration:
vp_theme:
nav:
- text: Guide
link: /what-is-jekyll-vitepress-theme/
collections: [getting_started, core_features, advanced]
sidebar_collections:
- id: getting_started
text: IntroductionLocal development (this repo)
bundle install
npm install
bundle exec jekyll serve --livereloadOpen http://127.0.0.1:4000.
Local Quality Gates
# one-shot verification
bundle exec rake verify
# regenerate built-in social icon assets after changing icon list
npm run build:social-icons
# install and run git hooks
bundle exec overcommit --install
bundle exec overcommit --sign pre-commit
bundle exec overcommit --sign pre-push
bundle exec overcommit --runDocs deployment (this repo)
-
maindeploys a single docs site at/ - No secondary version paths are published in default mode (
/latest/,/v/*,/next/) - Optional multi-version deployment is documented in _advanced/deployment.md
Theme configuration
See docs pages:
Release a gem
gem build jekyll-vitepress-theme.gemspec
gem push jekyll-vitepress-theme-<version>.gemLicense
MIT