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.
- 📖 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
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' => [],
];- Install the package:
composer require xoshbin/pertuk- (Optional) Publish the config:
php artisan vendor:publish --tag="pertuk-config"-
Create a
docsdirectory 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"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
Add YAML front matter to your markdown files for metadata:
---
title: "Getting Started"
order: 1
---
# Getting Started
Your markdown content here...Create language-specific versions by adding locale suffixes:
docs/
├── getting-started.md # English (default)
├── getting-started.ckb.md # Kurdish
└── getting-started.ar.md # Arabic
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.
