Fossil Forum

Did anyone integrate mermaid into fossil ?
Login

Did anyone integrate mermaid into fossil ?

Did anyone integrate mermaid into fossil ?

(1) By Norbert (NorbertK) on 2023-01-25 07:50:12 [link] [source]

Hello all,

i like mermaid very much and would like to see it rendered in Project documentation and (markdown) Wiki pages.

I assume it should be possible to inetegrate ist along these lines Forum post about highlight.js .

Did anyone do this for mermaid and would like to share some ideas ?

Thank you

Norbert

(2) By sean (jungleboogie) on 2023-01-25 18:08:07 in reply to 1 [link] [source]

Are you familiar with pikchr?

(3) By Norbert (NorbertK) on 2023-01-26 12:21:18 in reply to 2 [link] [source]

Not too familiar. And i want to avoid to learn another special language. I use mermaid anyway, so I prefer it.

(4) By Konstantin Khomutov (kostix) on 2023-01-26 16:59:44 in reply to 3 [link] [source]

The idea basically boils down to Fossil already having support for a diagram drawing language.

I do understand that not needing to learn new tricks and having an ability to just import existing code is very nice, but adding any new feature means spending scarce work budget on the implementation and then the requirement to support it forever.

Even if it's a ready-made JS module which would exist purely in the UI part, there's still a question of keeping it in sync — at a minimum to ensure security, and such synchronization must not break things (when the upstream decides to break them), which is a QA issue required to be carried out by someone.

(5) By Stephan Beal (stephan) on 2023-01-26 17:12:12 in reply to 4 [link] [source]

... there's still a question of keeping it in sync — at a minimum to ensure security,

To add to that: as a rule, we don't integrate 3rd-party JS code into fossil, for reasons of licensing, maintenance, and security, so mermaid support would need to be added by the client via the skinning mechanism or a customized fossil binary.

To the best of my recollection nobody has specifically brought up mermaid before, but we have seen highlight.js and prism.js integrated and know that the same process can be used for essentially arbitrary JS libraries.

(6) By Konstantin Khomutov (kostix) on 2023-01-26 17:21:56 in reply to 5 [source]

Mermaid is indeed not bad for simple things, and it's supported out of the box in on Github and in GitLab which might be greatly helping its adoption no matter its technical properties (compared to alternatives).

It also has an online editor with a feature of being able to generate an URL out of your diagram which encodes the diagram's source, so you can just share a (long and unwieldy) URL with someone, and they will be able to see it rendered in that editor by merely navigating the URL. FWIW, at my $dayjob it's quite popular (along with draw.io for more hard-core stuff).

(7.1) By Norbert (NorbertK) on 2023-01-28 11:02:45 edited from 7.0 in reply to 4 [link] [source]

I understand that you don't want to implement this as a feature.

I look for a way to bolt it on in my installation . I read the forum posts which described something similar and wondered wether someone did it with maermaid.

UPDATE:

I understand, that this can't work, because the javascript works not during the rendering of pages.

Sorry for the noise

(8) By notlibrary on 2023-02-04 15:27:09 in reply to 1 [link] [source]

Sorry for interrupting last week I integrated pikchr.c artifact using emcc compiler into Obsidian note taking app as a markdown fenced code block postprocessing commmunity plugin that runs entirely in client app js environment

Here is the repo prooflink It works perfectly fine

I have tons of personal floating text files that not worth version control neither delete but quick pikchr diagram in one of this text notes maybe(or not) extremly useful for anyone out there

Is it acceptable usage of this code base? Is anyone actually interested in taking pikchr diagram notes?

(9) By Stephan Beal (stephan) on 2023-02-04 15:45:08 in reply to 8 [link] [source]

last week I integrated pikchr.c artifact using emcc compiler into Obsidian

If you would, please also post that over in the pikchr forum and i'll get a link to it added to the "external links" section of the pikchr page.

(10) By notlibrary on 2023-02-04 16:43:11 in reply to 9 [link] [source]