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

DocSearch meta missing from the new released version #1792

Closed
s-pace opened this issue Sep 17, 2019 · 10 comments
Closed

DocSearch meta missing from the new released version #1792

s-pace opened this issue Sep 17, 2019 · 10 comments
Assignees
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@s-pace
Copy link

s-pace commented Sep 17, 2019

🐛 Bug Report

I am part of the team from algolia/Docsearch which features search for Docusaurus. We rely on meta tags to pick up the right version from the pages generated by Docusaurus. The v2 does not include these meta tags anymore. The Algolia search experience will be broken due to duplicates for every websites we crawl

Have you read the Contributing Guidelines on issues?

yes

To Reproduce

(Write your steps here:)

  1. Go on https://v2.docusaurus.io/docs/introduction or any website generated thanks to the latest v2 version of docusaurus
  2. Inspect the DOM
  3. Search for these meta tags within the DOM
<meta name="docsearch:language" content="en" />
<meta name="docsearch:version" content="2.0.0" />
  1. None of these variables are available

Expected behavior

Docusaurus should include these meta tags

Same as 0eb6612

My guess is that this issue is due to the latest release of Docusaurus.

Happy to provide more details if needed.

cc @endiliey @JoelMarcey

@JoelMarcey
Copy link
Contributor

HI @yangshun - did we decide to remove these meta tags purposely or just not implemented yet?

@yangshun yangshun added 2.x bug An error in the Docusaurus core causing instability or issues with its execution labels Sep 17, 2019
@yangshun
Copy link
Contributor

I think it's more of the latter. We will need them back eventually.

@nebrelbug
Copy link
Contributor

@yangshun would it help if I put together a pull request? I'd really like to have these merged so I can add search on my site 😄

@yangshun
Copy link
Contributor

@nebrelbug Sure but I don't exactly know what the correct fix should be (because I'm not familiar with Algolia). I initially thought this wasn't necessary because v2 doesn't have versioning yet, so there cannot be multiple versions of Algolia for a site.

cc @endiliey

@nebrelbug
Copy link
Contributor

Ah, right. @s-pace what needs to be done to fix this?

Also @yangshun, do you have a rough estimate of when versioning will be added?

@s-pace
Copy link
Author

s-pace commented Sep 18, 2019

We need a page of version x and language lang to include the following meta tags:

<meta name="docsearch:language" content="lang" />
<meta name="docsearch:version" content="x" />

This should be implemented at the same time as versioning then :)

@endiliey
Copy link
Contributor

Will leave this open for now to serve as reminder

@endiliey endiliey self-assigned this Oct 21, 2019
@nebrelbug
Copy link
Contributor

@endiliey how does v2.docusaurus.io currently implement this?

@endiliey
Copy link
Contributor

there's no versioning yet so ofc there's no meta tag for that yet

@endiliey
Copy link
Contributor

its done like this however https://v2.docusaurus.io/docs/docusaurus-core#head-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

5 participants