-
Notifications
You must be signed in to change notification settings - Fork 916
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
avoid mobility issues #2465
avoid mobility issues #2465
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prevents Google bot to index and crawl HTML chunks generated by citation plugin for reference section in the article detail page. The "*" makes this solution works for single and multi-journal installation.
If I understand this correctly, the proposal prevents indexing of the citations entirely in order to avoid a layout warning in the Google analysis tools, correct? Is it not possible to adujst the presentation of the citations to satisfy the analyser's requirements, or to exclude that part of the page from analysis but not indexing? It feels like taking a sledgehammer to crack a nut. |
The code which is being prevented from indexing is a piece like this:
Which is called from a URL like this one: https://demo.publicknowledgeproject.org/ojs3/testdrive/index.php/testdrive-journal/citationstylelanguage/get/harvard-cite-them-right?submissionId=710 This chunk is embedded into citation box: As far I can see, this HTML is not accessed directly by human users, only by OJS citation fetching script and machines, i.e.: Googlebot. |
@israelcefrin, it's a JSON exchange between the article page and the Citation Style Language plugin that fetches and presents the citation, not e.g. a HTML page load containing only the citation contents. So I'm pretty sure the Google tool is emulating a browser and correctly handling the JSON load within the article view page, rather than trying to present the citation format request stand-alone. From the thread linked at the top, the two warnings still appearing on the webmaster tool are
Could those not be legitimate warnings? |
@asmecher Google bot crawls the source-code of the article detail page. In the article detail page we have the citation formats being called with a hyperlink (A) HREF (HTML) parameter and a data-load-citation data-json-href (JSON) parameter, the second has the
The former is being indexed by Google Bot, which crawls every HREF value in a page, and ignores data-load-citation data-json-href. It is the first HREF which is assessed by Google tool and returns the issues. I think that A HREF is a fallback in case that JSON doesn't load for any reason and the citation content is still accessible in such case. I've submit only this value for a test and you can see that Text too small to read and Viewport not set are real issues in a small screen. https://search.google.com/test/mobile-friendly?id=d9T6yCbU_2crKT12rZZe7g OTOH we could also adjust the output code in the plugin to add a |
Ah, yes, I see that now. Mind if I punt this over to @NateWr? The |
I agree that intervening at the In this case, the URL that does not return JSON is intended to act as a fallback for browsers with JavaScript disabled. The appropriate solution is either to get rid of the raw HTML fallback or to improve it so that it's valid HTML. Two options:
Option 1 is probably want we want to be moving towards. But Option 2 would preserve compatibility with existing theme setups. I'd recommend Option 2 for now, with a plan to use Option 1 in all future themes. cc @sssoz and @Vitaliy-1 regarding future themes. |
maybe this should PR be converted to an issue, to reach a broader consensus? |
a third related alternative is to use the
https://developers.google.com/search/docs/crawling-indexing/block-indexing |
related to #7183: with several citation styles enabled, google search console reports thousands of "pages" (citation snippets) affected. |
Related issue with linked PRs: pkp/pkp-lib#10474 Going to close this PR in favour of the "nofollow" approach for now, but feel free to re-open or add comments in the issue if further discussion is needed. |
details at https://forum.pkp.sfu.ca/t/ojs-mobile-friendly/23655/21