Documentation

Documentation for projects follows the same structure by default regardless of the source extension you use.

Below is the standard structure for documentation files.

- documentation-module
    - docs
        - en
            - 01.your-landing-page
                - 01.index.md
                - 02.another-page.md
            - 02.example-page
                - 01.index.md
                - 02.another-child-page.md

Docs

All documentation should be placed within the docs directory in the root of your project.

Translations

The documentation translations should be placed in their locale directory.

Index Pages

Index files provide the content for the directory in which they reside. Using the example above:

/documentation/your-project/v1/your-landing-page
/documentation/your-project/v1/example-page

Pages

All other page files inside the directory will act as child pages:

/documentation/your-project/v1/your-landing-page/another-page
/documentation/your-project/v1/example-page/another-child-page

Front Matter

All pages MUST have at least the title defined in their front matter. Front matter must be located at the top of the page.

---
title: Your Title
---

...

All front matter will be available on the page via it's data attribute:

{{ page.data.title }}

Syncing

Once you have documentation files set in place you can sync your project through the control panel or use the following Artisan commands:

php artisan documentation:sync # Sync all projects and all references
php artisan documentation:sync my-project # Sync "my-project" and all references
php artisan documentation:sync my-project v1.0 # Sync "[email protected]" only