In this section, it is explained how you should write the documentation of every development.
Each development should respect the following rules:
## Functional documentation:
The functional documentation is the describes a javascript or php function.
**The documentation name should be the name of the function.**
And its content should be:
### Description
Short description of the function, what it does and what it returns (if it returns anything).
### UseCase
When and why the function should be used and how it is useful.
### Syntax
A code representation of the function: `const returnedValue = functionName(param1, param2);`.
### Parameters/arguments
`param: type` explanation of the parameter and what it means.
### Return
Description of what the function returns and his `type`.
### Examples
List of examples of how to use the function.
### References
List of useful references for the understanding and usage of the function.
AND a link to the function in the source code
### Tags
List of tags to describe the function, useful for the search in the documentation.
### Conversations
A connection to github permits this section to show any thread mentioning this element
---
## Custom element documentation:
The custom element documentation describes the new customElements and their usage.
**The documentation name should be the name of the custom element.**
And its content should be:
### Live example
The custom element is presented with a mmo-form that can configure live the custom
elements. (NOTE: mmo-form can generate automatically the input if you use the custom element
attribute schema).
You can also copy the code to generate the same custom element.
### Description
Short description of the customElement about what it does.
### UseCase
When and the custom element should be used and how it is useful.
### Attributes
Table of all attributes of the customElement:
| **Name** | _Description_ |
|---------------------------|--------------------------|
| **Attribute1** | _Attribute1 description_ |
| **Attribute2** | _Attribute2 description_ |
| **Attribute3** (optional) | _Attribute3 description_ |
### Attributes details (optional)
List of tables of every attribute explanation, usage and "impact" on the custom element.
_Example : for the mmo-select customElement:_
#### Input types
| **Type** | _Description_ | _Preview_ |
|-----------|---------------------|---------------------------|
| **Type1** | _Type1 description_ | Preview of the input type |
| **Type2** | _Type2 description_ | Preview of the input type |
| **Type3** | _Type3 description_ | Preview of the input type |
### Available classes (optional)
Table of all available classes of the customElement:
| **Name** | _Description_ | _Preview_ |
|------------|----------------------|------------|
| **Class1** | _Class1 description_ | |
| **Class2** | _Class2 description_ | |
| **Class3** | _Class3 description_ | |
### Preview & code
#### Preview
Preview of the customElement, so that the reader of the documentation is able to see and test the usage of the customElement.
#### Code
The code copyable of the above customElement preview, so that the reader of the documentation can just copy it and paste it in his project.
### References
List of useful references for the understanding and usage of the customElement.
AND a link to the function in the source code
### Tags
List of tags to describe the customElement, useful for the search in the documentation.
### Conversations
A connection to github permits this section to show any thread mentioning this element
---
## CSS classes documentation
The CSS classes documentation describes the utility and usage of a custom CSS class.
**The documentation name should be the name of the CSS class.**
And its content should be:
### Live example
You can also copy the code to generate the same styled element.
### Description
Short description of the CSS class, what it does and how to use it.
### UseCase
When and why the CSS class should be used and how it is useful.
### Syntax
Syntax of the CSS class to explain how to use it properly: `p { @include theme.color-text('blue-200'); }`.
### References
List of useful references for the understanding and usage of the CSS class.
### Tags
List of tags to describe the CSS class, useful for the search in the documentation.
### Conversations
A connection to github permits this section to show any thread mentioning this element
---
## Other development
Any useful documentation about custom developments that does not fit in the previous sections (if it is not a functional, custom element or CSS development).
**The documentation name should be the name of the new development.**
And its content should be:
### Get started
Short description of the development, and a simple example to use it out of the box.
### Usage
A complete explanation with any kind of structure.
Don't forget to use titles of level 3 or more
### References
List of useful references for the understanding and usage of the development.
### Tags
List of tags to describe the development, useful for the search in the documentation.
### Conversations
A connection to github permits this section to show any thread mentioning this element