jeffersongoncalves/filament-documentation

A Filament plugin to add markdown-based documentation directly inside your admin panel. Inspired by nova-documentation.
.md files from a configurable directory (resources/docs/).md links auto-converted to panel routesphp artisan docs:install)| Branch | Filament | Laravel | PHP | Livewire |
|---|---|---|---|---|
| 1.x | 3.x | 10+ | 8.1+ | 3.x |
| 2.x | 4.x | 11+ | 8.2+ | 3.x |
| 3.x | 5.x | 12+ | 8.2+ | 4.x |
| Screenshot | Light | Dark |
|---|---|---|
| Docs home | ![]() |
![]() |
| Docs installation | ![]() |
![]() |
| Docs configuration | ![]() |
![]() |
| Docs advanced | ![]() |
![]() |
You can install the package via composer:
composer require jeffersongoncalves/filament-documentation
Optionally, publish the config and example docs:
php artisan docs:install
Or publish individually:
php artisan vendor:publish --tag=filament-documentation-config
php artisan vendor:publish --tag=filament-documentation-docs
Register the plugin in your PanelProvider:
use JeffersonGoncalves\FilamentDocumentation\FilamentDocumentationPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FilamentDocumentationPlugin::make()
->slug('docs')
->navigationLabel('Documentation')
->navigationIcon('heroicon-o-book-open')
->navigationGroup('Help')
->navigationSort(99)
->withAuthorization(false),
]);
}
Place your .md files in resources/docs/ (configurable via config/filament-documentation.php).
Each file supports optional YAML frontmatter:
---
title: "Getting Started"
path: home
order: 1
---
| Key | Description |
|---|---|
title |
Page title (overrides first H1) |
path |
Custom URL slug |
order |
Sort order in sidebar |
Subdirectories become collapsible groups in the sidebar:
resources/docs/
├── home.md
├── installation.md
├── configuration.md
└── advanced/
├── overview.md
├── authorization.md
└── customization.md
Link between docs using relative .md paths — they are automatically converted to panel routes:
- [Installation](installation.md)
- [Advanced](advanced/overview.md)
// config/filament-documentation.php
return [
'title' => env('DOCS_TITLE', 'Documentation'),
'docs_path' => resource_path('docs'),
'home' => 'home.md',
'cache_minutes' => env('DOCS_CACHE', 10), // 0 to disable
'login_route' => null,
];
| Method | Default | Description |
|---|---|---|
slug() |
'docs' |
URL path: /admin/docs |
navigationLabel() |
'Documentation' |
Sidebar label |
navigationIcon() |
heroicon-o-book-open |
Sidebar icon |
navigationGroup() |
null |
Sidebar group |
navigationSort() |
99 |
Sort order |
withAuthorization() |
false |
Require viewDocumentation gate |
Enable authorization to restrict access:
FilamentDocumentationPlugin::make()
->withAuthorization(true)
Then define a gate:
Gate::define('viewDocumentation', function ($user) {
return $user->hasRole('admin');
});
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please see SECURITY for details.
The MIT License (MIT). Please see License File for more information.
How can I help you explore Laravel packages today?