Skip to content

Commit

Permalink
Merge 237dc64 into c9e8a76
Browse files Browse the repository at this point in the history
  • Loading branch information
michalstrzelecki committed Mar 13, 2017
2 parents c9e8a76 + 237dc64 commit 7c13dbf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

SITE_NAME="G-ZERO CMS"
SITE_DESC="Content management system."

DOMAIN=dev.gzero.pl
SESSION_DOMAIN=.dev.gzero.pl
SESSION_SECURE_COOKIE=false
Expand Down
1 change: 1 addition & 0 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@include('includes.canonical', ['paginator' => $contents])
@endif
@if(config('gzero.multilang.enabled'))
<link rel="alternate" href="{{env('APP_URL')}}" hreflang="x-default" />
@foreach($langs as $availableLang)
<link rel="alternate" href="{{url('/') . '/' . $availableLang->code}}" hreflang="{{$availableLang->code}}"/>
@endforeach
Expand Down
14 changes: 9 additions & 5 deletions resources/views/includes/alternateLinks.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
@if(config('gzero.multilang.enabled') && !empty($content))
@foreach($content->route->translations as $translation)
<link rel="alternate" href="{{$content->routeUrl($translation->langCode)}}"
hreflang="{{$translation->langCode}}"/>
@endforeach
@if(config('gzero.multilang.enabled'))
<link rel="alternate" href="{{env('APP_URL')}}" hreflang="x-default" />
@if(empty($content))
<link rel="alternate" href="{{url()->current()}}" hreflang="{{$lang->code}}"/>
@else
@foreach($content->route->translations as $translation)
<link rel="alternate" href="{{$content->routeUrl($translation->lang_code)}}" hreflang="{{$translation->lang_code}}"/>
@endforeach
@endif
@endif
2 changes: 1 addition & 1 deletion resources/views/includes/head.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</script>

@if(option('seo', 'google_analytics_id'))
@if(option('seo', 'google_analytics_id') && env('APP_ENV') === 'production')
<!-- Google Analytics web tracking code -->
<script type="text/javascript">
(function(i, s, o, g, r, a, m) {
Expand Down

0 comments on commit 7c13dbf

Please sign in to comment.