Mermaid is a diagramming and charting tool that allows diagrams to be drawn using Markdown inspired syntax.
For more information, refer to Mermaid
Github enables mermaid, so it would be nice for this to be available in the main web site and discourse forum as well.
I believe there is a Discourse plugin for mermaid:
Discourse-Mermaid plugin
Ric
August 6, 2023, 9:00am
2
Adding @musiko to the conversation.
Is this something that would be possible to add?
Any idea of pros and cons?
1 Like
musiko
August 6, 2023, 9:36am
3
What would be the purpose of the change? What would it accomplish, that was lacking until now?
2 Likes
I believe @christie is referring to the style of posting sheās currently doing on her website:
1 Like
musiko
August 6, 2023, 10:20am
5
I understand, but what would be an added benefit of enabling this directly on the forum, as opposed to linking to the source?
3 Likes
I would like to be able to embed these diagrams directly in a post, rather than embedding an image, which requires more storage.
Ric
August 6, 2023, 10:55am
7
Thanks Musiko, good point. The question would be about expected usage in the forum
What are some examples of use cases for these diagrams, please?
Please have a look at this GitHub issue:
opened 04:06PM - 26 Jul 23 UTC
#### User story
https://discourse.suttacentral.net/t/a-twelve-week-course-on-pa⦠li-for-serious-students-by-bhante-sujato/29730/45
> a word by word transliteration, followed by a ānatural Englishā translation
"Thatās a really useful approach. In fact, it is something that Iād be delighted to see someone take up on SuttaCentral. Even just for selected suttas, having both word-by-word and idiomatic translations together would be really helpful." -Sujato Jul 26
#### Feature description
A mode to view a literal translation word-by-word in a text.
Options:
- place the translated words directly below the original? How would the text align
- force the regular translation to show, too?
- place the translated words line by line, dividing the page into 3 sections
- some words don't have direct translations, should we employ another dictionary? Or even allow user entered/voted on translations
- would it generate this live? Or pre-process every text
- which languages does this work for?
#### Acceptance criteria (the list of things that need to be done for the ticket to be considered finished):
Something that:
- allows some option that will show transliterations of any text in some way
- that at least lets users better understand the meaning of the text
#### Pre milestone planning check:
- [ ] Small enough to completed in a milestone.
- [ ] Dependencies marked
- [ ] No external dependencies block the PBI from being completed.
- [ ] Details are understood by dev team to decide if the PBI can be completed.
#### Done check:
- [ ] Produced code for presumed functionalities
- [ ] Project builds without errors
- [ ] Peer Code Review performed/pull request approved x2
- [ ] Project deployed on the stage environment identical to production platform
- [ ] Feature is tested against acceptance criteria
- [ ] Feature ok-ed by Product Owner (moving to Closed on the Board)
- [ ] Refactoring completed
- [ ] Any configuration or build changes documented (readme, etc...)
As per @sujato ās suggestion, I am experimenting with a way of doing trilinear translation of Pali suttas, combined with grammatical analysis. I am playing with the idea of using pseudo UML diagrams to convey the grammatical analysis. I would like to post such diagrams on Discourse for others to provide feedback. It will be much easier if I can embed the diagrams directly into a post rather than link to a webpage every time. Because then I have to create and publish that webpage first.
If this method proves to be of merit, the next step is I would like to publish these translations on Bilara. If we enable mermaid support in Bilara/suttacentral, then such translations can be published without any further changes to Bilara.
2 Likes
musiko
August 6, 2023, 12:38pm
9
Iām usually reluctant to add extensions (especially third party unmaintained plugins) for maintenance and stability reasons, but in this case you might just be in luck, since there is an official theme component, which I can enable on the fly.
Here are the instructions on how to use the syntax inside the post:
:discourse2: Summary Discourse Mermaid lets you create very powerful graphs using the Mermaid syntax. š Preview Preview on theme-creator.discourse.org š Repository Link https://github.com/discourse/discourse-mermaid-theme-component š New to...
Reading time: 3 mins š
Likes: 69 ā¤
5 Likes
musiko
August 6, 2023, 12:50pm
10
classDiagram
class `tathÄgato bhÄsati` {
<<sentence>>
english(The TathÄgata speaks)
}
class tathÄgato {
<<noun>>
masculine
nominative
singular
english("thus-gone")
}
class bhÄsati {
<<verb>>
ābhÄs
present
3rd person
singular
english(speaks)
}
`tathÄgato bhÄsati` *-- tathÄgato : agent
`tathÄgato bhÄsati` *-- bhÄsati : action
5 Likes
flowchart LR
you(((you)))
thank --> you
2 Likes
sujato
August 6, 2023, 10:30pm
12
Awesome, nice additions folks! Mermaid is great, Iāve used it a few times, I had no idea you could add it to Discourse!