gubler / daux-parsedown-generator
Daux.io generator to use Parsedown instead of CommonMark
Installs: 2 117
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^5.5|^7.0
- erusev/parsedown-extra: ^0.7.1
Requires (Dev)
- dauxio/daux.io: ^0.5.0
README
This processor uses Parsedown Extra when generating a site with Daux.io
Additionally it converts specifically formatted blockquotes to callouts.
Usage
vendor/bin/daux --processor=ParsedownProcessor
Callouts
If you format the a blockquote in the following manner you can create a callout:
> #### Type::Title > Callout Body > ####
The rendered html will be formatted like this:
<div class="callout callout-type"> <div class="callout-header">Title</div> <div class="callout-body"> <p>Callout Body</p> </div> </div>
Any value can be entered for Type
. The Type
will always be converted to the class callout-type
.
Example:
> #### Alert::This is how you enter things! > This can contian any valid _markdown_. > > Just like a normal blockquote. > ####
The rendered html will be formatted like this:
<div class="callout callout-alert"> <div class="callout-header">Alert: This is how you enter things!</div> <div class="callout-body"> <p>This can contain any valid <em>markdown</em>.</p> <p>Just like a normal blockquote.</p> </div> </div>
If no Title is provided, the Header will just contain the Type
.
Example:
> #### Warning:: > A warning you should be aware of. > ####
The rendered html will be formatted like this:
<div class="callout callout-warning"> <div class="callout-header">Warning</div> <div class="callout-body"> <p>A warning you should be aware of.</p> </div> </div>
Callout Styles
In the less
directory you will find a basic styles. The less is modified from Bootstrap's alerts and contains styles for:
- success (green)
- note (blue)
- alert (red)
- warning (yellow)
- default (grey) - matches all other callouts that aren't success, note, alert, or warning.