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

DEV: output sitelinks search tag on homepage only #16157

Merged
merged 4 commits into from Sep 23, 2022

Conversation

rr-it
Copy link
Contributor

@rr-it rr-it commented Mar 10, 2022

Without this change the structured data element on every subpage declares the homepage-url instead of subpage-url.

See https://developers.google.com/search/docs/advanced/structured-data/sitelinks-searchbox?hl=en#adding-structured-data

  1. Implement the WebSite structured data element on the homepage for your site.
  • Add this markup only to the homepage, not to any other pages.

Discussion on meta.discourse.org

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/remove-wrong-structured-data-from-every-subpage-add-sitelinks-search-box-to-the-homepage-only/219299/1

@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/remove-wrong-structured-data-from-every-subpage-add-sitelinks-search-box-to-the-homepage-only/219299/4

@SamSaffron
Copy link
Member

this is fine, but we should have a test that confirms this is the case

@rr-it
Copy link
Contributor Author

rr-it commented Mar 26, 2022

Rspec tests added.

@CvX CvX requested a review from SamSaffron April 6, 2022 21:15
@nattsw nattsw merged commit 7277a9f into discourse:main Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants