xoshbin / pertuk
A powerful Laravel documentation package with multi-language support, markdown processing, and beautiful UI
Fund package maintenance!
:vendor_name
Installs: 64
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/xoshbin/pertuk
Requires
- php: ^8.4 || ^8.3
- illuminate/contracts: ^11.0||^12.0
- league/commonmark: ^2.0
- spatie/laravel-package-tools: ^1.16
- spatie/yaml-front-matter: ^2.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
README
Pertuk is a powerful Laravel documentation package that provides a complete documentation system with multi-language support, markdown processing, search functionality, and a beautiful, responsive UI.
Features
- 📖 Markdown Processing: Full CommonMark and GitHub Flavored Markdown support
- 🌍 Multi-Language Support: Built-in support for English, Kurdish, and Arabic
- 🔍 Search Functionality: Built-in search with JSON index
- 🎨 Beautiful UI: Responsive design with dark mode support
- 📱 Mobile Friendly: Optimized for all device sizes
- 🗂️ Auto Table of Contents: Automatic TOC generation from headings
- 💾 Caching: Intelligent caching for performance
- 🧭 Breadcrumbs: Automatic breadcrumb navigation
- 🏷️ Front Matter Support: YAML front matter for metadata
Configuration
This is the contents of the published config file:
return [ // Root folder for documentation files 'root' => base_path('docs'), // Default sort order when front matter 'order' is missing 'default_order' => 1000, // Excluded files or folders (relative to root) 'exclude' => [ '.DS_Store', 'README.md', 'Developers' ], // Cache TTL (seconds) for parsed HTML & metadata 'cache_ttl' => 3600, // Enable or disable the documentation system 'enabled' => true, // Route prefix for documentation 'route_prefix' => 'docs', // Route middleware 'middleware' => [], ];
Quick start
- Install the package:
composer require xoshbin/pertuk
- (Optional) Publish the config:
php artisan vendor:publish --tag="pertuk-config"
-
Create a
docs
directory and add a markdown file, e.g.docs/getting-started.md
. -
Visit your docs at
/docs
(or/{route_prefix}
if you changedpertuk.route_prefix
).
- Optional: publish the views to customize the layout and markup:
php artisan vendor:publish --tag="pertuk-views"
Usage
Document Structure
docs/
├── getting-started.md
├── User Guide/
│ ├── installation.md # default (en)
│ ├── installation.ckb.md # Kurdish
│ ├── installation.ar.md # Arabic
│ └── configuration.md
├── Developer Guide/
│ ├── api.md
│ └── examples.md
└── advanced.md
Front Matter
Add YAML front matter to your markdown files for metadata:
--- title: "Getting Started" order: 1 --- # Getting Started Your markdown content here...
Multi-Language Support
Create language-specific versions by adding locale suffixes:
docs/
├── getting-started.md # English (default)
├── getting-started.ckb.md # Kurdish
└── getting-started.ar.md # Arabic
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.