Introduction (updated on 2024.11.14)
Recently, I want to pick up the habit of blogging again, but I found that the previous Hexo blog | (Github-Pages) was a bit fancy. After searching for a long time, I found that this Hugo | (Github)’s Stack theme | (Github) is quite in line with my aesthetics, so I decided to use Hugo to write a blog.
There are a few points to note:
- The version I use is Hugo-stack theme-magic modification version | (Github).
- Since this version (as of now) has not been updated for two years (the last update was in 2022), for the latest version of Hugo, executing
hugo server
may report an error. You need to copy the error cause yourself and ask AI (such as ChatGPT, etc.) to solve the error.
Usage (MarkDown syntax)
Collapsible code block
This is the title (Click to expand and collapse)
|
|
Common sense (for me, I need to remember this)
HTML character set - space
- Space:
Press thespace
key to display it. The width is affected by the font. - Space:
 
has a width of $\frac{1}{2}$ Chinese characters, not affected by fonts. - Space:
 
has a width of 1 Chinese character, not affected by fonts.
Unresolved issues (updated at any time)
- The following issues are based on
hugo v0.138.0
(maybe I don’t know how to operate/doge).
How to check hugo version? (Click to expand and collapse)
Enter hugo version
in cmd
|
|
Multi-language adaptation of categories
I tried to use _index.md
and _index.en.md
in the test
file in the ./content/categories
directory, but the result was not what I expected. In the homepage category, it can only be displayed as test
or test
, and there is no multi-language adaptation.
Initial directory structure (Click to expand and collapse)
|
|
In the end, only the test
and test
directories can be configured separately:
Final directory structure (Click to expand and collapse)
|
|
In the end, only the test
and test
directories can be configured separately:
Final directory structure (Click to expand and collapse)
|
|
As shown in the figure:
Appendix
Copyright information
This article was originally published in CaiHongTu Blog and follows the CC BY-NC-SA 4.0 agreement. Please keep the original source when copying.