Comments (11)
Retype v1.7.0
has been released and includes Mermaid support. See https://retype.com/components/mermaid/.
Hope this helps.
from retype.
The two markdown syntaxes I've seen for mermaidjs are:
The Azure Devops mermaid versions doesn't work with some syntax so its likely quite an old version of mermaid behind the scenes. As a result, I use the ``` mermaid syntax.
This feature request does lead to the question of retypeapp extensibility as there are other "syntaxes" that it would be useful to support. Examples include all of the various diagram types supported by Kroki and any other form of code or non-code syntaxes.
By making fenced code block ``` processing an extensibility point of retypedapp, it would allow customers to be able implement their own custom syntax renders. Of course, I'd prefer this extensibility to be part of the free offering, however its a clear point of differentiation for a commercial version 😸 .
What language/coding-environment is retypedapp written? The context of this question is what an extensibility or addin infrastructure could look like.
from retype.
The fenced Mermaid syntax should be easy for Retype to support. Just need to prioritize building this new feature into the release schedule.
Currently, Retype uses Markdig for our Markdown parsing and Markdig already supports fenced Mermaid and nomnoml syntax.
https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/DiagramsSpecs.md
Kroki looks very interesting. I'll try and work out some configuration, syntax, and extensibility ideas for integrating the diagram types with Retype. It's certainly possible. We need to add four more developers to our team to keep up with all the features in the pipeline. 🏄 We'll get to them all – one step at a time.
What language/coding-environment is retypedapp written?
The Retype app is written in C#. The output of the app is static files (.html, .js, .css, images, etc), so no specific server-side technology is required for your generated website hosting. But, yes, the entire main CLI app is written in C#, supported on Mac, Win, and Linux.
from retype.
Having access to all of the Markdig extensions would be fantastic if you would consider it sooner rather than later - especially if its easy to turn on within Retypeapp at your end. The Kroki link was primarily supplied as an FYI and nice-to-have.
The query on the retypeapp implementation language was primarily out of interest in extensibility. Enabling all of the Markdig extensions (or have them configurable in retype.json) would cover most of my currently anticipated extension needs.
from retype.
We are going to try and include Mermaid support in the upcoming Retype v1.7.0
release, which should happen early next week.
from retype.
Enabling all of the Markdig extensions (or have them configurable in retype.json) would cover most of my currently anticipated extension needs.
Essentially all the Markdig extensions are enabled currently, but some also require additional resources files to be selectively included on the page(s), such as the Mermaid .js
files. The Retype App needs to manage the inclusion of those files, so that is why out of the box extensions like Mermaid are not currently working.
We will certainly be adding more extensibility and flexibility with each new release. Just one step at a time as the team has the resources available to implement, test, and document.
from retype.
We are going to try and include Mermaid support in the upcoming Retype
v1.7.0
release, which should happen early next week.
That would be fantastic. Thanks for the inclusion of mermaid functionality and I hope it makes it into V1.7.0.
from retype.
Okay, we have merged the Mermaid functionality into the v1.7.0
dev branch. It took a lot longer solve some Mermaid rendering scenarios than we had anticipated, but it's looking great now.
As far as we can determine, Mermaid does not support the automatic switching from light and dark modes, so we were kinda forced to render a white background on the Mermaid blocks when in dark
mode. It's a compromise we had to make to get it working.
Sample
```mermaid
graph LR
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
```
Light mode
Dark mode
If at some point in the future Mermaid supports full light/dark mode switching, then our current implementation might automatically support as well. We'll just have to test at that time.
We're almost finished v1.7.0
and will be releasing very soon.
from retype.
Thanks!
Sorry for my ignorance, but is there light/dark mode switching convention/standard that goes beyond having different css style options? If you can post some links to the javascript light/dark mode requirements, I can follow up on it with mermaidjs separately.
from retype.
We are using Tailwind CSS for handling the dark mode switching and I believe all the switching functionality is handled within CSS, but Tailwind might be using some JavaScript too.
https://tailwindcss.com/docs/dark-mode
Here's a post I found that provides samples for implementing dark
and light
mode checks in CSS and JS.
With CSS
@media (prefers-color-scheme: dark) {
body {
background: black;
}
}
Or a light one:
@media (prefers-color-scheme: light) {
body {
background: white;
}
}
With JavaScript
const userPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
const userPrefersLight = window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches;
if(userPrefersDark){
console.log("User prefers a dark interface");
}
Hope this helps.
from retype.
Fantastic! Thanks :)
from retype.
Related Issues (20)
- Project custom links: Add title attribute
- Page metadata: Add keywords to use with retype search
- Using Raw HTML In Pages HOT 4
- Skip nested folders in the sidebar and customise the page's place in the navigation sidebar
- Footnotes do not render well in panel. HOT 2
- Styling not complete when published on GH Pages? HOT 3
- Issues deploying with Docker
- Search Not Working for `visibility: protected` Pages Despite Password
- Search not working for code snippets HOT 1
- Footnote syntax breaks tags navigation page HOT 1
- The GitHub Action relies on Node 16 which is now deprecated
- Blog style card for latest blog post highlighted on a different page (e.g. the main index.md for the site)
- Port 5000 may not be a safe default
- NFR: Permalinks and/or static redirects (SEO)
- Disable right panel from displaying
- MojeeIO.Exceptions.LicenseException: Mojee License violation. HOT 3
- Definition lists formatting issues with lengthy definitions HOT 3
- Image size HOT 2
- Single characters in super- and subscript HOT 4
- Sidebar filter does not work for CamelCase titles HOT 3
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 retype.