What is this?
This is a remark plugin to wrap something in custom containers, based on remark-directive. you can passing arbitrary attributes to container, see remark-attr for more details.
for example: :::container{class="grid grid-cols-2"}
will easily implement a grid layout.
install
usage
remark-directive is required before remark-container.
Say our document example.md contains:
…and our module example.js contains:
…then running node example.js yields:
config
- @param {Object} config - optional,The configuration object.
- @param {string} config.name -optional, The container identifier behind
:::
. - @param {Object} config.attributes -optional, default attributes applied to all containers.
Examples
implement steps:
- install remark-container
- import remark-container
- use remark-container
the source code is as follows:
and css file as follows: