Skip to content

Commit f9f2109

Browse files
committed
more changes
1 parent c4910ae commit f9f2109

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ yarn-error.log*
2222
lerna-debug.log
2323

2424
/data
25-
/classes
25+
/classes
26+
/docs

docusaurus.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const config: Config = {
4343
{
4444
docs: {
4545
sidebarPath: require.resolve('./sidebars.js'),
46+
exclude: ['ref/**'],
4647
},
4748
theme: {
4849
customCss: require.resolve('./src/css/custom.css'),

plugins/cls-loader/src/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ export default function clsLoaderPlugin(
137137
const rootRoutes = await Promise.all(
138138
content.loadedVersions.map(async (loadedVersion) => {
139139
const version = loadedVersion.versionName;
140-
// console.log(context.generatedFilesDir)
141-
generateClassDocs(actions, path.join(context.generatedFilesDir, version), loadedVersion.classes);
140+
generateClassDocs(actions, path.join(context.siteDir, "docs", version), loadedVersion.classes);
142141

143142
// Define version metadata for all pages. We need to use the same structure as
144143
// "docs" so that we can utilize the same React components.

plugins/cls-loader/src/plugin/classes.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ function reshapeHTML(text) {
203203
text = text.join(" ");
204204
}
205205
text = text.replaceAll(/<[^>]*>/gi, "");
206-
text = text.replaceAll(/\[/gi, "\[");
207-
return text
206+
text = text.replaceAll(/\[/gi, "[");
207+
return text;
208208
text = text.replaceAll(/\]/gi, "]");
209209
text = text.replaceAll(/\<br\s*\/?\>/gi, "\n\n");
210210
text = text.replaceAll(/\<\/?p\>/gi, "\n\n");
@@ -269,7 +269,6 @@ function membersToMarkdown(
269269
}
270270

271271
export async function generateDoc(classFile, noCode: boolean = true) {
272-
console.log("generateDoc", classFile);
273272
const classContent = (await readFile(classFile)).toString();
274273
const classDef: ClassDefinition = parseClassFile(classContent);
275274

@@ -290,6 +289,7 @@ ${asCode(classDef.Class.code)}
290289
291290
${noCode ? "" : originalCode}
292291
`;
292+
return documentation;
293293
documentation += membersToMarkdown(
294294
classFile,
295295
"Parameters",

plugins/cls-loader/src/plugin/sidebar.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ export function extractSidebar(
4040
items: subItems,
4141
label: item.name,
4242
type: "category",
43-
link: {
44-
type: 'link',
45-
href: 'test',
46-
},
43+
// link: {
44+
// type: 'link',
45+
// href: 'test',
46+
// },
4747
} as const;
4848
});
4949

50-
const sidebar = items.filter((item) => "items" in item && items.length > 0);
50+
// const sidebar = items.filter((item) => "items" in item && items.length > 0);
5151

5252
// console.log("sidebar", JSON.stringify(sidebar, null, 2));
5353

static/img/intersystems-docs.svg

+8-1
Loading

0 commit comments

Comments
 (0)