rex-devs/lara-docs-kit 问题修复 & 功能扩展

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

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

rex-devs/lara-docs-kit

最新稳定版本:v1.0.0

Composer 安装命令:

composer require rex-devs/lara-docs-kit

包简介

A Laravel documentation package, that adds the ability to add multiple documentation sections to an existing site, while also choosing custom urls for each.

README 文档

README

Welcome to lara-docs-kit, a powerful Laravel documentation package. This package aims to simplify the process of creating and managing documentation for your Laravel projects.

Installation

To get started with lara-docs-kit, follow these simple steps:

  1. Install the package via Composer:
composer require rex-devs/lara-docs-kit
  1. Publish the tailwind css file.
php artisan vendor:publish --tag=lara-docs-kit-assets
  1. To enable the syntax highlighting the javascript package shiki is needed to be installed in the project. It can be install via npm:
npm install shiki
  1. A directory to store all the markdown files for the documentation will need to be created, using the default config the following command can be used to create the directory.
mkdir ./resources/docs
  1. A nav.json file will then be needed within that directory outlining the navigation menu.
{
    "introduction": "/",
}
  1. That's it! You're now ready to start using lara-docs-kit for your Laravel documentation needs.

Usage

The package is configured to run straight out the box, it adds a /docs route that takes markdown files directly out of the /resources/docs directory and deliveries them to the public. However, there is a config file that can be published and changed as needed.

Configuration

To publish the configuration file using the following command:

php artisan vendor:publish --tag=lara-docs-kit-config

The configuration file located at config/lara-docs-kit.php can then be customised according to your project's requirements. Here is an example of a route.

'routes' => [
    [
        'name' => 'docs',
        'url' => '/docs',
        'dir' => 'docs/',
        'middleware' => [
            'web',
        ],
    ],
],

Navigation

The package also uses a nav.json file in the top level of the directory that holds all the markdown files. This file allows for both top level links but also nested links (maximum of 1 level deep).

{
    "introduction": "/",
    "parent": {
        "introduction": "/parent/",
        "child": "/parent/child"
    }
}

Contributing

If you find any issues or have suggestions to improve lara-docs-kit, we welcome contributions from the community. Please feel free to submit a pull request or open an issue.

License

lara-docs-kit is open-source software licensed under the MIT license.

We hope lara-docs-kit proves to be a valuable tool for your Laravel projects. Should you have any questions or need assistance, don't hesitate to reach out to us on justin@rex-devs.co.uk.

Happy documenting! 😊

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-24