Download the PHP package olliecodes/laravel-etched-blade without Composer
On this page you can find all versions of the php package olliecodes/laravel-etched-blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download olliecodes/laravel-etched-blade
More information about olliecodes/laravel-etched-blade
Files in olliecodes/laravel-etched-blade
Package laravel-etched-blade
Short Description A Laravel package that uses blade templates to parse and convert markdown to HTML
License MIT
Informations about the package laravel-etched-blade
Install
Install via composer.
Once installed you'll want to publish the config.
If you want to modify the default themes you can publish those too.
Requirements
This package requires the following;
- PHP >= 7.3 (Including 8).
illuminate/view
>= 8.0 < 9.0 - The view component from Laravel.league/commonmark
>= 1.6 < 2.0 - The PHP league commonmark library, used for parsing the Markdown.webuni/front-matter
>= 1.2 < 2.0 - The front matter parser.
Usage
To render markdown in your blade files you can either do it inline;
Or by including a markdown file (.md
)
The above references the file markdown/content/article-1.md
, and the file will
be rendered by etched the same way that blade files normally are.
Themes
You can control the theme used for the rendered markdown in several ways.
Provide it as an argument on the directive.
As an argument when including.
Or in the front-matter of the markdown.
If no theme is provided the value of etched.defaults.theme
is used instead. If
multiple are provided, the value from the front-matter will take precedence.
Advanced
All markdown rendering is handled by the OllieCodes\Etched\Etched::render()
method.
You can use this method on an instance of Etched
Or using the facade.
The second parameter $theme
is optional and will default to the config value
etched.defaults.theme
. The theme will be overridden by the front-matter value
if one is provided in the markdown content.
All versions of laravel-etched-blade with dependencies
illuminate/view Version ^8.0
league/commonmark Version ^1.6
webuni/front-matter Version ^1.2