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 578e2ed03 Fix documentation build issue.
578e2ed03 is described below
commit 578e2ed030b2fd10b84d356519e6423e4a01d10c
Author: James Bognar <[email protected]>
AuthorDate: Tue Sep 23 10:04:42 2025 -0400
Fix documentation build issue.
---
juneau-docs-poc/docusaurus.config.ts | 8 ++++----
juneau-docs-poc/src/plugins/remark-version-replacer.js | 13 +++++++------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/juneau-docs-poc/docusaurus.config.ts
b/juneau-docs-poc/docusaurus.config.ts
index 7605c79a1..dd6b93bbd 100644
--- a/juneau-docs-poc/docusaurus.config.ts
+++ b/juneau-docs-poc/docusaurus.config.ts
@@ -68,6 +68,10 @@ const config: Config = {
editUrl:
'https://github.com/apache/juneau/tree/main/juneau-docs-poc/juneau-documentation/',
remarkPlugins: [
+ [remarkVersionReplacer, {
+ version: '9.0.1',
+ apiDocsUrl: '../apidocs'
+ }],
[remarkJuneauLinks, {
packageAbbreviations: {
'oaj': 'org.apache.juneau',
@@ -80,10 +84,6 @@ const config: Config = {
'oajmj': 'org.apache.juneau.microservice.jetty',
},
javadocBaseUrl: '../apidocs'
- }],
- [remarkVersionReplacer, {
- version: '9.0.1',
- apiDocsUrl: '../apidocs'
}]
]
},
diff --git a/juneau-docs-poc/src/plugins/remark-version-replacer.js
b/juneau-docs-poc/src/plugins/remark-version-replacer.js
index 7b061622d..0867bd673 100644
--- a/juneau-docs-poc/src/plugins/remark-version-replacer.js
+++ b/juneau-docs-poc/src/plugins/remark-version-replacer.js
@@ -39,14 +39,15 @@ function remarkVersionReplacer(options = {}) {
const fileName = file.path || 'unknown';
console.log(`📄 Processing file: ${fileName}`);
- // Try different possible content properties
- const content = file.contents || file.value || file.data;
+ // Force update the primary content property that MDX uses
+ const content = file.value || file.contents || file.data || String(tree);
// Show content sample for files that should have placeholders
if (fileName.includes('10.01.00.JuneauRestClientBasics')) {
console.log(`🔍 SPECIFIC FILE DEBUG - ${fileName}:`);
console.log(`📋 File object keys: ${Object.keys(file).join(', ')}`);
console.log(`📋 Content type: ${typeof content}`);
+ console.log(`📋 Content source: ${file.value ? 'file.value' :
file.contents ? 'file.contents' : file.data ? 'file.data' : 'tree'}`);
if (content) {
const contentStr = String(content);
console.log(`📋 Content length: ${contentStr.length}`);
@@ -67,10 +68,10 @@ function remarkVersionReplacer(options = {}) {
const replacedContent = replaceInString(content, version, apiDocsUrl);
- // Update the content property we found
- if (file.contents) file.contents = replacedContent;
- if (file.value) file.value = replacedContent;
- if (file.data) file.data = replacedContent;
+ // Force update the primary content property that MDX uses (prioritize
'value')
+ file.value = replacedContent;
+ if (file.contents !== undefined) file.contents = replacedContent;
+ if (file.data !== undefined) file.data = replacedContent;
const stillHasPlaceholders = replacedContent.includes('{{API_DOCS}}') ||
replacedContent.includes('{{JUNEAU_VERSION}}');