hollysocial / docweaver
Highly configurable Laravel 5.x package for product documentation.
Requires
- php: >=7.1.3
- erusev/parsedown-extra: ^0.7.1
- illuminate/support: 5.*
- monolog/monolog: ~1.11
- nesbot/carbon: ^1.22.1
- symfony/browser-kit: ^3.3
- symfony/process: ^3.3|~4.0
- symfony/yaml: ^3.3
Requires (Dev)
- orchestra/testbench-browser-kit: ~3.1
- phpunit/phpunit: ~7.0
Replaces
- reliqarts/doc-weaver: 1.*
This package is not auto-updated.
Last update: 2024-11-02 19:27:23 UTC
README
A simple Laravel 5.x product documentation package.
Docweaver is suitable for product documentation and/or knowledge bases. Converts folder(s) of .md files into full-bread complete documentation. Docweaver is inspired by Laravel's very own documentation.
Key Features
Docweaver provides the following features and more out of the box.
- Multi-product support
- Doc Weaver supports multiple products out-the-box. Just create your product folders and drop in your documentation version directories.
- Plug and play
- Just install and configure and you're golden! (approx. 2min)
Installation & Usage
Installation
Install via composer; in console:
composer require reliqarts/docweaver
or require in composer.json:
{ "require": { "reliqarts/docweaver": "^1.0" } }
then run composer update
in your terminal to pull it in.
Once this has finished, you will need to add the service provider to the providers array in your app.php config as follows: (n.b. This package supports Laravel's package auto-discovery; if you are using Laravel 5.5 or above you can skip this step.)
ReliQArts\Docweaver\DocweaverServiceProvider::class,
Ensure that your applications public storage directory is linked and assessible via the browser.
php artisan storage:link
see: https://laravel.com/docs/5.5/filesystem
Finally, publish package resources and configuration:
php artisan vendor:publish --provider="ReliQArts\Docweaver\DocweaverServiceProvider"
You may opt to publish only configuration by using the docweaver:config
tag:
php artisan vendor:publish --provider="ReliQArts\Docweaver\DocweaverServiceProvider" --tag="docweaver:config"
You may publish migrations in a similar manner using the tag migrations
.
Setup
Set the desired environment variables so the package knows your image model, controller(s), etc.
Example environment config:
DOC_WEAVER_ROUTE_PREFIX=docs
DOC_WEAVER_DIR=resources/docs
These variables, and more are explained within the config file.
Documentation Directory
The documentation directory is the place where you put your project documentation directories. It may be changed with the config key docweaver.storage.dir
or the environment variable DOC_WEAVER_DIR
. The default documentation directory is resources/docs
.
Structure
Each project directory should contain seperate folders for each documented version. Each version must have at least two (2) markdown files, namely documentation.md
and installation.md
, which serve as the sidebar and initial documentation pages respectively.
[doc dir] │ └─── Project One │ └── 1.0 │ └── 2.1 │ └── .docweaver.yml # meta file (optional) │ └── documentation.md # sidebar nav │ └── installation.md # initial page │ └─── Project Two
Meta File
Configurations for each doc version may be placed in .docweaver.yml
. The supported settings are:
-
name
Product name.
-
description
Product description.
-
image_url
Product image url. This may be an absolute url (e.g.
http://mywebsite.com/myimage.jpg
) or an image found in theimages
resource directory.To use the
foo.jpg
in the images directory you would setimage_url
to{{docs}}/images/foo.jpg
.For more info. see: Assets
Acknowledgements
This package was inspired by Laravel's documentation and uses its underlying mechanism as a base.