At the moment the documentation often only describes the standalone use of a component. Concrete examples are missing how the end user can use the component in his application.
Suggestion
Besides longer examples of integrations which needs extra pages in the documentation, we should also add an option for simpler code blocks. This can be done with a tabbed navigation; short "tabs".
Examples
mvc-based and expressive-based applications (like controller-action and handler)
different renderer (like Twig, Plates, zend-view)
usage standalone or embedded in a class (like Zend\Db\Sql\Sql as standalone or in a TableGateway class)
array notation vs. usage with methods in forms, validators, filters, etc.
Implementation
Markdown extension
The extension "Code Tabs" for Python-Markdown allows us to create code examples for different uses and application integrations. This extension comes with ready-to-use template for the CSS framework Bootstrap.
We must extend the configuration for MkDocs: (mkdocs.yml)
Problem
At the moment the documentation often only describes the standalone use of a component. Concrete examples are missing how the end user can use the component in his application.
Suggestion
Besides longer examples of integrations which needs extra pages in the documentation, we should also add an option for simpler code blocks. This can be done with a tabbed navigation; short "tabs".
Examples
Zend\Db\Sql\Sql
as standalone or in aTableGateway
class)Implementation
Markdown extension
The extension "Code Tabs" for Python-Markdown allows us to create code examples for different uses and application integrations. This extension comes with ready-to-use template for the CSS framework Bootstrap.
We must extend the configuration for MkDocs: (
mkdocs.yml
)Example
(GitHub ignores the extra markup
fct_label
in the preview.)Preview
Documentation: https://yacir.github.io/markdown-fenced-code-tabs/
Bootstrap component
https://getbootstrap.com/docs/3.3/components/#nav-tabs