3

2022.04 整理文章并为 gulu-dev.com 更换样式

 2 years ago
source link: https://gulu-dev.com/post/2022-04-30-build-a-better-blog/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

2022.04 整理文章并为 gulu-dev.com 更换样式

我这个博客 gulu-dev.com 的老读者可能知道,我有一些文章(主要是 2014-2020 年间)在 2020 年从 Bitcron 上迁出时,没有移到新的 blog 上来,不少知乎上的回答内的链接也因此失效了。

我一直想把这些文章整理出来,并在 https://github.com/mc-gulu/gl-public 中清理好。 趁着五一假期,就把这件一直想做都还没来得及做的事完成吧。

先选个更合适的主题,可以简化后续的整理。之前用的 hugo-clarity 缺少按照年份索引的 Archives 页面,很不方便,这次要挑一个索引功能更好的。

Hugo Themes 上挑了下,看中了 Pure 这个样式很不错,但看起来似乎有段时间没有维护了。继续找,看到了 Stack,这个挺简洁的,索引和布局看起来也都不错,有完善的年份分隔,还有一点很重要的是不管 Post 是否有图片都可以叠加在一起不违和,就是它了。

Stack 的优点:

  1. 由年份分隔的 Archive 索引页面
  2. 对有/无图片的 Post 都很友好
  3. 右边有方便阅读的大纲视图

先把 hugo 本地从 0.75 升级到 0.98

choco upgrade hugo -confirm

使用 Stack 模板后报错。检查发现是 Hugo Extended 没有同步更新,于是

choco upgrade hugo-extended -confirm

hugo-extended 同步从 0.74 升级到 0.98

然后 hugo server 就正常启动了

default looking
default looking

接下来我会把我也出来了整理出的文章都补充到这里。,我们看看五一期间能做到什么程度。

(全文完)


Licensed under Creative Commons BY-NC-ND 4.0


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK