Skip to content

Commit 04776e0

Browse files
CopilotB4nan
andauthored
docs: bump Docusaurus to v3.9.1 (#1428)
This PR updates the website's Docusaurus installation from v3.8.1 to v3.9.1 and applies the configuration changes from [apify/crawlee#3175](apify/crawlee#3175) to fix search modal styles after the docsearch v4 update. ## Changes Made ### Package Updates - Updated all Docusaurus packages from `3.8.1` to `3.9.1`: - `@docusaurus/core` - `@docusaurus/faster` - `@docusaurus/mdx-loader` - `@docusaurus/plugin-client-redirects` - `@docusaurus/preset-classic` - `@docusaurus/theme-mermaid` - `@docusaurus/module-type-aliases` - `@docusaurus/types` - Added `@mermaid-js/layout-elk@^0.1.5` dependency for enhanced Mermaid diagram support ### Configuration Updates Updated `docusaurus.config.js` to match the new v3.9.1 configuration structure: - **Simplified broken link handling**: Removed TypeScript type annotations from `onBrokenLinks` configuration - **Restructured markdown configuration**: Moved `onBrokenMarkdownLinks` from top-level to `markdown.hooks.onBrokenMarkdownLinks` - **Enhanced markdown options**: Maintained mermaid support while adopting the new hooks-based configuration ### CSS Fixes Applied DocSearch styling fixes in `custom.css`: - Added `.DocSearch-Clear` color styling for better visibility - Removed `flex-direction: row-reverse` from `.DocSearch-Form` to fix search input layout issues ## Testing The website builds successfully with the new Docusaurus version and all functionality is preserved. The search modal styling issues present in the previous version have been resolved. ## Impact This update brings the website up to the latest stable Docusaurus version, improving performance and fixing known issues with the search functionality while maintaining full backward compatibility. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > update docusaurus to v3.9.1 and modify the config the same way as in @apify/crawlee/pull/3175, and add `@mermaid-js/layout-elk` to the website dependencies > > do this inside the `website` folder, where the docusaurus project lives </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: B4nan <[email protected]>
1 parent 0e75587 commit 04776e0

File tree

4 files changed

+983
-631
lines changed

4 files changed

+983
-631
lines changed

website/docusaurus.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ module.exports = {
7373
gaGtag: true,
7474
repoUrl: 'https://github.com/apify/crawlee-python',
7575
},
76+
onBrokenLinks: 'throw',
7677
markdown: {
7778
mermaid: true,
79+
hooks: {
80+
onBrokenMarkdownLinks: 'throw',
81+
},
7882
},
7983
themes: [
8084
'@docusaurus/theme-mermaid',
8185
],
82-
onBrokenLinks:
83-
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('throw'),
84-
onBrokenMarkdownLinks:
85-
/** @type {import('@docusaurus/types').ReportingSeverity} */ ('throw'),
8686
presets: /** @type {import('@docusaurus/types').PresetConfig[]} */ ([
8787
[
8888
'@docusaurus/preset-classic',

website/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"devDependencies": {
1919
"@apify/eslint-config-ts": "^0.4.0",
2020
"@apify/tsconfig": "^0.1.0",
21-
"@docusaurus/module-type-aliases": "3.8.1",
22-
"@docusaurus/types": "3.8.1",
21+
"@docusaurus/module-type-aliases": "3.9.1",
22+
"@docusaurus/types": "3.9.1",
2323
"@types/react": "^19.0.0",
2424
"@typescript-eslint/eslint-plugin": "8.44.0",
2525
"@typescript-eslint/parser": "8.44.0",
@@ -36,14 +36,15 @@
3636
"dependencies": {
3737
"@apify/docusaurus-plugin-typedoc-api": "^4.4.7",
3838
"@apify/utilities": "^2.8.0",
39-
"@docusaurus/core": "3.8.1",
40-
"@docusaurus/faster": "3.8.1",
41-
"@docusaurus/mdx-loader": "3.8.1",
42-
"@docusaurus/plugin-client-redirects": "3.8.1",
43-
"@docusaurus/preset-classic": "3.8.1",
44-
"@docusaurus/theme-mermaid": "3.8.1",
39+
"@docusaurus/core": "3.9.1",
40+
"@docusaurus/faster": "3.9.1",
41+
"@docusaurus/mdx-loader": "3.9.1",
42+
"@docusaurus/plugin-client-redirects": "3.9.1",
43+
"@docusaurus/preset-classic": "3.9.1",
44+
"@docusaurus/theme-mermaid": "3.9.1",
4545
"@giscus/react": "^3.0.0",
4646
"@mdx-js/react": "^3.0.1",
47+
"@mermaid-js/layout-elk": "^0.1.5",
4748
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.1",
4849
"axios": "^1.5.0",
4950
"buffer": "^6.0.3",

website/src/css/custom.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,10 @@ div[class^="announcementBar_"] button {
761761
}
762762
}
763763

764+
.DocSearch-Clear {
765+
color: var(--color-text-subtle);
766+
}
767+
764768
.DocSearch-Form {
765769
border-radius: 6px;
766770
border-radius: var(--Radius-6, 6px);
@@ -769,7 +773,6 @@ div[class^="announcementBar_"] button {
769773
box-shadow: none;
770774
height: 40px;
771775
padding: 8px 12px;
772-
flex-direction: row-reverse;
773776
}
774777

775778
.DocSearch-Input {

0 commit comments

Comments
 (0)