import React, { Fragment } from 'react'; import moment from 'moment'; import { graphql } from 'gatsby'; import Layout from '../components/layout'; import Markdownify from '../components/markdownify'; import VideoEmbed from '../components/video-embed'; import '../css/imports/hero.css'; import '../css/imports/cta.css'; import '../css/imports/whatsnew.css'; import '../css/imports/editors.css'; import '../css/imports/community.css'; const Features = ({ items }) => ( {items.map(item => (
{item.imgpath && }

))}
); const HomePage = ({ data }) => { const landing = data.landing.childDataYaml; const updates = data.updates.childDataYaml; const contribs = data.contribs.childDataJson; return (

{' '}

    {updates.updates.slice(0, 3).map(node => (
  1. {node.version} {moment(node.date).format('MMMM D, YYYY')}
  2. ))}

{landing.community.contributors}

{contribs.contributors.map(user => ( {user.login} ))}
); }; export const pageQuery = graphql` query homeQuery { updates: file(relativePath: { regex: "/updates/" }) { childDataYaml { updates { date description version } } } landing: file(relativePath: { regex: "/landing/" }) { childDataYaml { hero { headline subhead devfeatures { feature description } } cta { primary primaryhook button } editors { hook intro features { feature imgpath description } } community { hook features { feature description } contributors } } } contribs: file(relativePath: { regex: "/contributors/" }) { childDataJson { contributors { name profile avatar_url login } } } } `; export default HomePage;