Skip to content
Merged
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
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ npm run start
```bash
# Development
npm run start # Start development server
npm run start-chok # Start development server with polling (for network drives)

# Building & Testing
npm run build # Full production build
Expand All @@ -100,6 +101,26 @@ npm run clear # Clear Docusaurus cache
npm run serve # Serve production build after `npm run build`
```

### Building/Running Specific Products

You can build or run the documentation for a single product using the `DOCS_PRODUCT` environment variable:

**Windows (PowerShell):**
```powershell
$ENV:DOCS_PRODUCT="pingcastle"
npm run start
```

**Unix/Linux/macOS:**
```bash
export DOCS_PRODUCT="pingcastle"
npm run start
```

This works with any command (`start`, `start-chok`, `build`) and speeds up development when working on a single product. Available product IDs can be found in `src/config/products.js`.

*Note: you may get a warning when you first run this. This warning doesn't seem to appear again and the site worked as expected*

### Development Workflow

The centralized system makes development simple:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"docusaurus": "npx docusaurus",
"start": "cross-env NODE_OPTIONS=--max-old-space-size=16384 CHOKIDAR_USEPOLLING=false npx docusaurus start --port=4500 --no-open",
"build": "NODE_OPTIONS=--max-old-space-size=16384 npx docusaurus build",
"start-chok": "cross-env NODE_OPTIONS=--max-old-space-size=16384 CHOKIDAR_USEPOLLING=true npx docusaurus start --port=4500 --no-open",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=16384 npx docusaurus build",
"swizzle": "npx docusaurus swizzle",
"clear": "npx docusaurus clear",
"serve": "npx serve -s build -l 8080",
Expand Down
8 changes: 7 additions & 1 deletion src/config/products.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,14 @@ export function getDefaultProduct() {
*/
export function generateDocusaurusPlugins() {
const plugins = [];

// Filter products if DOCS_PRODUCT environment variable is set
const targetProduct = process.env.DOCS_PRODUCT;
const productsToProcess = targetProduct
? PRODUCTS.filter(product => product.id === targetProduct)
: PRODUCTS;

PRODUCTS.forEach((product) => {
productsToProcess.forEach((product) => {
product.versions.forEach((version) => {
const pluginId = generatePluginId(product.id, version.version);
const routeBasePath = generateRouteBasePath(product.path, version.version);
Expand Down