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

feat(search) add opensearch.xml #406

Merged
merged 1 commit into from Mar 7, 2017

Conversation

Projects
None yet
3 participants
@Haroenv
Copy link
Member

Haroenv commented Mar 7, 2017

closes #405

All browsers that support the "search in this site" spec use this version.

feat(search) add opensearch.xml
closes #405

All browsers that support the "search in this site" spec use this version.

@Haroenv Haroenv force-pushed the algolia:feat/add-opensearch branch from f3f03c8 to 72818d9 Mar 7, 2017

@Haroenv

This comment has been minimized.

Copy link
Member Author

Haroenv commented Mar 7, 2017

Build error is because of netlify:

4:48:20 PM: Finished deploying directory /mnt/build-work/1488901628170398340/repo/_site
4:48:20 PM: Error deploying site: Put https://api.netlify.com/api/v1/deploys/58bed4cb6686744effd25f61: unexpected EOF
4:48:20 PM: Error deploying site: Put https://api.netlify.com/api/v1/deploys/58bed4cb6686744effd25f61: unexpected EOF
4:48:20 PM: Finished building and deploying site in 1m7.024344567s
4:48:20 PM: Compressing dependencies
4:48:38 PM: Uploading dependency cache
4:48:41 PM: Finished uploading cache
4:48:42 PM: Finished processing build request

@Daniel15 Daniel15 merged commit c3452e5 into yarnpkg:master Mar 7, 2017

1 check failed

deploy/netlify Deploy preview failed.
Details
@Daniel15

This comment has been minimized.

Copy link
Member

Daniel15 commented Mar 7, 2017

This looks good to me. Would be good to add doc search too :)

@Haroenv

This comment has been minimized.

Copy link
Member Author

Haroenv commented Mar 7, 2017

I'm not sure if it's supported to have two different search experiences, and how that would look, but I'll think about it!

@esphen

This comment has been minimized.

Copy link
Contributor

esphen commented Mar 7, 2017

You can have two (or many) search providers. From the mozilla documentation on search plugins:

If your site offers multiple search plugins, you can support autodiscovery for them all. For example:

<link rel="search" type="application/opensearchdescription+xml"
      title="MySite: By Author" href="http://example.com/mysiteauthor.xml">

<link rel="search" type="application/opensearchdescription+xml"
      title="MySite: By Title" href="http://example.com/mysitetitle.xml">

This way, your site can offer plugins to search by author or by title as separate entities.

Haroenv added a commit to algolia/yarnpkg-website that referenced this pull request Mar 8, 2017

fix(opensearch) link to /en/ by default
because a redirect takes you from /packages?q=whatever to /en/packages, which forgets the querystring, linking to en by default (from which you can then change your language) seems like a good solution.

see also yarnpkg#406 and yarnpkg#405

Daniel15 added a commit that referenced this pull request Mar 10, 2017

fix(opensearch) link to /en/ by default (#410)
because a redirect takes you from /packages?q=whatever to /en/packages, which forgets the querystring, linking to en by default (from which you can then change your language) seems like a good solution.

see also #406 and #405

@Haroenv Haroenv deleted the algolia:feat/add-opensearch branch Apr 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.