veiliglanceren/laravel-remote-documentation

Easily fetch, parse, and display remote Markdown documentation from GitHub (or other sources) directly into customizable Blade views in your Laravel application.

0.0.2 2025-04-27 19:55 UTC

This package is not auto-updated.

Last update: 2025-04-27 19:57:38 UTC


README

Veilig Lanceren

This package is maintained by VeiligLanceren.nl, your partner in website development and everything else to power up your online company.

Laravel Remote Documentation

Latest Version on Packagist Total Downloads License

Easily fetch, parse, and display remote Markdown documentation from GitHub (or other sources) directly into customizable Blade views inside your Laravel application.

โœจ Features

  • Fetch remote .md files from public GitHub repositories
  • Convert Markdown to clean HTML
  • Generate Blade templates automatically
  • Fully customizable Blade layouts
  • Service-oriented, extensible, and tested

๐Ÿ“ฆ Installation

Install the package via Composer:

composer require veiliglanceren/laravel-remote-documentation

Laravel will automatically discover the package.
If needed, manually register the ServiceProvider:

Veiliglanceren\LaravelRemoteDocumentation\RemoteDocumentationServiceProvider::class

And the Facade:

'RemoteDocumentation' => Veiliglanceren\LaravelRemoteDocumentation\Facades\RemoteDocumentation::class,

โšก Quick Usage

Fetch documentation and generate Blade file via command:

php artisan remote-docs:fetch vendor/repository README.md

This will:

  • Fetch the README.md from GitHub vendor/repository
  • Convert it to HTML
  • Save it as a Blade file under resources/views/vendor/remote-documentation/vendor_repository.blade.php

Customize your layout

Override the default layout by publishing the views:

php artisan vendor:publish --tag=remote-documentation-views

You can then edit resources/views/vendor/remote-documentation/layout.blade.php.

๐Ÿ›  Available functions

The following functions are available through the RemoteDocumentation facade.

Service Purpose
RemoteDocumentation::get($repo, $file) Fetch and parse remote Markdown
RemoteDocumentation::parse($markdown) Generate a Blade view file

All services are fully extensible and injectable for advanced use cases.

โœ… Testing

Run the tests using PestPHP:

./vendor/bin/pest

๐Ÿงช Pest Compatibility

This package supports:

  • Pest v2 (for Laravel 10)
  • Pest v3 (for Laravel 11 and 12)

Ensure that your Pest version aligns with your Laravel version to maintain compatibility.

๐Ÿ“š Future Roadmap

  • Add feature tests for full command flow
  • Support private repositories with token authentication

๐Ÿ“ License

The MIT License (MIT).
Please see License File for more information.