Skip to content

Commit

Permalink
Refactor prose
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 16, 2019
1 parent e8a347c commit 670d158
Showing 1 changed file with 37 additions and 22 deletions.
59 changes: 37 additions & 22 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
# remark-embed-images

[![Travis][travis-badge]][travis]
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Chat][chat-badge]][chat]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]

Embed local images as data URIs, inlining files as base64-encoded values.
[**remark**][remark] plugin to embed local images as data URIs, inlining files
as base64-encoded values.

## Installation
## Install

[npm][]:

```bash
```sh
npm install remark-embed-images
```

## Usage
## Use

Say we have [foo.png][], and next to it the following file, `example.md`:
Say we have an image, [`foo.png`][foo.png], and next to it the following file,
`example.md`:

```markdown
![A PNG file](./foo.png)
```

And our script, `example.js`, looks as follows:

```javascript
```js
var vfile = require('to-vfile')
var remark = require('remark')
var embed = require('remark-embed-images')
Expand All @@ -48,27 +51,29 @@ Now, running `node example` yields:

## API

### `remark.use(embedImages)`
### `remark().use(embedImages)`

Embed local images as data URIs.
Embed local images as data URIs, inlining files as base64-encoded values.

## Contribute

See [`contributing.md` in `remarkjs/remark`][contributing] for ways to get
started.
See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.

This organisation has a [Code of Conduct][coc]. By interacting with this
repository, organisation, or community you agree to abide by its terms.
This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.

## License

[MIT][license] © [David Herges][author]

<!-- Definitions -->

[travis-badge]: https://img.shields.io/travis/remarkjs/remark-embed-images.svg
[build-badge]: https://img.shields.io/travis/remarkjs/remark-embed-images/master.svg

[travis]: https://travis-ci.org/remarkjs/remark-embed-images
[build]: https://travis-ci.org/remarkjs/remark-embed-images

[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-embed-images.svg

Expand All @@ -78,24 +83,34 @@ repository, organisation, or community you agree to abide by its terms.

[downloads]: https://www.npmjs.com/package/remark-embed-images

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg
[size-badge]: https://img.shields.io/bundlephobia/minzip/remark-embed-images.svg

[chat]: https://spectrum.chat/unified/remark
[size]: https://bundlephobia.com/result?p=remark-embed-images

[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg

[backers-badge]: https://opencollective.com/unified/backers/badge.svg

[collective]: https://opencollective.com/unified

[license]: license
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg

[author]: https://spektrakel.de
[chat]: https://spectrum.chat/unified/remark

[npm]: https://docs.npmjs.com/cli/install

[contributing]: https://github.com/remarkjs/remark/blob/master/contributing.md
[health]: https://github.com/remarkjs/.github

[contributing]: https://github.com/remarkjs/.github/blob/master/contributing.md

[support]: https://github.com/remarkjs/.github/blob/master/support.md

[coc]: https://github.com/remarkjs/.github/blob/master/code-of-conduct.md

[license]: license

[author]: https://spektrakel.de

[coc]: https://github.com/remarkjs/remark/blob/master/code-of-conduct.md
[remark]: https://github.com/remarkjs/remark

[foo.png]: test/fixtures/foo.png

0 comments on commit 670d158

Please sign in to comment.