<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://echohowardlam.github.io/blog/feed.xml" rel="self" type="application/atom+xml" /><link href="https://echohowardlam.github.io/blog/" rel="alternate" type="text/html" /><updated>2025-03-12T17:27:52+00:00</updated><id>https://echohowardlam.github.io/blog/feed.xml</id><title type="html">Echo Howard blog</title><subtitle>Some random software dev</subtitle><entry><title type="html">Starts using jekyll</title><link href="https://echohowardlam.github.io/blog/Starts-using-jekyll/" rel="alternate" type="text/html" title="Starts using jekyll" /><published>2025-03-09T00:00:00+00:00</published><updated>2025-03-09T00:00:00+00:00</updated><id>https://echohowardlam.github.io/blog/Starts-using-jekyll</id><content type="html" xml:base="https://echohowardlam.github.io/blog/Starts-using-jekyll/"><![CDATA[<p>Today I am starting to use jekyll.
Let’s see how it goes.</p>]]></content><author><name></name></author><summary type="html"><![CDATA[Today I am starting to use jekyll. Let’s see how it goes.]]></summary></entry><entry><title type="html">Adding mermaid support for jekyll</title><link href="https://echohowardlam.github.io/blog/Testing-mermaid/" rel="alternate" type="text/html" title="Adding mermaid support for jekyll" /><published>2025-03-09T00:00:00+00:00</published><updated>2025-03-09T00:00:00+00:00</updated><id>https://echohowardlam.github.io/blog/Testing-mermaid</id><content type="html" xml:base="https://echohowardlam.github.io/blog/Testing-mermaid/"><![CDATA[<p>Mermaid is great for visualization so got to add it to my blog.</p>

<p>Initially I tried <a href="https://github.com/jasonbellamy/jekyll-mermaid">jekyll-mermaid plugin</a><br />
but the code is old and also didn’t work</p>

<p>So I turn towards another <a href="https://jackgruber.github.io/2021-05-09-Embed-Mermaid-in-Jekyll-without-plugin/">solution</a> that does not need plugin<br />
The solution works with some tweaks:</p>

<ol>
  <li>My site does not make use of footer-scripts.html so have to include it in my webpage template<br />
  i.e. <code class="language-plaintext highlighter-rouge">{% include footer-scripts.html %}</code></li>
  <li><code class="language-plaintext highlighter-rouge">$(document)</code> causes <code class="language-plaintext highlighter-rouge">ReferenceError: $ is Not Defined</code>.<br />
  This is fixed by including <code class="language-plaintext highlighter-rouge">&lt;script src="https://code.jquery.com/jquery-3.6.0.min.js"&gt;&lt;/script&gt;</code></li>
</ol>

<p>The followings are some testing results</p>

<p>Testing code</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>int main() {
    int b = 0;
    for (int i = 0; i &lt; 42; i++)
        b = (b ^ 42) ^ (b - 42);
    return (b &amp; 255);
}
</code></pre></div></div>

<p>Testing mermaid</p>

<pre><code class="language-mermaid">graph TD;
    A--&gt;B;
    A--&gt;C;
    B--&gt;D;
    C--&gt;D;
</code></pre>]]></content><author><name></name></author><summary type="html"><![CDATA[Mermaid is great for visualization so got to add it to my blog.]]></summary></entry></feed>