Download the PHP package projektmotor/documentationbundle without Composer
On this page you can find all versions of the php package projektmotor/documentationbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download projektmotor/documentationbundle
More information about projektmotor/documentationbundle
Files in projektmotor/documentationbundle
Package documentationbundle
Short Description Symfony2 markdown based documentation bundle
License
Informations about the package documentationbundle
PmDocumentationBundle
Symfony2 Bundle to build simple Markdown based documentations (thanks to KnpMarkdownBundle & KnpMenuBundle).
Markdown syntax: cheatsheet
Features
- filesystem based for simple handling (create markdown-file, request uri, ready!)
- generate menus (KnpMenu) by simply parsing a toc-file (table of content)
- link rewriting: links could be written absolute to documentation root, bundle rewrites these links to be accessable by public urls
- image url rewriting: bundle is publishing the images to the configured path and rewrites urls, similar to links
Dependencies
Install
-
Install package via composer:
-
Activate in AppKernel:
-
Include routing:
-
OPTIONAL - Set documentation root dir & template (if you do not want to use the default path):
- NOTE: the template (view) MUST CONTAIN a block called content where the parsed markdown is rendered in.
- NOTE: image destination path must be writeable by the web server user (e.g. www-data)
Usage
Directory Structure
- let`s say your documentation-root is at /my/doc
- first level subdirectories divide different languages from each other
- /my/doc/en
- /my/doc/de
- ...
- every dir behind the language-dirs MUST contain an index.md (see Requesting a Page)
- /my/doc/en/index.md
- /my/doc/en/chapter_1/index.md
- ...
- the language-dirs SHOULD contain a toc.md (depending on your need of a menu)
- /my/doc/en/toc.md
- /my/doc/de/toc.md
- ...
Requesting a Page
Assuming you want to render the markdown file /path/to/doc/en/chapter_1/first-steps.md
in your browser, just call http://example.com/documentation/en/chapter_1/first-steps
.
Structure:
documentation
: the route prefix (could be set in routing)en
: the localechapter_1/first_steps
: path to markdown file
If you request a folder instead of specific markdown-file, the index.md
file of the folder is used. Requesting http://example.com/documentation/en/chapter_1
would end up in rendering the /path/to/doc/en/chapter_1/index.md
Including the (Sub-) Menu:
-
inject menu helper to you Knp MenuBuilder:
- add menu (based on toc.md)