Jeff Escalante c9fdd021a5
🌷 Docs Website Maintenance (#9408)
* update dependencies, adjust for breaking changes
- Updates all dependencies to the latest versions
- Updates to consent manager to add all analytics scripts in a way that is compliant with GDPR
- Improves the product download component to default to 64-bit architecture for `x86_64` arch tags, removes some repeated processing code on the downloads page
- Standardizes and documents components available for use within markdown files, adding a new `Tabs` component
- Documents syntax highlighting standards
- You can now `@include` non-markdown files, they will be imported into a code block. This is great for things like code examples!

* Update website/README.md
2020-06-12 12:08:23 +02:00

40 lines
1.1 KiB
JavaScript

import DocsPage from '@hashicorp/react-docs-page'
import order from 'data/guides-navigation.js'
import { frontMatter as data } from '../pages/guides/**/*.mdx'
import Head from 'next/head'
import Link from 'next/link'
import { createMdxProvider } from '@hashicorp/nextjs-scripts/lib/providers/docs'
const MDXProvider = createMdxProvider({ product: 'packer' })
export default function GuidesLayoutWrapper(pageMeta) {
function GuidesLayout(props) {
return (
<MDXProvider>
<DocsPage
{...props}
product="packer"
head={{
is: Head,
title: `${pageMeta.page_title} | Packer by HashiCorp`,
description: pageMeta.description,
siteName: 'Packer by HashiCorp',
}}
sidenav={{
Link,
category: 'guides',
currentPage: props.path,
data,
order,
}}
resourceURL={`https://github.com/hashicorp/packer/blob/master/website/pages/${pageMeta.__resourcePath}`}
/>
</MDXProvider>
)
}
GuidesLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
return GuidesLayout
}