Skip to content

Implement search page #363

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

Merged
merged 1 commit into from
Aug 2, 2020
Merged

Conversation

NoelDeMartin
Copy link
Contributor

Added search page as discussed in #352.

Given that the Algolia credentials are not available yet, I've used the ones from v2 for development. If you want to do the same, add the following to src/.vuepress/config.js under themeConfig:

algolia: {
  appId: 'BH4D9OD16A',
  apiKey: '85cc3221c9f23bfbaa4e3913dd7625ea',
  indexName: 'vuejs',
  algoliaOptions: { facetFilters: ["version:2.6"] },
}

I've implemented this looking at the current implementation in v2 docs.

There are some improvements that can be done given the new architecture, for example falling back to VuePress-powered search if Algolia is not configured or unavailable. However, as we've discussed in #352, that would be a nice addition to VuePress itself. So I think it's best to have this for now that is very similar to what we had in v2 and work on the improvements in VuePress.

@NataliaTepluhina
Copy link
Member

@NoelDeMartin thank you for working on this! I see we have this error on build: ReferenceError: location is not defined at VueComponent.data (src/.vuepress/components/search/index.vue:57:0). Could you please look into it and fix it?

@NoelDeMartin
Copy link
Contributor Author

@NataliaTepluhina Thanks for the heads-up, I forgot about SSR 😅 It should be fixed now.

@NataliaTepluhina NataliaTepluhina linked an issue Aug 2, 2020 that may be closed by this pull request
Copy link
Member

@NataliaTepluhina NataliaTepluhina 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 @NoelDeMartin, changes look good to me! I'm waiting for the answer from Algolia regarding new credentials (so far we're on the stage 'Are you able to modify this website?' and the silence after this but I hope they will come back soon)

As soon as we have them, I'll add Algolia to VuePress theme config 👍🏻

@NataliaTepluhina NataliaTepluhina merged commit 6761928 into vuejs:master Aug 2, 2020
@NoelDeMartin NoelDeMartin mentioned this pull request Nov 8, 2020
alexeyvokin pushed a commit to alexeyvokin/docs-ru_old that referenced this pull request Apr 1, 2024
* feat: добавлен перевод /about/community-guide.md

* убрал лишний перенос строки

* fix: добавил запятую перед союзом "и"

---------

Co-authored-by: Tsakanyan Artak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search page
2 participants