Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added blog post #4758

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions www/src/templates/template-blog-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class BlogPostTemplate extends React.Component {
{children}
</p>
)
let canonicalLink
if(post.frontmatter.canonicalLink) {
canonicalLink = <link rel="canonical" href={post.frontmatter.canonicalLink} />
Copy link
Contributor Author

@vojtechruz vojtechruz Mar 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical link is overwritten by gatsby-plugin-canonical-urls. It would be nice if there way a way to avoid this for certain pages like this one, where custom canonical url is needed.

}

return (
<div>
<Container className="post" css={{ paddingBottom: `0 !important` }}>
Expand Down Expand Up @@ -105,6 +110,7 @@ class BlogPostTemplate extends React.Component {
name="article:published_time"
content={post.frontmatter.rawDate}
/>
{canonicalLink}
</Helmet>
<header
css={{
Expand Down