feat(core): support TypeScript + ESM configuration (#9317)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
Chongyi Zheng 2023-10-13 20:46:03 -04:00 committed by GitHub
parent 336a44f3ea
commit 45f1a669b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
126 changed files with 2054 additions and 914 deletions

View file

@ -69,7 +69,7 @@ npm install --save @docusaurus/theme-search-algolia
2. Register the theme in `docusaurus.config.js`:
```js title="docusaurus.config.js"
module.exports = {
export default {
title: 'My site',
// ...
themes: ['@docusaurus/theme-search-algolia'],
@ -84,7 +84,7 @@ module.exports = {
Then, add an `algolia` field in your `themeConfig`. **[Apply for DocSearch](https://docsearch.algolia.com/apply/)** to get your Algolia index and API key.
```js title="docusaurus.config.js"
module.exports = {
export default {
// ...
themeConfig: {
// ...
@ -146,7 +146,7 @@ Contextual search is **enabled by default**.
It ensures that search results are **relevant to the current language and version**.
```js title="docusaurus.config.js"
module.exports = {
export default {
// ...
themeConfig: {
// ...
@ -177,7 +177,7 @@ When using `contextualSearch: true` (default), the contextual facet filters will
For specific needs, you can disable `contextualSearch` and define your own `facetFilters`:
```js title="docusaurus.config.js"
module.exports = {
export default {
// ...
themeConfig: {
// ...
@ -252,7 +252,7 @@ Still, you can reuse the [Infima CSS variables](styling-layout.mdx#styling-your-
Algolia DocSearch supports a [list of options](https://autocomplete-experimental.netlify.app/docs/DocSearchModal#reference) that you can pass to the `algolia` field in the `docusaurus.config.js` file.
```js title="docusaurus.config.js"
module.exports = {
export default {
themeConfig: {
// ...
algolia: {