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

0.0.4 2025-09-10 03:21 UTC

This package is auto-updated.

Last update: 2025-10-18 19:13:27 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

img.png

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

  1. Install the package:
composer require xoshbin/pertuk
  1. (Optional) Publish the config:
php artisan vendor:publish --tag="pertuk-config"
  1. Create a docs directory and add a markdown file, e.g. docs/getting-started.md.

  2. Visit your docs at /docs (or /{route_prefix} if you changed pertuk.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.