https://github.com/goto-bus-stop/md-insert
insert content under a markdown header or into a comment delimited region
https://github.com/goto-bus-stop/md-insert
Last synced: 3 months ago
JSON representation
insert content under a markdown header or into a comment delimited region
- Host: GitHub
- URL: https://github.com/goto-bus-stop/md-insert
- Owner: goto-bus-stop
- License: other
- Created: 2020-08-06T18:41:12.000Z (almost 5 years ago)
- Default Branch: default
- Last Pushed: 2024-06-30T11:53:34.000Z (about 1 year ago)
- Last Synced: 2025-03-29T03:06:06.712Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# md-insert
insert content under a markdown header or into a comment delimited region
with a cli!
[Install](#install) [![npm][npm-image]][npm-url] - [Usage](#usage) - [License: Apache-2.0](#license)
[npm-image]: https://img.shields.io/npm/v/md-insert.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/md-insert## Install
```
npm install md-insert
```## Usage
```bash
$ md-insert
usage: md-insert [--header name] [--region name] [-i]--header name Insert content under the header with this name.
--region name Insert content under the comment-delimited region with this
name.-i Update in place. If given, the result is written to ,
instead of to standard output.Examples:
md-insert -i README.md --header API < generated-doc.md
make-toc README.md | md-insert -i README.md --region toc
document-prop-types src/index.js | md-insert TEMPLATE.md --header Props > README.md
```### Regions
`--region` inserts content into a comment-delimited region like this:
```md
```
```bash
md-insert FILE.md -i --region toc < TOC.md
``````md
contents of TOC.md
```
### Headers
`--header` inserts content below a header like this:
```md
## Props
``````bash
document-prop-types src/index.js | md-insert README.md -i --header Props
```## License
[Apache-2.0](LICENSE.md)