Compose the content of markdown files into an xml-like tag structure.
Tag Composer processes markdown files that can reference other markdown files using @@ syntax, and outputs XML with the composed content wrapped in tags based on file paths.
$ tree docs/
docs/
├── index.md
├── intro.md
└── api/
├── overview.md
└── methods.md$ cat docs/index.md
# Documentation
@@docs/intro.md
@@docs/api/overview.md$ cat docs/intro.md
Welcome to our project!
This is the introduction.$ tag-composer docs/index.md
<document>
<docs>
<index>
# Documentation
<intro>
Welcome to our project!
This is the introduction.
</intro>
<api>
<overview>
API Overview content here...
</overview>
</api>
</index>
</docs>
</document>npm install tag-composertag-composer input.mdLearn more in the CLI Guide
import { composeTags } from 'tag-composer'
const output = composeTags('input.md')
console.log(output)Learn more in the Library Guide