open-vault/website/pages/guides/[[...page]].jsx
Jeff Escalante ec620a7765
Implement MDX Remote (#10581)
* implement mdx remote

* fix an unfenced code block

* fix partials path

Co-authored-by: Jim Kalafut <jkalafut@hashicorp.com>
2020-12-17 16:53:33 -05:00

33 lines
703 B
JavaScript

import { productName, productSlug } from 'data/metadata'
import order from 'data/guides-navigation.js'
import DocsPage from '@hashicorp/react-docs-page'
import {
generateStaticPaths,
generateStaticProps,
} from '@hashicorp/react-docs-page/server'
const subpath = 'guides'
export default function GuidesLayout(props) {
return (
<DocsPage
product={{ name: productName, slug: productSlug }}
subpath={subpath}
order={order}
staticProps={props}
/>
)
}
export async function getStaticPaths() {
return generateStaticPaths(subpath)
}
export async function getStaticProps({ params }) {
return generateStaticProps({
subpath,
productName,
params,
})
}