This repository has been archived by the owner on Dec 8, 2017. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-implementing #4 after merge conflicts. Reproducing original PR message:
This adds a rel="canonical" link to the top of every page, with an absolute URL to https://www.notalone.gov, so that search engines aren't confused about any instance of this code on other domains (like 18f.github.io/notalone). Essentially, it prevents penalization for duplicate content and transfers all pagerank to the canonical domain.
To do this, I also added a permalink field to every page -- otherwise, the page.url field always adds index.html to the end of every canonical URL. I added the base canonical URL to _config.yml as a canonical field.
For more information on rel="canonical", Google's description: https://support.google.com/webmasters/answer/139066?hl=en
It looks like my text editor also deleted a lot of trailing whitespace (I have it configured to do that automatically on save). You can view the diff without that by adding ?w=1 to the end of this pull request's URL.