<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Pocket Hugo</title>
    <link>https://theme.leftn.com/</link>
    <description>Pocket Hugo</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 27 Aug 2026 16:54:52 &#43;0000</lastBuildDate>
    <atom:link href="https://theme.leftn.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Pocket Hugo: Browser-First Publishing for Hugo</title>
      <link>https://theme.leftn.com/article/pocket-hugo-project/</link>
      <pubDate>Mon, 23 Mar 2026 07:30:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/pocket-hugo-project/</guid>
      <description>Pocket Hugo is a browser-first publishing tool for Hugo, built for writing, image handling, and GitHub-based Markdown workflows across desktop, tablet, and phone.</description>
      <content:encoded><![CDATA[<p>Pocket Hugo is a browser-first publishing tool for Hugo across desktop, tablet, and phone. It is designed for people who keep their content in GitHub repositories and want to write, manage, and publish Markdown in the browser without being tied to one main computer.</p>
<p>What makes it interesting is not just that it runs in the browser. Its homepage describes it more directly: Pocket Hugo combines GitHub publishing, local drafts, higher-efficiency WebP image handling, and page editing into one browser workflow while staying close to real Hugo content structures. That makes it a natural sister project to <code>pocket-hugo-theme</code>.</p>
<ul>
<li>GitHub repo: <a href="https://github.com/h2dcc/pocket-hugo" target="_blank" rel="noopener noreferrer">https://github.com/h2dcc/pocket-hugo</a>
</li>
<li>Production landing: <a href="https://leftn.com" target="_blank" rel="noopener noreferrer">https://leftn.com</a>
</li>
<li>Production app entry: <a href="https://leftn.com/app" target="_blank" rel="noopener noreferrer">https://leftn.com/app</a>
</li>
</ul>
<h2 id="why-it-exists">Why it exists</h2>
<p>Many Hugo workflows still assume that writing happens on one main computer, with image handling, front matter editing, and publishing all done in separate steps. Pocket Hugo tries to reduce that friction.</p>
<p>It is especially useful when:</p>
<ul>
<li>you want to continue drafting on a phone or tablet</li>
<li>you publish directly from GitHub-hosted content</li>
<li>you want image handling to stay close to the post itself</li>
<li>you use multilingual bundles and need to create translated versions quickly</li>
</ul>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/pocket-hugo-project/where-to-start.webp" data-lightbox-image>
        <img
            src="/article/pocket-hugo-project/where-to-start_hu_9eecf91f78338e3f.webp"
            alt="Pocket Hugo entry and initial setup"
            loading="lazy"
            decoding="async"
            srcset="/article/pocket-hugo-project/where-to-start_hu_633ef2a1634e34de.webp 640w, /article/pocket-hugo-project/where-to-start_hu_9eecf91f78338e3f.webp 960w"
            sizes="100vw"
            width="1080"
            height="589"
             title="Pocket Hugo entry and initial setup"
        >
    </a>
    <figcaption>Pocket Hugo entry and initial setup</figcaption>
</figure>
</p>
<h2 id="what-it-brings-together">What it brings together</h2>
<p>Pocket Hugo is best understood as a publishing workflow rather than a generic Markdown editor. It brings several useful pieces into one place:</p>
<ul>
<li>GitHub sign-in and direct publishing</li>
<li>support for three Hugo-friendly content structures</li>
<li>image compression, conversion, and auto naming during upload</li>
<li>local draft recovery in the browser</li>
<li>loading published posts back from GitHub for another round of editing</li>
<li>standalone page editing and Quick Timeline updates</li>
</ul>
<p>That is also why the homepage feels more like a product landing page than a developer tool page. It is selling a smoother Hugo workflow, not just a text box.</p>
<h2 id="writing-around-hugo-structures">Writing around Hugo structures</h2>
<p>Pocket Hugo currently works best with three content layouts:</p>
<ol>
<li>Flat Markdown files for simple, text-first notes.</li>
<li>Single-language bundles for richer posts with local assets.</li>
<li>Multilingual bundles for translated articles that share the same folder and assets.</li>
</ol>
<p>That structure awareness is important. It affects how new posts are created, how existing posts are loaded, and how content is pushed back to GitHub.</p>
<h2 id="post-editor-and-publishing-flow">Post editor and publishing flow</h2>
<p>The editor is divided into a few practical sections: basic info, body content, images, and front matter. In bundle-based modes, image upload and asset management are available directly in the writing flow.</p>
<p>That makes the tool feel closer to a focused publishing interface than a generic Markdown editor. You are not just writing text. You are preparing a Hugo post in the shape the site actually expects, then sending it back into a Git-based workflow.</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/pocket-hugo-project/writing-posts.webp" data-lightbox-image>
        <img
            src="/article/pocket-hugo-project/writing-posts_hu_d08468cfe6819089.webp"
            alt="Pocket Hugo writing editor"
            loading="lazy"
            decoding="async"
            srcset="/article/pocket-hugo-project/writing-posts_hu_a73bb7b59bb37cc3.webp 640w, /article/pocket-hugo-project/writing-posts_hu_d08468cfe6819089.webp 960w"
            sizes="100vw"
            width="1080"
            height="881"
             title="Pocket Hugo writing editor"
        >
    </a>
    <figcaption>Pocket Hugo writing editor</figcaption>
</figure>
</p>
<h2 id="multilingual-workflow">Multilingual workflow</h2>
<p>One of the more distinctive parts of Pocket Hugo is its multilingual bundle support. The preview area can expose the current Markdown, help you copy it into another translation workflow, then bring the translated content back into a new file such as <code>index.zh-cn.md</code>, <code>index.de.md</code>, or another language variant.</p>
<p>This is particularly useful for writers who publish in more than one language but do not want to maintain a heavy CMS.</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/pocket-hugo-project/create-multi-versions.webp" data-lightbox-image>
        <img
            src="/article/pocket-hugo-project/create-multi-versions_hu_2f2e06ad9be2ca5d.webp"
            alt="Creating multilingual versions in Pocket Hugo"
            loading="lazy"
            decoding="async"
            srcset="/article/pocket-hugo-project/create-multi-versions_hu_5a32186169c83eaa.webp 640w, /article/pocket-hugo-project/create-multi-versions_hu_2f2e06ad9be2ca5d.webp 960w"
            sizes="100vw"
            width="1080"
            height="784"
             title="Creating multilingual versions in Pocket Hugo"
        >
    </a>
    <figcaption>Creating multilingual versions in Pocket Hugo</figcaption>
</figure>
</p>
<h2 id="image-handling">Image handling</h2>
<p>Pocket Hugo also pays special attention to the image workflow. It supports upload, preview, conversion, cover selection, file insertion, and lighter-weight compression. The current pipeline is especially aimed at reducing oversized images from phones and tablets before they are published into the repository.</p>
<p>That focus on bundled content is one reason the theme and the editor fit together so well. The theme assumes cover-driven posts and bundle-friendly content. Pocket Hugo helps produce exactly that kind of material.</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/pocket-hugo-project/images-flow.webp" data-lightbox-image>
        <img
            src="/article/pocket-hugo-project/images-flow_hu_755179ba511effc6.webp"
            alt="Image workflow in Pocket Hugo"
            loading="lazy"
            decoding="async"
            srcset="/article/pocket-hugo-project/images-flow_hu_51ff0ddf00c1706a.webp 640w, /article/pocket-hugo-project/images-flow_hu_755179ba511effc6.webp 960w"
            sizes="100vw"
            width="1080"
            height="865"
             title="Image workflow in Pocket Hugo"
        >
    </a>
    <figcaption>Image workflow in Pocket Hugo</figcaption>
</figure>
</p>
<h2 id="publishing-back-to-github">Publishing back to GitHub</h2>
<p>When a post is ready, Pocket Hugo commits the Markdown file and related assets back to the configured repository. The result view makes the output more transparent by showing the repository, branch, path, and changed files.</p>
<p>That makes it easier to trust the publishing step, especially when writing away from your normal development environment.</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/pocket-hugo-project/published-uccessfully.webp" data-lightbox-image>
        <img
            src="/article/pocket-hugo-project/published-uccessfully_hu_2451d5bb0ff33e72.webp"
            alt="Pocket Hugo publishing result"
            loading="lazy"
            decoding="async"
            srcset="/article/pocket-hugo-project/published-uccessfully_hu_60c351f0f49dccab.webp 640w, /article/pocket-hugo-project/published-uccessfully_hu_2451d5bb0ff33e72.webp 960w"
            sizes="100vw"
            width="1080"
            height="731"
             title="Pocket Hugo publishing result"
        >
    </a>
    <figcaption>Pocket Hugo publishing result</figcaption>
</figure>
</p>
<h2 id="why-it-fits-this-theme">Why it fits this theme</h2>
<p><code>pocket-hugo-theme</code> is designed for long-term personal writing with strong cover presentation, calm reading rhythm, and multilingual support. Pocket Hugo complements that by making the authoring side simpler.</p>
<p>Together they are a good match for people who want:</p>
<ul>
<li>a light browser-based writing workflow</li>
<li>Hugo-native content structures</li>
<li>multilingual publishing without a large CMS</li>
<li>article cards and covers that still read well on mobile</li>
</ul>
<p>Pocket Hugo is not trying to replace every possible static-site workflow. It is most useful when your content already lives in a Hugo-shaped repository and you want the writing experience to be faster, lighter, and more mobile-friendly.</p>
<p>The positioning on the homepage also says it well: it is built for Hugo first, but still compatible with adjacent Markdown workflows such as Astro or Hexo when the repository follows similar content patterns.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Responsive Image Pipeline Demo</title>
      <link>https://theme.leftn.com/article/responsive-image-pipeline/</link>
      <pubDate>Sat, 21 Mar 2026 01:00:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/responsive-image-pipeline/</guid>
      <description>A sample post for checking derived image sizes, inline rendering, and the built-in lightbox.</description>
      <content:encoded><![CDATA[<p>This article demonstrates the theme&rsquo;s <strong>responsive image pipeline</strong> for inline Markdown images. The same source file is rendered inside the article, constrained by layout rules, and still available in a larger lightbox view.</p>
<h2 id="inline-image-test">Inline image test</h2>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/responsive-image-pipeline/cover.webp" data-lightbox-image>
        <img
            src="/article/responsive-image-pipeline/cover_hu_891a2c2ed3e28888.webp"
            alt="Yue Lu School"
            loading="lazy"
            decoding="async"
            srcset="/article/responsive-image-pipeline/cover_hu_cff19abd5b070e14.webp 640w, /article/responsive-image-pipeline/cover_hu_891a2c2ed3e28888.webp 960w"
            sizes="100vw"
            width="1080"
            height="464"
            
        >
    </a>
    
</figure>
</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/responsive-image-pipeline/guangzhou.webp" data-lightbox-image>
        <img
            src="/article/responsive-image-pipeline/guangzhou_hu_e1e939e85e40728a.webp"
            alt="Guang Zhou"
            loading="lazy"
            decoding="async"
            srcset="/article/responsive-image-pipeline/guangzhou_hu_982af0487a09f27b.webp 640w, /article/responsive-image-pipeline/guangzhou_hu_e1e939e85e40728a.webp 960w"
            sizes="100vw"
            width="1080"
            height="691"
            
        >
    </a>
    
</figure>
</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/responsive-image-pipeline/writing.webp" data-lightbox-image>
        <img
            src="/article/responsive-image-pipeline/writing_hu_d0f50a54ee4873ff.webp"
            alt="Writing"
            loading="lazy"
            decoding="async"
            srcset="/article/responsive-image-pipeline/writing_hu_7d0824451caa5ad9.webp 640w, /article/responsive-image-pipeline/writing_hu_d0f50a54ee4873ff.webp 960w"
            sizes="100vw"
            width="1080"
            height="595"
            
        >
    </a>
    
</figure>
</p>
<p>This represents the default display behavior for images on the webpage. If you wish to adjust the image display height, you can configure this in <code>hugo.toml</code>. If you do not require this feature, you can disable it directly by setting: <code>limitHeight = false</code>.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl">  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">images</span><span class="p">.</span><span class="nx">content</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">    <span class="nx">mobileMaxHeight</span> <span class="p">=</span> <span class="s2">&#34;160px&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="nx">tabletMaxHeight</span> <span class="p">=</span> <span class="s2">&#34;250px&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="nx">desktopMaxHeight</span> <span class="p">=</span> <span class="s2">&#34;350px&#34;</span></span></span></code></pre></div><p>This page complements the <a href="/article/image-config-reference/">Image Configuration Reference</a>
, which focuses on article headers and card covers instead.</p>]]></content:encoded>
    </item>
    <item>
      <title>Markdown Rendering Showcase</title>
      <link>https://theme.leftn.com/article/markdown-demo/</link>
      <pubDate>Thu, 19 Mar 2026 01:15:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/markdown-demo/</guid>
      <description>A compact post for testing common Markdown elements in the English article layout.</description>
      <content:encoded><![CDATA[<p>This post is a compact Markdown rendering showcase for <code>pocket-hugo-theme</code>. It is meant to stress the article layout with the symbols and block styles people use most often.</p>
<h2 id="inline-formatting">Inline Formatting</h2>
<p>You can check <strong>bold text</strong>, <em>italic text</em>, <em><strong>combined emphasis</strong></em>, <code>inline code</code>, and a standard <a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">link to Hugo</a>
.</p>
<p>You can also test superscript-like notation such as H<del>2</del>O, keyboard-style hints like <code>Ctrl + K</code>, and escaped characters such as <code>*literal asterisks*</code>.</p>
<h2 id="lists">Lists</h2>
<h3 id="unordered-list">Unordered List</h3>
<ul>
<li>Cover-first cards should still feel calm on mobile.</li>
<li>Metadata needs to stay readable at narrow widths.</li>
<li>Spacing matters as much as typography.</li>
</ul>
<h3 id="ordered-list">Ordered List</h3>
<ol>
<li>Draft the post.</li>
<li>Add a cover image.</li>
<li>Review the mobile reading rhythm.</li>
</ol>
<h3 id="task-list">Task List</h3>
<ul>
<li><input checked="" disabled="" type="checkbox"> Add front matter</li>
<li><input checked="" disabled="" type="checkbox"> Add a local cover image</li>
<li><input disabled="" type="checkbox"> Replace demo copy with production writing</li>
</ul>
<h2 id="quote">Quote</h2>
<blockquote>
<p>Good article themes disappear while you read.</p>
<p>Great ones also make browsing pleasant before you click.</p>
</blockquote>
<h2 id="code-blocks">Code Blocks</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">theme</span> <span class="p">=</span> <span class="s2">&#34;pocket-hugo-theme&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">defaultContentLanguage</span> <span class="p">=</span> <span class="s2">&#34;en&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">mainSections</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;posts&#34;</span><span class="p">]</span></span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">article</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nx">title</span><span class="o">:</span> <span class="s2">&#34;Markdown Rendering Showcase&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nx">cover</span><span class="o">:</span> <span class="s2">&#34;cover.webp&#34;</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">  <span class="nx">mobileReady</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span></span></span></code></pre></div><h2 id="table">Table</h2>
<table>
  <thead>
      <tr>
          <th>Element</th>
          <th>Why it matters</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Headings</td>
          <td>Establish content rhythm</td>
      </tr>
      <tr>
          <td>Lists</td>
          <td>Reveal spacing and indentation</td>
      </tr>
      <tr>
          <td>Tables</td>
          <td>Stress overflow behavior on mobile</td>
      </tr>
      <tr>
          <td>Code blocks</td>
          <td>Show padding, font, and wrapping</td>
      </tr>
  </tbody>
</table>
<h2 id="image">Image</h2>
<p>The local bundle image should appear both as the cover and as an inline asset:</p>
<p><figure class="article-image">
    <a class="article-image__link" href="/article/markdown-demo/cover.webp" data-lightbox-image>
        <img
            src="/article/markdown-demo/cover_hu_e0096db56b3b63d9.webp"
            alt="Sample photo"
            loading="lazy"
            decoding="async"
            srcset="/article/markdown-demo/cover_hu_cc1c9dbfada38dfb.webp 640w, /article/markdown-demo/cover_hu_e0096db56b3b63d9.webp 960w"
            sizes="100vw"
            width="1080"
            height="467"
            
        >
    </a>
    
</figure>
</p>
<h2 id="horizontal-rule">Horizontal Rule</h2>
<hr>
<h2 id="final-notes">Final Notes</h2>
<p>If this article looks balanced on both desktop and phone, the theme is usually in a strong place for real essays, changelogs, notes, and documentation pages.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Shortcodes Demo</title>
      <link>https://theme.leftn.com/article/shortcodes-demo/</link>
      <pubDate>Fri, 06 Mar 2026 01:00:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/shortcodes-demo/</guid>
      <description>A sample page that groups together several practical shortcodes for content-heavy Hugo sites.</description>
      <content:encoded><![CDATA[<p>This page groups together several practical shortcodes that work well in a content-first Hugo theme. They are intentionally simple, easy to copy, and suitable for essays, notes, and documentation pages.</p>
<h2 id="fold">Fold</h2>
<p>Use <code>fold</code> when a section should stay readable without taking too much vertical space.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; fold &#34;Why this shortcode exists&#34; &gt;}}
</span></span><span class="line"><span class="cl">This hidden block is rendered inside a native `&lt;details&gt;` element.
</span></span><span class="line"><span class="cl">{{&lt; /fold &gt;}}</span></span></code></pre></div><details>
    <summary>Why this shortcode exists</summary>
    This hidden block is rendered inside a native <code>&lt;details&gt;</code> element, so it works without JavaScript and still feels natural in long-form writing.
</details>

<h2 id="note">Note</h2>
<p>Use <code>note</code> for callouts such as tips, warnings, or side remarks.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; note type=&#34;info&#34; title=&#34;Content-first&#34; &gt;}}
</span></span><span class="line"><span class="cl">Pocket Hugo Theme keeps callouts readable without making them look like app UI.
</span></span><span class="line"><span class="cl">{{&lt; /note &gt;}}</span></span></code></pre></div><div class="shortcode-note shortcode-note--info"><div class="shortcode-note__title">Content-first</div><div class="shortcode-note__body">
    Pocket Hugo Theme keeps callouts readable without making them look like app UI.
  </div>
</div>

<div class="shortcode-note shortcode-note--tip"><div class="shortcode-note__title">Tip</div><div class="shortcode-note__body">
    Shortcodes like this are useful for tutorials, changelogs, and writing guides.
  </div>
</div>

<div class="shortcode-note shortcode-note--warn"><div class="shortcode-note__title">Experimental</div><div class="shortcode-note__body">
    If you add custom shortcodes, keep them small and easy to understand. Readers should not need to decode the layout before reading the content.
  </div>
</div>

<h2 id="badge">Badge</h2>
<p>Badges are useful for compact status labels inside paragraphs.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; badge &#34;Stable&#34; &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; badge text=&#34;Optional&#34; type=&#34;info&#34; &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; badge text=&#34;Experimental&#34; type=&#34;warn&#34; &gt;}}</span></span></code></pre></div><p><span class="shortcode-badge shortcode-badge--default">Stable</span>

<span class="shortcode-badge shortcode-badge--info">Optional</span>

<span class="shortcode-badge shortcode-badge--warn">Experimental</span>
</p>
<h2 id="button">Button</h2>
<p>Use <code>button</code> when you want a stronger inline call to action than a normal text link.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; button href=&#34;https://theme.leftn.com/guide/&#34; label=&#34;Open the Guide&#34; &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; button href=&#34;https://theme.leftn.com/links/&#34; label=&#34;Browse Links&#34; style=&#34;ghost&#34; &gt;}}</span></span></code></pre></div><p><a class="shortcode-button shortcode-button--primary" href="/guide/">Open the Guide</a>

<a class="shortcode-button shortcode-button--ghost" href="/links/">Browse Links</a>
</p>
<h2 id="video-and-audio">Video and audio</h2>
<p>These shortcodes keep common media embeds consistent with the rest of the theme.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; video src=&#34;https://theme.leftn.com/media/demo.mp4&#34; title=&#34;Local video&#34; &gt;}}Caption{{&lt; /video &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; audio src=&#34;https://theme.leftn.com/media/demo.mp3&#34; title=&#34;Audio clip&#34; &gt;}}Caption{{&lt; /audio &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; youtube id=&#34;rdwz7QiG0lk&#34; &gt;}}YouTube embed{{&lt; /youtube &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; bilibili bvid=&#34;BV1xx411c7mu&#34; &gt;}}Bilibili embed{{&lt; /bilibili &gt;}}</span></span></code></pre></div><figure class="shortcode-media shortcode-media--video">
  <video
    controls
    preload="metadata"
    title="HTML5 video"
    
    
    
    
    playsinline>
    <source src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4" />
  </video>
  <figcaption>A plain HTML5 video wrapper with the theme&rsquo;s default radius and spacing.</figcaption>
</figure>

<figure class="shortcode-media shortcode-media--audio">
  <div class="shortcode-audio__title">HTML5 audio</div>
  <audio controls preload="metadata">
    <source src="https://interactive-examples.mdn.mozilla.net/media/cc0-audio/t-rex-roar.mp3">
  </audio>
  <figcaption>A matching audio player for short clips, podcasts, or spoken notes.</figcaption>
</figure>

<figure class="shortcode-media shortcode-media--embed">
  <div class="shortcode-embed">
    <iframe
      src="https://www.youtube-nocookie.com/embed/rdwz7QiG0lk"
      title="YouTube video"
      loading="lazy"
      referrerpolicy="strict-origin-when-cross-origin"
      allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
      allowfullscreen>
    </iframe>
  </div>
  <figcaption>A YouTube embed wrapped in the same media style.</figcaption>
</figure>

<figure class="shortcode-media shortcode-media--embed">
  <div class="shortcode-embed">
    <iframe
      src="https://player.bilibili.com/player.html?bvid=BV1xx411c7mu&page=1"
      title="Bilibili video"
      loading="lazy"
      scrolling="no"
      frameborder="0"
      allowfullscreen>
    </iframe>
  </div>
  <figcaption>A Bilibili embed using the same responsive frame.</figcaption>
</figure>

<h2 id="timeline">Timeline</h2>
<p>Use <code>timeline</code> when you want a process, update log, or historical sequence.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; timeline &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; timeline-item date=&#34;2026-01&#34; title=&#34;Planning&#34; &gt;}}Outline the scope.{{&lt; /timeline-item &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; timeline-item date=&#34;2026-02&#34; title=&#34;Build&#34; &gt;}}Ship the first version.{{&lt; /timeline-item &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; /timeline &gt;}}</span></span></code></pre></div><div class="shortcode-timeline">
  
<div class="shortcode-timeline__item">
  <div class="shortcode-timeline__rail"></div>
  <div class="shortcode-timeline__content">
    <div class="shortcode-timeline__date">2026-01</div>
    <div class="shortcode-timeline__title">Planning</div>
    <div class="shortcode-timeline__body">Outline the first version of the feature and keep the data format small.</div>
  </div>
</div>

<div class="shortcode-timeline__item">
  <div class="shortcode-timeline__rail"></div>
  <div class="shortcode-timeline__content">
    <div class="shortcode-timeline__date">2026-02</div>
    <div class="shortcode-timeline__title">Build</div>
    <div class="shortcode-timeline__body">Add a simple implementation that fits long-form content rather than app-like UI.</div>
  </div>
</div>

<div class="shortcode-timeline__item">
  <div class="shortcode-timeline__rail"></div>
  <div class="shortcode-timeline__content">
    <div class="shortcode-timeline__date">2026-03</div>
    <div class="shortcode-timeline__title">Polish</div>
    <div class="shortcode-timeline__body">Tighten copy, spacing, and multilingual examples.</div>
  </div>
</div>


</div>

<h2 id="columns">Columns</h2>
<p>Use <code>columns</code> when two ideas need to be compared side by side.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; columns &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; column &gt;}}Left side{{&lt; /column &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; column &gt;}}Right side{{&lt; /column &gt;}}
</span></span><span class="line"><span class="cl">{{&lt; /columns &gt;}}</span></span></code></pre></div><div class="shortcode-columns">
  
<div class="shortcode-columns__item shortcode-columns__item--1">
  <h3 id="better-for">Better for</h3>
<ul>
<li>short comparisons</li>
<li>feature summaries</li>
<li>before/after notes</li>
</ul>

</div>

<div class="shortcode-columns__item shortcode-columns__item--1">
  <h3 id="avoid-for">Avoid for</h3>
<ul>
<li>long essay paragraphs</li>
<li>deeply nested lists</li>
<li>content that must stay linear</li>
</ul>

</div>


</div>

<h2 id="gallery">Gallery</h2>
<p>Use <code>gallery</code> when one article needs a compact image grid without writing a separate Markdown image block for every file.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">{{&lt; gallery pattern=&#34;sample*.webp&#34; columns=&#34;3&#34; &gt;}}</span></span></code></pre></div><p>The shortcode reads matching image files from the current page bundle, renders them as a responsive grid, and reuses the built-in lightbox when you click a photo.</p>
<section class="shortcode-gallery" style="--gallery-columns: 3; --article-content-image-desktop-max-height: none; --article-content-image-tablet-max-height: none; --article-content-image-mobile-max-height: none;"><figure class="shortcode-gallery__item">
      <a class="shortcode-gallery__link" href="/article/shortcodes-demo/sample1.webp" data-lightbox-image>
        <img
          src="/article/shortcodes-demo/sample1_hu_769169bf8aa436a6.webp"
          alt="sample1.webp"
          loading="lazy"
          decoding="async"
          width="1200"
          height="634"
        >
      </a>
    </figure><figure class="shortcode-gallery__item">
      <a class="shortcode-gallery__link" href="/article/shortcodes-demo/sample2.webp" data-lightbox-image>
        <img
          src="/article/shortcodes-demo/sample2_hu_30929b063163d0c7.webp"
          alt="sample2.webp"
          loading="lazy"
          decoding="async"
          width="1200"
          height="647"
        >
      </a>
    </figure><figure class="shortcode-gallery__item">
      <a class="shortcode-gallery__link" href="/article/shortcodes-demo/sample3.webp" data-lightbox-image>
        <img
          src="/article/shortcodes-demo/sample3_hu_14c5b80a4fe9479e.webp"
          alt="sample3.webp"
          loading="lazy"
          decoding="async"
          width="1200"
          height="610"
        >
      </a>
    </figure><figure class="shortcode-gallery__item">
      <a class="shortcode-gallery__link" href="/article/shortcodes-demo/sample4.webp" data-lightbox-image>
        <img
          src="/article/shortcodes-demo/sample4_hu_c2bdf2377283164c.webp"
          alt="sample4.webp"
          loading="lazy"
          decoding="async"
          width="1200"
          height="892"
        >
      </a>
    </figure><figure class="shortcode-gallery__item">
      <a class="shortcode-gallery__link" href="/article/shortcodes-demo/sample5.webp" data-lightbox-image>
        <img
          src="/article/shortcodes-demo/sample5_hu_bd8ccefce6c594d9.webp"
          alt="sample5.webp"
          loading="lazy"
          decoding="async"
          width="1200"
          height="1190"
        >
      </a>
    </figure><figure class="shortcode-gallery__item">
      <a class="shortcode-gallery__link" href="/article/shortcodes-demo/sample6.webp" data-lightbox-image>
        <img
          src="/article/shortcodes-demo/sample6_hu_5a08dc0e4d4206dd.webp"
          alt="sample6.webp"
          loading="lazy"
          decoding="async"
          width="1200"
          height="2058"
        >
      </a>
    </figure></section>
<h2 id="why-this-matters">Why this matters</h2>
<p>These shortcodes are not meant to turn the theme into a component library. They simply give writers a few reusable building blocks that fit the theme without adding a framework layer.</p>]]></content:encoded>
    </item>
    <item>
      <title>i18n MultiLanguage Configuration Reference</title>
      <link>https://theme.leftn.com/article/i18n-multilanguage-config/</link>
      <pubDate>Thu, 05 Mar 2026 01:00:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/i18n-multilanguage-config/</guid>
      <description>A field-by-field guide to the i18n MultiLanguage Hugo configuration used by Pocket Hugo Theme.</description>
      <content:encoded><![CDATA[<p>The Pocket Hugo theme supports multilingual usage. Two languages ​​are enabled by default; if you do not require them, you can simply remove the unwanted languages ​​within the <code>hugo.toml</code> file.</p>
<h2 id="set-preferred-language">Set Preferred Language</h2>
<p>Pocket Hugo theme natively supports over 10 language settings, including English, Chinese, Japanese, French, Spanish, Russian, German, Korean, Portuguese, Italian, and more. You can specify a preferred language in <code>hugo.toml</code>; this preferred language typically corresponds directly to the <code>index.md</code> file within the content directory.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">languageCode</span> <span class="p">=</span> <span class="s2">&#34;en&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">defaultContentLanguage</span> <span class="p">=</span> <span class="s2">&#34;en&#34;</span></span></span></code></pre></div><p>If you require a different site name and title for each language, you can configure them individually in <code>hugo.toml</code>.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="nx">languageName</span> <span class="p">=</span> <span class="s2">&#34;English&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;Pocket Hugo&#34;</span>
</span></span><span class="line"><span class="cl">  <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">params</span><span class="p">.</span><span class="nx">sidebar</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="nx">subtitle</span> <span class="p">=</span> <span class="s2">&#34;A cover-driven theme for long-term personal writing&#34;</span></span></span></code></pre></div><h2 id="language-switching-settings">Language Switching Settings</h2>
<p>If you configure two languages, you can switch between them with a single click using a button located in the website header and below the in-text table of contents. If you configure three or more languages, a dropdown menu will be enabled by default in the website header.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl">  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">languageSwitcher</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">    <span class="nx">headerSelectThreshold</span> <span class="p">=</span> <span class="mi">3</span></span></span></code></pre></div><ul>
<li><a href="/article/responsive-image-pipeline/">Responsive Image Pipeline Demo</a>
</li>
<li><a href="/article/shortcodes-demo/">Shortcodes Demo</a>
</li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Title Card Guide</title>
      <link>https://theme.leftn.com/article/title-card-guide/</link>
      <pubDate>Mon, 09 Feb 2026 00:30:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/title-card-guide/</guid>
      <description>A practical guide for using fallback title cards in Pocket Hugo Theme, including front matter setup and all 16 presets.</description>
      <content:encoded><![CDATA[<p>Pocket Hugo Theme can turn a missing cover image into a generated <strong>title card</strong>.</p>
<h2 id="what-this-feature-is-for">What this feature is for</h2>
<p>Use a title card when you want the article to look complete in lists and single pages, but you do not want to prepare a real image file for every post.</p>
<p>That is especially useful for:</p>
<ul>
<li>notes and short essays</li>
<li>documentation pages</li>
<li>multilingual pages that should share a consistent visual rhythm</li>
<li>sections where text-first cards feel more natural than photo covers</li>
</ul>
<h2 id="quick-start">Quick start</h2>
<div class="shortcode-note shortcode-note--info"><div class="shortcode-note__title">Zero config works too</div><div class="shortcode-note__body">
    If you do nothing, the theme can still generate a fallback title card automatically when the site-level cover settings are enabled.
  </div>
</div>

<p>In front matter, the simplest form is just one letter:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">coverCard</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;a&#34;</span></span></span></code></pre></div><p>Rules:</p>
<ul>
<li><code>a</code> to <code>h</code>: the 8 light presets</li>
<li><code>A</code> to <code>H</code>: the 8 dark presets</li>
<li>any other value: falls back to an automatic random preset</li>
</ul>
<p>If you set <code>coverCard</code>, the theme will use the generated title card and stop using <code>image</code>.</p>
<h2 id="hide-the-repeated-list-title">Hide the repeated list title</h2>
<p>If you only want the title to appear inside the card on homepage, taxonomy, archive, and other list-style pages, add:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">listTitle</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre></div><p>That will hide the repeated title in list cards. On single pages, if the page is using a generated title card, it will also hide the separate title block there.</p>
<p>If you want to change this site-wide, use <code>params.article.listTitle = false</code> in <code>hugo.toml</code>. That site-level switch only affects generated gradient cards in list pages, not normal image covers.</p>
<h2 id="example-front-matter">Example front matter</h2>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;My Article&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">date</span><span class="p">:</span><span class="w"> </span><span class="ld">2026-02-09T08:30:00</span><span class="m">+08</span><span class="p">:</span><span class="m">00</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">slug</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;my-article&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">coverCard</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;C&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">listTitle</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span></span></span></code></pre></div><h2 id="all-16-presets">All 16 presets</h2>
<p>The presets below follow the built-in order used by the theme.</p>


<div class="title-card-showcase">
    <div class="title-card-showcase__grid">
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="golden-summer-fields" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Golden Summer Fields</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>a</code> Golden Summer Fields</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="golden-summer-fields" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Golden Summer Fields Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>A</code> Golden Summer Fields Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="soft-pastel-shades" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Soft Pastel Shades</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>b</code> Soft Pastel Shades</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="soft-pastel-shades" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Soft Pastel Shades Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>B</code> Soft Pastel Shades Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="black-gold-elegance" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Black Gold Elegance</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>c</code> Black Gold Elegance</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="black-gold-elegance" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Black Gold Elegance Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>C</code> Black Gold Elegance Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="morandi-mist" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Morandi Mist</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>d</code> Morandi Mist</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="morandi-mist" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Morandi Mist Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>D</code> Morandi Mist Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="fresh-greens" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Fresh Greens</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>e</code> Fresh Greens</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="fresh-greens" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Fresh Greens Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>E</code> Fresh Greens Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="light-steel" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Light Steel</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>f</code> Light Steel</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="light-steel" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Light Steel Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>F</code> Light Steel Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="deep-sea-blue" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Deep Sea Blue</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>g</code> Deep Sea Blue</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="deep-sea-blue" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Deep Sea Blue Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>G</code> Deep Sea Blue Dark</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="monochrome-core" data-cover-tone="light">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Monochrome Core</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>h</code> Monochrome Core</figcaption>
            </figure>
        
            <figure class="title-card-showcase__item">
                <div class="cover-fallback cover-fallback--card" data-cover-palette="monochrome-core" data-cover-tone="dark">
                    <div class="cover-fallback__inner">
                        <p class="cover-fallback__title">Monochrome Core Dark</p>
                    </div>
                </div>
                <figcaption class="title-card-showcase__caption"><code>H</code> Monochrome Core Dark</figcaption>
            </figure>
        
    </div>
</div>

<h2 id="when-to-use-which-preset">When to use which preset</h2>
<ul>
<li><code>a</code> / <code>A</code>: warm and editorial, good for essays and personal writing</li>
<li><code>b</code> / <code>B</code>: softer and more friendly, useful for tutorials or documentation</li>
<li><code>c</code> / <code>C</code>: stronger contrast, good for product or release notes</li>
<li><code>d</code> / <code>D</code>: muted and calm, fits archive-like or reflective writing</li>
<li><code>e</code> / <code>E</code>: lively and fresh, useful for tools, workflow, and updates</li>
<li><code>f</code> / <code>F</code>: neutral and restrained, good for technical references</li>
<li><code>g</code> / <code>G</code>: clearer and more digital, useful for software and platform topics</li>
<li><code>h</code> / <code>H</code>: monochrome and minimal, good for terse notes or index pages</li>
</ul>
<h2 id="default-behavior">Default behavior</h2>
<p>If the page does not define <code>coverCard</code>, the theme falls back to the site-level cover rules in <code>hugo.toml</code>.</p>
<p>That means a user can also do nothing at all and still get a generated title card by default. When the theme fallback is set to gradient mode, the card preset is assigned automatically.</p>
<p>That means you can combine both strategies:</p>
<ul>
<li>use a global fallback mode for ordinary posts</li>
<li>set <code>coverCard</code> only on the pages where you want a specific preset</li>
</ul>
<h2 id="one-practical-recommendation">One practical recommendation</h2>
<p>Start with the automatic fallback for the site, then manually assign letters only to pages that you want to feel more deliberate. That keeps authoring fast while still giving important pages a distinct look.</p>]]></content:encoded>
    </item>
    <item>
      <title>Header Links Settings</title>
      <link>https://theme.leftn.com/article/header-links-settings/</link>
      <pubDate>Thu, 05 Feb 2026 01:00:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/header-links-settings/</guid>
      <description>How to configure the main header links, social links, and header tools in Pocket Hugo Theme.</description>
      <content:encoded><![CDATA[<p>This page explains how each part works from a theme user&rsquo;s point of view.</p>
<h2 id="1-how-the-main-header-navigation-works">1. How the main header navigation works</h2>
<p>The main navigation is <strong>not</strong> built by scanning every page under <code>content/page/</code>.</p>
<p>Instead, the header reads Hugo&rsquo;s <code>main</code> menu:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go-html-template" data-lang="go-html-template"><span class="line"><span class="cl"><span class="cp">{{</span><span class="w"> </span><span class="k">range</span><span class="w"> </span><span class="na">.Site.Menus.main</span><span class="w"> </span><span class="cp">}}</span></span></span></code></pre></div><p>That means a page only appears in the main header if you add it to <code>menu.main</code> in that page&rsquo;s front matter.</p>
<p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nn">---</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Guide&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">slug</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;guide&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">menu</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">main</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">weight</span><span class="p">:</span><span class="w"> </span>-<span class="m">45</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nn">---</span></span></span></code></pre></div><p>In this theme:</p>
<ul>
<li><code>menu.main</code> decides whether a page becomes a header candidate</li>
<li><code>weight</code> controls the order</li>
<li>smaller weights appear earlier</li>
</ul>
<p>For example, these demo pages use this pattern:</p>
<ul>
<li><code>talks</code>: <code>weight: -90</code></li>
<li><code>links</code>: <code>weight: -50</code></li>
<li><code>guide</code>: <code>weight: -45</code></li>
<li><code>about</code>: <code>weight: -40</code></li>
</ul>
<p>So if you want to add your own fixed page to the header, the normal way is:</p>
<ol>
<li>Create the page.</li>
<li>Add <code>menu.main</code>.</li>
<li>Give it a <code>weight</code>.</li>
</ol>
<p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nn">---</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Docs&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">slug</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;docs&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nt">menu</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">main</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">weight</span><span class="p">:</span><span class="w"> </span>-<span class="m">42</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="nn">---</span></span></span></code></pre></div><h2 id="2-how-to-configure-social-links">2. How to configure social links</h2>
<p>The social links in the header come from <code>params.social</code> in <code>hugo.toml</code>.</p>
<p>Example:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;GitHub&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;https://github.com/your-name&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">icon</span> <span class="p">=</span> <span class="s2">&#34;brand-github&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;RSS&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/index.xml&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">icon</span> <span class="p">=</span> <span class="s2">&#34;rss&#34;</span></span></span></code></pre></div><p>Each item usually includes:</p>
<ul>
<li><code>name</code>: used as the accessible label and tooltip</li>
<li><code>url</code>: the link target</li>
<li><code>icon</code>: the icon id used by the theme</li>
</ul>
<p>If you want to add your own small icon, the simplest way is to put an SVG into
<code>assets/icons/</code> and then reference its file name without the <code>.svg</code> suffix.
For example, you can search online for a suitable SVG icon, save it as
something like <code>assets/icons/brand-mastodon.svg</code>, and then use:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"><span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Mastodon&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;https://example.social/@your-name&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nx">icon</span> <span class="p">=</span> <span class="s2">&#34;brand-mastodon&#34;</span></span></span></code></pre></div><p>In this theme:</p>
<ul>
<li>internal links such as <code>/index.xml</code> stay in the same tab</li>
<li>external links open in a new tab automatically</li>
</ul>
<p>If you remove all <code>[[params.social]]</code> entries, the social links area disappears.</p>
<h2 id="3-the-three-tools-in-the-top-right-corner">3. The three tools in the top-right corner</h2>
<p>The top-right area can show up to three controls:</p>
<ul>
<li>language switcher</li>
<li>color palette picker</li>
<li>dark/light mode switch</li>
</ul>
<p>These three do <strong>not</strong> follow the same rules.</p>
<h3 id="language-switcher-behavior">Language switcher behavior</h3>
<p>The language switcher is rendered by the translation toggle partial.</p>
<p>It only appears when the current page actually has translations.</p>
<p>That means:</p>
<ul>
<li>if your site has only one language, it does not show</li>
<li>if a page has no translated counterpart, it does not show on that page</li>
</ul>
<p>The header behavior is also affected by this setting in <code>hugo.toml</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">languageSwitcher</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="nx">headerSelectThreshold</span> <span class="p">=</span> <span class="mi">2</span></span></span></code></pre></div><p>This value controls when the header uses:</p>
<ul>
<li>a direct switch icon</li>
<li>or a dropdown menu with language abbreviations</li>
</ul>
<p>Practical rule:</p>
<ul>
<li>if total languages are less than or equal to the threshold, the header shows a simple switch entry</li>
<li>if total languages are greater than the threshold, the header shows a dropdown</li>
</ul>
<p>So this button can disappear naturally when your site or page is not translated.</p>
<h3 id="color-palette-picker-behavior">Color palette picker behavior</h3>
<p>The palette picker is optional.</p>
<p>It is controlled by:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">colorScheme</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="nx">showPicker</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>The theme also accepts the legacy name:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">showPalettePicker</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>If both are false or missing, the palette picker does not appear.</p>
<p>So this is a header tool that you can explicitly turn off in configuration.</p>
<h3 id="darklight-mode-switch-behavior">Dark/light mode switch behavior</h3>
<p>The dark/light switch is controlled by:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">colorScheme</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="nx">toggle</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>The theme also supports the older compatibility key:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="nx">colorSchemeToggle</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>In the example site, this switch is enabled by default, so most users will see it unless they deliberately change the config.</p>
<p>Compared with the other two tools:</p>
<ul>
<li>the language switcher may disappear automatically when translations are not available</li>
<li>the palette picker can be switched off directly</li>
<li>the dark/light toggle is usually kept visible because it is enabled by default in normal theme setup</li>
</ul>
<p>If you want it hidden, set the related toggle option to <code>false</code>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Comments Demo</title>
      <link>https://theme.leftn.com/article/comments-demo/</link>
      <pubDate>Tue, 03 Feb 2026 01:00:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/comments-demo/</guid>
      <description>A sample post for checking the comments area.</description>
      <content:encoded><![CDATA[<p>This article demonstrates a default comment section.</p>
<h2 id="default-setting">Default Setting</h2>
<p>By default, Pocket Hugo theme enables comments on all pages. If you wish to disable comments on a specific page or post, please add <code>comments: false</code> to the frontmatter section of the corresponding Markdown file.</p>
<p>This theme uses Twikoo as its default comment system. To utilize Twikoo, you must deploy the necessary cloud functions in accordance with the official Twikoo documentation to ensure proper operation. Alternatively, you are free to configure your preferred comment solution, such as Utterances, Waline, Disqus, and others, according to your own preferences.</p>
<ul>
<li>
<p><a href="https://twikoo.js.org/en/intro.html" target="_blank" rel="noopener noreferrer">Twikoo Docs</a>
</p>
</li>
<li>
<p><a href="https://giscus.app/" target="_blank" rel="noopener noreferrer">Giscus Docs</a>
</p>
</li>
<li>
<p><a href="https://utteranc.es/" target="_blank" rel="noopener noreferrer">Utterances Docs</a>
</p>
</li>
<li>
<p><a href="https://waline.js.org/" target="_blank" rel="noopener noreferrer">Waline Docs</a>
</p>
</li>
<li>
<p><a href="https://disqus.com/" target="_blank" rel="noopener noreferrer">Disqus Docs</a>
</p>
</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Markdown Extensions Demo</title>
      <link>https://theme.leftn.com/article/markdown-extensions-demo/</link>
      <pubDate>Sun, 01 Feb 2026 01:00:00 &#43;0000</pubDate>
      <guid>https://theme.leftn.com/article/markdown-extensions-demo/</guid>
      <description>A focused demo for the optional Syntax, Mermaid, and KaTeX extensions in Pocket Hugo Theme.</description>
      <content:encoded><![CDATA[<p>This post is a dedicated demo for the optional Markdown-related extensions in <code>pocket-hugo-theme</code>.</p>
<p>To see every block below rendered as intended, enable the related switches in <code>hugo.toml</code>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">extensions</span><span class="p">]</span>
</span></span><span class="line"><span class="cl">  <span class="nx">mermaid</span> <span class="p">=</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl">  <span class="nx">katex</span> <span class="p">=</span> <span class="kc">true</span></span></span></code></pre></div><p>Syntax highlighting is included by default. For Mermaid and KaTeX, add a page-level list in the front matter of the article that actually needs them:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">extensions</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">mermaid</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="l">katex</span></span></span></code></pre></div><h2 id="syntax-highlighting">Syntax Highlighting</h2>
<p>Pocket Hugo includes a small syntax color layer by default, so normal highlighted code blocks do not need any extra page-level switch.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kn">package</span><span class="w"> </span><span class="nx">main</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="kn">import</span><span class="w"> </span><span class="s">&#34;fmt&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="kd">func</span><span class="w"> </span><span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nx">theme</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="s">&#34;pocket-hugo-theme&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nx">enabled</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="p">[]</span><span class="kt">string</span><span class="p">{</span><span class="s">&#34;syntax&#34;</span><span class="p">,</span><span class="w"> </span><span class="s">&#34;mermaid&#34;</span><span class="p">,</span><span class="w"> </span><span class="s">&#34;katex&#34;</span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nx">fmt</span><span class="p">.</span><span class="nf">Println</span><span class="p">(</span><span class="nx">theme</span><span class="p">,</span><span class="w"> </span><span class="nx">enabled</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="line"><span class="cl"><span class="p">.</span><span class="nc">article-content</span> <span class="nt">pre</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="k">border-radius</span><span class="p">:</span> <span class="mi">18</span><span class="kt">px</span><span class="p">;</span>
</span></span><span class="line"><span class="cl">  <span class="k">overflow-x</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div><h2 id="mermaid">Mermaid</h2>
<p>When the <code>mermaid</code> extension is enabled, fenced code blocks with the <code>mermaid</code> language are converted into diagrams on the page.</p>
<div class="highlight">
    <pre tabindex="0" class="chroma"><code class="language-mermaid" data-lang="mermaid">flowchart LR
    A[Write Markdown] --> B[Enable extension]
    B --> C[Build site]
    C --> D[See rendered diagram]</code></pre>
</div><h2 id="katex">KaTeX</h2>
<p>When the <code>katex</code> extension is enabled, inline and block math can render directly inside the article.</p>
<p>Inline math: $E = mc^2$</p>
<p>Block math:</p>
<p>$$
\int_{0}^{1} x^2 , dx = \frac{1}{3}
$$</p>
<p>$$
f(x) = \frac{1}{\sqrt{2\pi\sigma^2}}
\exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)
$$</p>
<h2 id="mixed-content">Mixed Content</h2>
<p>The main goal of this post is to show that code, diagrams, and formulas can live together in one normal article layout without breaking the theme rhythm.</p>
<ol>
<li>Syntax highlighting improves token contrast.</li>
<li>Mermaid turns fenced blocks into SVG diagrams.</li>
<li>KaTeX renders math without changing your writing flow too much.</li>
</ol>
]]></content:encoded>
    </item>
  </channel>
</rss>
