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 language & version meta for algolia docsearch #787

Merged
merged 1 commit into from
Jun 19, 2018

Conversation

endiliey
Copy link
Contributor

Motivation

algolia/docsearch-configs#454 (comment)

In order to help algolia docsearch scrape our docs better, we will provide Docsearch metadata.
cc @s-pace

Changes

Provide docsearch metadata on head. Example:

<meta name="docsearch:version" content='1.2.1'>
<meta name="docsearch:language" content='en'>

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Before
before

After
after-next

@endiliey endiliey added ✅ Test Plan better engineering Not a bug or feature request labels Jun 18, 2018
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 18, 2018
@docusaurus-bot
Copy link
Contributor

Deploy preview for docusaurus-preview ready!

Built with commit 8ca7222

https://deploy-preview-787--docusaurus-preview.netlify.com

Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@endiliey endiliey merged commit 0eb6612 into facebook:master Jun 19, 2018
@stoffeastrom
Copy link

FYI

To get the new meta data I had to add

onPageNav: 'separate'

in the siteConfig.js

@endiliey
Copy link
Contributor Author

@stoffeastrom do you have an example repo ?
I don't think it's true. I removed onPageNav: 'separate' and the meta is still there
adsada

@stoffeastrom
Copy link

Strange, I did the same and now it still adds them 🤔
When debugging it from the beginning the

this.props.version

was undefined in lib/core/Head.js

@endiliey
Copy link
Contributor Author

Oh. that meta is only for docs by the way. Because there is no concept of version for home page :)

@endiliey endiliey deleted the docsearch-meta branch June 28, 2018 13:19
@stoffeastrom
Copy link

Yeah I know, I need it so Algolia starts indexing my next version :)

@endiliey
Copy link
Contributor Author

Hmm .. It is hard for me to guess without understanding what you did 😂
But anyway I'll be glad to help if you encounter a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better engineering Not a bug or feature request CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants