This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new aeaa9c4aa Fix documentation build issue.
aeaa9c4aa is described below

commit aeaa9c4aa30c19b3a1b137e114fb47ef58946d63
Author: James Bognar <[email protected]>
AuthorDate: Tue Sep 23 10:19:00 2025 -0400

    Fix documentation build issue.
---
 juneau-docs-poc/package.json               |  1 -
 juneau-docs-poc/scripts/preprocess-docs.js | 28 +++++++++++++++++++++++-----
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/juneau-docs-poc/package.json b/juneau-docs-poc/package.json
index b2b47935d..c9a9b1974 100644
--- a/juneau-docs-poc/package.json
+++ b/juneau-docs-poc/package.json
@@ -20,7 +20,6 @@
     "@docusaurus/preset-classic": "3.8.1",
     "@mdx-js/react": "^3.0.0",
     "clsx": "^2.0.0",
-    "glob": "^10.3.0",
     "markdown-it": "^14.1.0",
     "prism-react-renderer": "^2.3.0",
     "react": "^19.0.0",
diff --git a/juneau-docs-poc/scripts/preprocess-docs.js 
b/juneau-docs-poc/scripts/preprocess-docs.js
index 2758505df..07b4fff9d 100644
--- a/juneau-docs-poc/scripts/preprocess-docs.js
+++ b/juneau-docs-poc/scripts/preprocess-docs.js
@@ -23,7 +23,6 @@
 
 const fs = require('fs');
 const path = require('path');
-const glob = require('glob');
 
 // Configuration
 const JUNEAU_VERSION = '9.0.1';
@@ -82,6 +81,26 @@ function processFile(filePath) {
   }
 }
 
+/**
+ * Recursively find all .md files in a directory
+ */
+function findMarkdownFiles(dir, fileList = []) {
+  const files = fs.readdirSync(dir);
+  
+  for (const file of files) {
+    const filePath = path.join(dir, file);
+    const stat = fs.statSync(filePath);
+    
+    if (stat.isDirectory()) {
+      findMarkdownFiles(filePath, fileList);
+    } else if (file.endsWith('.md')) {
+      fileList.push(filePath);
+    }
+  }
+  
+  return fileList;
+}
+
 /**
  * Main preprocessing function
  */
@@ -89,15 +108,14 @@ function preprocessDocs() {
   const docsDir = path.join(__dirname, '../docs');
   
   // Find all markdown files
-  const markdownFiles = glob.sync('**/*.md', { cwd: docsDir });
+  const markdownFiles = findMarkdownFiles(docsDir);
   
   console.log(`📁 Found ${markdownFiles.length} markdown files`);
   
   let processedCount = 0;
   
-  for (const file of markdownFiles) {
-    const fullPath = path.join(docsDir, file);
-    if (processFile(fullPath)) {
+  for (const filePath of markdownFiles) {
+    if (processFile(filePath)) {
       processedCount++;
     }
   }

Reply via email to