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: Implements Docusearch into docusaurus docs #19289

Merged
merged 1 commit into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ const config = {
favicon: 'img/favicon.ico',
organizationName: 'apache', // Usually your GitHub org/user name.
projectName: 'superset', // Usually your repo name.
themes: [
'@saucelabs/theme-github-codeblock'
],
plugins: [
themes: ['@saucelabs/theme-github-codeblock'],
plugins: [
[
'@docusaurus/plugin-client-redirects',
{
Expand Down Expand Up @@ -159,6 +157,11 @@ const config = {
defaultMode: 'light',
disableSwitch: true,
},
algolia: {
appId: 'WR5FASX5ED',
apiKey: '299e4601d2fc5d0031bf9a0223c7f0c5',
Copy link
Member Author

Choose a reason for hiding this comment

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

https://docusaurus.io/docs/search

Says that it is safe to commit this, which feels weird.

Copy link
Member

Choose a reason for hiding this comment

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

is there a way for us to embedded these keys via the env? Personally don't think it is a good idea to just have these available for someone to just copy

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I think this is ok, as I believe this is just a reference to the search index (this can probably be extracted fairly easily from the built assets, too)

indexName: 'superset-apache',
},
navbar: {
logo: {
alt: 'Superset Logo',
Expand Down Expand Up @@ -237,8 +240,6 @@ const config = {
darkTheme: darkCodeTheme,
},
}),


};

module.exports = config;
18 changes: 9 additions & 9 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"dependencies": {
"@ant-design/icons": "^4.7.0",
"@docsearch/react": "^3.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

needed for docuSearch

"@docusaurus/core": "^2.0.0-beta.15",
"@docusaurus/plugin-client-redirects": "^2.0.0-beta.15",
"@docusaurus/preset-classic": "^2.0.0-beta.15",
Expand Down