fix: add docsearch 4 to website (#2767)
Co-authored-by: Paul Jankowski <8BitTitan@gmail.com>
This commit is contained in:
parent
4f895f8839
commit
9a908b89b0
14 changed files with 3695 additions and 3237 deletions
|
|
@ -33,12 +33,12 @@ aliases:
|
|||
defaults: &defaults
|
||||
working_directory: ~/docsearch
|
||||
docker:
|
||||
- image: cimg/node:18.20.3
|
||||
- image: cimg/node:22.15.0
|
||||
|
||||
cypress: &cypress
|
||||
working_directory: ~/docsearch
|
||||
docker:
|
||||
- image: cypress/browsers:node-18.20.3-chrome-125.0.6422.141-1-ff-126.0.1-edge-125.0.2535.85-1
|
||||
- image: cypress/browsers:node-22.15.0-chrome-136.0.7103.113-1-ff-138.0.3-edge-136.0.3240.64-1
|
||||
environment:
|
||||
## this enables colors in the output
|
||||
TERM: xterm
|
||||
|
|
|
|||
2
.nvmrc
2
.nvmrc
|
|
@ -1 +1 @@
|
|||
18.20.5
|
||||
22.15.0
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ describe('Search', () => {
|
|||
const currentURL = cy.url();
|
||||
|
||||
cy.typeQueryMatching();
|
||||
cy.get('.DocSearch-Hits #docsearch-hits0-item-1 > a').click({
|
||||
cy.get('#docsearch-hits_docsearch_0-item-1 > a').click({
|
||||
force: true,
|
||||
});
|
||||
cy.on('url:changed', (newUrl) => {
|
||||
|
|
@ -123,7 +123,7 @@ describe('Recent and Favorites', () => {
|
|||
cy.visit(Cypress.config().baseUrl!);
|
||||
cy.openModal();
|
||||
cy.typeQueryMatching();
|
||||
cy.get('#docsearch-hits0-item-1 > a').click({ force: true }).wait(1000);
|
||||
cy.get('#docsearch-hits_docsearch_0-item-1 > a').click({ force: true }).wait(1000);
|
||||
cy.openModal();
|
||||
cy.contains('Recent').should('be.visible');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -33,11 +33,6 @@
|
|||
"website:serve": "yarn workspace @docsearch/website serve --host 0.0.0.0",
|
||||
"website:test": "yarn workspace @docsearch/website start --no-open"
|
||||
},
|
||||
"resolutions": {
|
||||
"@docusaurus/utils": "https://github.com/algolia/docsearch/releases/download/v4.0.0-beta.4/docusaurus-utils-3.8.1.tgz",
|
||||
"@docusaurus/theme-search-algolia": "https://github.com/algolia/docsearch/releases/download/v4.0.0-beta.4/docusaurus-theme-search-algolia-3.8.1.tgz",
|
||||
"@docusaurus/theme-translations": "https://github.com/algolia/docsearch/releases/download/v4.0.0-beta.4/docusaurus-theme-translations-3.8.1.tgz"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "7.25.9",
|
||||
"@babel/preset-env": "7.26.0",
|
||||
|
|
@ -91,5 +86,8 @@
|
|||
"vitest": "3.0.2",
|
||||
"watch": "1.0.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"@docsearch/react": "^4.0.1"
|
||||
},
|
||||
"packageManager": "yarn@4.6.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
"@docsearch/css": "4.0.1",
|
||||
"ai": "^5.0.30",
|
||||
"algoliasearch": "^5.28.0",
|
||||
"marked": "^15.0.12",
|
||||
"marked": "^16.3.0",
|
||||
"zod": "^4.1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,11 @@ export default {
|
|||
organizationName: 'Algolia',
|
||||
projectName: 'DocSearch',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'throw',
|
||||
markdown: {
|
||||
hooks: {
|
||||
onBrokenMarkdownLinks: 'throw',
|
||||
},
|
||||
},
|
||||
future: {
|
||||
v4: {
|
||||
removeLegacyPostBuildHeadAttribute: true,
|
||||
|
|
@ -65,11 +69,13 @@ export default {
|
|||
placeholder: 'Search or ask AI',
|
||||
appId: 'PMZUYBQDAK',
|
||||
apiKey: '24b09689d5b4223813d9b8e48563c8f6',
|
||||
indexName: 'docsearch',
|
||||
askAi: {
|
||||
indexName: 'docsearch-markdown',
|
||||
assistantId: 'askAIDemo',
|
||||
apiKey: '24b09689d5b4223813d9b8e48563c8f6',
|
||||
appId: 'PMZUYBQDAK',
|
||||
},
|
||||
indexName: 'docsearch',
|
||||
contextualSearch: true,
|
||||
translations: {
|
||||
button: {
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@
|
|||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docsearch/css": "4.0.1",
|
||||
"@docsearch/react": "4.0.1",
|
||||
"@docusaurus/core": "https://github.com/algolia/docsearch/releases/download/v4.0.0-beta.4/docusaurus-core-3.8.1.tgz",
|
||||
"@docusaurus/preset-classic": "https://github.com/algolia/docsearch/releases/download/v4.0.0-beta.4/docusaurus-preset-classic-3.8.1.tgz",
|
||||
"@docsearch/css": "^4.0.1",
|
||||
"@docsearch/react": "^4.0.1",
|
||||
"@docusaurus/core": "3.8.1-canary-6397",
|
||||
"@docusaurus/preset-classic": "3.8.1-canary-6397",
|
||||
"@mdx-js/react": "^3.1.0",
|
||||
"@tabler/icons-react": "^3.34.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
|
|
@ -41,14 +41,18 @@
|
|||
"tw-animate-css": "^1.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "^3.8.1",
|
||||
"@docusaurus/tsconfig": "^3.8.1",
|
||||
"@docusaurus/types": "^3.8.1",
|
||||
"@docusaurus/module-type-aliases": "3.8.1-canary-6397",
|
||||
"@docusaurus/tsconfig": "3.8.1-canary-6397",
|
||||
"@docusaurus/types": "3.8.1-canary-6397",
|
||||
"@tailwindcss/postcss": "4.1.11",
|
||||
"image-webpack-loader": "^8.1.0",
|
||||
"tailwindcss": "4.1.11",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"@docsearch/react": "^4.0.1",
|
||||
"@docsearch/css": "^4.0.1"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -2,8 +2,8 @@
|
|||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"jsx": "react",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitAny": false,
|
||||
"noImplicitReturns": true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue