feat: add Algolia DocSearch to documentation site#54
feat: add Algolia DocSearch to documentation site#54pleerock merged 4 commits intotypeorm:masterfrom
Conversation
The `apiKey`, `appId` and `indexName` parameters specified in `MainPage.js` should be updated in order for the search to work
|
@pleerock Please let me know if I could help in any way to merge this feature |
|
Here is what I got from the email: CSS JavaScript I guess you can now finish this PR. |
|
@pleerock I've updated the PR with the If you like, you can add me to the TypeORM index team at Algolia (here) so I can experiment with the configuration and make it work well with the way the documentation site works |
…arch engine indexing In order to support loading a deep url without getting a 404 error, a custom 404.html page is implemented to redirect back to index.html which uses history api to load the original url without a refresh. Based on typeorm#36
|
@pleerock I think setting this config would make the search work across all pages after merging this PR |
|
thank you! |
|
@pleerock It seems like the search doesn't index the documentation correctly. |
|
@giladgd done! |
Description
Added Algolia DocSearch to the documentation site
In order for the search to actually work you have to do the following:
apiKey,appIdandindexNameinscript/component/MainPage.jswith the values provided to you by Algolia.Closes: #16
Changed Vue router's mode from "hash" to "history" to support search engine indexing
Previously site URLs looked like this:
Now site URLs will look like this:
The previous URLs will continue to work but will now redirect to the new URLs.
In order to prevent getting a 404 error when opening a deep URL, a custom
404.htmlpage is implemented to redirect back toindex.htmlwhich will then use the history API to load the original URL without a refresh.Based on #36
Screenshots