<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on BoilTask's Blog</title><link>https://boiltask.com/en/tags/blog/</link><description>Recent content in Blog on BoilTask's Blog</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Wed, 11 Nov 2026 22:52:11 +0800</lastBuildDate><atom:link href="https://boiltask.com/en/tags/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>📌First Official Post, Let's Just Chat</title><link>https://boiltask.com/en/record/first-blog/</link><pubDate>Wed, 18 Nov 2015 05:21:05 +0000</pubDate><guid>https://boiltask.com/en/record/first-blog/</guid><description>&lt;p&gt;It seems that ever since Qzone started to become popular, blogs have been trending toward obsolescence; it seems only some professionals are willing to stick with this form of communication&amp;hellip;&lt;/p&gt;
&lt;p&gt;Anyway, blogs still have their advantages and merits—for example, this code annotation feature I really like. Awesome&amp;hellip;&lt;/p&gt;
&lt;p style="text-align:center"&gt;
Thoughts and goals
&lt;/p&gt;
&lt;p style="text-align:center"&gt;
Since the blog has been created, we can't just let it be useless~
&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll record some things I see and think about along the learning path, even though probably not many people will read them here -_-&lt;/p&gt;
&lt;p&gt;But ╮(╯_╰)╭ it doesn&amp;rsquo;t matter~ It&amp;rsquo;s a gift to myself. After all, being nostalgic and having something to be nostalgic about is a really great thing&amp;hellip;&lt;/p&gt;
&lt;p&gt;As a blog for &lt;span style="background-color:black;color:white;"&gt;discussing tech&lt;/span&gt;~ I&amp;rsquo;ll just write some code casually in this first post&amp;hellip;&lt;/p&gt;
&lt;p style="font-family:'Times New Roman',Georgia,Serif;"&gt;
Thinking back to when I was little, I still liked this kind of informal font. I was intimidated by the Englishness of C, plus I had a playful mindset, so I chose to learn randomly for a while. The most useful thing was the so-called Chinese programming E-language... and so...
&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;
&lt;div class="highlight-header"&gt;
&lt;span class="highlight-language"&gt;易语言&lt;/span&gt;
&lt;/div&gt;
&lt;div class="highlight-body"&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;标签1.标题=“你好世界！我就是不写英文”&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Back then I hadn&amp;rsquo;t even used things like debug output&amp;hellip; because I felt they were useless&amp;hellip;&lt;/p&gt;
&lt;p&gt;But&amp;hellip;&lt;/p&gt;
&lt;p style="text-align:center;color:red"&gt;
Since I've chosen computer science as my major, even if I turn to ashes, I'll drift forward with the wind!
&lt;/p&gt;
&lt;p&gt;At the start of this freshman semester, I seriously looked at C for the first time&amp;hellip; and wrote:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;
&lt;div class="highlight-header"&gt;
&lt;span class="highlight-language"&gt;cpp&lt;/span&gt;
&lt;/div&gt;
&lt;div class="highlight-body"&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#include&amp;lt;stdio.h&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Hello World&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I gave in&amp;hellip; so I studied patiently&amp;hellip; and by now I prefer writing&amp;hellip;&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;
&lt;div class="highlight-header"&gt;
&lt;span class="highlight-language"&gt;cpp&lt;/span&gt;
&lt;/div&gt;
&lt;div class="highlight-body"&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-cpp" data-lang="cpp"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#include&amp;lt;stdio.h&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;Hello World&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;我还是喜欢中文！&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;╮(╯▽╰)╭ You&amp;rsquo;ve got to have goals in mind&lt;/p&gt;
&lt;p&gt;China&amp;rsquo;s computing industry has to keep working hard!&lt;/p&gt;
&lt;p&gt;Keep going, keep going!&lt;/p&gt;
&lt;p&gt;Thoughts and reflections—I&amp;rsquo;ll talk about them slowly later~&lt;/p&gt;
&lt;p&gt;I also still need to keep working on the website issues!&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://BoilTask.com" target="_blank" rel="noopener"&gt;Boiling Dream Space——www.BoilTask.com&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Couldn't Resist Adding a Backend Service to the Blog</title><link>https://boiltask.com/en/record/blog-serverless/</link><pubDate>Wed, 11 Nov 2026 22:52:11 +0800</pubDate><guid>https://boiltask.com/en/record/blog-serverless/</guid><description>&lt;p&gt;Ever since I migrated my blog to Hugo, this pure-static deployment approach has become increasingly addictive—so much so that for many local scratch documents, I lean toward spinning up a static site service just to get a better reading experience.&lt;/p&gt;
&lt;p&gt;But for a blog, some services inevitably involve a backend—the view count mechanism, for example.&lt;/p&gt;
&lt;p&gt;I used to rely on &lt;a class="link" href="https://www.busuanzi.cc/" target="_blank" rel="noopener"&gt;Busuanzi&lt;/a&gt; as the counting service, but lately it has been in an abnormal state. After all, as a free third-party service with no quality guarantee, it&amp;rsquo;s hard to be too harsh on it. Still, running into problems is unpleasant, so I started thinking about building my own backend service.&lt;/p&gt;
&lt;p&gt;There are actually quite a few ways to host a backend server these days—Edgeone offers Edge Functions, and Cloudflare has similar Worker and KV storage services. But these services do have limitations; for example, if I want a post list that displays view counts, or even sorts by view count, it&amp;rsquo;s not easy to pull off.&lt;/p&gt;
&lt;p&gt;Fortunately, I was already using Alibaba Cloud&amp;rsquo;s Serverless and PostgreSQL database, so additionally supporting the blog service wouldn&amp;rsquo;t add much overhead. So I had AI vibe a backend, and that&amp;rsquo;s how the current blog backend came to be.&lt;/p&gt;
&lt;p&gt;With the backend in place, the frontend encryption I&amp;rsquo;d built earlier could be replaced, so I switched to backend encryption to improve security.&lt;/p&gt;
&lt;p&gt;Still, per the plan, it will remain a lightweight backend design—meaning even if the backend server goes down completely, the core blog experience won&amp;rsquo;t be much affected.&lt;/p&gt;</description></item><item><title>Importing Third-Party Libraries Locally in Hugo</title><link>https://boiltask.com/en/knowledge/hugo-third-party/</link><pubDate>Mon, 09 Feb 2026 13:01:27 +0800</pubDate><guid>https://boiltask.com/en/knowledge/hugo-third-party/</guid><description>&lt;p&gt;Under Hugo&amp;rsquo;s design, third-party libraries hosted on external sites are typically used to implement certain effects.&lt;/p&gt;
&lt;p&gt;However, depending on the network environment, you may sometimes want to download these third-party libraries locally and deploy them alongside your site to simplify network dependencies.&lt;/p&gt;
&lt;p&gt;You can use npm to download these third-party libraries, then copy them into Hugo&amp;rsquo;s output static asset directory during deployment.&lt;/p&gt;
&lt;p&gt;For reference: &lt;a class="link" href="https://github.com/BoilTask/web-third-party" target="_blank" rel="noopener"&gt;BoilTask/web-third-party&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Finally Created a Hugo Theme Based on My Own Understanding</title><link>https://boiltask.com/en/record/hugo-boiltask-blog/</link><pubDate>Fri, 16 Jan 2026 13:08:03 +0800</pubDate><guid>https://boiltask.com/en/record/hugo-boiltask-blog/</guid><description>&lt;p&gt;Thanks to advances in large models, with the help of &lt;a class="link" href="https://www.trae.cn/" target="_blank" rel="noopener"&gt;Trae&lt;/a&gt;, I was finally able to build a theme that matches my own design and expectations.&lt;/p&gt;
&lt;p&gt;The overall design references the &lt;a class="link" href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener"&gt;hugo-theme-stack&lt;/a&gt; theme I used before, though I made many adjustments based on my own needs.&lt;/p&gt;
&lt;p&gt;First, the layout uses three columns: navigation on the left, content in the middle, and a sidebar on the right.&lt;/p&gt;
&lt;p&gt;The navigation bar can switch between menus and the article tree, and users can drag to resize its width; on narrow phone screens it collapses into a single button that users can tap to expand.&lt;/p&gt;
&lt;p&gt;The article tree draws on the directory structures of products like Notion and knowledge bases, which are a great way to organize article structure. So I allow specifying a &lt;code&gt;parent&lt;/code&gt; in an article to establish parent-child relationships, which generates an &lt;a class="link" href="https://boiltask.com/tree/index.json"&gt;article tree configuration&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The content area uses the &lt;a class="link" href="https://github.com/lxgw/LxgwWenKai" target="_blank" rel="noopener"&gt;LXGW WenKai&lt;/a&gt; font, an open-source Chinese typeface that renders Chinese text very well.&lt;/p&gt;
&lt;p&gt;The table of contents on the right is generated automatically from the article&amp;rsquo;s heading structure; users can click an entry to jump to that position, and it hides when the screen is narrow.&lt;/p&gt;
&lt;p&gt;The overall palette is Solarized, which I&amp;rsquo;ve loved since I entered the industry. It creates a paper-like feel, and I also considered dark mode. Under this design the body text has an ink-black quality, while links have the texture of blue ink.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://r2.boiltask.com/2026/02/7aaf95447876c62b9cdc0ae4263de6c6.png"
loading="lazy"
alt="Site style"
&gt;&lt;/p&gt;
&lt;p&gt;From experience it basically matches my current aesthetic, though I may keep refining it later.&lt;/p&gt;
&lt;p&gt;But as I said before, what matters most for a blog is certainly the content; reworking the theme is more about the author&amp;rsquo;s sentiment and personal emotional value.&lt;/p&gt;
&lt;p&gt;Given my limited capabilities, I can&amp;rsquo;t offer long-term, stable support, and inspiration strikes at any time, so there may be some breaking updates that can&amp;rsquo;t be guaranteed to suit everyone&amp;rsquo;s taste — hence I&amp;rsquo;m not planning to open-source it for now.&lt;/p&gt;
&lt;p&gt;If you have questions, suggestions, or feedback, feel free to discuss them in the comments below.&lt;/p&gt;</description></item><item><title>Finally Finished Migrating CSDN After Months</title><link>https://boiltask.com/en/record/oj-problem-migrate/</link><pubDate>Fri, 30 May 2025 23:53:23 +0800</pubDate><guid>https://boiltask.com/en/record/oj-problem-migrate/</guid><description>&lt;p&gt;Back in college I uploaded a large batch of OJ problem solutions to CSDN (though many of them were trivial problems). Several previous migrations skipped these problems entirely, because the volume was too large and the payoff too low.&lt;/p&gt;
&lt;p&gt;In early April, inspiration struck out of nowhere: I wanted to migrate all these articles to Hugo, where managing them as markdown would be more flexible. Thinking back to when I wrote them, what I actually wanted was a backup of the md files, but it never happened because it was too much hassle. Taking this opportunity, I&amp;rsquo;ve finally sorted these articles out again.&lt;/p&gt;
&lt;p&gt;Along the way, I built a lot of scaffolding just to support this one thing—things like various shortcodes for displaying problems, a &lt;a class="link" href="https://oj.boiltask.com" target="_blank" rel="noopener"&gt;crawler site&lt;/a&gt; for backing up static problem statements, and a brand-new &lt;a class="link" href="https://oj.didapipa.com" target="_blank" rel="noopener"&gt;DidaOJ&lt;/a&gt; system rebuilt from scratch.&lt;/p&gt;
&lt;p&gt;In short, although the process was fairly manual labor, the result is quite satisfying.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve also left some TODOs behind. Some are because the original site was temporarily or permanently unreachable, making many records hard to recover; others are loose ends I left back then and never tied up after all these years.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll gradually improve them when I get the chance later (hopefully this isn&amp;rsquo;t just another flag for a new pit).&lt;/p&gt;
&lt;p&gt;Going forward, similar solution posts will preferentially be submitted under the category: &lt;a class="link" href="https://boiltask.com/categories/oj/"&gt;OnlineJudge&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Joined Some Blogging Communities</title><link>https://boiltask.com/en/record/join-blog-group/</link><pubDate>Mon, 21 Apr 2025 22:06:12 +0800</pubDate><guid>https://boiltask.com/en/record/join-blog-group/</guid><description>&lt;p&gt;Through information I came across on other blogs, I recently applied to join several blog interconnection organizations one after another.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://icp.gov.moe/?keyword=20250158" target="_blank" rel="noopener"&gt;Moe ICP Filing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.foreverblog.cn/go.html" target="_blank" rel="noopener"&gt;Ten-Year Pact - Wormhole&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.travellings.cn/go.html" target="_blank" rel="noopener"&gt;Travellings&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If any friends would like to exchange friend links, feel free to leave a message on the page: &lt;a class="link" href="https://boiltask.com/links"&gt;Friend Links - BoilTask&amp;rsquo;s Blog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While organizing my articles, I found that many posts I had previously published on CSDN had been scraped by crawlers onto all kinds of platforms. Some of them are even large platforms that rely on crawlers to fill their own content. Thinking about this kind of environment in the Chinese internet, it&amp;rsquo;s quite sad.&lt;/p&gt;
&lt;p&gt;At least a self-hosted blog has one advantage: it&amp;rsquo;s hard to write a general-purpose crawler for it, and to some extent it can reduce the probability of mindless reposting.&lt;/p&gt;
&lt;p&gt;How should I put it? Choosing to build my own site is more about satisfying my desire to share and my sense of accomplishment. Looking back years later, it will have its own special flavor. If I can keep going, I&amp;rsquo;ll keep going~&lt;/p&gt;
&lt;p&gt;Here I still have to thank the cyber saint Cloudflare again for providing so much powerful, easy-to-use, and affordable support.&lt;/p&gt;</description></item><item><title>Baidu Site Verification 308 Issue in Cloudflare Pages Environment</title><link>https://boiltask.com/en/knowledge/cloudflare-page-baidu-308/</link><pubDate>Sat, 19 Apr 2025 19:46:23 +0800</pubDate><guid>https://boiltask.com/en/knowledge/cloudflare-page-baidu-308/</guid><description>&lt;p&gt;Baidu provides a webmaster service. After verification, you can influence the behavior of some Baidu crawlers and also check link visibility on Baidu.&lt;/p&gt;
&lt;p&gt;Service address: &lt;a class="link" href="https://ziyuan.baidu.com/site/" target="_blank" rel="noopener"&gt;Baidu Search Resource Platform&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When updating the verification information for this site, I found that file verification failed. After investigating, I found that the link conflicts with Cloudflare&amp;rsquo;s mechanism.&lt;/p&gt;
&lt;p&gt;For detailed verification instructions, see: &lt;a class="link" href="https://zy.baidu.com/academy/detail?id=1003" target="_blank" rel="noopener"&gt;Illustrated Guide to Site Verification&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cloudflare automatically converts test.html to test, so Baidu cannot find it when accessing the original URL.&lt;/p&gt;
&lt;p&gt;Here, the approach is to append another .html after the normal file, creating a test.html.html structure, so that after conversion there is still a suffix.&lt;/p&gt;
&lt;p&gt;Reference article: &lt;a class="link" href="https://blog.ovvv.top/posts/e7163e6b/" target="_blank" rel="noopener"&gt;Baidu indexing Cloudflare Page shows 308 error&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Suddenly Want to Start a New Project and Make a Theme</title><link>https://boiltask.com/en/record/fork-hugo-theme-stack/</link><pubDate>Sat, 05 Apr 2025 03:21:08 +0800</pubDate><guid>https://boiltask.com/en/record/fork-hugo-theme-stack/</guid><description>&lt;p&gt;Suddenly want to start a new project — maybe &lt;code&gt;fork&lt;/code&gt; &lt;a class="link" href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener"&gt;hugo-theme-stack&lt;/a&gt; and hack it myself?&lt;/p&gt;
&lt;p&gt;Though I might just be talking…&lt;/p&gt;
&lt;p&gt;That said, Hugo&amp;rsquo;s theme management approach is quite convenient. I&amp;rsquo;ll probably add features I want step by step, and if the scale gets big enough, starting a new theme doesn&amp;rsquo;t seem like a bad idea…&lt;/p&gt;
&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener"&gt;GitHub - CaiJimmy/hugo-theme-stack: Card-style Hugo theme designed for bloggers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://github.com/hugo-fixit/FixIt" target="_blank" rel="noopener"&gt;GitHub - hugo-fixit/FixIt: 🔧 A clean, elegant but advanced blog theme for Hugo — a clean, elegant and efficient Hugo theme&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;20251229 With the rise of Vibe Codeing, the &lt;a class="link" href="https://oj.boiltask.com/" target="_blank" rel="noopener"&gt;BoilTask Online Judge Problem&lt;/a&gt; site has adopted the new theme.&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Trying to Combine Obsidian with Hugo</title><link>https://boiltask.com/en/record/try-obsidian/</link><pubDate>Thu, 03 Apr 2025 21:40:08 +0800</pubDate><guid>https://boiltask.com/en/record/try-obsidian/</guid><description>&lt;p&gt;I used to be a devoted Notion user, but after not using Notion for a long time again, I started thinking about choosing a note-taking app once more.&lt;/p&gt;
&lt;p&gt;I had always felt that Obsidian, as a locally stored note-taking app, was not as powerful as Notion and required handling sync and other issues yourself, so it should not have much of an advantage.&lt;/p&gt;
&lt;p&gt;However, after tinkering with Hugo last time, I increasingly felt that for notes, returning to basics suits me better; otherwise, it is too easy to get distracted by fiddling with styles, layout, and similar things. In the end, I found that apart from the designed templates, there was not much actual content.&lt;/p&gt;
&lt;p&gt;After downloading Obsidian, I found that it fits Hugo&amp;rsquo;s workflow surprisingly well. Using Obsidian to manage the workspace is more suitable for document organization than an IDE focused on coding. Although this makes the &amp;ldquo;expensive&amp;rdquo; Typora I bought somewhat wasteful, at least it can finally be put to good use.&lt;/p&gt;
&lt;p&gt;Speaking of which, as a user who bought Typora at launch as soon as its paid plan came out, I seem to have barely used it since buying it&amp;hellip; Conversely, back when it was free, I did use it to write some things.&lt;/p&gt;
&lt;p&gt;Open Hugo&amp;rsquo;s folder with Obsidian, write content under the &lt;code&gt;content&lt;/code&gt; path as usual, and then put some articles that do not need to be uploaded to the blog, as well as some articles that Hugo does not support, in a separate folder.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;20260210: In the end, I found it had become what I said before—blogs are still content-first, and a notepad might be the best tool (now I use VSCODE-like tools).&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Introducing pangu.js to the Hugo Blog</title><link>https://boiltask.com/en/record/hugo-pangu/</link><pubDate>Thu, 03 Apr 2025 09:06:12 +0800</pubDate><guid>https://boiltask.com/en/record/hugo-pangu/</guid><description>&lt;p&gt;I used to often struggle with typography when mixing Chinese and English, so I introduced &lt;code&gt;pangu.js&lt;/code&gt; to improve the typesetting effect.&lt;/p&gt;
&lt;p&gt;Official repository: &lt;a class="link" href="https://github.com/vinta/pangu.js" target="_blank" rel="noopener"&gt;vinta/pangu.js: Paranoid text spacing in JavaScript&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;pangu.autoSpacingPage()&lt;/code&gt; converts the page into the beautified result.&lt;/p&gt;
&lt;p&gt;Since loading and processing &lt;code&gt;JS&lt;/code&gt; takes time, writing it directly like this means users will first see the unprocessed page, then after a short pause it refreshes to the new content, which makes the experience feel strange.&lt;/p&gt;
&lt;p&gt;As a solution, you can consider hiding the page first, waiting for &lt;code&gt;DOM&lt;/code&gt; to finish loading, running &lt;code&gt;pangu.js&lt;/code&gt; processing first, and then showing the page again after it is done.&lt;/p&gt;
&lt;p&gt;To avoid a long first load, you can also add a Loading effect.&lt;/p&gt;
&lt;p&gt;Note that the &lt;code&gt;autoSpacingPage&lt;/code&gt; function processes asynchronously; you can switch to the blocking version &lt;code&gt;spacingPage&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="reference-code"&gt;&lt;a href="#reference-code" class="header-anchor"&gt;&lt;/a&gt;Reference Code
&lt;/h2&gt;
&lt;div class="highlight-wrapper"&gt;
&lt;div class="highlight-header"&gt;
&lt;span class="highlight-language"&gt;html&lt;/span&gt;
&lt;/div&gt;
&lt;div class="highlight-body"&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;span class="lnt"&gt;55
&lt;/span&gt;&lt;span class="lnt"&gt;56
&lt;/span&gt;&lt;span class="lnt"&gt;57
&lt;/span&gt;&lt;span class="lnt"&gt;58
&lt;/span&gt;&lt;span class="lnt"&gt;59
&lt;/span&gt;&lt;span class="lnt"&gt;60
&lt;/span&gt;&lt;span class="lnt"&gt;61
&lt;/span&gt;&lt;span class="lnt"&gt;62
&lt;/span&gt;&lt;span class="lnt"&gt;63
&lt;/span&gt;&lt;span class="lnt"&gt;64
&lt;/span&gt;&lt;span class="lnt"&gt;65
&lt;/span&gt;&lt;span class="lnt"&gt;66
&lt;/span&gt;&lt;span class="lnt"&gt;67
&lt;/span&gt;&lt;span class="lnt"&gt;68
&lt;/span&gt;&lt;span class="lnt"&gt;69
&lt;/span&gt;&lt;span class="lnt"&gt;70
&lt;/span&gt;&lt;span class="lnt"&gt;71
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;loadingOverlay&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;loader&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;加载中...&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;#&lt;/span&gt;&lt;span class="nn"&gt;loadingOverlay&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;9999&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;loader&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="kc"&gt;solid&lt;/span&gt; &lt;span class="mh"&gt;#f3f3f3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="kc"&gt;solid&lt;/span&gt; &lt;span class="mh"&gt;#3498db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;spin&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="kt"&gt;s&lt;/span&gt; &lt;span class="kc"&gt;linear&lt;/span&gt; &lt;span class="kc"&gt;infinite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;keyframes&lt;/span&gt; &lt;span class="nt"&gt;spin&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="kt"&gt;deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="kt"&gt;deg&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="c"&gt;/* 初始隐藏页面内容，避免显示未经处理的文本 */&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;main-container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;style&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;isShouldLoad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isShouldLoad&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;loadingOverlay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;loadingOverlay&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;loadingOverlay&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;loadingOverlay&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;flex&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 0.2秒如果还没有加载完成就开启Loading
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;module&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;pangu&lt;/span&gt; &lt;span class="nx"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://jspm.dev/pangu&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;DOMContentLoaded&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;isShouldLoad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;pangu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;spacingPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;elements&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementsByClassName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;main-container&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;elements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;elements&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;flex&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;loadingOverlay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;loadingOverlay&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;loadingOverlay&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;loadingOverlay&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;none&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Katex Fails After Enabling Rocket Loader in Cloudflare Environment</title><link>https://boiltask.com/en/knowledge/katex-cloudflare/</link><pubDate>Sat, 09 Nov 2024 12:45:51 +0800</pubDate><guid>https://boiltask.com/en/knowledge/katex-cloudflare/</guid><description>&lt;p&gt;After deploying the blog online, I found that the &lt;code&gt;Katex&lt;/code&gt; formulas would not display properly, while the same &lt;code&gt;Html&lt;/code&gt; file displayed correctly in the local environment.&lt;/p&gt;
&lt;p&gt;The core parsing code is as follows:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;
&lt;div class="highlight-header"&gt;
&lt;span class="highlight-language"&gt;javascript&lt;/span&gt;
&lt;/div&gt;
&lt;div class="highlight-body"&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;DOMContentLoaded&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;renderMathInElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;delimiters&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;$$&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;$$&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;$&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;$&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;\\(&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;\\)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;\\[&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;\\]&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;ignoredClasses&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;gist&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;})&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;By adding logging, I found that the &lt;code&gt;DOMContentLoaded&lt;/code&gt; event was not firing.&lt;/p&gt;
&lt;p&gt;But I couldn&amp;rsquo;t figure out the reason for a long time, until I noticed that in the online version the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag had become something like &lt;code&gt;&amp;lt;script type=&amp;quot;d6a94c0af8a975daac5bee56-text/javascript&amp;quot;&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Eventually I recalled that &lt;code&gt;Cloudflare&lt;/code&gt; had &lt;code&gt;Rocket Loader&lt;/code&gt; enabled.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Rocket Loader&lt;/code&gt; is a &lt;code&gt;Cloudflare&lt;/code&gt; feature that loads &lt;code&gt;JavaScript&lt;/code&gt; asynchronously to improve page load speed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, &lt;code&gt;Rocket Loader&lt;/code&gt; may change the loading order and thereby cause some &lt;code&gt;JavaScript&lt;/code&gt; code to fail to execute properly.&lt;/p&gt;
&lt;p&gt;I disabled &lt;code&gt;Rocket Loader&lt;/code&gt; for now, and the problem was solved.&lt;/p&gt;
&lt;p&gt;You can also disable &lt;code&gt;Rocket Loader&lt;/code&gt; by adding &lt;code&gt;data-cfasync=&amp;quot;false&amp;quot;&lt;/code&gt; to the tag, but since that would require modifying the Theme, I won&amp;rsquo;t make that change for now.&lt;/p&gt;</description></item><item><title>Configuring Giscus in Hugo</title><link>https://boiltask.com/en/knowledge/hugo-giscus/</link><pubDate>Fri, 08 Nov 2024 13:06:06 +0800</pubDate><guid>https://boiltask.com/en/knowledge/hugo-giscus/</guid><description>&lt;p&gt;While setting up a comment section for my blog, I ran into a few issues and jotted some of them down.&lt;/p&gt;
&lt;h2 id="why-giscus"&gt;&lt;a href="#why-giscus" class="header-anchor"&gt;&lt;/a&gt;Why Giscus
&lt;/h2&gt;&lt;p&gt;The &lt;code&gt;Stack&lt;/code&gt; theme uses &lt;code&gt;Disqus&lt;/code&gt; as its default comment system, but &lt;code&gt;Disqus&lt;/code&gt; is a foreign service and requires payment, so I didn&amp;rsquo;t use it.&lt;/p&gt;
&lt;p&gt;The theme also supports other common comment configurations. I first picked &lt;code&gt;Gitalk&lt;/code&gt;, which I&amp;rsquo;d noticed frequently before — using &lt;code&gt;Github&lt;/code&gt; &lt;code&gt;Issue&lt;/code&gt;s as a comment section was quite an eye-catching approach at the time.&lt;/p&gt;
&lt;p&gt;However, I ran into some permission problems during configuration and found &lt;code&gt;Gitalk&lt;/code&gt;&amp;rsquo;s permissions somewhat unreasonable: commenters have to authorize their accounts to the blogger in order to comment, and in theory the blogger then gains some permissions over the logged-in user that they shouldn&amp;rsquo;t have.
On top of that, because of cross-origin issues, you also need to find a proxy to handle CORS, which adds further privacy concerns and configuration overhead.&lt;/p&gt;
&lt;p&gt;In the end I chose &lt;code&gt;Giscus&lt;/code&gt;. It uses its own &lt;code&gt;App&lt;/code&gt; as the permission holder, and as a third party, users only need to authorize that app to complete the &lt;code&gt;Github&lt;/code&gt; authorization.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also more convenient and flexible to use.&lt;/p&gt;
&lt;h2 id="configuration-steps"&gt;&lt;a href="#configuration-steps" class="header-anchor"&gt;&lt;/a&gt;Configuration Steps
&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;Install &lt;a class="link" href="https://github.com/apps/giscus" target="_blank" rel="noopener"&gt;Giscus&lt;/a&gt; in &lt;code&gt;Github&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Authorize the repository to the app
&lt;ol&gt;
&lt;li&gt;Find &lt;code&gt;Giscus&lt;/code&gt; in &lt;a class="link" href="https://github.com/settings/installations" target="_blank" rel="noopener"&gt;Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Under &lt;code&gt;Repository access&lt;/code&gt;, select the repository where comments are stored&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Go to the &lt;a class="link" href="https://giscus.app/zh-CN" target="_blank" rel="noopener"&gt;Giscus&lt;/a&gt; website to finish the configuration
&lt;ol&gt;
&lt;li&gt;Choose a &lt;code&gt;语言&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Enter the authorized repository under &lt;code&gt;仓库&lt;/code&gt;, e.g. &lt;code&gt;BoilTask/BoilTask.github.io&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Choose the configuration you want based on the descriptions that follow&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Check the required configuration under the &lt;code&gt;启用 giscus&lt;/code&gt; section&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Just fill in the generated configuration wherever you need it.&lt;/p&gt;</description></item><item><title>Once Again Reorganizing the Blog</title><link>https://boiltask.com/en/record/202411081/</link><pubDate>Fri, 08 Nov 2024 12:46:38 +0800</pubDate><guid>https://boiltask.com/en/record/202411081/</guid><description>&lt;p&gt;Recently I’ve been organizing the event system I wrote earlier: &lt;a class="link" href="https://www.fab.com/zh-cn/listings/a3991470-a7b9-474d-8038-289dad0b0497" target="_blank" rel="noopener"&gt;DidaEvent&lt;/a&gt;, and I created a &lt;a class="link" href="https://event.didapipa.com/" target="_blank" rel="noopener"&gt;documentation&lt;/a&gt; site for it. I used &lt;code&gt;Hugo&lt;/code&gt; as the site generation system, and the experience was quite good, so I decided to migrate the blog from &lt;code&gt;WordPress&lt;/code&gt; to &lt;code&gt;Hugo&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="why-migrate"&gt;&lt;a href="#why-migrate" class="header-anchor"&gt;&lt;/a&gt;Why migrate
&lt;/h2&gt;&lt;p&gt;Actually, I used to be somewhat averse to static site solutions. First, compared with the traditional direct online editing approach, it is less intuitive; second, a solution with a server feels more flexible.&lt;/p&gt;
&lt;p&gt;However, the cost of maintaining a server myself is still relatively high. Although I used &lt;code&gt;WordPress&lt;/code&gt;, I am not very optimistic about the development of &lt;code&gt;PHP&lt;/code&gt;, and it is also relatively heavy.&lt;/p&gt;
&lt;p&gt;From past experience, servers often need to be migrated due to renewal, maintenance, and other reasons, which means the blog has to be reworked each time. This also makes writing more costly and hard to sustain.&lt;/p&gt;
&lt;p&gt;Therefore, static site solutions such as &lt;code&gt;Hugo&lt;/code&gt; stand out for their advantages: first, there are free hosting options; second, writing directly in &lt;code&gt;Markdown&lt;/code&gt; also makes it easier to flexibly use the tools at hand.&lt;/p&gt;
&lt;p&gt;And if special modules are really needed, I can actually customize some space and pages myself, so it should also meet my current needs.&lt;/p&gt;
&lt;h2 id="why-choose-hugo"&gt;&lt;a href="#why-choose-hugo" class="header-anchor"&gt;&lt;/a&gt;Why choose Hugo
&lt;/h2&gt;&lt;p&gt;There are many static site generators to choose from, such as &lt;code&gt;Jekyll&lt;/code&gt;, &lt;code&gt;Hexo&lt;/code&gt;, and so on. Why choose &lt;code&gt;Hugo&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Hexo&lt;/code&gt; uses &lt;code&gt;Node.js&lt;/code&gt; and has a slower generation speed, so I no longer considered it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Jekyll&lt;/code&gt; has official Github support and can be deployed directly on &lt;code&gt;Github&lt;/code&gt;. However, I tried a &lt;code&gt;Jekyll&lt;/code&gt; theme and felt it was too complicated.
Also, I actually wanted the data source to be separate from the final generated files, which makes management easier.&lt;/p&gt;
&lt;p&gt;In the end, I chose &lt;code&gt;Hugo&lt;/code&gt;: first, there was a suitable theme; second, generation is fast; third, the &lt;code&gt;Golang&lt;/code&gt; language it uses is one I am relatively optimistic about.&lt;/p&gt;
&lt;p&gt;The theme used for the &lt;code&gt;DidaEvent&lt;/code&gt; documentation is &lt;a class="link" href="https://github.com/thuliteio/doks" target="_blank" rel="noopener"&gt;Doks&lt;/a&gt;, and the theme used for the blog is &lt;a class="link" href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener"&gt;Stack&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="migration-process"&gt;&lt;a href="#migration-process" class="header-anchor"&gt;&lt;/a&gt;Migration process
&lt;/h2&gt;&lt;p&gt;After simply deploying the framework, I felt quite satisfied with the overall result.&lt;/p&gt;
&lt;p&gt;The remaining task was to migrate the original &lt;code&gt;WordPress&lt;/code&gt; posts. I had already prepared to copy them bit by bit, but fortunately I found a plugin: &lt;a class="link" href="https://github.com/SchumacherFM/wordpress-to-hugo-exporter" target="_blank" rel="noopener"&gt;wordpress-to-hugo-exporter&lt;/a&gt;.
After exporting with the plugin, I got an archive of the posts, then made some simple adjustments according to my own needs, and a basic blog was set up.&lt;/p&gt;
&lt;p&gt;However, there are some old posts and some images that still need to be organized, so I’ll slowly renovate them later.&lt;/p&gt;
&lt;h2 id="comment-section-configuration"&gt;&lt;a href="#comment-section-configuration" class="header-anchor"&gt;&lt;/a&gt;Comment section configuration
&lt;/h2&gt;&lt;p&gt;I still ran into some trouble when configuring the comment section. See: &lt;a class="link" href="https://boiltask.com/content/post/knowledge/hugo-giscus/index"&gt;Giscus configuration in Hogo&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Welcome to BoilDream Space — www.BoilTask.com</title><link>https://boiltask.com/en/record/www-boiltask-com/</link><pubDate>Fri, 29 Jul 2016 08:58:40 +0800</pubDate><guid>https://boiltask.com/en/record/www-boiltask-com/</guid><description>&lt;blockquote&gt;
&lt;p&gt;20250530: This post was originally published on CSDN&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Top-level domain:&lt;br&gt;
&lt;a class="link" href="http://www.BoilTask.com" target="_blank" rel="noopener"&gt;BoilTask Space — www.BoilTask.com&lt;/a&gt;&lt;br&gt;
Blog address:&lt;br&gt;
&lt;a class="link" href="http://www.boiltask.com/blog/" target="_blank" rel="noopener"&gt;BoilTask Space — www.BoilTask.com/blog&lt;/a&gt;&lt;br&gt;
Future posts will prioritize the website&lt;br&gt;
Syncing them directly over here may not render particularly well&lt;br&gt;
So I recommend clicking through to the original post and reading it on the site&lt;br&gt;
— BoilTask&lt;/p&gt;</description></item><item><title>This Is the 200th Blog Post</title><link>https://boiltask.com/en/record/201602021/</link><pubDate>Tue, 02 Feb 2016 03:11:09 +0800</pubDate><guid>https://boiltask.com/en/record/201602021/</guid><description>&lt;blockquote&gt;
&lt;p&gt;20250405: This refers to the 200th blog post on CSDN — not very usable, I gave up on CSDN long ago&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;They say 200 is a milestone&lt;br&gt;
Let me just plant a flag here~&lt;br&gt;
I&amp;rsquo;ll come back and edit this one when I remember&lt;br&gt;
So let me say a few words here~&lt;br&gt;
Hahaha&lt;br&gt;
===========2016.02.02-03:10===========&lt;/p&gt;</description></item><item><title>[Rant] Why Can't Usernames Be Changed!</title><link>https://boiltask.com/en/record/csdn-username/</link><pubDate>Mon, 28 Dec 2015 14:09:59 +0800</pubDate><guid>https://boiltask.com/en/record/csdn-username/</guid><description>&lt;p&gt;Why did the URL have to turn into this?!!!!&lt;br&gt;
&lt;a class="link" href="http://blog.csdn.net/u011493189" target="_blank" rel="noopener"&gt;http://blog.csdn.net/u011493189&lt;/a&gt;&lt;br&gt;
I want&lt;br&gt;
&lt;a class="link" href="http://blog.csdn.net/BoilTask" target="_blank" rel="noopener"&gt;http://blog.csdn.net/BoilTask&lt;/a&gt;&lt;br&gt;
ah!!!!!!&lt;br&gt;
This is really rough for someone who spends forever tweaking formatting!&lt;/p&gt;
&lt;p&gt;Forget it&amp;hellip;&lt;br&gt;
Can&amp;rsquo;t be bothered to change it&lt;br&gt;
Just rant and log it&lt;/p&gt;
&lt;p&gt;Curing OCD&lt;br&gt;
starts with a messy URL!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;20250405: Thinking about it this way, there&amp;rsquo;s a reason I&amp;rsquo;ve never liked CSDN and keep messing around with blogs&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;</description></item><item><title>Before Formally Blogging — The Meaning of Blogging</title><link>https://boiltask.com/en/record/blog-significance/</link><pubDate>Sat, 19 Dec 2015 08:47:04 +0000</pubDate><guid>https://boiltask.com/en/record/blog-significance/</guid><description>&lt;p&gt;Finally figured out what blogging is really for&lt;/p&gt;
&lt;p&gt;Well&amp;hellip; at least&lt;/p&gt;
&lt;p&gt;it helps me keep track of the total number of problems I&amp;rsquo;ve AC&amp;rsquo;d~&lt;/p&gt;
&lt;p&gt;Guess it&amp;rsquo;s a counter of sorts&lt;/p&gt;
&lt;p&gt;And when I have nothing better to do, I can rant a bit, reminisce a bit&lt;/p&gt;
&lt;p&gt;The problems in this category are all from quite early on&lt;/p&gt;
&lt;p&gt;so the descriptions I write may be a bit shorter&lt;/p&gt;
&lt;p&gt;From now on I&amp;rsquo;ll try to write the code and the blog post together~&lt;/p&gt;</description></item></channel></rss>