# metalsmith-medium-data

> Metalsmith plugin to fetch latest user post data from medium.com

Latest version **1.0.0** (published 2017-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install metalsmith-medium-data
pnpm add metalsmith-medium-data
yarn add metalsmith-medium-data
bun add metalsmith-medium-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-04-01 |
| First published | 2017-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Alex Hunt |
| Maintainers | huntie |
| Keywords | metalsmith, medium, api |

## Links

- npm: https://www.npmjs.com/package/metalsmith-medium-data
- Repository: https://github.com/huntie/metalsmith-medium-data
- Homepage: https://github.com/huntie/metalsmith-medium-data#readme
- Issues: https://github.com/huntie/metalsmith-medium-data/issues
- npm.io page: https://npm.io/package/metalsmith-medium-data

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^1.6.0

## Recent versions

- 1.0.0 (latest) — 2017-04-01

## README

# Metalsmith Medium data

Metalsmith plugin to fetch latest user post data from [medium.com](https://medium.com/) as metadata for template usage.

## Installation

    $ npm install metalsmith-medium-data

## Usage

Add an `metalsmith-medium-data` entry in `metalsmith.json` or pass the plugin to `metalsmith.use()` in a JavaScript file.

**metalsmith.json**

```json
{
    "plugins": {
        "metalsmith-medium-data": {
            "username": "huntie"
        }
    }
}
```

**JavaScript file**

```js
import medium from 'metalsmith-medium-data';

metalsmith.use(medium({
    username: 'huntie'
});
```

The plugin will add a new metadata object on build under the key `medium` for use in templates.

| Property | Type | Description |
| --- | --- | --- |
| `medium.user` | `Object` | The user profile data. |
| `medium.posts` | `Array` | The collection of most recent user posts. |

## Options

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `username` | `String`  | Yes | `null` | The Medium account user from which to fetch posts. |
| `key` | `String` | No | `"medium"` | The name of the key to set in metadata. |
| `limit` | `Number` | No | `10` | The maximum number of `posts` to include. |

## Contributing

If you discover a problem or have a feature request, please [create an issue](https://github.com/huntie/metalsmith-medium-data/issues) or feel free to fork this repository and make improvements.

---
_Source: https://npm.io/package/metalsmith-medium-data · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
