Skip to content

Commit cc852b2

Browse files
docs: add Ask AI feature (#744)
## Description - bumped `docusaurus`, `react`, `node` and `t-rex-ui` versions for our docs - added `Docsearch Ask AI` feature to our docs - configured Algolia Ask AI assistant - updated `docs-build-check` workflow to use required node version (`20+`) ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [ ] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [x] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions - try to build docs locally (`yarn build -> yarn serve`) from this branch ### Screenshots https://github.com/user-attachments/assets/0eaabb6e-7c97-4c20-bb16-16d693970791 https://github.com/user-attachments/assets/201202ff-8c9f-48b3-b36d-eb25609e10b9 ### Related issues <!-- Link related issues here using #issue-number --> ### Checklist - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [ ] My changes generate no new warnings ### Additional notes <!-- Include any additional information, assumptions, or context that reviewers might need to understand this PR. -->
1 parent eece898 commit cc852b2

File tree

4 files changed

+1856
-1106
lines changed

4 files changed

+1856
-1106
lines changed

.github/workflows/docs-build-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
steps:
2727
- name: Checkout repository
2828
uses: actions/checkout@v3
29-
- name: Use Node.js 18
30-
uses: actions/setup-node@v2
29+
- name: Use Node.js 20
30+
uses: actions/setup-node@v4
3131
with:
32-
node-version: 18
32+
node-version: 20
3333
- name: Install node dependencies
3434
working-directory: ${{ env.WORKING_DIRECTORY }}
3535
run: yarn install --immutable

docs/docusaurus.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,20 @@ const config = {
107107
appId: '9PIVJVUUXB',
108108
apiKey: '8634751cfd500c6708f63ea5fc7446c6',
109109
indexName: 'swmansion',
110+
askAi: {
111+
appId: '9PIVJVUUXB',
112+
apiKey: '8634751cfd500c6708f63ea5fc7446c6',
113+
assistantId: 'MZHkLL8cFqAN',
114+
indexName: 'swmansion-markdown-for-llms',
115+
},
110116
},
111117
}),
118+
customFields: {
119+
algolia: {
120+
suggestedQuestions: true,
121+
enableSidePanel: true,
122+
},
123+
},
112124
};
113125

114126
module.exports = config;

docs/package.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,27 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "3.7.0",
19-
"@docusaurus/plugin-sitemap": "3.7.0",
20-
"@docusaurus/preset-classic": "3.7.0",
18+
"@docsearch/core": "^4.4.0",
19+
"@docsearch/css": "^4.4.0",
20+
"@docsearch/sidepanel": "^4.4.0",
21+
"@docusaurus/core": "^3.9.2",
22+
"@docusaurus/plugin-sitemap": "^3.9.2",
23+
"@docusaurus/preset-classic": "^3.9.2",
24+
"@emotion/react": "^11.14.0",
25+
"@emotion/styled": "^11.14.1",
2126
"@mdx-js/react": "^3.0.0",
22-
"@swmansion/t-rex-ui": "1.0.1",
27+
"@mui/material": "^7.3.7",
28+
"@swmansion/t-rex-ui": "^1.2.1",
2329
"clsx": "^2.1.0",
30+
"copy-text-to-clipboard": "^3.2.2",
2431
"prism-react-renderer": "^2.1.0",
25-
"react": "^18.2.0",
26-
"react-dom": "^18.2.0",
32+
"react": "^19.2.3",
33+
"react-dom": "^19.2.3",
2734
"swiper": "^11.2.10"
2835
},
2936
"devDependencies": {
30-
"@docusaurus/module-type-aliases": "3.7.0",
31-
"@docusaurus/tsconfig": "3.7.0"
37+
"@docusaurus/module-type-aliases": "^3.9.2",
38+
"@docusaurus/tsconfig": "^3.9.2"
3239
},
3340
"browserslist": {
3441
"production": [
@@ -43,6 +50,6 @@
4350
]
4451
},
4552
"engines": {
46-
"node": ">=18.0"
53+
"node": ">=20.0"
4754
}
4855
}

0 commit comments

Comments
 (0)