Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 4 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,59 +15,17 @@ The following websites are maintained in this monorepo:
- https://rushstack.io
- https://tsdoc.org

## Targets
## Local Development

The Docusaurus websites in this monorepo support a concept called "target", which describes the environment
sites are being built for. There are 3 possible targets:

### "local"

The `local` target is intended for use when a Docusaurus development server is running locally. This
target will automatically be selected if you run `rushx start` in any of the website projects.

You can also force this target by setting the environment variable `TARGET=local`.

### "fork"

The `fork` target is intended for use when you are building static Docusaurus sites for deployment,
but you'll be deploying them to GitHub Pages on your fork of the `rushstack-websites` project. This is
useful for deploying demo sites to share with others, to test on phones and tablets, etc. This target
will automatically be selected if you run a production build (`rushx build`) of a website project and
you have cloned a _fork_ of the `rushstack-websites` project.

You can also force this target by setting the environment variable `TARGET=fork`.

### "prod"

The `prod` target is intended for use when you will be deploying a website project to GitHub Pages
in its live production repo. Typically this target is only used by a CI pipeline, and it is automatically
selected if you run a production build on a clone of the `microsoft/rushstack-websites` repo.

You can also force this target by setting the environment variable `TARGET=prod`.

## Deploying a fork

To facilitate testing of multi-site changes, you can opt to build and deploy all of the website projects
at once from a fork of `rushstack-websites`. To do so, first make sure you've forked the project
and cloned your fork locally, and then run:
To run a website locally:

```bash
rush install
rush build
GIT_USER=<your-git-username> rush deploy-fork
cd websites/<site-name>
rushx start
```

The commands above will automatically build all of the supported websites with `TARGET=fork`, then deploy
them in a group to the `gh-pages` branch of your forked repo. You can then access these sites via individual
site paths, for example:

```text
https://<your-git-username>.github.io/rushstack-websites/rushstack.io/
```

Cross-site links between the different sites will automatically be linked up to navigate to your deployed
versions of those sites.

## Deploying to production

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.
Expand Down
23 changes: 19 additions & 4 deletions common/config/rush/.pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ function readPackage(packageJson, context) {

if (packageJson.dependencies) {
// The docusaurus-theme-search-typesense project does not keep up with latest Docusaurus releases.
if (packageJson.name === 'docusaurus-theme-search-typesense') {
if (
packageJson.name === 'docusaurus-theme-search-typesense' ||
packageJson.name === 'typesense-docsearch-react'
) {
const docusaurusPackageNames = [
'@docusaurus/core',
'@docusaurus/logger',
Expand All @@ -47,14 +50,25 @@ function readPackage(packageJson, context) {
];
for (const docusaurusPackageName of docusaurusPackageNames) {
if (packageJson.dependencies[docusaurusPackageName]) {
packageJson.dependencies[docusaurusPackageName] = '2.3.1';
packageJson.dependencies[docusaurusPackageName] = '3.10.0';
}
if (packageJson.peerDependencies[docusaurusPackageName]) {
packageJson.peerDependencies[docusaurusPackageName] = '2.3.1';
packageJson.peerDependencies[docusaurusPackageName] = '3.10.0';
}
}

const reactPackageNames = ['react', 'react-dom'];
for (const reactPackageName of reactPackageNames) {
if (packageJson.peerDependencies[reactPackageName]) {
packageJson.peerDependencies[reactPackageName] = '^19.2.5';
}
}
}

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

return packageJson;
Expand Down
9 changes: 0 additions & 9 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
* "rush my-global-command --help".
*/
"commands": [
{
"commandKind": "global",
"name": "deploy-fork",
"summary": "Deploy your local websites to GitHub Pages",
"description": "Deploy all local websites from your fork of rushstack-websites up to GitHub Pages for testing",
"safeForSimultaneousRushProcesses": false,
"shellCommand": "cd tools/deploy-fork && rushx deploy"
},

{
"name": "prettier",
"commandKind": "global",
Expand Down
10 changes: 2 additions & 8 deletions common/config/rush/pnpm-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@
* PNPM documentation: https://pnpm.io/package_json#pnpmoverrides
*/
"globalOverrides": {
// "example1": "^1.0.0",
// "example2": "npm:@company/example2@^1.0.0"
"webpack": "5.98.0"
},

/**
Expand Down Expand Up @@ -358,12 +357,7 @@
*
* PNPM documentation: https://pnpm.io/package_json#pnpmpatcheddependencies
*/
"globalPatchedDependencies": {
"typesense-docsearch-react@0.2.3": "patches/typesense-docsearch-react@0.2.3.patch",
"@docusaurus/theme-classic@2.3.1": "patches/@docusaurus__theme-classic@2.3.1.patch",
"docusaurus-theme-search-typesense@0.9.0": "patches/docusaurus-theme-search-typesense@0.9.0.patch",
"react-loadable-ssr-addon-v5-slorber": "patches/react-loadable-ssr-addon-v5-slorber.patch"
},
"globalPatchedDependencies": {},

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