Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/discretetom/mdcg
Markdown content generator.
https://github.com/discretetom/mdcg
Last synced: about 1 month 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-07T04:07:32.000Z (almost 2 years ago)
- Last Synced: 2024-08-09T23:47:00.622Z (3 months 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
[![npm](https://img.shields.io/npm/v/mdcg?color=green&style=flat-square)](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.