@primer/next

0.0.10 • Public • Published

@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
  • Sets assetPrefix to process.env.NOW_URL, and exposes it to the client via 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:

// 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:

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

Pages

TBD

Readme

Keywords

Package Sidebar

Install

npm i @primer/next

Weekly Downloads

36

Version

0.0.10

License

MIT

Unpacked Size

10.9 kB

Total Files

8

Last publish

Collaborators

  • lukasoppermann
  • joshblack
  • siddharthkp
  • camertron
  • hectahertz
  • broccolini
  • jonrohan
  • joelhawksley
  • primer-css
  • colebemis
  • manuelpuyol
  • smockle
  • simurai
  • khiga8