<?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/"><channel><title>HugoonDocs</title><link>https://hiraethecho.github.io/docs/tags/hugo/</link><description>Recent contentinHugoonDocs</description><generator>Hugo --0.152.2</generator><language>en</language><managingEditor>wyz2016zxc@outlook.com(Hiraeth)</managingEditor><webMaster>wyz2016zxc@outlook.com(Hiraeth)</webMaster><lastBuildDate>Mon, 16 Mar 2026 15:39:39 +0800</lastBuildDate><atom:link href="https://hiraethecho.github.io/docs/tags/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>hugo theme记录</title><link>https://hiraethecho.github.io/docs/project/hugo-theme-log/</link><pubDate>Sat, 06 Dec 2025 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/hugo-theme-log/</guid><description>写hugo主题时候的一些记录</description><content:encoded><![CDATA[<h1 id="开发记录">
  <a class="anchor inpage" href="#%e5%bc%80%e5%8f%91%e8%ae%b0%e5%bd%95">#</a>开发记录</h1>
<h2 id="一阶段">
  <a class="anchor inpage" href="#%e4%b8%80%e9%98%b6%e6%ae%b5">##</a>一阶段</h2>
<p>用 hugo new theme生成的样子，复制了一些文章做测试。这里加了文件树的功能，用AI写的，完全不懂go template
<figure>
  <a
    href="https://asset.877675.xyz/1.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/1.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>然后开始做css，先分了区，为了前期方便，随便加了background color，太刺激了
<figure>
  <a
    href="https://asset.877675.xyz/2.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/2.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>用details而不是ul，加了点button
<figure>
  <a
    href="https://asset.877675.xyz/3.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/3.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>太刺眼了，换颜色了。稍微搞了点响应式，微调一点css，加了代码复制按钮之类的功能。
<figure>
  <a
    href="https://asset.877675.xyz/4.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/4.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>一边加各种layout里的功能，一边调css，打算确定颜色风格
<figure>
  <a
    href="https://asset.877675.xyz/5.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/5.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>加了callouts等，打算用柔和一点的阴影类的装饰，用更少颜色
<figure>
  <a
    href="https://asset.877675.xyz/6.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/6.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>开始无休止的微调。
<figure>
  <a
    href="https://asset.877675.xyz/7.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/7.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<h2 id="实装">
  <a class="anchor inpage" href="#%e5%ae%9e%e8%a3%85">##</a>实装</h2>
<p>基本上开始使用，加了评论、搜索，偶尔调一调样式和bug。<br>
以及名称换成了lichtung而不是glade。</p>
<h2 id="稳定">
  <a class="anchor inpage" href="#%e7%a8%b3%e5%ae%9a">##</a>稳定</h2>
<p>2026-03-16 又翻出这个log，发现已经很久没有动主题了，算是稳定了。<br>
有闲情逸致的时候写个文档吧。<br>
没有文档的
，也不是不能用。</p>
]]></content:encoded></item><item><title>hugo主题lichtung</title><link>https://hiraethecho.github.io/docs/project/example/</link><pubDate>Sun, 05 Oct 2025 00:00:00 +0000</pubDate><author>wyz2016zxc@outlook.com(Hiraeth)</author><guid>https://hiraethecho.github.io/docs/project/example/</guid><description>&lt;h1 id="my-hugo-theme"&gt;
&lt;a class="anchor inpage" href="#my-hugo-theme"&gt;#&lt;/a&gt;My hugo theme&lt;/h1&gt;
&lt;p&gt;&lt;figure&gt;
&lt;a
href="https://asset.877675.xyz/202510101905530.webp"
class="img-link"
data-sub-html=""
target="_blank"
&gt;
&lt;img
src="https://asset.877675.xyz/202510101905530.webp"
alt=""loading="lazy"
/&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;some thing.&lt;br&gt;
another line
a
&lt;/p&gt;
&lt;h2 id="titles"&gt;
&lt;a class="anchor inpage" href="#titles"&gt;##&lt;/a&gt;titles&lt;/h2&gt;
&lt;h3 id="h3"&gt;
&lt;a class="anchor inpage" href="#h3"&gt;###&lt;/a&gt;h3&lt;/h3&gt;
&lt;h4 id="h4"&gt;
&lt;a class="anchor inpage" href="#h4"&gt;####&lt;/a&gt;h4&lt;/h4&gt;
&lt;h5 id="h5"&gt;
&lt;a class="anchor inpage" href="#h5"&gt;#####&lt;/a&gt;h5&lt;/h5&gt;
&lt;h6 id="h6"&gt;
&lt;a class="anchor inpage" href="#h6"&gt;######&lt;/a&gt;h6&lt;/h6&gt;
&lt;h2 id="fonts"&gt;
&lt;a class="anchor inpage" href="#fonts"&gt;##&lt;/a&gt;fonts&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;bold text&lt;/strong&gt; and &lt;em&gt;italic text&lt;/em&gt;. and both &lt;strong&gt;&lt;em&gt;bold and italic&lt;/em&gt;&lt;/strong&gt; and &lt;em&gt;&lt;strong&gt;jlkfas&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;try some thing new: &lt;del&gt;delete&lt;/del&gt;, &lt;ins&gt;insert&lt;/ins&gt;, &lt;mark&gt;mark&lt;/mark&gt;, superscript&lt;sup&gt;2&lt;/sup&gt; and subscript&lt;sub&gt;2&lt;/sub&gt;&lt;/p&gt;
&lt;p&gt;some Typographer&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;... &amp;amp;hellip; horizontal ellipsis
' &amp;amp;rsquo; apostrophe
-- &amp;amp;ndash; en dash
--- &amp;amp;mdash; em dash
« &amp;amp;laquo; left angle quote
“ &amp;amp;ldquo; left double quote
‘ &amp;amp;lsquo; left single quote
» &amp;amp;raquo; right angle quote
” &amp;amp;rdquo; right double quote
’ &amp;amp;rsquo; right single quote
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;as&lt;/p&gt;</description><content:encoded><![CDATA[<h1 id="my-hugo-theme">
  <a class="anchor inpage" href="#my-hugo-theme">#</a>My hugo theme</h1>
<p><figure>
  <a
    href="https://asset.877675.xyz/202510101905530.webp"
    class="img-link"
    data-sub-html=""
    target="_blank"
  >
    <img
      src="https://asset.877675.xyz/202510101905530.webp"
      alt=""loading="lazy"
    />
  </a></figure>
</p>
<p>some thing.<br>
another line
a 
</p>
<h2 id="titles">
  <a class="anchor inpage" href="#titles">##</a>titles</h2>
<h3 id="h3">
  <a class="anchor inpage" href="#h3">###</a>h3</h3>
<h4 id="h4">
  <a class="anchor inpage" href="#h4">####</a>h4</h4>
<h5 id="h5">
  <a class="anchor inpage" href="#h5">#####</a>h5</h5>
<h6 id="h6">
  <a class="anchor inpage" href="#h6">######</a>h6</h6>
<h2 id="fonts">
  <a class="anchor inpage" href="#fonts">##</a>fonts</h2>
<p><strong>bold text</strong> and <em>italic text</em>. and both <strong><em>bold and italic</em></strong> and <em><strong>jlkfas</strong></em></p>
<p>try some thing new: <del>delete</del>, <ins>insert</ins>, <mark>mark</mark>, superscript<sup>2</sup> and subscript<sub>2</sub></p>
<p>some Typographer</p>
<pre><code>... &amp;hellip;    horizontal ellipsis
'   &amp;rsquo; apostrophe
--  &amp;ndash; en dash
--- &amp;mdash; em dash
«   &amp;laquo; left angle quote
“   &amp;ldquo; left double quote
‘   &amp;lsquo; left single quote
»   &amp;raquo; right angle quote
”   &amp;rdquo; right double quote
’   &amp;rsquo; right single quote
</code></pre>
<p>as</p>
<p>&hellip; … horizontal ellipsis
&rsquo; ’ apostrophe
&ndash; – en dash
&mdash; — em dash
« « left angle quote
“ “ left double quote
‘ ‘ left single quote
» » right angle quote
” ” right double quote
’ ’ right single quote</p>
<h2 id="callouts">
  <a class="anchor inpage" href="#callouts">##</a>callouts</h2>
<p>some text</p>
<blockquote class="alert alert-note">
      <p class="alert-heading">a</p></blockquote><p>and other</p>
<blockquote class="alert alert-tip">
      <p class="alert-heading">b</p></blockquote><blockquote class="alert alert-important">
      <p class="alert-heading">重要</p></blockquote><blockquote class="alert alert-warning">
      <p class="alert-heading">WARNING</p><p>hell</p></blockquote><blockquote class="alert alert-caution">
      <p class="alert-heading">CAUTION</p><p>waow</p>
<blockquote class="alert alert-warning">
      <p class="alert-heading">WARNING</p><p>nested</p></blockquote><p>blocks</p></blockquote><h3 id="blockquotes">
  <a class="anchor inpage" href="#blockquotes">###</a>blockquotes</h3>
<blockquote class="alert"><p>just<br>
a quote</p>
</blockquote><p>nest</p>
<blockquote class="alert"><p>nest</p>
<blockquote class="alert"><p>anoth</p>
</blockquote></blockquote><p>and</p>
<blockquote class="alert"><p>nest</p>
<blockquote class="alert"><p>anoth</p>
</blockquote><p>a</p>
</blockquote><h2 id="latex">
  <a class="anchor inpage" href="#latex">##</a>latex</h2>
<p>行间</p>
<pre><code>\[
\mathrm{e}^{\theta \mathrm{i}} = \cos \theta + \mathrm{i}\sin \theta
\]
</code></pre>
<p>和</p>
<pre><code>\[
\mathcal{E}=\mathcal{O}^{\oplus n} \rightarrow \mathcal{F}
\]
</code></pre>
<p>为
</p>
\[
\mathrm{e}^{\theta \mathrm{i}} = \cos \theta + \mathrm{i}\sin \theta
\]<p>
和
</p>
\[
\mathcal{E}=\mathcal{O}^{\oplus n} \rightarrow \mathcal{F}
\]<p>
行中 <code>$E=mc^2$</code> 和 <code>\(E=mc^2\)</code> 为 $E=mc^2$ 和 \(E=mc^2\)</p>
<h2 id="footnotes">
  <a class="anchor inpage" href="#footnotes">##</a>footnotes</h2>
<p>some text.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> And named footnote<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> another footnote<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup> what if <sup id="fnref1:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> same one.</p>
<h2 id="forms">
  <a class="anchor inpage" href="#forms">##</a>forms</h2>
<p>select 跳转</p>
<pre><code>&lt;select onchange=&quot;location = this.value;&quot;&gt;
&lt;option value=&quot;&quot;&gt;导航菜单&lt;/option&gt;
&lt;option value=&quot;/&quot;&gt;首页&lt;/option&gt;
&lt;option value=&quot;/glade&quot;&gt;关于&lt;/option&gt;
&lt;/select&gt;
</code></pre>
<select onchange="location = this.value;">
  <option value="">导航菜单</option>
  <option value="/">首页</option>
  <option value="/about">关于</option>
</select>
<details><summary>details</summary>
<ul>
  <li>nested</li>
  <li> ul </li>
</ul>
</details>
<h2 id="lists">
  <a class="anchor inpage" href="#lists">##</a>lists</h2>
<p>some texts</p>
<ul>
<li>askjdfk</li>
<li>jklasdf
<ul>
<li>nested
<ol>
<li>mixed type</li>
<li>ok</li>
</ol>
</li>
<li>sdajfl</li>
</ul>
</li>
<li>laksdfjlk</li>
</ul>
<p>ok, then another list</p>
<ol>
<li>i do</li>
<li>not</li>
</ol>
<h2 id="codes">
  <a class="anchor inpage" href="#codes">##</a>codes</h2>
<h3 id="inline-codes">
  <a class="anchor inpage" href="#inline-codes">###</a>inline codes</h3>
<p>asdfjlk <code>ajsdfj</code> sdjfakl</p>
<h3 id="code-fences">
  <a class="anchor inpage" href="#code-fences">###</a>code fences</h3>
<p>iolkjlkasdf</p>
<details open>
    <summary>bash</summary><pre
        class="chroma codeblock"
      ><code class="language-bash" data-lang="bash"
          ><span style="display:flex;"><span><span style="color:#75715e">#!/bin/bash --noprofile --norc
</span></span></span><span style="display:flex;"><span><span style="color:#75715e"></span>export MY_VARIABLE<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;value&#34;</span></span></span></code
        ><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><details open>
    <summary>TEXT</summary><pre
        class="codeblock"
      ><code class="language-" data-lang="">#!/bin/bash --noprofile --norc
export MY_VARIABLE=&#34;value&#34;
echo &#34;Current PATH: $PATH&#34;</code><button onclick="copyCode(this)" class="copybtn">copy</button></pre></details>

  <script>
    function copyCode(btn) {
      const code = btn.previousElementSibling.textContent.trim();
      navigator.clipboard.writeText(code).then(() => {
        btn.innerText = "copied";
        setTimeout(() => (btn.innerText = "copy"), 2000);
      });
    }
  </script><p>this is confusing</p>
<pre><code>#!/bin/bash --noprofile --norc
export MY_VARIABLE=&quot;value&quot;
echo &quot;Current PATH: $PATH&quot;
</code></pre>
<h3 id="pre">
  <a class="anchor inpage" href="#pre">###</a>pre</h3>
<pre><code>       一剪梅·舟过吴江 蒋捷
一片春愁待酒浇。江上舟摇，楼上帘招。
秋娘渡与泰娘桥，风又飘飘，雨又萧萧。
何日归家洗客袍？银字笙调，心字香烧。
流光容易把人抛，红了樱桃，绿了芭蕉。
</code></pre>
<hr>
<h2 id="table">
  <a class="anchor inpage" href="#table">##</a>table</h2>
<table>
  <thead>
      <tr>
          <th>ajksldf</th>
          <th>dsf</th>
          <th>dfs</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>dfs</td>
          <td>dfs</td>
          <td>dfsx</td>
      </tr>
      <tr>
          <td>ss</td>
          <td>eet</td>
          <td>zzz</td>
      </tr>
      <tr>
          <td>dsfwe</td>
          <td>dsfb</td>
          <td>we</td>
      </tr>
  </tbody>
</table>
<h2 id="plain-text">
  <a class="anchor inpage" href="#plain-text">##</a>plain text</h2>
<p>ok Let me see.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>what is this&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a>&#160;<a href="#fnref1:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>a footnote with name.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>another footnote&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item></channel></rss>