digitalcraftsman / hugo-material-docs

Port of Martin Donath's mkdocs-material theme to Hugo
MIT License
706 stars 186 forks source link

!!! warning "Don't try this at home" #14

Closed Hitaro closed 8 years ago

Hitaro commented 8 years ago
{{< warning title="Don't try this at home" >}}
Nothing to see here, move along.
{{< /warning >}}

Isn't there a way to add warnings/notes in the way of mkdocs (+)? The current way is a bit hard for none-technical users to deal with.

digitalcraftsman commented 8 years ago

Hi @Hitaro,

Hugo uses Blackfriday to convert your Markdown files into HTML. The !!! aren't part of the Markdown syntax itself but Blackfriday has a couple of extensions that allow you to add such features. Some of them are usable in Hugo.

However, I had the same thought and created a feature request (see russross/blackfriday#246). Even the original Material theme uses a Markdown extension for these admonition blocks.

A theme-based integration would be out of my scope. Shortcodes like your example above are the easiest way.

Cheers, Digitalcraftsman