PHP code example of pfaciana / render-docs
1. Go to this page and download the library: Download pfaciana/render-docs library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pfaciana / render-docs example snippets
rDocs([
'docRoot' => __DIR__ . '/../docs/', // Required. Location of the JSON files (Projects grouped as sub-directories)
'editorUrl' => 'http://localhost:1234/api/file/', // Optional. If you have an IDE installed, this will prefix a link to open the file (if it exists locally) in your IDE.
'locationFilter' => function ($file) { /* alter filepath */ return $file; }, // Optional. Used with `editorUrl`, if the file exists in a different location locally than in the repo, this is a filter that allows you to alter the filepath so that you can link to it locally.
]);