Skip to content

Commit

Permalink
removing date from blog template & collections view (#320)
Browse files Browse the repository at this point in the history
* removing date from blog template & collections view

* address linter complaints
  • Loading branch information
nkarpov authored Aug 3, 2023
1 parent 6ce482c commit 49ea46a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/templates/collections/blog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ const BlogCollectionTemplate = ({ data, pageContext }) => {

const cards = edges.map(({ node }) => {
const { frontmatter = {}, fields = {} } = node;
const { title, description, author, thumbnail, date } = frontmatter;
const { title, description, author, thumbnail } = frontmatter;
const { slug } = fields;

return {
title,
description,
url: slug,
date,
date: " ", // we want to hide dates in this view, this is the least intrusive way
author,
thumbnail,
};
Expand Down
4 changes: 2 additions & 2 deletions src/templates/mdx/blog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const PostMeta = styled.div`

const BlogMdxTemplate = ({ data, children }) => {
const { frontmatter = {} } = data.mdx;
const { title, author, date } = frontmatter;
const { title, author } = frontmatter;

const renderPostMeta = () => (
<PostMeta>
{date} by <BlogAuthorsName name={author} />
by <BlogAuthorsName name={author} />
</PostMeta>
);

Expand Down

0 comments on commit 49ea46a

Please sign in to comment.