open-vault/website/pages/docs/[[...page]].jsx
2021-01-26 16:50:58 -05:00

39 lines
926 B
JavaScript

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'
import Columns from 'components/columns'
import Tag from 'components/inline-tag'
const subpath = 'docs'
const additionalComponents = { Columns, Tag }
export default function DocsLayout(props) {
return (
<DocsPage
product={{ name: productName, slug: productSlug }}
subpath={subpath}
order={order}
staticProps={props}
mainBranch="master"
additionalComponents={additionalComponents}
/>
)
}
export async function getStaticPaths() {
return generateStaticPaths(subpath)
}
export async function getStaticProps({ params }) {
return generateStaticProps({
subpath,
productName,
params,
additionalComponents,
})
}