使用hugo生成博客
之前一直有使用Hexo来生成静态博客,如今将博客迁移到了Hugo下。两种工具总体而言各有优势,个人此次转移到hugo的主要原因大概是希望能够重拾写博客的习惯,本文主要介绍了使用Hugo的大致流程。首先给出个人博客的文件结构: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Root # blog根目录 | +-- archetypes +-- content |-- posts # 博客目录 |-- _index.md # 主页 +-- data +-- layouts +-- ox-hugo # org文件位置 |-- messy.org # category为Others的org文件 +-- public # submodule +-- resource +-- static +-- themes |-- xxx # 主题文件夹, submodule +-- .git +-- config.toml +-- .dir-locals.el # 自动将org文件转为markdown配置文件 +-- .gitmodules 其中只有 ox-hugo 为自定义文件夹, .dir-locals 为ox-hugo自动转换的配置文件,其他都是自动生成的。接下来个人就hugo生成博客关键部分展开介绍下。 ...