Skip to content

Commit e96c3cc

Browse files
authored
Merge pull request #356 from Peefy/enhance-website-search
refactor: enhance the website search using the docusaurus-search-local package
2 parents ff79fc3 + 17f227e commit e96c3cc

File tree

6 files changed

+399
-46
lines changed

6 files changed

+399
-46
lines changed

.env

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/docsearch.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ test:
4848
translations:
4949
npm run docusaurus write-translations
5050

51-
.PHONY: algolia
52-
# Edit your API_KEY in .env before run `make algolia` for the `kcl-lang` index.
53-
algolia:
54-
docker run -it --env-file=.env -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper
55-
5651
# ----------------
5752
# Docker
5853
# ----------------

docusaurus.config.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,6 @@ const config = {
159159
id: 'announcementBar-1', // Increment on change
160160
content: `Give us a star ⭐️ - If you are using KCL or think it is an interesting project, we would love a star and record on <a target="_blank" rel="noopener noreferrer" href="https://github.com/kcl-lang/kcl">Github</a> and <a target="_blank" rel="noopener noreferrer" href="https://github.com/kcl-lang/kcl/issues/578">Record Issue</a>`,
161161
},
162-
163-
algolia: {
164-
appId: 'I3BKOKGSD5',
165-
apiKey: '20af56a3665effe7fa744b4b6cf78d60',
166-
indexName: 'kcl-lang',
167-
contextualSearch: true,
168-
},
169162
navbar: {
170163
title: 'KCL',
171164
logo: {
@@ -323,6 +316,12 @@ const config = {
323316
anonymizeIP: true,
324317
},
325318
],
319+
[
320+
require.resolve("@cmfcmf/docusaurus-search-local"),
321+
{
322+
language: ["en", "zh"],
323+
},
324+
],
326325
async function myPlugin(context, options) {
327326
return {
328327
name: "docusaurus-tailwindcss",

0 commit comments

Comments
 (0)