https://github.com/discretetom/mdcg
Markdown content generator.
https://github.com/discretetom/mdcg
Last synced: about 1 year ago
JSON representation
Markdown content generator.
- Host: GitHub
- URL: https://github.com/discretetom/mdcg
- Owner: DiscreteTom
- License: mit
- Created: 2022-07-31T13:14:51.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T04:07:32.000Z (over 3 years ago)
- Last Synced: 2025-02-05T06:38:58.281Z (over 1 year ago)
- Language: TypeScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
# MDCG
[](https://www.npmjs.com/package/mdcg)
Markdown Content Generator.
Useful when you want to reference other file contents in your markdown content.
## Installation
```
yarn add mdcg
```
## Usage
Use a special tag to specify the content. The default tag is `include`.
```xml
```
Then run `mdcg input.md output.md`.
Available attributes:
- `from`: from which line, can be negative, default: `1`, means the first line.
- `to`: to which line, can be negative, default: `undefined`, means eof.
- `type`: the content type, default: `code`.
- `lang`: when type is `code`, `lang` means the language of the code block, default: the file's extension.