Download the PHP package lynkbyte/docs-builder without Composer
On this page you can find all versions of the php package lynkbyte/docs-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lynkbyte/docs-builder
More information about lynkbyte/docs-builder
Files in lynkbyte/docs-builder
Package docs-builder
Short Description A Laravel-powered static documentation site generator that compiles Markdown and OpenAPI YAML into themed, searchable HTML.
License MIT
Informations about the package docs-builder
Docs Builder
https://docs-builder.lynkbyte.com/
A Laravel package that compiles Markdown files and OpenAPI 3.x YAML specifications into a fully themed, searchable, static documentation site — with zero frontend build step required.
Features
- Markdown with GFM — Tables, task lists, strikethrough, and all GitHub Flavored Markdown extensions
- Server-side syntax highlighting — 15+ languages via Tempest Highlight, with styled code blocks, language labels, and copy-to-clipboard buttons
- Mermaid diagrams — Render flowcharts, sequence diagrams, ERDs, and more using fenced
mermaidcode blocks, with automatic dark/light theme support, zoom in/out, pan (drag-to-scroll), and fullscreen - Image support — Standalone images are wrapped in
<figure>with alt-text captions, click-to-zoom lightbox overlay, and lazy loading for all images - Video embeds — YouTube and Vimeo URLs are auto-embedded as privacy-enhanced iframes; local
.mp4/.webm/.oggURLs render as native<video>elements with responsive 16:9 containers - OpenAPI 3.x API reference — Auto-generates endpoint pages from your YAML spec with parameters, responses, and an interactive "Try it out" panel
- Client-side search — Instant full-text search powered by Fuse.js with a keyboard-driven command palette (
Cmd+K/Ctrl+K) - Dark / light theme — Class-based toggle with OS preference detection and
localStoragepersistence - Multiple visual themes — Ships with a
defaulttheme (cool blue tones) and amoderntheme (warm amber/gold, inspired by Mintlify and Laravel docs). Switch with a single config key. - Responsive 3-column layout — Sidebar navigation, content area, and table of contents with mobile slide-in sidebar
- Pre-compiled assets — Ships with production-ready CSS and JS in
dist/— no Node.js or build step needed - Optional Vite integration — Opt into the host app's Vite pipeline for full asset customization
- Fully configurable — Logo, header navigation, Google Fonts, CSS theme overrides, Material Symbols icons, footer, and more
- Publishable views — Override any Blade template for complete control over the HTML output
Requirements
- PHP 8.3 or higher
- Laravel 11.x, 12.x, or 13.x
Installation
The package auto-discovers its service provider — no manual registration needed.
Quick Start
1. Scaffold starter files
The command presents an interactive prompt to select which optional sections to include (API Reference, Examples). This creates:
config/docs-builder.php— the configuration file (tailored to your selections)docs/README.md— a starter documentation pagedocs/openapi.yaml— a minimal OpenAPI spec (only when API Reference is selected)
2. Build the documentation
3. View the output
The static site is written to public/docs/ by default. Open public/docs/index.html in your browser, or visit /docs if your app is running.
Configuration Reference
Publish the config file (or use the one created by docs:init):
Site Settings
Appearance
Logo
Header Navigation
Fonts
Note: Material Symbols Outlined is used for sidebar page icons and UI elements. If you disable fonts, icons will not render unless you provide them through another mechanism.
Theme Name
Switch between built-in visual themes with a single config key:
Both themes support dark/light mode, all the same features, and the same configuration options. The modern theme has a warmer color palette, refined typography, and a polished card-based layout.
Theme Overrides
Override the default CSS custom properties by setting key-value pairs. These are injected as an inline <style> block on :root.
All available theme variables
| Variable | Default | Description | |----------|---------|-------------| | `color-primary` | `#137fec` | Primary brand color (links, active states) | | `color-primary-light` | `#3b9af5` | Lighter primary variant (hover states) | | `color-primary-dark` | `#0d6ad4` | Darker primary variant | | `color-dark-bg` | `#101922` | Dark mode background | | `color-dark-surface` | `#1a2632` | Dark mode surface (cards, sidebar) | | `color-dark-border` | `#233648` | Dark mode borders | | `color-dark-muted` | `#92adc9` | Dark mode muted text | | `color-dark-text` | `#e2e8f0` | Dark mode primary text | | `color-dark-text-secondary` | `#cbd5e1` | Dark mode secondary text | | `color-light-bg` | `#f6f7f8` | Light mode background | | `color-light-surface` | `#ffffff` | Light mode surface | | `color-light-border` | `#e2e8f0` | Light mode borders | | `color-light-muted` | `#94a3b8` | Light mode muted text | | `color-light-text` | `#0f172a` | Light mode primary text | | `color-light-text-secondary` | `#475569` | Light mode secondary text | | `color-code-bg` | `#0d1117` | Code block background | | `color-code-header` | `#1a2632` | Code block header background | | `color-code-border` | `#233648` | Code block border | | `color-code-text` | `#f1f5f9` | Code block text |Navigation
The sidebar navigation is defined as an array of sections, each containing an array of pages:
Each page entry supports:
| Key | Required | Description |
|---|---|---|
title |
Yes | Display title in the sidebar and page heading |
file |
Yes | Markdown filename (relative to source_dir) |
icon |
No | Material Symbols icon name |
layout |
No | 'documentation' (default) or 'api-reference' |
Pages using the api-reference layout render with the API sidebar (tags, endpoints) instead of the standard documentation sidebar.
API Settings
Footer
Support URL
Writing Documentation
Markdown Files
Place your Markdown files in the source_dir directory (docs/ by default). The builder supports all standard Markdown plus GitHub Flavored Markdown extensions:
| Feature | Syntax |
|---|---|
| Tables | \| Header \| Header \| |
| Task lists | - [x] Done |
| Strikethrough | ~~text~~ |
| Fenced code blocks | `` markdown |
title: Installation Guide
Installation
Your content here... markdown
`markdown
markdown
Check the icon for details. markdown
https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://example.com/demo.mp4 js // vite.config.js laravel({ input: [ 'resources/css/app.css', 'resources/js/app.js', // Add these for docs asset customization: 'vendor/lynkbyte/docs-builder/resources/css/docs.css', 'vendor/lynkbyte/docs-builder/resources/js/docs.js', ], }), bash php artisan docs:build bash
Rebuild only HTML pages, skip asset handling
php artisan docs:build --skip-assets bash php artisan docs:init bash
Overwrite existing files
php artisan docs:init --force
Include only API Reference (skip interactive prompt)
php artisan docs:init --features=api_reference
Include all features explicitly
php artisan docs:init --features=api_reference,examples bash php artisan docs:ai bash
Publish individual groups
php artisan vendor:publish --tag=docs-builder-config php artisan vendor:publish --tag=docs-builder-views php artisan vendor:publish --tag=docs-builder-assets php artisan vendor:publish --tag=docs-builder-css php artisan vendor:publish --tag=docs-builder-js php artisan vendor:publish --tag=docs-builder-stubs php artisan vendor:publish --tag=docs-builder-llms
views/vendor/docs-builder/docs/ ├── layouts/ │ ├── base.blade.php # Root HTML document (head, scripts, styles) │ ├── documentation.blade.php # Standard doc page (sidebar + content + TOC) │ └── api-reference.blade.php # API reference page (API sidebar + content) ├── partials/ │ ├── header.blade.php # Top navigation bar (logo, nav links, search, theme toggle) │ ├── sidebar.blade.php # Left sidebar navigation │ ├── toc.blade.php # Right-side table of contents │ ├── search-modal.blade.php # Search command palette overlay │ └── footer.blade.php # Site footer └── themes/ └── modern/docs/ # Modern theme overrides (same structure as above) ├── layouts/ └── partials/ bash
1. Publish the CSS source file
php artisan vendor:publish --tag=docs-builder-css
2. Add it as a Vite entry point in your vite.config.js
(see Asset Modes > Vite section above)
3. Set asset_mode to 'vite' in config/docs-builder.php
bash php artisan vendor:publish --tag=docs-builder-js bash php artisan vendor:publish --tag=docs-builder-stubs bash php artisan vendor:publish --tag=docs-builder-llms bash
Clone the repository
git clone https://github.com/lynkbyte/docs-builder.git cd docs-builder
Install dependencies
composer install npm install
Run the test suite
vendor/bin/pest
Build pre-compiled assets
npm run build
Before submitting a pull request:
1. **Code style** — Run `vendor/bin/pint` to auto-fix formatting (PSR-12)
2. **Tests** — Add tests for any new functionality and ensure all existing tests pass
3. **One concern per PR** — Keep pull requests focused on a single change
4. **Descriptive title** — Use a clear, concise title that summarizes the change
## Security Vulnerabilities
If you discover a security vulnerability within Docs Builder, please report it responsibly. **Do not open a public issue.** Instead, email [[email protected]](mailto:[email protected]) directly. All reports will be reviewed promptly and handled with care.
## License
Docs Builder is open-sourced software licensed under the [MIT license](LICENSE).All versions of docs-builder with dependencies
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/view Version ^11.0|^12.0|^13.0
laravel/prompts Version ^0.1|^0.2|^0.3
league/commonmark Version ^2.7
symfony/yaml Version ^6.4|^7.0|^8.0
tempest/highlight Version ^2.0