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

Add rel='nofollow' to all external hardcoded links in templates #3162

Merged
merged 2 commits into from
Oct 28, 2023

Conversation

willthong
Copy link
Contributor

@willthong willthong commented Jul 25, 2023

Pull Request Checklist

Resolves: #2956

The HTML tag (eg <a href="https://getpelican.com">) in our templates negatively impacts a Pelican-generated site's ranking for Search Engine Optimisation purposes. This can be solved by adding the Google-developed rel="nofollow" attribute to external links so that the website's owner does not have to provide link authority to the target. This change also had to be reflected in the tests so that they would pass.

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code
  • Updated documentation for changed code

@justinmayer
Copy link
Member

As a general practice, I think it's a good idea to always specify the “why” — the motivation behind the proposed changes — in the commit body/description. That way folks can better understand the rationale, without having to take guesses as to the proponent's state of mind. 😉

I can take a guess as to why, but in the interest of clarity, would you amend the commit body and the PR description here with your thoughts regarding the motivation/rationale?

Fix getpelican#2956: the HTML tag (eg `<a href="https://getpelican.com">`) in our
templates negatively impacts a Pelican-generated site's ranking for
Search Engine Optimisation purposes. This can be solved by adding the
Google-developed `rel="nofollow"` attribute to external links so that
the website's owner does not have to provide link authority to the
target. This change also had to be reflected in the tests so that they
would pass.
@justinmayer justinmayer modified the milestone: Pelican 4.9 Oct 28, 2023
Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

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

Many thanks to @willthong for the enhancement and to @avaris for reviewing. 🥇

@justinmayer justinmayer merged commit 8a7e016 into getpelican:master Oct 28, 2023
20 checks passed
@willthong willthong deleted the seo-friendly-backlinks branch November 1, 2023 17:37
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.

SEO-friendly backlinks
3 participants