Skip to content

Commit 5e47fec

Browse files
committed
algolia search
1 parent 3b38786 commit 5e47fec

File tree

2 files changed

+29
-15
lines changed

2 files changed

+29
-15
lines changed

docs/advanced/1_self_host/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ address:
5353
# .env
5454
DB_PASSWORD=supersecret
5555
WM_BASE_URL=http://windmill.example.com
56-
CADDY_REVERSE_PROXY=http://windmill.example.com
5756
```
5857

5958
Setting the `WM_BASE_URL` configures Windmill to use it as its base url. The reverse proxy is also configured at the same domain. You can use any reverse proxy as long as they behave mostly like the following caddy configuration:

docusaurus.config.js

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,6 @@ const config = {
1515
favicon: 'img/logo.svg',
1616
organizationName: 'windmill', // Usually your GitHub org/user name.
1717
projectName: 'windmill',
18-
themes: [
19-
[
20-
require.resolve('@easyops-cn/docusaurus-search-local'),
21-
{
22-
hashed: true,
23-
docsDir: 'docs',
24-
docsRouteBasePath: '/docs',
25-
indexDocs: true,
26-
// indexBlog: false,
27-
indexPages: false,
28-
highlightSearchTermsOnTargetPage: false
29-
}
30-
]
31-
],
3218

3319
plugins: [
3420
async function myPlugin(context, options) {
@@ -145,6 +131,35 @@ const config = {
145131
defaultMode: 'light',
146132
disableSwitch: true,
147133
respectPrefersColorScheme: false
134+
},
135+
algolia: {
136+
// The application ID provided by Algolia
137+
appId: '3Q3AONZ2W8',
138+
139+
// Public API key: it is safe to commit it
140+
apiKey: '22ac914215bd02f11fcafa7ef9a9d1bf',
141+
142+
indexName: 'windmill',
143+
144+
// Optional: see doc section below
145+
contextualSearch: true,
146+
147+
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
148+
externalUrlRegex: 'windmill\\.dev|www.windmill\\.dev',
149+
150+
// // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
151+
// replaceSearchResultPathname: {
152+
// from: '/docs/', // or as RegExp: /\/docs\//
153+
// to: '/'
154+
// },
155+
156+
// Optional: Algolia search parameters
157+
searchParameters: {},
158+
159+
// Optional: path for search page that enabled by default (`false` to disable it)
160+
searchPagePath: 'search'
161+
162+
//... other Algolia params
148163
}
149164
})
150165
};

0 commit comments

Comments
 (0)