<commit_before>{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "wiki/base.html" %}
{% block title %}{{ page_title(document.title) }}{% endblock %}
{% set classes = 'document' %}
{% block bodyclass %}document{% endblock %}
{% if document.parent %}
  {# If there is a parent doc, use it for translating. #}
  {% set translate_url = url('wiki.select_locale', document_path=document.parent.full_path) %}
{% else %}
  {% set translate_url = url('wiki.select_locale', document_path=document.full_path, locale=document.locale) %}
{% endif %}
{% if fallback_reason == 'no_translation' %}
  {% set help_link = url('wiki.translate', document_path=document.full_path, locale=document.locale)|urlparams(tolocale=request.locale) %}
{% elif fallback_reason == 'translation_not_approved' %}
  {% set help_link = url('wiki.translate', document_path=document.parent.full_path, locale=document.parent.locale)|urlparams(tolocale=request.locale) %}
{% endif %}

{% block extrahead %}
  <link rel="alternate" type="application/json" href="{{ url('wiki.json_slug', document.full_path) }}" />

  <meta property="og:title" content="{{ document.title }}"/>
  <meta property="og:type" content="website"/>
  <meta property="og:image" content="{{ request.build_absolute_uri('/media/img/mdn-logo-sm.png') }}"/>    
  <meta property="og:site_name" content="Mozilla Developer Network"/>

  {% if seo_summary %}
  <meta property="og:description" content="{{ seo_summary }}"/>
  <meta name="description" content="{{ seo_summary }}" />
  {% endif %}
{% endblock %}

{% block lang_switcher %}
  {% if document.is_localizable or document.parent %}<commit_msg>fix bug 788459 - Add cononical links to document pages<commit_after>{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "wiki/base.html" %}
{% block title %}{{ page_title(document.title) }}{% endblock %}
{% set classes = 'document' %}
{% block bodyclass %}document{% endblock %}
{% if document.parent %}
  {# If there is a parent doc, use it for translating. #}
  {% set translate_url = url('wiki.select_locale', document_path=document.parent.full_path) %}
{% else %}
  {% set translate_url = url('wiki.select_locale', document_path=document.full_path, locale=document.locale) %}
{% endif %}
{% if fallback_reason == 'no_translation' %}
  {% set help_link = url('wiki.translate', document_path=document.full_path, locale=document.locale)|urlparams(tolocale=request.locale) %}
{% elif fallback_reason == 'translation_not_approved' %}
  {% set help_link = url('wiki.translate', document_path=document.parent.full_path, locale=document.parent.locale)|urlparams(tolocale=request.locale) %}
{% endif %}

{% block extrahead %}
  <link rel="alternate" type="application/json" href="{{ url('wiki.json_slug', document.full_path) }}" />
  <link rel="canonical" href="{{ url('wiki.document', document.full_path) }}" />

  <meta property="og:title" content="{{ document.title }}"/>
  <meta property="og:type" content="website"/>
  <meta property="og:image" content="{{ request.build_absolute_uri('/media/img/mdn-logo-sm.png') }}"/>    
  <meta property="og:site_name" content="Mozilla Developer Network"/>

  {% if seo_summary %}
  <meta property="og:description" content="{{ seo_summary }}"/>
  <meta name="description" content="{{ seo_summary }}" />
  {% endif %}
{% endblock %}

{% block lang_switcher %}
  {% if document.is_localizable or document.parent %}
{'fraction_non_alphanumeric': 0.18460166468489894, 'fraction_numerical': 0.0035671819262782403, 'mean_word_length': 5.716566866267465, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3000890', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1045, 'n_words': 217}