consul/website/pages/commands/[[...page]].jsx
Daniel Nephin 374072d1ee Merge pull request #10527 from hashicorp/rename-main-branch
Update references to the main branch

 Conflicts:
	.github/CONTRIBUTING.md
	website/content/docs/upgrading/instructions/upgrade-to-1-10-x.mdx

The website conflicts seems like it some of the changes on main didn't
make it into the 1.10.x branch, but the content is relevant for 1.10 so
I took the changes from main.
2021-06-30 17:58:22 -04:00

40 lines
1001 B
JavaScript

import { productName, productSlug } from 'data/metadata'
import DocsPage from '@hashicorp/react-docs-page'
// Imports below are only used server-side
import {
generateStaticPaths,
generateStaticProps,
} from '@hashicorp/react-docs-page/server'
// Configure the docs path
const baseRoute = 'commands'
const navDataFile = `data/${baseRoute}-nav-data.json`
const localContentDir = `content/${baseRoute}`
const mainBranch = 'main'
const product = { name: productName, slug: productSlug }
export default function CommandsLayout(props) {
return (
<DocsPage baseRoute={baseRoute} product={product} staticProps={props} />
)
}
export async function getStaticPaths() {
const paths = await generateStaticPaths({
localContentDir,
navDataFile,
})
return { paths, fallback: false }
}
export async function getStaticProps({ params }) {
const props = await generateStaticProps({
localContentDir,
mainBranch,
navDataFile,
params,
product,
})
return { props }
}