Comments (1)
For everyone else waiting on this feature, here is a patch solution based on @matteopini-horsa's proposed changes
Step 1) create file patch-compodoc.js
& add the code below
#!/usr/bin/env node
const fs = require('fs');
const compoMod = `${process.cwd()}/node_modules/@compodoc/compodoc`;
const updates = [
{ // filename 'index-cli-Cr-tk_1e.js' is unique to compodoc v1.1.24, this will need to be updated to reflect the correct path for whichever version you're on
target: `${compoMod}/dist/index-cli-Cr-tk_1e.js`,
search: `if (!language) {`,
replace: `if (language === 'mermaid') {
// setting the mermaid css class will enable the diagram to be rendered
return '<div class="mermaid">'+code+'</div>';
}
if (!language) {`,
},
{
target: `${compoMod}/src/templates/page.hbs`,
search: `<script src="{{relativeURL data.depth }}js/lazy-load-graphs.js"></script>`,
replace: `<script src="{{relativeURL data.depth }}js/lazy-load-graphs.js"></script>
<!-- loading mermaid library -->
<script src=" 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'"></script>`,
},
];
for (const update of updates) {
const data = fs.readFileSync(update.target);
const patched = data.toString().replace(update.search, update.replace);
fs.writeFileSync(update.target, patched);
}
console.log('successfully patched compodoc');
Step 2) update your docs script to something like below
node ./patch-compodoc.js && npx @compodoc/compodoc -p tsconfig.json -s
from compodoc.
Related Issues (20)
- [FEATURE] Replace babel for SWC HOT 1
- [BUG] Declaration Merging not working/supported
- [BUG] cannot exclude files from being scanned HOT 1
- [BUG] Dark mode switch doesn't work
- [BUG] Darkmode Switch Seems not to work HOT 1
- TypeError: Cannot read properties of undefined (reading 'getKindName') HOT 1
- [BUG] Layout broken on tablet and mobile
- [BUG] Input Signals implementation is excluding valid cases
- [BUG] Using deprecated packages: @babel/plugin-proposal-private-methods and vis
- [BUG] Dependency package PDF.js vulnerability CVE-2024-4367 HOT 1
- @shakedSetoo
- I can not create documentation of angular 16 project
- [BUG] cannot parse angular 17.3 output() function
- [BUG] HOT 1
- Interfaces that extend Omit<type, property> do not include the non Omitted types and documents as extending Omit
- Angular v16. while generating the Doc HOT 2
- [BUG] Watch doesn't work
- [BUG] Input Signals implementation excludes arrays of types
- [BUG] Input Signals are not correctly detected when default value is set
- [BUG] Dark mode - Active nav tab is fully white (unreadable) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compodoc.