packer-cn/website/pages/docs/[[...page]].jsx

34 lines
723 B
React
Raw Normal View History

2020-12-04 16:00:53 -05:00
import { productName, productSlug } from 'data/metadata'
import order from 'data/docs-navigation.js'
import DocsPage from '@hashicorp/react-docs-page'
import {
generateStaticPaths,
generateStaticProps,
} from '@hashicorp/react-docs-page/server'
const subpath = 'docs'
export default function DocsLayout(props) {
return (
<DocsPage
product={{ name: productName, slug: productSlug }}
subpath={subpath}
order={order}
staticProps={props}
mainBranch="master"
2020-12-04 16:00:53 -05:00
/>
)
}
export async function getStaticPaths() {
return generateStaticPaths(subpath)
}
export async function getStaticProps({ params }) {
return generateStaticProps({
subpath,
productName,
params,
})
}