Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benrbray/remark-cite
Adds support for pandoc-style citations to the Markdown syntax for the remark and micromark parsers.
https://github.com/benrbray/remark-cite
Last synced: 11 days ago
JSON representation
Adds support for pandoc-style citations to the Markdown syntax for the remark and micromark parsers.
- Host: GitHub
- URL: https://github.com/benrbray/remark-cite
- Owner: benrbray
- License: mit
- Created: 2021-05-06T14:09:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-28T05:10:31.000Z (about 1 month ago)
- Last Synced: 2024-10-30T22:16:26.275Z (12 days ago)
- Language: TypeScript
- Homepage:
- Size: 918 KB
- Stars: 20
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `remark-cite`
Following [convention](https://github.com/micromark/micromark/discussions/56), this repository contains **three separate `npm` packages** related to support for [`pandoc`-style](https://pandoc.org/MANUAL.html#extension-citations) citation syntax for the `remark` Markdown parser.
* [`micromark-extension-cite`](https://www.npmjs.com/package/@benrbray/micromark-extension-cite) defines a new [syntax extension](https://github.com/micromark/micromark#syntaxextension) for `micromark`, which is responsible for converting markdown syntax to a token stream
* [`mdast-util-cite`](https://www.npmjs.com/package/@benrbray/mdast-util-cite) describes how to convert tokens output by `micromark-extension-cite` into either an HTML string or `mdast` syntax tree.
* [`remark-cite`](https://www.npmjs.com/package/@benrbray/remark-cite) encapsulates the above functionality into a `remark` plugin.For more information, see the individual folders for each package.
## Contributing
Pull requests for bugfixes or new features / options are welcome. Be aware that changes to the syntax extension `micromark-extension-cite` may also have an impact on the other two packages, and you will need to test all three.
## Development
Build dependencies, in order:
```
lerna run build
```Publishing
```
lerna publish --no-private
```## Publishing Guide
> (this section is for myself, so I don't forget how to publish the packages :) )
It seems that `npm version` does not work properly from subdirectories, so we use `lerna` instead. However, `lerna publish` does not properly erase `workspace` protocol markers when publishing from `pnpm` monorepos, so we have to publish the packages in two steps:
1. First, increment all package versions by running `lerna version` from the project root.
2. Next, use `lerna run publish-pnpm`, which calls the `publish-pnpm" script for all packages.