Skip to content

Commit

Permalink
Fixed django#874 -- Made dev docs canonical only for the English vers…
Browse files Browse the repository at this point in the history
…ion of the internals URLs (dev docs are never translated)
  • Loading branch information
tobiasmcnulty authored Mar 2, 2019
1 parent 2b5b981 commit 76e168b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangoproject/templates/docs/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{% block link_rel_tags %}
{% if docurl %}
{% if "internals" in docurl %} {# The canonical version of "internals" is the dev docs. #}
{% if "internals" in docurl and lang == "en" %} {# The canonical version of "internals" is the dev docs (but only for English, since the dev docs are never translated). #}
{% url 'document-detail' lang=lang version='dev' url=docurl host 'docs' as canonical_url %}
{% else %}
{% url 'document-detail' lang=lang version=canonical_version url=docurl host 'docs' as canonical_url %}
Expand Down

0 comments on commit 76e168b

Please sign in to comment.