import * as React from "react"; import { graphql } from "gatsby"; import { GatsbyImage, getImage } from "gatsby-plugin-image"; import { Section, Label } from "../components/Layout"; import { NewsSummary } from "../components/News"; import Link from "../components/Link"; import SEO from "../components/seo"; const NewsCard = ({ ...props }) => { return (
{props.frontmatter.categories && (
{props.frontmatter.categories.map((category) => ( ))}
)} {props.frontmatter.title} {props.frontmatter.description && ( {props.frontmatter.description} )}
); }; const NewsPage = ({ data }) => { return ( <>
{data.allMarkdownRemark.edges.map(({ node }) => ( ))}
); }; export const query = graphql` query NewsQuery { allMarkdownRemark( filter: { frontmatter: { hidden: { ne: true } } } sort: { fields: frontmatter___date, order: DESC } ) { edges { node { id frontmatter { title date(formatString: "MMMM DD, YYYY") description author categories thumbnail { childImageSharp { gatsbyImageData(width: 320, placeholder: BLURRED, formats: [AUTO, WEBP, AVIF]) } } avatar { childImageSharp { gatsbyImageData(width: 40, placeholder: BLURRED, formats: [AUTO, WEBP, AVIF]) } } } fields { slug } } } } } `; export default NewsPage;