diff --git a/packages/website/data/news/hello-world/index.md b/packages/website/data/news/hello-world/index.md index 1811f662..8465ade0 100644 --- a/packages/website/data/news/hello-world/index.md +++ b/packages/website/data/news/hello-world/index.md @@ -4,6 +4,7 @@ date: "2015-05-01T22:12:03.284Z" description: "Hello World" author: Nicole Tay avatar: ../../team/nicole-tay.png +hidden: true --- This is my first post on my new fake blog! How exciting! diff --git a/packages/website/data/news/my-second-post/index.md b/packages/website/data/news/my-second-post/index.md index 7dca8309..a04e11f2 100644 --- a/packages/website/data/news/my-second-post/index.md +++ b/packages/website/data/news/my-second-post/index.md @@ -4,6 +4,7 @@ date: "2015-05-06T23:46:37.121Z" description: Wow! I love blogging so much already. author: Daniel Helm avatar: ../../team/daniel-helm.png +hidden: true --- Wow! I love blogging so much already. diff --git a/packages/website/data/news/new-beginnings/index.md b/packages/website/data/news/new-beginnings/index.md index e4e52673..7d116837 100644 --- a/packages/website/data/news/new-beginnings/index.md +++ b/packages/website/data/news/new-beginnings/index.md @@ -4,6 +4,7 @@ date: "2015-05-28T22:40:32.169Z" description: This is a custom description for SEO and Open Graph purposes, rather than the default generated excerpt. Simply add a description field to the frontmatter. author: Karol Wypchlo avatar: ../../team/karol-wypchlo.png +hidden: true --- Far far away, behind the word mountains, far from the countries Vokalia and diff --git a/packages/website/gatsby-node.js b/packages/website/gatsby-node.js index 350b421b..652bc520 100644 --- a/packages/website/gatsby-node.js +++ b/packages/website/gatsby-node.js @@ -108,6 +108,7 @@ exports.createSchemaCustomization = ({ actions }) => { description: String date: Date @dateformat author: String + hidden: Boolean } type Fields { slug: String diff --git a/packages/website/src/components/Icons/FacebookSmall.svg b/packages/website/src/components/Icons/FacebookSmall.svg new file mode 100644 index 00000000..6b455b14 --- /dev/null +++ b/packages/website/src/components/Icons/FacebookSmall.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/website/src/components/Icons/index.js b/packages/website/src/components/Icons/index.js index ea7ba78c..a168d81f 100644 --- a/packages/website/src/components/Icons/index.js +++ b/packages/website/src/components/Icons/index.js @@ -13,6 +13,7 @@ export { default as DiscordSmallWhite } from "./DiscordSmallWhite.svg"; export { default as Encryption } from "./Encryption.svg"; export { default as Error } from "./Error.svg"; export { default as ExternalLink } from "./ExternalLink.svg"; +export { default as FacebookSmall } from "./FacebookSmall.svg"; export { default as Fingerprint } from "./Fingerprint.svg"; export { default as GithubSmall } from "./GithubSmall.svg"; export { default as GitlabSmall } from "./GitlabSmall.svg"; diff --git a/packages/website/src/components/News/News.js b/packages/website/src/components/News/News.js index 40bb0665..50728060 100644 --- a/packages/website/src/components/News/News.js +++ b/packages/website/src/components/News/News.js @@ -1,7 +1,7 @@ import * as React from "react"; import { GatsbyImage, getImage } from "gatsby-plugin-image"; -export function Aside({ avatar, author, date }) { +export function NewsSummary({ avatar, author, date }) { return (
{avatar && } diff --git a/packages/website/src/pages/news.js b/packages/website/src/pages/news.js index f07ba853..c1a08113 100644 --- a/packages/website/src/pages/news.js +++ b/packages/website/src/pages/news.js @@ -1,7 +1,7 @@ import * as React from "react"; import { graphql } from "gatsby"; import Layout, { Section } from "../components/Layout"; -import { Aside } from "../components/News"; +import { NewsSummary } from "../components/News"; import Link from "../components/Link"; import SEO from "../components/seo"; @@ -11,14 +11,23 @@ const NewsCard = ({ ...props }) => { {props.frontmatter.title} - + + {props.frontmatter.title} + {props.frontmatter.description && ( -
{props.frontmatter.description}
+ + {props.frontmatter.description} + )} +
-
); @@ -42,7 +51,10 @@ const NewsPage = ({ data }) => { export const query = graphql` query NewsQuery { - allMarkdownRemark(sort: { fields: frontmatter___date, order: DESC }) { + allMarkdownRemark( + filter: { frontmatter: { hidden: { ne: true } } } + sort: { fields: frontmatter___date, order: DESC } + ) { edges { node { id diff --git a/packages/website/src/templates/news-post.js b/packages/website/src/templates/news-post.js index bbd8e866..8fc99969 100644 --- a/packages/website/src/templates/news-post.js +++ b/packages/website/src/templates/news-post.js @@ -1,10 +1,10 @@ import * as React from "react"; import { graphql } from "gatsby"; import Layout, { Section, SectionTitle } from "../components/Layout"; -import { Aside } from "../components/News"; +import { NewsSummary } from "../components/News"; import SEO from "../components/seo"; import { TwitterShareButton, LinkedinShareButton, FacebookShareButton } from "react-share"; -import { TwitterSmall, LinkedinSmall } from "../components/Icons"; +import { TwitterSmall, LinkedinSmall, FacebookSmall } from "../components/Icons"; const BlogPostTemplate = ({ data, location }) => { const post = data.markdownRemark; @@ -24,7 +24,11 @@ const BlogPostTemplate = ({ data, location }) => {