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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTML meta tags "description" with QGIS version and for outdated docs "robots" with noindex #8121

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

pathmapper
Copy link
Contributor

@pathmapper pathmapper commented Mar 22, 2023

closes #6449

ref https://lists.osgeo.org/pipermail/qgis-developer/2023-March/065647.html

from #6449 (comment)

The missing version in Google result is problematic imho. Is there something we can/need configure on our side?

There's a good chance that Google/other search engines would use an HTML meta tag description for the snippet when displaying search results:
https://developers.google.com/search/docs/appearance/snippet#meta-descriptions


This PR
image


Here's an example which demonstrates this: https://www.google.com/search?q=geoportal+niederrhein

image

Source of https://geoportal-niederrhein.de/
image


I'm not familiar with the release workflow of the docs, but looking at the code I guess the specific version will be used here when building the docs for deployment:

version = 'testing'

Would be great if someone could confirm 馃槃


We could potentially add additional HTML meta tags there, e.g. to exclude outdated docs from search results.

Here are some options:

/cc @DelazJ @rduivenvoorde

conf.py Outdated Show resolved Hide resolved
@DelazJ
Copy link
Collaborator

DelazJ commented Mar 24, 2023

@pathmapper Thanks for addressing this issue
I downloaded the artifact from github action and couldn't find the meta name info as shown in your screenshot above. Still get "docutils...". Any idea?
Anyway, TBH I'm a bit far from this topic and can't find time for the literature you point to (sorry!). But I'm happy to merge and see, if some more versed watcher gives a "GO!"

@pathmapper
Copy link
Contributor Author

pathmapper commented Mar 24, 2023

I downloaded the artifact from github action and couldn't find the meta name info as shown in your screenshot above. Still get "docutils...". Any idea?

Good find @DelazJ ! Looks like we were running into readthedocs/sphinx_rtd_theme#469.

I've implemented it another way and added also the page title to the content to have unique descriptions (which is recommended by Google).

image

But I'm happy to merge and see, if some more versed watcher gives a "GO!"

I think we have nothing to loose here - well, only the currently automatically generated snippets :-)
But if we loose them, we are going to have snippets including the version number. 馃

@kgjenkins
Copy link
Sponsor

kgjenkins commented Mar 24, 2023

It's great to see this being addressed, and the proposed solution looks promising!

I'm wondering, though, if we might want to shorten the description a bit, since Google and others tend to limit the length of the snippet. Maybe instead of:

Documentation for QGIS 3.18 - 20. Working with Point Clouds

we use something like

QGIS 3.18 docs: 20. Working with Point Clouds

@pathmapper
Copy link
Contributor Author

pathmapper commented Mar 26, 2023

@kgjenkins thanks for your feedback. I don't think we have to shorten the description (there are much longer snippets around, also docs is used as abbreviation for doctors) but I do like your suggestion to move QGIS with version to the beginning (so we could also omit the word for):

QGIS 3.18 documentation: 20. Working with Point Clouds

That said, I have no strong opinion here.

@DelazJ DelazJ added backport release_3.22 backport release_3.28 On merge create a backported pull request Backend labels Mar 28, 2023
@pathmapper pathmapper changed the title Add HTML meta tag "description" with QGIS version Add HTML meta tags "description" with QGIS version and "robots" with noindex for outdated docs Mar 28, 2023
to prevent outdated docs popping up in search results
@pathmapper pathmapper changed the title Add HTML meta tags "description" with QGIS version and "robots" with noindex for outdated docs Add HTML meta tags "description" with QGIS version and for outdated docs "robots" with noindex Mar 28, 2023
@pathmapper
Copy link
Contributor Author

pathmapper commented Mar 28, 2023

@DelazJ should be good to merge (unrelated test failure).

@DelazJ DelazJ merged commit fc7f349 into qgis:master Mar 28, 2023
@DelazJ
Copy link
Collaborator

DelazJ commented Mar 28, 2023

OK let's then try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend backport release_3.28 On merge create a backported pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

robots.txt to control indexing by Internet search engines
5 participants