Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
transform
zadam4385a02f6b5d
diff --git a/src/transform_api_docs.js b/src/transform_api_docs.jsindex 2db0f09a97..6791e2501c 100644--- a/src/transform_api_docs.js+++ b/src/transform_api_docs.js@@ -75,3 +75,67 @@ for (const sourcePath of sourceFiles) {console.log(destPath);}++const META_PATH = './docs/user_guide/!!!meta.json';+const meta = JSON.parse(fs.readFileSync(META_PATH).toString());++meta.files[0].children = meta.files[0].children.filter(note => note.title !== 'API docs');+meta.files[0].children.push(getApiMeta());++fs.writeFileSync(META_PATH, JSON.stringify(meta, null, 2));++function getApiMeta() {+ return {+ "isClone": false,+ "noteId": "_apiDocs",+ "notePath": [+ "_userGuide",+ "_apiDocs"+ ],+ "title": "API docs",+ "notePosition": 10,+ "prefix": null,+ "isExpanded": false,+ "type": "text",+ "mime": "text/html",+ "attributes": [],+ "format": "html",+ "dataFileName": "API docs.html",+ "children": [+ {+ "isClone": false,+ "noteId": "_frontendApi",+ "notePath": [+ "_userGuide",+ "_frontendApi"+ ],+ "title": "API docs",+ "notePosition": 10,+ "prefix": null,+ "isExpanded": false,+ "type": "text",+ "mime": "text/html",+ "attributes": [],+ "format": "html",+ "dataFileName": "FrontendScriptApi.html"+ },+ {+ "isClone": false,+ "noteId": "_backendApi",+ "notePath": [+ "_userGuide",+ "_backendApi"+ ],+ "title": "API docs",+ "notePosition": 20,+ "prefix": null,+ "isExpanded": false,+ "type": "text",+ "mime": "text/html",+ "attributes": [],+ "format": "html",+ "dataFileName": "BackendScriptApi.html"+ }+ ]+ };+}\ No newline at end of file