Skip to content

Commit

Permalink
Updated LM page titles. Resolves #1829.
Browse files Browse the repository at this point in the history
  • Loading branch information
MillenniumFalconMechanic authored and NoopDog committed Jul 6, 2021
1 parent c057232 commit 9e8055a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
16 changes: 12 additions & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ let gtmEnvName = process.env.GATSBY_ENV_NAME;

const lungmap = process.env.GATSBY_ATLAS === "lungmap";

module.exports = {
siteMetadata: {
const siteMetadata = lungmap ?
{
title: "LungMAP Data Browser",
siteUrl: "https://data-browser.lungmap.net"
} :
{
title: "HCA Data Portal",
siteUrl: `https://data.humancellatlas.org/`
},
siteUrl: "https://data.humancellatlas.org/"

};

module.exports = {
siteMetadata,
plugins: [
{
resolve: `gatsby-plugin-google-tagmanager`,
Expand Down
3 changes: 2 additions & 1 deletion src/components/pageHead/pageHead.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import * as EnvironmentService from "../../utils/environment/environment.service
class PageHead extends React.Component {
render() {
const { pageTitle } = this.props,
title = pageTitle ? pageTitle : "HCA Data Portal";
defaultTitle = EnvironmentService.isLungMAP() ? "LungMAP Data Browser" : "HCA Data Portal",
title = pageTitle ? pageTitle : defaultTitle;

return (
<Helmet>
Expand Down
5 changes: 3 additions & 2 deletions src/components/seo/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ import * as EnvironmentService from "../../utils/environment/environment.service
class SEO extends React.Component {
render() {
const { description, pageTitle } = this.props,
title = pageTitle ? pageTitle : "HCA Data Portal",
defaultTitle = EnvironmentService.isLungMAP() ? "LungMAP Data Browser" : "HCA Data Portal",
title = pageTitle ? pageTitle : defaultTitle,
siteURL = EnvironmentService.getCurrentEnvironmentURL(),
twitterImgUrl = `${siteURL}images/hca-twitter.jpg`;
return (
<Helmet>
<meta property="og:title" content={title} />
<meta property="og:site_name" content="HCA Data Portal" />
<meta property="og:site_name" content={defaultTitle} />
<meta property="twitter:title" content={title} />
{description
? [
Expand Down

0 comments on commit 9e8055a

Please sign in to comment.