eightynine/filament-docs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

eightynine/filament-docs

最新稳定版本:3.0.1

Composer 安装命令:

composer require eightynine/filament-docs

包简介

Elegant documentation system for your Filament application with search, navigation, and markdown support

README 文档

README

Latest Version on Packagist Total Downloads

A Filament plugin for creating elegant documentation pages within your admin panel.

Features

  • Markdown Support: Full CommonMark compatibility with syntax highlighting
  • Real-time Search: Instant search with context-aware results
  • Responsive Design: Mobile-first with dark mode support
  • Multi-language: Built-in internationalization support
  • Theme Integration: Seamlessly integrates with Filament themes
  • Artisan Commands: CLI tools for generating pages and content

Requirements

  • PHP 8.1+
  • Laravel 10.0+
  • Filament 3.0+

Installation

composer require eightynine/filament-docs

Publish configuration (optional):

php artisan vendor:publish --tag="filament-docs-config"

Create documentation directory:

mkdir -p resources/docs

Quick Start

  1. Create a documentation page:
php artisan make:filament-docs-page UserManual \ --navigation-group="Documentation" \ --navigation-icon="heroicon-o-book-open"
  1. Add markdown files to resources/docs/:
# Getting Started Welcome to the documentation!
  1. Access your documentation in the Filament admin panel.

Configuration

The configuration file config/filament-docs.php allows customization:

return [ 'default_docs_path' => resource_path('docs'), 'search' => [ 'debounce_ms' => 300, ], 'ui' => [ 'sidebar_width' => 'lg:w-80', 'default_navigation_group' => 'Documentation', ], ];

Advanced Usage

Custom Documentation Page

<?php namespace App\Filament\Pages; use EightyNine\FilamentDocs\Pages\DocsPage; class UserManual extends DocsPage { protected static ?string $navigationIcon = 'heroicon-o-book-open'; protected static ?string $navigationGroup = 'Documentation'; protected static ?string $title = 'User Manual'; protected function getDocsPath(): string { return resource_path('user-manual'); } protected function getSectionOrder(string $filename): int { return match($filename) { 'introduction' => 1, 'installation' => 2, 'usage' => 3, default => 99, }; } }

Multi-language Support

// config/filament-docs.php return [ 'localization' => [ 'supported_locales' => ['en', 'es', 'fr'], 'locale_paths' => [ 'en' => 'docs/en', 'es' => 'docs/es', 'fr' => 'docs/fr', ], ], ];

Directory structure:

resources/docs/ ├── en/ │ ├── getting-started.md │ └── user-guide.md ├── es/ │ ├── getting-started.md │ └── user-guide.md └── fr/ ├── getting-started.md └── user-guide.md 

Commands

Create Documentation Page

# Basic page php artisan make:filament-docs-page MyDocs # With options php artisan make:filament-docs-page ApiDocs \ --navigation-group="Developer" \ --navigation-icon="heroicon-o-code-bracket" \ --title="API Documentation" \ --slug="api-docs"

Create Markdown Content

# Basic markdown file php artisan make:filament-docs-markdown "Getting Started" # With template php artisan make:filament-docs-markdown "API Guide" --template=api

Available templates: basic, guide, api, troubleshooting, feature

Customization

Custom Views

Publish views for customization:

php artisan vendor:publish --tag="filament-docs-views"

Custom Styling

Publish assets:

php artisan vendor:publish --tag="filament-docs-assets"

Add custom CSS:

.docs-container { @apply max-w-7xl mx-auto; } .docs-sidebar { @apply w-64 bg-white dark:bg-gray-900; }

Performance Optimization

Enable caching for large documentation:

class CachedDocsPage extends DocsPage { protected function getCachedContent(string $filename): string { return Cache::remember( "docs.content.{$filename}", 3600, fn() => $this->loadAndProcessMarkdown($filename) ); } }

License

MIT License. See LICENSE.md for details.

统计信息

  • 总下载量: 899
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固