chore: update gatsby to v3 (#5057)
This commit is contained in:
website
content
blog
implementing-a-jekyll-cms-in-3-days.mdnetlify-cms-2-0-launches-with-bitbucket-support-and-a-new-monorepo-architecture.mdnetlify-cms-now-supports-gitlab-as-a-backend.md
docs
public/img
src
cms
components
pages
templates
static/admin
yarn.lock@ -2,34 +2,10 @@ import React from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { graphql } from 'gatsby';
|
||||
import { trimStart, trimEnd } from 'lodash';
|
||||
import { css } from '@emotion/core';
|
||||
|
||||
import TwitterMeta from '../components/twitter-meta';
|
||||
import Layout from '../components/layout';
|
||||
import Container from '../components/container';
|
||||
import Markdown from '../components/markdown';
|
||||
import MetaInfo from '../components/meta-info';
|
||||
import Page from '../components/page';
|
||||
|
||||
export function BlogPostTemplate({ title, author, date, body, html }) {
|
||||
return (
|
||||
<Container size="sm">
|
||||
<Page as="article">
|
||||
<h1
|
||||
css={css`
|
||||
margin-bottom: 0;
|
||||
`}
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
<MetaInfo>
|
||||
by {author} on {date}
|
||||
</MetaInfo>
|
||||
<Markdown body={body} html={html} />
|
||||
</Page>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
import BlogPostTemplate from '../components/blog-post-template';
|
||||
|
||||
function BlogPost({ data }) {
|
||||
const { html, frontmatter } = data.markdownRemark;
|
||||
|
@ -4,12 +4,7 @@ import { graphql } from 'gatsby';
|
||||
import 'prismjs/themes/prism-tomorrow.css';
|
||||
|
||||
import Layout from '../components/layout';
|
||||
import DocsNav from '../components/docs-nav';
|
||||
import Container from '../components/container';
|
||||
import SidebarLayout from '../components/sidebar-layout';
|
||||
import EditLink from '../components/edit-link';
|
||||
import Widgets from '../components/widgets';
|
||||
import Markdown from '../components/markdown';
|
||||
import DocsTemplate from '../components/docs-template';
|
||||
|
||||
function filenameFromPath(p) {
|
||||
return p
|
||||
@ -25,40 +20,6 @@ function toMenu(menu, nav) {
|
||||
}));
|
||||
}
|
||||
|
||||
function DocsSidebar({ docsNav, location }) {
|
||||
return (
|
||||
<aside>
|
||||
<DocsNav items={docsNav} location={location} />
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
|
||||
export function DocsTemplate({
|
||||
title,
|
||||
filename,
|
||||
body,
|
||||
html,
|
||||
showWidgets,
|
||||
widgets,
|
||||
showSidebar,
|
||||
docsNav,
|
||||
location,
|
||||
group,
|
||||
}) {
|
||||
return (
|
||||
<Container size="md">
|
||||
<SidebarLayout sidebar={showSidebar && <DocsSidebar docsNav={docsNav} location={location} />}>
|
||||
<article data-docs-content>
|
||||
{filename && <EditLink collection={`docs_${group}`} filename={filename} />}
|
||||
<h1>{title}</h1>
|
||||
<Markdown body={body} html={html} />
|
||||
{showWidgets && <Widgets widgets={widgets} location={location} />}
|
||||
</article>
|
||||
</SidebarLayout>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
function DocPage({ data, location }) {
|
||||
const {
|
||||
nav,
|
||||
|
Reference in New Issue
Block a user