Skip to content

Commit

Permalink
fix(v2): replace h1 tag with h2 in blog list pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Nov 13, 2019
1 parent ae1dec5 commit 86477fa
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function BlogPostItem(props) {
const {author, authorURL, authorTitle, authorFBID, title} = frontMatter;

const renderPostHeader = () => {
const TitleHeading = isBlogPostPage ? 'h1' : 'h2';
const match = date.substring(0, 10).split('-');
const year = match[0];
const month = [
Expand All @@ -50,9 +51,10 @@ function BlogPostItem(props) {

return (
<header>
<h1 className={classnames('margin-bottom--sm', styles.blogPostTitle)}>
<TitleHeading
className={classnames('margin-bottom--sm', styles.blogPostTitle)}>
{isBlogPostPage ? title : <Link to={permalink}>{title}</Link>}
</h1>
</TitleHeading>
<div className="margin-bottom--sm">
<time dateTime={date} className={styles.blogPostDate}>
{month} {day}, {year}
Expand Down

0 comments on commit 86477fa

Please sign in to comment.