Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andchir/markdown-bundle
markdown-bundle for Symfony 4.x
https://github.com/andchir/markdown-bundle
Last synced: 6 days ago
JSON representation
markdown-bundle for Symfony 4.x
- Host: GitHub
- URL: https://github.com/andchir/markdown-bundle
- Owner: andchir
- License: mit
- Created: 2019-01-04T12:13:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-05T09:36:49.000Z (over 4 years ago)
- Last Synced: 2024-11-16T13:04:34.573Z (about 2 months ago)
- Language: PHP
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
MarkdownBundle
==============~~~
composer require andchir/markdown-bundle
~~~Usage example:
~~~
{{ currentPage.description | markdown }}
~~~~~~
{{ currentPage.description | markdown({urlsLinked: false, safeMode: true, breaksEnabled: true, markupEscaped: true}) }}
~~~~~~
{{ includeFileContent(currentPage.file_content_path) | markdown }}
~~~Save content from file to the document field:
~~~
{% if currentPage.description is defined and currentPage.description is not empty %}
{{ currentPage.description | markdown }}
{% else %}
{{ includeFileContent(currentPage.file_content_path, 'documentation', currentPage.id, 'description') | markdown }}
{% endif %}
~~~bundles.php:
~~~
return [
...,
Andchir\MarkdownBundle\MarkdownBundle\MarkdownBundle::class => ['all' => true]
];
~~~Command to update content from file:
~~~
php bin/console markdown:action update_content documentation file_content_path description
~~~~~~
composer require erusev/parsedown
~~~