# @primer/next

> Primer components and helpers for Next.js

Latest version **0.0.10** (published 2018-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @primer/next
pnpm add @primer/next
yarn add @primer/next
bun add @primer/next
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2018-11-30 |
| First published | 2018-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | GitHub |
| Maintainers | broccolini, emplums, jonrohan, shawnbot |
| Keywords | primer, next, next.js |

## Links

- npm: https://www.npmjs.com/package/@primer/next
- npm.io page: https://npm.io/package/@primer/next

## Dependencies (5)

- [tree-model](https://npm.io/package/tree-model.md) ^1.0.7
- [@svgr/webpack](https://npm.io/package/@svgr/webpack.md) ^4.1.0
- [next-page-map](https://npm.io/package/next-page-map.md) ^1.0.1
- [@zeit/next-mdx](https://npm.io/package/@zeit/next-mdx.md) ^1.2.0
- [next-compose-plugins](https://npm.io/package/next-compose-plugins.md) ^2.1.1

## Recent versions

- 0.0.10 (latest) — 2018-11-30
- 0.0.9 — 2018-11-29
- 0.0.8 — 2018-11-29
- 0.0.7 — 2018-11-29
- 0.0.6 — 2018-11-29
- 0.0.5 — 2018-11-29
- 0.0.4 — 2018-11-29
- 0.0.3 — 2018-11-29
- 0.0.2 — 2018-11-29
- 0.0.1 — 2018-11-29

## README

# @primer/next
React components and helpers for Primer sites built with Next.js.

## Features
* [MDX] support for pages with `.md` and `.mdx` extensions
* Conversion of `.svg` files into React components with [SVGR](https://www.smooth-code.com/open-source/svgr/)
* Sets [`assetPrefix`][assetPrefix] to `process.env.NOW_URL`, and exposes it to the client via [`publicRuntimeConfig`][publicRuntimeConfig]

### Configuration
Configuration happens in your `next.config.js` via what Zeit refers to as a "plugin" but is really just a function that generates a configuration object:

```js
// next.config.js
const withPrimer = require('@primer/next/plugin')
module.exports = withPrimer({
  // base Next config
}, {
  // optional plugin options
})
```

or, if you just want the default setup, simply:

```js
const withPrimer = require('@primer/next/plugin')
module.exports = withPrimer()
```

### Pages
TBD

[assetPrefix]: https://github.com/zeit/next.js/#cdn-support-with-asset-prefix
[pageExtensions]: https://github.com/zeit/next.js/#configuring-extensions-looked-for-when-resolving-pages-in-pages
[publicRuntimeConfig]: https://github.com/zeit/next.js/#exposing-configuration-to-the-server--client-side
[MDX]: https://mdxjs.com/

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