CU-DBMI / set-website

Website for the software engineering team (SET)
https://cu-dbmi.github.io/set-website
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Tip of the Week: Diagrams as Code #7

Closed d33bs closed 2 years ago

d33bs commented 2 years ago

This PR focuses on creating a new blog post covering Diagrams as Code via Mermaid. As part of this work I also created a new repo implementing JupyterLite under https://github.com/CU-DBMI/notebooks, where a linked notebook example within the blog post content may be found.

Thank you for any feedback, suggestions, or edits you may have!

netlify[bot] commented 2 years ago

Deploy Preview for set-website ready!

Name Link
Latest commit fb0979d16a7f4827283da472edef780fef24ae13
Latest deploy log https://app.netlify.com/sites/set-website/deploys/638a2e391a91c60008b444e1
Deploy Preview https://deploy-preview-7--set-website.netlify.app/2022/11/27/diagrams-as-code
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

vincerubinetti commented 2 years ago

Writing looks good. My only thoughts:

https://mermaid-js.github.io/mermaid/#/n00b-gettingStarted?id=_3-calling-the-javascript-api

Haven't tested this:

graph TD A[Client] --> B[Load Balancer] B --> C[Server01] B --> D[Server02]

{:.mermaid}

☝️ this "attach class" sequence might have to go on the same line as the code block close, not sure.

OR, if that doesn't work:

<pre class="mermaid">
  graph TD 
  A[Client] --> B[Load Balancer] 
  B --> C[Server01] 
  B --> D[Server02]
</pre>

<script type="module">
  import mermaid from 'https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs';
  mermaid.initialize({ startOnLoad: true });
</script>

Should be able to do it with the same two-col component approach.

d33bs commented 2 years ago

Thank you @vincerubinetti ! I'll see about addressing your comments with a few updates.