<?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>Original on Ben&#39;s Blog</title>
    <link>https://jinpeng.cv/en/categories/original/</link>
    <description>Recent content in Original on Ben&#39;s Blog</description>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <copyright>©️ 2025 Ben</copyright>
    <lastBuildDate>Mon, 09 Mar 2026 22:26:59 -0600</lastBuildDate>
    <atom:link href="https://jinpeng.cv/en/categories/original/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hugo &#43; Obsidian: An Elegant Image Hosting-Free Solution</title>
      <link>https://jinpeng.cv/en/posts/note/code/note_20250331012336/</link>
      <pubDate>Sun, 30 Mar 2025 17:23:36 +0000</pubDate>
      <guid>https://jinpeng.cv/en/posts/note/code/note_20250331012336/</guid>
      <description>&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;p&gt;When managing images for a Hugo blog in Obsidian, using an image hosting service can be unstable. Without one, inserting images becomes difficult and maintenance is cumbersome. Common issues include:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Path Confusion&lt;/strong&gt;: Manual maintenance of the &lt;code&gt;/static/images&lt;/code&gt; directory structure is required.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-language Adaptation&lt;/strong&gt;: Duplicate configuration is needed for Chinese and English paths.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Poor Development Experience&lt;/strong&gt;: Frequent 404 errors occur during local debugging and file operations.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;demonstration&#34;&gt;Demonstration&lt;/h2&gt;
&lt;p&gt;Direct rendering may result in errors due to incorrect paths, as shown below:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<h2 id="problem">Problem</h2>
<p>When managing images for a Hugo blog in Obsidian, using an image hosting service can be unstable. Without one, inserting images becomes difficult and maintenance is cumbersome. Common issues include:</p>
<ol>
<li><strong>Path Confusion</strong>: Manual maintenance of the <code>/static/images</code> directory structure is required.</li>
<li><strong>Multi-language Adaptation</strong>: Duplicate configuration is needed for Chinese and English paths.</li>
<li><strong>Poor Development Experience</strong>: Frequent 404 errors occur during local debugging and file operations.</li>
</ol>
<h2 id="demonstration">Demonstration</h2>
<p>Direct rendering may result in errors due to incorrect paths, as shown below:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">GET http://192.168.3.29:1313/en/static/images/diary/two-ways.png <span class="m">404</span> <span class="o">(</span>Not Found<span class="o">)</span>
</span></span></code></pre></td></tr></table>
</div>
</div><p>After applying the script, the image path is corrected and re-requested:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">Replaced: http://192.168.3.29:1313/en/static/images/diary/two-ways.png -&gt; http://192.168.3.29:1313/images/diary/two-ways.png
</span></span></code></pre></td></tr></table>
</div>
</div><p>The image is then rendered correctly.</p>
<img loading="lazy" src="../../../../static/images/note/%E6%88%AA%E5%9B%BE%E7%A4%BA%E4%BE%8B.png"><h2 id="solution">Solution</h2>
<p>This section provides a conceptual reference. Anyone can easily implement it. If you need the source code, feel free to request it in the comments.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="cl"><span class="c1">// instead_images.js
</span></span></span><span class="line"><span class="cl"><span class="kr">const</span> <span class="nx">IMAGE_REWRITER_CONFIG</span> <span class="o">=</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="nx">pathPatterns</span><span class="o">:</span> <span class="p">[</span>
</span></span><span class="line"><span class="cl">    <span class="p">{</span>
</span></span><span class="line"><span class="cl">      <span class="nx">test</span><span class="o">:</span> <span class="sr">/(\/zh|\/en)\/static\/images\/(.*)/</span><span class="p">,</span>
</span></span><span class="line"><span class="cl">      <span class="nx">replace</span><span class="o">:</span> <span class="s1">&#39;/images/$2&#39;</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">  <span class="p">],</span>
</span></span><span class="line"><span class="cl">  <span class="nx">debug</span><span class="o">:</span> <span class="kc">true</span>
</span></span><span class="line"><span class="cl"><span class="p">};</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="kd">function</span> <span class="nx">rewriteImageSource</span><span class="p">(</span><span class="nx">src</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// Implement smart path conversion
</span></span></span><span class="line"><span class="cl">  <span class="c1">// [Core logic code...]
</span></span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// Hijack the native image creation method
</span></span></span><span class="line"><span class="cl"><span class="nb">document</span><span class="p">.</span><span class="nx">createElement</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">tagName</span><span class="p">)</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// [Image object hijacking code...]
</span></span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1">// Dynamic content handling
</span></span></span><span class="line"><span class="cl"><span class="k">new</span> <span class="nx">MutationObserver</span><span class="p">(()</span> <span class="p">=&gt;</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">  <span class="c1">// [Auto-processing for new images code...]
</span></span></span><span class="line"><span class="cl"><span class="p">});</span>
</span></span></code></pre></td></tr></table>
</div>
</div><h2 id="configuration">Configuration</h2>
<h3 id="configure-hugo">Configure Hugo</h3>
<p>In <code>config.yaml</code>, set:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-yml" data-lang="yml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">InsteadPicture</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span></code></pre></td></tr></table>
</div>
</div><p>Then, simply include the following in the head section:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">-</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">.</span><span class="nx">Site</span><span class="p">.</span><span class="nx">Params</span><span class="p">.</span><span class="nx">InsteadPicture</span><span class="w"> </span><span class="o">-</span><span class="p">}}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nx">script</span><span class="w"> </span><span class="nx">src</span><span class="p">=</span><span class="s">&#34;{{ &#34;</span><span class="o">/</span><span class="nx">js</span><span class="o">/</span><span class="nx">instead_images</span><span class="p">.</span><span class="nx">js</span><span class="s">&#34; | relURL }}&#34;</span><span class="p">&gt;&lt;</span><span class="o">/</span><span class="nx">script</span><span class="p">&gt;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">-</span><span class="w"> </span><span class="nx">end</span><span class="w"> </span><span class="o">-</span><span class="p">}}</span><span class="w">
</span></span></span></code></pre></td></tr></table>
</div>
</div><p>After configuring Obsidian, the solution will take effect.</p>
<h3 id="configure-obsidian">Configure Obsidian</h3>
<ol>
<li>Set file references to use <strong>relative path</strong> mode.</li>
<li>Configure the image storage directory as needed. For example, mine is <code>static\images\</code>.</li>
<li>No need to worry about file changes—Obsidian automatically updates links when files are moved.</li>
</ol>
<h2 id="advantages">Advantages</h2>
<ol>
<li><strong>No Dependency on Image Hosting</strong>: All images are managed locally without any file operations.</li>
<li><strong>Developer-Friendly</strong>: Real-time reloading doesn’t disrupt the writing flow.</li>
<li><strong>SEO Optimization</strong>: Ensures consistency in static resource paths.</li>
<li><strong>Multi-platform Compatibility</strong>: Works seamlessly with static site generators like Hugo/Hexo.</li>
<li><strong>Easy Organization</strong>: Moving file paths can rely on Obsidian to automatically update links.</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title>The End of Life</title>
      <link>https://jinpeng.cv/en/posts/essay/article_20250224232831/</link>
      <pubDate>Mon, 24 Feb 2025 23:28:31 +0000</pubDate>
      <guid>https://jinpeng.cv/en/posts/essay/article_20250224232831/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Is There a Stop Button for Life? Without relying on any external forces.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On a Saturday evening, I was strolling down the street with my partner when I received a call from my dad: &amp;ldquo;Your grandmother isn’t doing well. I’m taking leave tomorrow to visit her.&amp;rdquo; Later that night, my mom also tried to video call me. My phone was on silent, and by the time I noticed the missed call, it was almost 11 PM. When I called back, she didn’t answer.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<blockquote>
<p>Is There a Stop Button for Life? Without relying on any external forces.</p>
</blockquote>
<p>On a Saturday evening, I was strolling down the street with my partner when I received a call from my dad: &ldquo;Your grandmother isn’t doing well. I’m taking leave tomorrow to visit her.&rdquo; Later that night, my mom also tried to video call me. My phone was on silent, and by the time I noticed the missed call, it was almost 11 PM. When I called back, she didn’t answer.</p>
<p>I dread those few seconds of silence before my parents speak when they call me—it often signals that they’re about to share some unwelcome news. The weight of those moments is palpable, and I’ve received several such calls before. Each time, I’m left at a loss for how to respond.</p>
<p>This time, it was about my grandmother. Strangely, my heart didn’t churn with the usual turmoil, mainly for two reasons: first, my grandmother had been ill for a long time and was already 89 years old; second, I’ve experienced far more sorrowful events, and my interactions with her had been limited.</p>
<h2 id="if-the-world-were-an-animal">If the World Were an Animal</h2>
<p>I once compared our lives to the process of digestion, with the world as the animal. Whether we’re apples, rice, eggs, beef, water, or anything else, our birth is like entering the mouth of society. We’re broken down, absorbed, and our inherent value is extracted. When we’re deemed worthless, we’re expelled from this societal body.</p>
<p>And just like that, our lives come to an end. But what choices do we have in this process? Upon reflection, quite a few. From the moment we enter the mouth, we can choose to cling to society’s front teeth, or become a fishbone stuck in its gums. Once in the stomach, if it’s unbearable, we might turn into watermelon or scalding hotpot oil to hasten the end of this painful ordeal. Or, adopting a sacrificial approach, we could become sickly sweet beverages, giving our all to inflict ailments like diabetes upon this societal organism&hellip;</p>
<p>Of course, these are just fantasies. More often than not, we have no say in what we become. Sometimes, society might not even want to consume us—most &ldquo;food&rdquo; is stripped of nutrients and expelled without exception. The silver lining is that whatever consumes us has its own life cycle—it too will fall ill, die, decompose, and be absorbed. After we’re expelled, though our nutrients are gone (nutrients being relative to the society that digested us), we’re actually returning to—or entering—a vaster world, where life continues endlessly.</p>
<p>If this is the truth of life, how should we choose to live? Different people will offer different answers, some of which may work temporarily. Transforming ourselves into toxins might seem impactful, but from the perspective of our ecosystem, the effect is often negligible.</p>
<p>Perhaps the most optimistic attitude is to view this digestive process as a journey. Actively explore, observe, and marvel at the exquisite world our lives create and sustain. Alternatively, quietly completing this journey without overthinking is also a perfectly valid choice.</p>
<h2 id="the-love-of-parents">The Love of Parents</h2>
<p>This article has taken so long to finish that I’ve forgotten what this subheading was meant to convey.</p>
<p>Alas!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Jealousy and Comparison</title>
      <link>https://jinpeng.cv/en/posts/essay/jealous-and-comparison/</link>
      <pubDate>Wed, 11 Dec 2024 21:08:55 +0800</pubDate>
      <guid>https://jinpeng.cv/en/posts/essay/jealous-and-comparison/</guid>
      <description>Desc Text.</description>
      <content:encoded><![CDATA[<p>I am envious of certain things, not the luxurious ones like wealth or power, but rather talents and the like. For instance, people like Zhu Ziqing, Shi Tiesheng, and Lu Xun, to name a few, though I can&rsquo;t list more due to my limited knowledge.</p>
<p>There are many people in this world who possess extraordinary talents, minds, and inspirations. They often create works that strike a chord with people&rsquo;s hearts. They can shape the world through their creations, or at the very least, earn a living by exchanging their works for sustenance.</p>
<p>A minute ago, I was also pondering what meaningful things I could do that would also keep me from starving. Based on my own growth experiences and areas of expertise, I came up with two plausible answers. One is developing software, and the other is writing. Unfortunately, neither of these has brought me any profit so far, mainly because I haven&rsquo;t produced or created anything worth paying for. I haven&rsquo;t soothed people&rsquo;s weary bodies nor touched their souls, which is the root cause of my failure.</p>
<p>It&rsquo;s not that I want to do these two things for money; fundamentally, I love these activities, though the extent of my passion might make you question it. This leads to comparisons. The gap between me and other successful developers lies in the fact that I haven&rsquo;t invested enough time in this field. If I had been admitted to the information security major, things might have been very different. Many things I&rsquo;m interested in have been abandoned due to my laziness, procrastination, and other commitments.</p>
<p>Comparing myself to literary giants naturally leads to a clear conclusion. I also haven&rsquo;t invested enough time in this endeavor. Additionally, I&rsquo;m not particularly skilled at writing, which was evident from the very beginning of my learning process. I lack the necessary sense of rendering,铺垫, and修辞 that writing requires. I write merely to express the restless thoughts in my mind, which command my mediocre body, and I have no choice but to obey her orders, thus conveying her commands through my fingertips.</p>
<p>I believe my mind is the same as those of literary giants; they have the same bizarre, beautiful, absurd, tragic, and ugly thoughts. But my mediocre body hasn&rsquo;t been honed through socialization and technical training, which makes me compare and feel envious. I also want to become a literary giant, to captivate, shock, and touch souls with just the clatter of my fingertips.</p>
<p>Perhaps it&rsquo;s the desperation that breeds change. My brain only gives me commands to execute, never offering any reward. The current dire situation forces me to think about how to quietly engage in a side hustle while carrying out these orders. I think, perhaps with my peculiar and whimsical ideas, I could become a comforter of souls, offering services to souls in exchange for their rewards.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
