diff --git a/website/src/cms/cms.js b/website/src/cms/cms.js index d709882d..dd2e9dbb 100644 --- a/website/src/cms/cms.js +++ b/website/src/cms/cms.js @@ -25,9 +25,7 @@ function getEmotionCache() { const PreviewContainer = ({ children, highlight }) => ( - - {highlight ? {children} : children} - + {highlight ? {children} : children} ); @@ -42,7 +40,7 @@ class Highlight extends React.Component { if (this.ref.current) { Prism.highlightAllUnder(this.ref.current); } - }) + }); } componentDidMount() { @@ -54,13 +52,9 @@ class Highlight extends React.Component { } render() { - return ( -
- {this.props.children} -
- ); + return
{this.props.children}
; } -}; +} const BlogPostPreview = ({ entry, widgetFor }) => { const data = entry.get('data'); @@ -121,8 +115,7 @@ const NotificationPreview = ({ entry }) => ( {notif.get('message')} - )) - } + ))} ); diff --git a/website/src/components/edit-link.js b/website/src/components/edit-link.js index bea2678c..a90e84f7 100644 --- a/website/src/components/edit-link.js +++ b/website/src/components/edit-link.js @@ -15,7 +15,7 @@ const EditLink = ({ collection, filename }) => ( } `} > - + ( {children} -) +); const Layout = ({ hasPageHero, children }) => { return ( diff --git a/website/src/components/markdown.js b/website/src/components/markdown.js index c3cb465f..411ed059 100644 --- a/website/src/components/markdown.js +++ b/website/src/components/markdown.js @@ -127,7 +127,7 @@ const StyledMarkdown = styled.div` const Markdown = ({ body, html }) => { if (body) { - return {body} + return {body}; } return ; }; diff --git a/website/src/templates/doc-page.js b/website/src/templates/doc-page.js index c8c26f74..15f9f0e1 100644 --- a/website/src/templates/doc-page.js +++ b/website/src/templates/doc-page.js @@ -12,7 +12,10 @@ import Widgets from '../components/widgets'; import Markdown from '../components/markdown'; function filenameFromPath(p) { - return p.split('/').slice(-1)[0].split('.')[0]; + return p + .split('/') + .slice(-1)[0] + .split('.')[0]; } const toMenu = (menu, nav) => @@ -40,13 +43,9 @@ export const DocsTemplate = ({ group, }) => ( - } - > + }>
- {filename && ( - - )} + {filename && }

{title}

{showWidgets && } @@ -56,8 +55,13 @@ export const DocsTemplate = ({ ); const DocPage = ({ data, location }) => { - const { nav, page: { frontmatter, html, fields }, widgets, menu } = data; - const { title, group } = frontmatter + const { + nav, + page: { frontmatter, html, fields }, + widgets, + menu, + } = data; + const { title, group } = frontmatter; const docsNav = toMenu(menu.siteMetadata.menu.docs, nav); const showWidgets = location.pathname.indexOf('/docs/widgets') !== -1;