<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code on Mono</title><link>https://mono.youali.me/tags/code/</link><description>Recent content in Code on Mono</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 30 Dec 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://mono.youali.me/tags/code/index.xml" rel="self" type="application/rss+xml"/><item><title>Code Blocks</title><link>https://mono.youali.me/posts/post-06/</link><pubDate>Mon, 30 Dec 2024 00:00:00 +0000</pubDate><guid>https://mono.youali.me/posts/post-06/</guid><description>&lt;p>The Mono theme uses &lt;a href="https://github.com/alecthomas/chroma">Chroma&lt;/a>, Hugo&amp;rsquo;s built-in syntax highlighter, which supports hundreds of languages. The syntax color themes were generated using Hugo&amp;rsquo;s CLI:&lt;/p>
&lt;div class="highlight-wrapper">&lt;div class="code-language">bash&lt;/div>&lt;button type="button" class="copy-button" title="Copy code">
 &lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
 &lt;rect x="9" y="9" width="13" height="13" rx="2" ry="2">&lt;/rect>
 &lt;path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1">&lt;/path>
&lt;/svg>

 &lt;/button>
 &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Light theme (GitHub style)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo gen chromastyles --style&lt;span class="o">=&lt;/span>github &amp;gt; assets/css/syntax-light.css
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Dark theme (Catppuccin Mocha style)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo gen chromastyles --style&lt;span class="o">=&lt;/span>catppuccin-mocha &amp;gt; assets/css/syntax-dark.css&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/div>
&lt;p>These are combined in &lt;code>assets/css/syntax.css&lt;/code> and automatically switch based on the site&amp;rsquo;s light/dark mode.&lt;/p></description></item></channel></rss>