Skip to content

Commit 0fcf738

Browse files
authored
Merge pull request #314 from octogonz/main
Upgrade to Docusaurus 3.10.0
2 parents 52f2c4e + fa6ccc2 commit 0fcf738

66 files changed

Lines changed: 7366 additions & 6231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -15,59 +15,17 @@ The following websites are maintained in this monorepo:
1515
- https://rushstack.io
1616
- https://tsdoc.org
1717

18-
## Targets
18+
## Local Development
1919

20-
The Docusaurus websites in this monorepo support a concept called "target", which describes the environment
21-
sites are being built for. There are 3 possible targets:
22-
23-
### "local"
24-
25-
The `local` target is intended for use when a Docusaurus development server is running locally. This
26-
target will automatically be selected if you run `rushx start` in any of the website projects.
27-
28-
You can also force this target by setting the environment variable `TARGET=local`.
29-
30-
### "fork"
31-
32-
The `fork` target is intended for use when you are building static Docusaurus sites for deployment,
33-
but you'll be deploying them to GitHub Pages on your fork of the `rushstack-websites` project. This is
34-
useful for deploying demo sites to share with others, to test on phones and tablets, etc. This target
35-
will automatically be selected if you run a production build (`rushx build`) of a website project and
36-
you have cloned a _fork_ of the `rushstack-websites` project.
37-
38-
You can also force this target by setting the environment variable `TARGET=fork`.
39-
40-
### "prod"
41-
42-
The `prod` target is intended for use when you will be deploying a website project to GitHub Pages
43-
in its live production repo. Typically this target is only used by a CI pipeline, and it is automatically
44-
selected if you run a production build on a clone of the `microsoft/rushstack-websites` repo.
45-
46-
You can also force this target by setting the environment variable `TARGET=prod`.
47-
48-
## Deploying a fork
49-
50-
To facilitate testing of multi-site changes, you can opt to build and deploy all of the website projects
51-
at once from a fork of `rushstack-websites`. To do so, first make sure you've forked the project
52-
and cloned your fork locally, and then run:
20+
To run a website locally:
5321

5422
```bash
5523
rush install
5624
rush build
57-
GIT_USER=<your-git-username> rush deploy-fork
25+
cd websites/<site-name>
26+
rushx start
5827
```
5928

60-
The commands above will automatically build all of the supported websites with `TARGET=fork`, then deploy
61-
them in a group to the `gh-pages` branch of your forked repo. You can then access these sites via individual
62-
site paths, for example:
63-
64-
```text
65-
https://<your-git-username>.github.io/rushstack-websites/rushstack.io/
66-
```
67-
68-
Cross-site links between the different sites will automatically be linked up to navigate to your deployed
69-
versions of those sites.
70-
7129
## Deploying to production
7230

7331
The production Rushstack websites are deployed periodically by the maintainers using an Azure DevOps pipeline. Check the badge at the top of this README for the latest status and deployment history.

common/config/rush/.pnpmfile.cjs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ function readPackage(packageJson, context) {
3535

3636
if (packageJson.dependencies) {
3737
// The docusaurus-theme-search-typesense project does not keep up with latest Docusaurus releases.
38-
if (packageJson.name === 'docusaurus-theme-search-typesense') {
38+
if (
39+
packageJson.name === 'docusaurus-theme-search-typesense' ||
40+
packageJson.name === 'typesense-docsearch-react'
41+
) {
3942
const docusaurusPackageNames = [
4043
'@docusaurus/core',
4144
'@docusaurus/logger',
@@ -47,14 +50,25 @@ function readPackage(packageJson, context) {
4750
];
4851
for (const docusaurusPackageName of docusaurusPackageNames) {
4952
if (packageJson.dependencies[docusaurusPackageName]) {
50-
packageJson.dependencies[docusaurusPackageName] = '2.3.1';
53+
packageJson.dependencies[docusaurusPackageName] = '3.10.0';
5154
}
5255
if (packageJson.peerDependencies[docusaurusPackageName]) {
53-
packageJson.peerDependencies[docusaurusPackageName] = '2.3.1';
56+
packageJson.peerDependencies[docusaurusPackageName] = '3.10.0';
57+
}
58+
}
59+
60+
const reactPackageNames = ['react', 'react-dom'];
61+
for (const reactPackageName of reactPackageNames) {
62+
if (packageJson.peerDependencies[reactPackageName]) {
63+
packageJson.peerDependencies[reactPackageName] = '^19.2.5';
5464
}
5565
}
56-
}
5766

67+
if (packageJson.peerDependencies['@types/react']) {
68+
packageJson.peerDependencies['@types/react'] = '^19.2.14';
69+
}
70+
}
71+
/*
5872
// This is a workaround for what a possible PNPM bug? Because "@docusaurus/types" is an optional
5973
// peer dependency, we end up with side-by-side installs of "@docusaurus/theme-common" etc whose
6074
// only difference is whether "@docusaurus/types" was included.
@@ -67,6 +81,7 @@ function readPackage(packageJson, context) {
6781
// https://github.com/facebook/docusaurus/issues/7275
6882
packageJson.dependencies['trim'] = '^1.0.0';
6983
}
84+
*/
7085
}
7186

7287
return packageJson;

common/config/rush/command-line.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111
* "rush my-global-command --help".
1212
*/
1313
"commands": [
14-
{
15-
"commandKind": "global",
16-
"name": "deploy-fork",
17-
"summary": "Deploy your local websites to GitHub Pages",
18-
"description": "Deploy all local websites from your fork of rushstack-websites up to GitHub Pages for testing",
19-
"safeForSimultaneousRushProcesses": false,
20-
"shellCommand": "cd tools/deploy-fork && rushx deploy"
21-
},
22-
2314
{
2415
"name": "prettier",
2516
"commandKind": "global",

common/config/rush/pnpm-config.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@
231231
* PNPM documentation: https://pnpm.io/package_json#pnpmoverrides
232232
*/
233233
"globalOverrides": {
234-
// "example1": "^1.0.0",
235-
// "example2": "npm:@company/example2@^1.0.0"
234+
"webpack": "5.98.0"
236235
},
237236

238237
/**
@@ -358,12 +357,7 @@
358357
*
359358
* PNPM documentation: https://pnpm.io/package_json#pnpmpatcheddependencies
360359
*/
361-
"globalPatchedDependencies": {
362-
"typesense-docsearch-react@0.2.3": "patches/typesense-docsearch-react@0.2.3.patch",
363-
"@docusaurus/theme-classic@2.3.1": "patches/@docusaurus__theme-classic@2.3.1.patch",
364-
"docusaurus-theme-search-typesense@0.9.0": "patches/docusaurus-theme-search-typesense@0.9.0.patch",
365-
"react-loadable-ssr-addon-v5-slorber": "patches/react-loadable-ssr-addon-v5-slorber.patch"
366-
},
360+
"globalPatchedDependencies": {},
367361

368362
/**
369363
* (USE AT YOUR OWN RISK) This is a free-form property bag that will be copied into

0 commit comments

Comments
 (0)