Adds search to documentation (#280)

This commit is contained in:
Chris Anderson 2023-10-09 16:41:07 -05:00 committed by GitHub
parent f918b0b066
commit 56ad60cef7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 1 deletions

View file

@ -148,7 +148,7 @@ const subscriptionPreferencesTemplate = compileTemplate<SubscriptionPreferencesA
<p>Choose which notifications you would like to continue to receive.</p>
{{#if showUpdatedMessage}}
<div class="alert-success">
Preferenced Saved Successfully!
Your preferences have been updated!
</div>
{{/if}}
{{#each subscriptions}}

View file

@ -8,4 +8,14 @@ module.exports = function(app) {
changeOrigin: true,
}),
)
app.use(
'/unsubscribe',
createProxyMiddleware({
pathRewrite: (path) => {
return path.replace('/unsubscribe', '/api/unsubscribe')
},
target: process.env.REACT_APP_PROXY_URL,
changeOrigin: true,
}),
)
}

View file

@ -82,6 +82,26 @@ const config = {
darkTheme: darkCodeTheme,
additionalLanguages: ['swift', 'json', 'kotlin'],
},
algolia: {
// The application ID provided by Algolia
appId: '8ZOD0Z0X8I',
// Public API key: it is safe to commit it
apiKey: '0a521d036d0eeb2ac5c8bafbcfe5b830',
indexName: 'parcelvoy',
// Optional: see doc section below
contextualSearch: true,
// Optional: Algolia search parameters
searchParameters: {},
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',
//... other Algolia params
},
}),
};

View file

@ -85,6 +85,14 @@ h1, h2, h3, h4, h5, h6 {
border-bottom: 1px solid var(--color-grey);
}
.navbar__inner .DocSearch-Button-Keys {
display: none;
}
.DocSearch.DocSearch-Button {
min-width: 200px;
}
.theme-doc-sidebar-container {
border-right-color: var(--color-grey-soft) !important;
}