Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper handling of canonical URLs #52

Merged
merged 2 commits into from
Aug 31, 2019
Merged

Conversation

sio
Copy link
Contributor

@sio sio commented Aug 28, 2019

Previously canonical URLs were badly broken: pages would not get any value and articles would receive two contradicting entries (one for site root, one for the article itself). Search engines do not like that.

Thanks to @QuantumGhost this can be fixed. I've cherry-picked relevant commit from their repo and modified it slightly to fix remaining duplicate values.

QuantumGhost and others added 2 commits August 28, 2019 15:26
That leads to repeating the block twice instead of replacing its value
from `base.html`
@@ -27,10 +27,10 @@
{% set selected_color = HEADER_COLOR %}
{% endif %}

{% block canonical_url %}<link href="{{ SITEURL }}/{{ article.url }}" rel="canonical" />{% endblock canonical_url %}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@arulrajnet arulrajnet merged commit 73e216f into arulrajnet:master Aug 31, 2019
@sio sio deleted the canonical-url branch September 1, 2019 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants