1. Go to this page and download the library: Download mogita/docbuilder 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/ */
use Mogita\DocBuilder\MkDocs;
$mkdocs = new MkDocs(getcwd() . '/docs');
$mkdocs->setHeaderLink('http://www.example.com');
$mkdocs->setSiteName('Title new');
$mkdocs->setTheme('material'); // You'll have to install the specific themes to your system first
$mkdocs->addPage('Home', 'index.md');
$mkdocs->addPage('About', 'about.md');
$mkdocs->addPage('API Docs', []); // this creates a secondary level, so that you can add pages to this level
$mkdocs->addPage('User', 'user.md', 'API Docs');
$mkdocs->addPage('Data', 'data.md', 'API Docs');
$mkdocs->setPrev('前一页');
$mkdocs->setNext('后一页');
$mkdocs->setPrimaryColor('purple');
$mkdocs->setAccentColor('teal');
$res = $mkdocs->build();
if ($res === true) {
echo 'Success!';
}
else {
var_dump($res);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.