When you do not want to customize, you do not need any config file.
The bundle provides following defaults:
twig_doc:
doc_identifier: TWIG_DOC
use_fake_parameter: false
directories:
- '%twig.default_path%/components'
categories:
- name: Components
breakpoints:
small: 240
medium: 640
large: 768
By default, the bundle looks for your components in this directory: %twig.default_path%/components
You can provide additional directories in the config-file:
twig_doc:
directories:
- '%twig.default_path%/snippets'
- '%kernel.project_dir%/resources/components'
By default, the bundle uses this identifier: TWIG_DOC
To use another one:
twig_doc:
doc_identifier: 'MY_DOC_IDENTIFIER'
In your component template, you can then mark up your documentation in the template:
{#MY_DOC_IDENTIFIER
title: My component
...
MY_DOC_IDENTIFIER#}
<div class="fancy-component"></div>
By default, the creation of fake parameters is disabled!
When enabled, the bundle fakes parameters based on parameter-config of the component
The bundle groups components into categories and optionally into sub-categories.
Example:
twig_doc:
categories:
- name: Buttons
sub_categories:
- Action
- Submit
- name: Headings
- name: Alerts
...
The default category is always merged into the configuration.
To use custom breakpoints, simply provide a breakpoint-config. You can name the breakpoints as you like:
twig_doc:
breakpoints:
iphone: 598
unusual: 743
...