Skip to content

Commit

Permalink
Merge pull request mozilla#1438 from lmorchard/static-canonical-exper…
Browse files Browse the repository at this point in the history
…iment-url-fix

Fix canonical & social image URL paths for static experiment pages
  • Loading branch information
dannycoates authored Sep 26, 2016
2 parents 791af3c + d5c9a67 commit 86e5052
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/templates/index.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="viewport" content="width=device-width">
<link rel="localization" href="/static/locales/{locale}/app.ftl">

<link rel="canonical" href="https://testpilot.firefox.com/">
<link rel="canonical" href="https://testpilot.firefox.com/{{{ canonical_path }}}">

<title>{{ meta_title }}</title>
<meta property="og:title" content="{{ meta_title }}" />
Expand All @@ -20,8 +20,8 @@
<meta property="og:description" content="{{ meta_description }}" />
<meta name="twitter:description" content="{{ meta_description }}" />
<meta name="twitter:card" content="summary" />
<meta property="og:image" content="{{ image_facebook }}" />
<meta name="twitter:image" content="{{ image_twitter }}" />
<meta property="og:image" content="{{{ image_facebook }}}" />
<meta name="twitter:image" content="{{{ image_twitter }}}" />
</head>
<body class="blue">
<div class="stars"></div>
Expand Down
2 changes: 2 additions & 0 deletions frontend/tasks/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function buildLandingPage() {
const pageContent = Mustache.render(template, {
meta_title: 'Firefox Test Pilot',
meta_description: 'Test new Features. Give us feedback. Help build Firefox.',
canonical_path: '',
image_facebook: THUMBNAIL_FACEBOOK,
image_twitter: THUMBNAIL_TWITTER,
enable_pontoon: config.ENABLE_PONTOON
Expand All @@ -78,6 +79,7 @@ function buildExperimentPage() {
const pageContent = Mustache.render(indexTemplate, {
meta_title: 'Firefox Test Pilot - ' + experiment.title,
meta_description: experiment.description,
canonical_path: 'experiments/' + experiment.slug + '/',
image_facebook: experiment.image_facebook || THUMBNAIL_FACEBOOK,
image_twitter: experiment.image_twitter || THUMBNAIL_TWITTER,
enable_pontoon: config.ENABLE_PONTOON
Expand Down

0 comments on commit 86e5052

Please sign in to comment.