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
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@loopback/docs": "latest",
"chalk": "^5.6.2",
"fs-extra": "^11.3.6",
"glob": "^13.0.6",
"markdownlint-cli": "^0.49.0",
"retry": "^0.13.1",
"swagger-ui-dist": "^5.32.8",
Expand Down
17 changes: 17 additions & 0 deletions update-lb4-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const fs = require('fs-extra');
const path = require('path');
const yaml = require('js-yaml');
const assert = require('assert');
const {glob} = require('glob');

const srcDocs = path.resolve(__dirname,'node_modules/@loopback/docs/site');
const destDocs = path.resolve(__dirname, 'pages/en/lb4');
Expand Down Expand Up @@ -83,6 +84,22 @@ function copyFile(input) {
// Most of the connector doc files are in the lb3 dir, copy them for lb4
copyFile(connectorsReference);

const fixApidocs = async () => {
const apidocsFiles = await glob(path.resolve(destDocs, 'apidocs/**/*.md'));
for (apidocsFile of apidocsFiles) {
try {
let contents = fs.readFileSync(apidocsFile, 'utf-8');
contents = contents.replaceAll('<td>', '<td markdown="1">');
fs.writeFileSync(apidocsFile, contents, 'utf-8');
} catch (err) {
console.error('failed to update apidocs index %s', err.stack);
process.exit(1);
}
}
}

fixApidocs();

const fileToUpdate = path.resolve(destDocs, 'Testing-the-API.md');

// bug in `jekyll-relative-links` plugin; probably safe to remove when
Expand Down