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 canonical links for Google #988

Draft
wants to merge 15 commits into
base: release
Choose a base branch
from
Draft

Add canonical links for Google #988

wants to merge 15 commits into from

Conversation

gilgongo
Copy link
Member

@gilgongo gilgongo commented Jun 6, 2024

==> UPDATE <===

These changes are probably better incorporated with @ignotus666 changes to the language selector. So putting in draft for now.

Short description of changes

  1. Fix for [Bug] Untranslated pages make Google complain about duplicate content #986
  2. Adds fully-qualified links to KB articles in sitemap.xml which I think might be responsible for "invalid URL" errors from Google.

What is missing until this pull request can be merged?
Ideally, need to work out how to get _includes/general/nav.html to work, but it's not doing it when the current language is en for some reason.

BTW I'm not 100% sure that adding rel=canonical to the EN version of links is necessarily going to fix Google's problem, since they imply we can only "suggest" the canonical versions, but hopefully this will make things a bit better.

Does this need translation?

No

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I'm sure that this Pull Request goes to the correct branch

@gilgongo gilgongo self-assigned this Jun 6, 2024
@gilgongo gilgongo added this to the Release 3.11.0 milestone Jun 6, 2024
@gilgongo gilgongo added the bug Something isn't working label Jun 6, 2024
sitemap.xml Outdated Show resolved Hide resolved
@gilgongo gilgongo marked this pull request as ready for review June 8, 2024 14:53
_includes/langselect.html Outdated Show resolved Hide resolved
_includes/langselect.html Outdated Show resolved Hide resolved
_includes/general/nav.html Outdated Show resolved Hide resolved
_includes/general/nav.html Outdated Show resolved Hide resolved
gilgongo and others added 6 commits June 8, 2024 16:30
Co-authored-by: Peter L Jones <[email protected]>
Co-authored-by: Peter L Jones <[email protected]>
Co-authored-by: Peter L Jones <[email protected]>
Couldn't work out how to avoid repeating the conditionals though.
@gilgongo
Copy link
Member Author

gilgongo commented Jun 9, 2024

BTW the only way I can get the site to work without errors after cloning it locally (on Ubuntu 24.04) is to:

bundle add webrick
then change to liquid (4.0.4) in Gemfile.lock
(Also had to use po4a v0.69 but @ignotus666 gave me v0.72 which also works)

@ignotus666
Copy link
Contributor

I had a go yesterday and surprisingly enough didn't run into any problems - the usual commands worked. I'm on Mint 21.3 (based on Ubuntu 22.04).

@gilgongo
Copy link
Member Author

gilgongo commented Jun 9, 2024 via email

_includes/langselect.html Outdated Show resolved Hide resolved
_includes/langselect.html Outdated Show resolved Hide resolved
Co-authored-by: Peter L Jones <[email protected]>
_includes/langselect.html Outdated Show resolved Hide resolved
@gilgongo
Copy link
Member Author

I think we may be best merging this after the language code fix is merged, since Google might treat rel=alternate differently if it also knows the URL is in a given language.

@gilgongo gilgongo marked this pull request as draft June 19, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

None yet

3 participants