Skip to content

Commit 487fa43

Browse files
Copilotnickytonline
andcommitted
Fix redocusaurus plugin and remove test documentation file
- Restore redocusaurus plugin with conditional loading based on environment - Remove DOCUSAURUS_FASTER_RESULTS.md test file that shouldn't be committed - Add DISABLE_REDOCUSAURUS environment variable to handle network-restricted environments - Ensures API documentation works in production while handling test environment constraints Co-authored-by: nickytonline <833231+nickytonline@users.noreply.github.com>
1 parent fdcb90e commit 487fa43

File tree

2 files changed

+17
-96
lines changed

2 files changed

+17
-96
lines changed

DOCUSAURUS_FASTER_RESULTS.md

Lines changed: 0 additions & 84 deletions
This file was deleted.

docusaurus.config.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const webpack = require('webpack');
66

77
dotenv.config();
88

9+
// Check if we should include redocusaurus (disable in environments with network restrictions)
10+
const includeRedocusaurus = process.env.DISABLE_REDOCUSAURUS !== 'true';
11+
912
const config = {
1013
title: 'Pomerium',
1114
tagline: 'Documentation',
@@ -79,18 +82,20 @@ const config = {
7982
},
8083
},
8184
],
82-
// Temporarily disabled redocusaurus due to network connectivity issues in test environment
83-
// [
84-
// 'redocusaurus',
85-
// {
86-
// specs: [
87-
// {
88-
// spec: 'https://console.pomerium.app/openapi.yaml',
89-
// route: '/docs/api/',
90-
// },
91-
// ],
92-
// },
93-
// ],
85+
// Conditionally include redocusaurus based on environment
86+
...(includeRedocusaurus ? [
87+
[
88+
'redocusaurus',
89+
{
90+
specs: [
91+
{
92+
spec: 'https://console.pomerium.app/openapi.yaml',
93+
route: '/docs/api/',
94+
},
95+
],
96+
},
97+
],
98+
] : []),
9499
],
95100

96101
themeConfig: {

0 commit comments

Comments
 (0)