Better HN
topnewbestaskshowjobs
Log inSign up

jihchi

9 karma · joined Apr 18, 2014 (12y ago) · 6 submissions

Submissions

comment 11mo ago · link · parent

This is cool! One use case is generating a Mermaid diagram as an image. For example, you can use the following HTML[^1]:

  <!doctype html>
  <html lang="en">
    <body>
      <pre class="mermaid">
    graph LR
        A --- B
        B-->C[fa:fa-ban forbidden]
        B-->D(fa:fa-spinner);
      </pre>
      <script type="module">
        import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
      </script>
    </body>
  </html>
Then html2png.dev will serve you:

  https://html2png.dev/api/blob/oTVGhhCc6rDZYQFDIE3EGkcKs-KO6J9-_DHs-jO2OJc-d23fb4f2.png
[^1]: https://mermaid.js.org/config/usage.html#simple-full-example

comment 1y ago · link · parent

It looks similar to https://hurl.dev

comment 4y ago · link · parent

https://news.ycombinator.com/item?id=31009609 hurl looks good

comment 4y ago · link · parent

I'd love to join the group buy if it is possible

comment 5y ago · link · parent

Were you comparing two identical image? Could you try two different image?

6.

Show HN: Mermaid Ink - Generate diagrams and flowcharts images on the fly(mermaid.ink ↗)

6 points · by jihchi · 7y ago · 1 comment