A documentation rendering engine built with Vue 3, Quasar v2 and Vite.
Transform Markdown content into beautiful, navigable documentation sites β with i18n, syntax highlighting, dark/light mode, and anchor navigation.
- π Markdown Rendering β Write docs in Markdown, rendered with syntax highlighting (Prism.js)
- π Internationalization (i18n) β Multi-language support with HJSON locale files and per-page translations
- π Dark/Light Mode β Automatic theme switching with Quasar Dark Plugin
- π Anchor Navigation β Right-side Table of Contents tree with scroll tracking
- π Search β Menu search across all documentation content and tags
- π± Responsive β Mobile-friendly with collapsible sidebar and drawers
- π·οΈ Status Badges β Mark pages as
done,draft, oremptywith visual indicators - βοΈ Edit on GitHub β Direct links to edit pages on your repository
- π Translation Progress β Automatic translation percentage based on header coverage
- βοΈ Single Config File β Customize branding, links, and languages via
docsector.config.js
npm install @docsector/docsector-readernpx docsector init my-docs
cd my-docs
npm installThis creates a minimal project with quasar.config.js, docsector.config.js, src/pages/, src/i18n/, and public/ β all powered by the docsector-reader engine.
npx docsector dev
# or
npx quasar devnpx docsector build
npx docsector serve # Preview production buildDocsector Reader works as a rendering engine: it provides the layout, components, router, store, and boot files. Consumer projects supply only their content (pages, i18n, config, assets).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Consumer project (your-docs/) β
β βββ docsector.config.js β branding, links, langs β
β βββ quasar.config.js β thin wrapper β
β βββ src/pages/ β Markdown + route defs β
β βββ src/i18n/ β language files + tags β
β βββ public/ β logo, images, icons β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
β β @docsector/docsector-reader (engine) β β
β β βββ App.vue, router, store, boot files β β
β β βββ DPage, DMenu, DH1βDH6, DefaultLayout β β
β β βββ composables (useNavigator) β β
β β βββ CSS, Prism.js, QZoom β β
β βββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The consumer's Quasar config is a thin wrapper around the factory:
import { configure, createQuasarConfig } from '@docsector/docsector-reader/quasar-factory'
export default configure(() => {
return createQuasarConfig({
projectRoot: import.meta.dirname,
// Optional: consumer-specific boot files (resolved from src/boot/)
boot: ['qmediaplayer'],
// Optional: PWA manifest overrides
pwa: {
name: 'My Docs',
short_name: 'Docs',
theme_color: '#027be3'
},
// Optional: extra Vite plugins
vitePlugins: [],
// Optional: extend Vite config further
extendViteConf (viteConf) {
// custom aliases, plugins, etc.
}
})
})| Alias | Standalone | Consumer mode |
|---|---|---|
components |
project src/components/ |
package src/components/ |
layouts |
project src/layouts/ |
package src/layouts/ |
boot |
project src/boot/ |
package src/boot/ |
composables |
project src/composables/ |
package src/composables/ |
css |
project src/css/ |
package src/css/ |
stores |
project src/store/ |
package src/store/ |
pages |
project src/pages/ |
consumer src/pages/ |
src/i18n |
project src/i18n/ |
consumer src/i18n/ |
docsector.config.js |
project root | consumer root |
@docsector/tags |
project src/i18n/tags.hjson |
consumer src/i18n/tags.hjson |
export default {
branding: {
logo: '/images/logo/my-logo.png',
name: 'My Project',
version: 'v1.0.0',
versions: ['v1.0.0', 'v0.9.0']
},
links: {
github: 'https://github.com/org/repo',
discussions: 'https://github.com/org/repo/discussions',
chat: 'https://discord.gg/invite',
email: 'contact@example.com',
changelog: 'https://github.com/org/repo/releases',
roadmap: 'https://github.com/org/repo/blob/main/ROADMAP.md',
sponsor: 'https://github.com/sponsors/user',
explore: [
{ label: 'π Related Project', url: 'https://github.com/org/related' }
]
},
github: {
editBaseUrl: 'https://github.com/org/repo/edit/main/src/pages'
},
languages: [
{ image: '/images/flags/united-states-of-america.png', label: 'English (US)', value: 'en-US' },
{ image: '/images/flags/brazil.png', label: 'PortuguΓͺs (BR)', value: 'pt-BR' }
],
defaultLanguage: 'en-US'
}Consumer projects use the buildMessages helper from the engine:
import { buildMessages } from '@docsector/docsector-reader/i18n'
const langModules = import.meta.glob('./languages/*.hjson', { eager: true })
const mdModules = import.meta.glob('../pages/**/*.md', { eager: true, query: '?raw', import: 'default' })
import boot from 'pages/boot'
import pages from 'pages'
export default buildMessages({ langModules, mdModules, pages, boot })Place HJSON locale files in src/i18n/languages/:
src/i18n/languages/en-US.hjson
src/i18n/languages/pt-BR.hjson
Provide search keywords per route and locale for menu search:
{
"en-US": {
"/manual/my-section/my-page": "keyword1 keyword2 keyword3"
}
"pt-BR": {
"/manual/my-section/my-page": "palavra1 palavra2 palavra3"
}
}
my-docs/
βββ docsector.config.js # Branding, links, languages
βββ quasar.config.js # Thin wrapper using createQuasarConfig()
βββ package.json
βββ src/
β βββ pages/
β β βββ index.js # Page registry (routes + metadata)
β β βββ boot.js # Boot page data
β β βββ guide/ # Guide pages (.md files)
β β βββ manual/ # Manual pages (.md files)
β βββ i18n/
β β βββ index.js # Uses buildMessages() from engine
β β βββ tags.hjson # Search keywords per route/locale
β β βββ languages/ # HJSON locale files
β βββ css/
β β βββ app.sass # Optional overrides (imports engine CSS)
β βββ boot/ # Consumer-specific boot files
β βββ qmediaplayer.js # Example: custom Quasar extension
βββ public/
βββ images/logo/ # Project logo
βββ images/flags/ # Locale flag images
βββ icons/ # PWA icons
1οΈβ£ Register in src/pages/index.js:
export default {
'/manual/my-section/my-page': {
config: {
icon: 'description',
status: 'done', // 'done' | 'draft' | 'empty'
type: 'manual', // 'guide' | 'manual'
menu: {
header: { label: '.my-section', icon: 'category' }
},
subpages: { showcase: false, vs: false }
},
data: {
'en-US': { title: 'My Page' },
'pt-BR': { title: 'Minha PΓ‘gina' }
}
}
}2οΈβ£ Create Markdown files:
src/pages/manual/my-section/my-page.overview.en-US.md
src/pages/manual/my-section/my-page.overview.pt-BR.md
docsector init <name> # Scaffold a new consumer project
docsector dev # Start dev server (port 8181)
docsector dev --port 3000 # Custom port
docsector build # Build for production (dist/spa/)
docsector serve # Serve production build
docsector help # Show help| Import path | Export | Description |
|---|---|---|
@docsector/docsector-reader/quasar-factory |
createQuasarConfig() |
Config factory for consumer projects |
@docsector/docsector-reader/quasar-factory |
configure() |
No-op wrapper (avoids needing quasar dep) |
@docsector/docsector-reader/i18n |
buildMessages() |
Build i18n messages from globs + pages |
@docsector/docsector-reader/i18n |
filter() |
Filter i18n messages by locale |
| Technology | Purpose |
|---|---|
| Vue 3 | Composition API + <script setup> |
| Quasar v2 | UI framework |
| @quasar/app-vite | Vite-based Quasar build |
| Vuex 4 | State management |
| vue-i18n 9 | Internationalization |
| markdown-it | Markdown parsing |
| Prism.js | Syntax highlighting |
| HJSON | Human-friendly JSON for locale files |
Contributions are welcome! Please open an issue or submit a pull request.
Copyright (c) Rodrigo de Araujo Vieira
