{"repo":"jake-low/remark-sectionize","free":true,"listed":false,"github":"https://github.com/jake-low/remark-sectionize","clone":"git clone https://github.com/jake-low/remark-sectionize.git","description":"Remark plugin to wrap each heading and the content that follows it in a <section> tag","language":"JavaScript","stars":73,"topics":["remark","markdown"],"license":"MIT","category":"productivity","readme_excerpt":"remark-sectionize This is a remark plugin to wrap each heading and the content that follows it in a tag, allowing you to style the document sections using CSS. Example When using remark-sectionize , given the following markdown: ...remark will output the following HTML: One use case of this plugin is to permit the logical sections of a document to be targeted and styled using CSS. For example, you could do something like this: To give the h2 -level sections alternating background colors. Usage If you are invoking remark (or unified ) in JavaScript, you can add this plugin by calling use() : If you're using remark from the CLI, you can use sectionize via the --use argument: Note that for the above to work, remark-sectionize needs to be installed somewhere that remark can find. Finally, if you're using Webpack and mdx-loader to import markdown files from JS, you can modify the loader options in your webpack config file, adding sectionize to your mdPlugins list (something like the following): License This repository is licensed under the MIT license; see the LICENSE file for details.","default_branch":null,"files":null,"tree":[],"storefront":"/r/jake-low","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jake-low/remark-sectionize/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}