Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inkdropapp/remark-fix-relative-uris
remark plugin to resolve relative URIs
https://github.com/inkdropapp/remark-fix-relative-uris
Last synced: 20 days ago
JSON representation
remark plugin to resolve relative URIs
- Host: GitHub
- URL: https://github.com/inkdropapp/remark-fix-relative-uris
- Owner: inkdropapp
- License: mit
- Created: 2021-04-02T03:05:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-02T03:10:40.000Z (over 3 years ago)
- Last Synced: 2024-11-30T16:11:48.412Z (27 days ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remark-fix-relative-uris
[**remark**][remark] plugin to resolve relative URIs.
## Install
[npm][]:
```sh
npm install remark-fix-relative-uris
```## Use
```js
var remark = require('remark')
var fixRelativeUris = require('remark-fix-relative-uris')remark()
.use(fixRelativeUris, {baseURI: 'https://www.craftz.dog/'})
.processSync('[About](/about)\n')
.toString()
// => "[About](https://www.craftz.dog/about)\n"
```## API
### `remark().use(fixRelativeUris, args)`
Resolve relative URIs.
- `args.baseURI` — The base URI to append
## Related
- [`mdast-util-fix-relative-uris`][mdast-util-fix-relative-uris]
— [**mdast**][mdast] utility that is in the core of this plugin## Contribute
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.## License
[MIT][license] © [Takuya Matsuyama][author]
[npm]: https://docs.npmjs.com/cli/install
[health]: https://github.com/remarkjs/.github
[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md
[support]: https://github.com/remarkjs/.github/blob/HEAD/support.md
[coc]: https://github.com/remarkjs/.github/blob/HEAD/code-of-conduct.md
[license]: LICENSE
[author]: https://www.craftz.dog/
[remark]: https://github.com/remarkjs/remark
[mdast]: https://github.com/syntax-tree/mdast
[mdast-util-fix-relative-uris]: https://github.com/inkdropapp/mdast-util-fix-relative-uris
[hast]: https://github.com/syntax-tree/hast