packer-cn/website/next.config.js
Zachary Shilton 252a774572
website: support hidden pages in nav-data (#10993) (#10998)
* website: bump to docs-page prerelease with hidden page support

* website: remove temporary check for hidden pages, now covered by docs-page

* website: bump to stable docs-page, w next-mdx-remote bump

* website: bump to latest markdown-page
2021-05-06 15:35:55 -04:00

30 lines
872 B
JavaScript

const withHashicorp = require('@hashicorp/nextjs-scripts')
const path = require('path')
const redirects = require('./redirects.next')
module.exports = withHashicorp({
defaultLayout: true,
transpileModules: [
'is-absolute-url',
'@hashicorp/react-.*',
'@hashicorp/versioned-docs',
],
mdx: { resolveIncludes: path.join(__dirname, 'pages/partials') },
})({
svgo: { plugins: [{ removeViewBox: false }] },
rewrites: () => [
{
source: '/api/:path*',
destination: '/api-docs/:path*',
},
],
redirects: () => redirects,
// Note: These are meant to be public, it's not a mistake that they are here
env: {
HASHI_ENV: process.env.HASHI_ENV,
SEGMENT_WRITE_KEY: 'AjXdfmTTk1I9q9dfyePuDFHBrz1tCO3l',
BUGSNAG_CLIENT_KEY: 'de0b822b269aa57b620efd8927e03744',
BUGSNAG_SERVER_KEY: 'b6c57b27a37e531a5de94f065dd98bc0',
},
})