Docs Starter
About This Template
Docs Starter is Laravel application to create documentation for your projects. It is a simple and easy to use application to create and manage documentation for your projects.
Add markdown files to the resources/docs
directory. The application will automatically generate the documentation based on the markdown files.
Configuration
The configuration is minimal and easy to use. The configuration file is located at config/app.php
. The configuration file contains the following options:
- name - The name of the application.
- description - The description on the home page.
Versions
The application supports multiple versions of the documentation. Versions are calculated based on the directories in the resources/docs
directory.
Once calculated a version dropdown is displayed to switch between versions.
Navigation
The navigation is generated based on contents of resources/docs/v1/_nav.md
The navigation is displayed on the left side of the documentation pages.
Use ## to create a new section.
Use - to create a new link.
## Getting Started
- [Introduction](/docs/v1/introduction)
- [Installation](/docs/v1/installation)
## Basic Usage
- [Configuration](/docs/v1/configuration)
- [Routes](/docs/v1/routes)
- [Sponsors](/docs/v1/sponsors)
Sample docs
resources/docs/v1/_nav.md
resources/docs/v1/configuration.md
resources/docs/v1/installation.md
resources/docs/v1/introduction.md
resources/docs/v1/routes.md
resources/docs/v1/sponsors.md
Routes
The routes are defined in the routes/web.php
file.
The following routes are defined in the routes/web.php
file:
- / loads
index.blade.php
view file. - /docs redirects to /docs/v1/introduction to change the default version of view change the redirect path.
- docs/{path} loads the markdown file from the
resources/docs
directory. - become-a-sponsor loads the
become-a-sponsor.blade.php
view file.
<?php
use App\Http\Controllers\PageController;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('index');
});
Route::get('docs', function () {
return redirect('docs/v1/introduction');
});
Route::get('docs/{path}', [PageController::class, 'page'])->name('docs.page')->where(['path' => '.*']);
Route::view('become-a-sponsor', 'become-a-sponsor')->name('become-a-sponsor');
You Might Also Like
Discover more templates to enhance your development workflow
Weight Tracker
Weight Tracker is designed to be simple and easy to use, with a clean and intuitive interface that makes it easy to trac...