Skip to content

Commit

Permalink
Merge pull request #2906 from nstapelbroek/feature/2895-duplicate-tit…
Browse files Browse the repository at this point in the history
…le-and-meta-tags

#2895 duplicate title and meta tags
  • Loading branch information
jbrooksuk committed Feb 17, 2018
2 parents e43f984 + ce7437e commit 2d8bf2f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
11 changes: 10 additions & 1 deletion resources/lang/en/cachet.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,18 @@
],
],

// Meta descriptions
'meta' => [
'description' => [
'incident' => 'Details and updates about the :name incident that occurred on :date',
'schedule' => 'Details about the scheduled maintenance period :name starting :startDate',
'subscribe' => 'Subscribe to :app in order to receive updates of incidents and scheduled maintenance periods',
'overview' => 'Stay up to date with the latest service updates from :app.',
],
],

// Other
'home' => 'Home',
'description' => 'Stay up to date with the latest service updates from :app.',
'powered_by' => 'Powered by <a href="https://cachethq.io" class="links">Cachet</a>.',
'timezone' => 'Times are shown in :timezone.',
'about_this_site' => 'About This Site',
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layout/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="description" content="{{ trans('cachet.description', ['app' => $app_name]) }}">
<meta name="description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $app_name]))">

<meta property="og:type" content="website">
<meta property="og:title" content="{{ $site_title }}">
<meta property="og:image" content="/img/favicon.png">
<meta property="og:description" content="{{ trans('cachet.description', ['app' => $app_name]) }}">
<meta property="og:description" content="@yield('description', trans('cachet.meta.description.overview', ['app' => $app_name]))">

<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading -->
<meta http-equiv="cleartype" content="on">
Expand Down
2 changes: 2 additions & 0 deletions resources/views/single-incident.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@section('title', $incident->name.' | '.$site_title)

@section('description', trans('cachet.meta.description.incident', ['name' => $incident->name, 'date' => $incident->occurred_at_formatted]))

@section('bodyClass', 'no-padding')

@section('outer-content')
Expand Down
2 changes: 2 additions & 0 deletions resources/views/single-schedule.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

@section('title', $schedule->name.' | '.$site_title)

@section('description', trans('cachet.meta.description.schedule', ['name' => $schedule->name, 'startDate' => $schedule->scheduled_at_formatted]))

@section('bodyClass', 'no-padding')

@section('outer-content')
Expand Down
4 changes: 4 additions & 0 deletions resources/views/subscribe/subscribe.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@extends('layout.master')

@section('title', trans('cachet.subscriber.subscribe'). " | ". $site_title))

@section('description', trans('cachet.meta.description.subscribe', ['app' => $site_title]))

@section('content')
<div class="pull-right">
<p><a class="btn btn-success btn-outline" href="{{ cachet_route('status-page') }}"><i class="ion ion-home"></i></a></p>
Expand Down

0 comments on commit 2d8bf2f

Please sign in to comment.