https://github.com/cable8mm/document2
The Document2 is to generate Laravel style documents to static website
https://github.com/cable8mm/document2
Last synced: 3 months ago
JSON representation
The Document2 is to generate Laravel style documents to static website
- Host: GitHub
- URL: https://github.com/cable8mm/document2
- Owner: cable8mm
- License: mit
- Created: 2024-03-26T13:01:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T12:12:40.000Z (about 2 years ago)
- Last Synced: 2025-12-08T14:51:14.281Z (6 months ago)
- Language: HTML
- Homepage:
- Size: 2.89 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Document2 - Documentation Generator
[](https://github.com/cable8mm/document2/actions/workflows/code-style.yml)
[](https://github.com/cable8mm/document2/actions/workflows/run-tests.yml)
[](https://packagist.org/packages/cable8mm/document2)
[](https://packagist.org/packages/cable8mm/document2/stats)
[](https://packagist.org/packages/cable8mm/document2)

[](https://github.com/cable8mm/document2/stargazers)
[](https://github.com/cable8mm/document2/blob/main/LICENSE.md)
The Document2 is to generate Laravel style documents to static website.
We have done our best to create a convenient tool for you all. Take a moment to see how it works.
## Features
- [x] Generate static website from documentations
- [x] Versions are supported
- [x] Templates are supported
- [x] Testing available locally
- [x] Dark theme is supported
- [ ] Skeleton Theme is supported
- [ ] Search is supported
- [ ] Publish GitHub Pages with actions
- [ ] SEO is supported
## Installation
```shell
composer install cable8mm/document2
```
## Usage
Three official three templates are available. We can introduce them for creating as soon as possible.
Select your template:
```shell
bin/install-theme.sh https://github.com/cable8mm/laravel-theme
```
And clone the documentation files:
```shell
bin/checkout_latest_docs.sh
# Import laravel documentations into `docs` folder
```
Finally, run the following command to generate the static htmls
```shell
./document2
# Generate the static html files into the `public` folder
./document2 -d docs -b 10.x -f artisan.md
# Generate the static html file of directory `docs`, branch `10.x` and filename `artisan.md`
```
If Laravel Valet or Laravel Herd has been installed, you can visit https://document2.test.
## Development Templates
### Create
```shell
cd templates
npm run dev
```
and visit http://localhost:5173/. The port can be different.
### Reserved Placeholders
{{ section_title }} : replaces the section title
{{ title }} : replaces the title
{{ version }} : replaces the documentation version
{{ canonical }} : replaces the canonical url of the documentation
{{ app_url }} : replaces the documentation url
{{ original_url }} : replaces the original website url out of docs
### Reserved Dividers
The navigator html is inserted in this area
The option html is inserted in this area
The markdown documentation html is inserted in this area
## Testing
```shell
composer test
```
## Formatting
```shell
composer lint
# Modify all files to comply with the PSR-12.
composer inspect
# Inspect all files to ensure compliance with PSR-12.
```
## License
The Document2 project is open-sourced software licensed under the [MIT license](LICENSE.md).