Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getgrav/grav-plugin-markdown-notices
Grav Markdown Notices Plugin
https://github.com/getgrav/grav-plugin-markdown-notices
grav grav-plugin markdown notice
Last synced: 3 days ago
JSON representation
Grav Markdown Notices Plugin
- Host: GitHub
- URL: https://github.com/getgrav/grav-plugin-markdown-notices
- Owner: getgrav
- License: mit
- Created: 2015-12-18T04:08:56.000Z (almost 9 years ago)
- Default Branch: develop
- Last Pushed: 2020-12-02T21:47:38.000Z (almost 4 years ago)
- Last Synced: 2024-10-30T02:06:05.415Z (16 days ago)
- Topics: grav, grav-plugin, markdown, notice
- Language: PHP
- Homepage: https://getgrav.org
- Size: 110 KB
- Stars: 33
- Watchers: 7
- Forks: 21
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Grav Markdown Notices Plugin
The **markdown-notices plugin** for [Grav](http://github.com/getgrav/grav) allows generation of notice blocks of text via markdown:
![](assets/screenshot.png)
# Installation
This plugin is easy to install with GPM.
```
$ bin/gpm install markdown-notices
```# Configuration
Simply copy the `user/plugins/markdown-notices/markdown-notices.yaml` into `user/config/plugins/markdown-notices.yaml` and make your modifications.
```
enabled: true
built_in_css: true
base_classes: 'notices'
level_classes: [yellow, red, blue, green]
```# Examples
Using one level of `!`
```
! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris feugiat quam erat, ut iaculis diam posuere nec.
! Vestibulum eu condimentum urna. Vestibulum feugiat odio ut sodales porta. Donec sit amet ante mi. Donec lobortis
! orci dolor. Donec tristique volutpat ultricies. Nullam tempus, enim sit amet fringilla facilisis, ipsum ex
! tincidunt ipsum, vel placerat sem sem vitae risus. Aenean posuere sed purus nec pretium.
```You will output the following HTML
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris feugiat quam erat, ut iaculis diam posuere nec.
Vestibulum eu condimentum urna. Vestibulum feugiat odio ut sodales porta. Donec sit amet ante mi. Donec lobortis
orci dolor. Donec tristique volutpat ultricies. Nullam tempus, enim sit amet fringilla facilisis, ipsum ex
tincidunt ipsum, vel placerat sem sem vitae risus. Aenean posuere sed purus nec pretium.
```The `notices` class determined by the `base_classes` and `yellow` class is determined by the `level_classes` in the configuration. You can customize this as you need.
```
!! Lorem ipsum dolor sit amet, **consectetur adipiscing** elit. Mauris feugiat quam erat, ut iaculis diam posuere nec.
!!
!! * List item a
!! * List item b
!!
!! orci dolor. Donec tristique volutpat ultricies. Nullam tempus, enim sit amet fringilla facilisis, ipsum ex
!! tincidunt ipsum, vel placerat sem sem vitae risus. Aenean posuere sed purus nec pretium.
```Two levels of `!!` will use the second level class etc. You can also use complex markdown inside the notices.