mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-28 12:43:11 +10:00
Allow passing in canonical path
This commit is contained in:
parent
cfe5c1a265
commit
fa17075caa
1 changed files with 4 additions and 1 deletions
|
|
@ -59,6 +59,7 @@ class PageComponent extends Component {
|
|||
title,
|
||||
twitterHandle,
|
||||
twitterImages,
|
||||
canonicalPath,
|
||||
updated,
|
||||
} = this.props;
|
||||
|
||||
|
|
@ -129,7 +130,7 @@ class PageComponent extends Component {
|
|||
}}
|
||||
>
|
||||
<title>{title}</title>
|
||||
<link rel="canonical" href={canonicalURL(pathWithSearch)} />
|
||||
<link rel="canonical" href={canonicalURL(canonicalPath || pathWithSearch)} />
|
||||
<meta httpEquiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta httpEquiv="Content-Language" content={intl.locale} />
|
||||
{metaTags}
|
||||
|
|
@ -170,6 +171,7 @@ PageComponent.defaultProps = {
|
|||
description: null,
|
||||
facebookImages: null,
|
||||
twitterImages: null,
|
||||
canonicalPath: null,
|
||||
published: null,
|
||||
schema: null,
|
||||
tags: null,
|
||||
|
|
@ -209,6 +211,7 @@ PageComponent.propTypes = {
|
|||
title: string.isRequired, // page title
|
||||
twitterHandle: string, // twitter handle
|
||||
updated: string, // article:modified_time
|
||||
canonicalPath: string, // link rel=canonical
|
||||
|
||||
// from withRouter
|
||||
history: shape({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue