After working on it for four hours, seeing that sentence made me laugh—how could it possibly take so long? Then I checked the time: three hours
This is the first draft of 2022. It’s not a complicated project, just as the title states (I was quite young then). I thought simply saving 作业 would be enough, so I put it in my favorites and waited over a month before remembering this task.
Moving to INLINE_CODE_0, I always felt there were too few plugins. The inability to copy code snippets made migrating notes from Notion a hassle, as copying code became cumbersome and significantly dampened my motivation to update my blog.
Prologue
Let’s carefully review the original author’s manuscript, read it through and check their introduction. Wow, I’ve stumbled upon a big shot – a current undergraduate student at Tsinghua who started with computers early on. Hmm, just browsing this blog now; completely forgot what I was supposed to do. By the way, let’s also check out the author’s __INLINE_CODE_0__BOLD_2even
theme – it’s much better than the current one and has more features. Let’s get it running; first merge the relevant code.
New feature: View article history, related submission records
The effect is pretty good; you can experience it by reading to the end of the article
I didn’t really look at the author’s repository history before starting, assuming a simple merge would fix it. Ended up merging a lot of code, with conflicts and numerous iterations. I just overwrote everything blindly, prioritizing my own code for frontend and rendering templates.
Warehouse address: https://github.com/TianlongXiang/hugo-theme-even
A pitfall in Chinese, italicized text, leads to the failure of historical link generation; generating a complete article history also requires modifying the auto-integration script. Remember to pull all historical records from the current repository.
- Please provide the Chinese text you want me to translate. I am ready when you are! Just paste the text here.
- Please provide the Chinese text you want me to translate. I am ready when you are! Just paste the text here.
name: Build Github
run: git config --global core.quotePath false && hugo -b "https://www.xiangtianlong.com/" -d "github_public" && ls
Style adjustments
- Adjusted the site content width. The previous design was suitable for both mobile and desktop, but in reality, no one views it on their phone; I mostly use it on my computer.
- The directory bar supports auto-sizing
Main body
I spent over half an hour looking at the code record for INLINE_CODE_0, but still couldn’t figure out how to add the copy button
Time passes, and after a month, I thought of it again
Since I don’t understand this assignment, I might as well copy another one; eventually, I’ll figure it out. The search results were surprisingly __INLINE_CODE_0__官方的论坛里面就有个帖子提到了如何增加复制按钮,跑过去一看,逻辑清晰。懵逼的事情来了,回到的站点一看__INLINE_CODE_1__revealing a difference in the code block styling and the description in the materials—this part is quite tedious, so I’m just noting it briefly.
Because I barely understand front-end development, I kept the browser open INLINE_CODE_0,对着代码分析、靠着右边的样式器信息,慢慢也分析懂了逻辑;__INLINE_CODE_1__and couldn’t understand it, so I checked the console for logs. There were many things I didn’t understand, but I calmed down and slowly sorted out and broke down the logic; eventually, I could find a solution.
- Multiple nodes exist; here, this refers to a single code block. The theme generated line numbers, resulting in two copy buttons appearing.
- I want code highlighting, but I’m not familiar with how to set it up in this theme
- Settings to control code highlighting
- Adjusting the configuration file, it’s consistently wrong; the rendering doesn’t match expectations
- Finding these settings, I’ll continue reviewing materials and adjusting them—let’s remove line numbers first
- Configure custom
css
BOLD_2js
scripts - Since we’ve gotten things to this point, it suddenly occurred to me that I saw a nice color scheme recently – let’s update the button styles with a Chinese-style celadon blue


It took four hours, and when I saw that sentence, I thought it was funny – how could it take so long? Then I looked at the time: three hours