2020-05-21 17:18:17 +00:00
|
|
|
import DocsPage from '@hashicorp/react-docs-page'
|
2020-07-02 18:24:34 +00:00
|
|
|
import order from 'data/docs-navigation.js'
|
2020-05-21 17:18:17 +00:00
|
|
|
import { frontMatter as data } from '../pages/docs/**/*.mdx'
|
|
|
|
import { MDXProvider } from '@mdx-js/react'
|
|
|
|
import Head from 'next/head'
|
|
|
|
import Link from 'next/link'
|
2020-09-02 23:25:06 +00:00
|
|
|
import Columns from 'components/columns'
|
|
|
|
import Tag from 'components/inline-tag'
|
2020-07-02 18:24:34 +00:00
|
|
|
import Tabs, { Tab } from 'components/tabs'
|
|
|
|
import EnterpriseAlert from 'components/enterprise-alert'
|
2020-01-18 00:18:09 +00:00
|
|
|
|
2020-09-02 23:25:06 +00:00
|
|
|
const DEFAULT_COMPONENTS = { Tabs, Tab, EnterpriseAlert, Columns, Tag }
|
2020-05-21 17:18:17 +00:00
|
|
|
|
|
|
|
export default function DocsLayoutWrapper(pageMeta) {
|
2020-01-18 00:18:09 +00:00
|
|
|
function DocsLayout(props) {
|
|
|
|
return (
|
2020-05-21 17:18:17 +00:00
|
|
|
<MDXProvider components={DEFAULT_COMPONENTS}>
|
|
|
|
<DocsPage
|
|
|
|
{...props}
|
|
|
|
product="vault"
|
|
|
|
head={{
|
|
|
|
is: Head,
|
|
|
|
title: `${pageMeta.page_title} | Vault by HashiCorp`,
|
|
|
|
description: pageMeta.description,
|
|
|
|
siteName: 'Vault by HashiCorp',
|
|
|
|
}}
|
|
|
|
sidenav={{
|
|
|
|
Link,
|
|
|
|
category: 'docs',
|
|
|
|
currentPage: props.path,
|
|
|
|
data,
|
|
|
|
order,
|
|
|
|
}}
|
|
|
|
resourceURL={`https://github.com/hashicorp/vault/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
|
|
|
/>
|
|
|
|
</MDXProvider>
|
2020-01-18 00:18:09 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
DocsLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
2020-01-18 00:18:09 +00:00
|
|
|
|
|
|
|
return DocsLayout
|
|
|
|
}
|