@import views.support.StripHtmlTagsAndUnescapeEntities @()(implicit page: model.Page, request: RequestHeader, context: model.ApplicationContext) @import common.{AnalyticsHost, _} @import conf.{Configuration, _} @import model.meta.LinkedData @import model.Page @import views.support.{SeoThumbnail, StripHtmlTags} @import conf.switches.Switches.SmartAppBanner @import play.api.Mode.{Dev, Prod} @page.metadata.description.map { description => } @* Critical meta data that have an impact on rendering speed *@ @* http://www.chromium.org/developers/design-documents/dns-prefetching *@ @if(context.environment.mode == Prod){ } @Page.getContentPage(page).map { page => @if(page.item.content.shouldAmplify) { } } @* Additional meta data that does not impact rendering speed (and can live at the end of the
) *@ @if(context.environment.mode == Dev){ } else { } @* ONLY for EDITONALISED sections https://support.google.com/webmasters/answer/189077 *@ @Edition.localizedEditionLinks(request).map{ link => } @page.metadata.rssPath.map { path => } @if(!page.metadata.shouldGoogleIndex) { } @if(SmartAppBanner.isSwitchedOn) { } @Page.getContent(page).map { content => @content.tags.contributors.map { contributor => } } @* https://support.google.com/customsearch/answer/1626955?hl=en *@ @SeoThumbnail(page).map{ thumb => } @page match { case c: model.ContentPage => { @* https://support.google.com/news/publisher/answer/68297?hl=en-GB *@ @if(c.item.tags.keywords.nonEmpty) { } @c.getOpenGraphProperties.map { case (key, value) => } @c.getTwitterProperties.map{ case (key, value) => } } case s: model.StandalonePage => { @s.getOpenGraphProperties.map{ case (key, value) => } @s.getTwitterProperties.map{ case (key, value) => } } case _ => {} } @* https://dev.twitter.com/web/overview/privacy *@ @page.metadata.openGraphImages.map{ case (imageUrl) => } @Configuration.facebook.pages.authorisedIdsForLinkEdits.map { id => } @page.metadata.pagination.map{ pagination => @pagination.next.map{ next => } @pagination.previous.map{ prev => } } @* this script allows you to hook up an external debugger for mobile devices see: http://people.apache.org/~pmuellr/weinre/docs/latest/ *@ @if(context.environment.mode == Dev) { @Configuration.javascript.pageData.get("guardian.page.iphoneDebugger").map{ scriptUrl => } } @page.metadata.linkedData.map { linkedData => } @* This add structured data markup for google enhanced search result (https://developers.google.com/search/docs/data-types/data-type-selector) and the semantic web. Sources of the markup is our own structured data from the Content API *@ @Page.getContentPage(page).map(_.item).map { item => @for(review <- item.content.atoms.map(_.reviews).getOrElse(Nil)) { @review.data.game.map { game => @fragments.atoms.structureddata.gameReview(review, game, item.tags.contributors) } @review.data.film.map { film => @fragments.atoms.structureddata.filmReview(review, film, item.tags.contributors) } @review.data.restaurant.map { restaurant => @fragments.atoms.structureddata.restaurant.restaurantReview(review, restaurant, item.tags.contributors) } } @* add here another atom (organisations, people, events, ...) *@ } @page.metadata.iosId("google").map { iosId => } @* As a European publisher, we need to include snippets and thumbnails in our search previews - https://search.google.com/search-console/settings/eucd?resource_id=https%3A%2F%2Fwww.theguardian.com%2F https://developers.google.com/search/reference/robots_meta_tag *@