Hugo + Reveal.js 后续
摘要 上一篇 介绍了如何在 Hugo 中使用 Reveal.js 进行 Slide 分享后,这段时间把自己历史的分享逐一迁移到博客上了。这个过程中,又发现了上次方案的一些问题,并做了很多细节的调整,整理如下: ...
摘要 上一篇 介绍了如何在 Hugo 中使用 Reveal.js 进行 Slide 分享后,这段时间把自己历史的分享逐一迁移到博客上了。这个过程中,又发现了上次方案的一些问题,并做了很多细节的调整,整理如下: ...
摘要 又开始折腾博客了。 ...
基本安装 搭建站点 1 hugo new site <name of site> -f yml 初始化 Git 仓库 1 2 git init git branch -m main # 兼容 Github 的设置 安装主题 1 git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod 若是已经安装过主题的,需要下面的命令激活 1 git submodule update --init --recursive 本地调试 1 hugo server 添加新文章 1 hugo new posts/my-first-post.md 配置 配置 config.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 baseURL: "https://examplesite.com/" languageCode: zh-cn title: ExampleSite theme: PaperMod timeZone: Asia/Shanghai enableInlineShortcodes: true enableGitInfo: true enableRobotsTXT: true enableEmoji: true hasCJKLanguage: true outputs: home: [HTML, RSS, JSON] Params: title: ExampleSite description: "ExampleSite description" author: xxx homeInfoParams: Title: Hi there wave Content: Can be Info, links, about... socialIcons: # optional - name: rss url: /index.xml ShowFullTextinRSS: true ShowReadingTime: true ShowCodeCopyButtons: true DateFormat: "2006-01-02" # 日期格式化 menu: main: - identifier: home name: 主页 url: / weight: 10 - identifier: search name: 搜索 url: /search weight: 20 - identifier: tags name: 标签 url: /tags weight: 30 - identifier: archives name: 时间轴 url: /archives weight: 40 配置 content/archives.md 1 2 3 4 5 --- title: "时间轴" layout: "archives" summary: archives --- 配置 content/search.md 1 2 3 4 5 6 --- title: "搜索" # in any language you want layout: "search" # is necessary summary: "search" placeholder: "Typing something..." --- 增加 Latex 数学公式的支持 在 layouts/partials 路径下新建文件 extend_head.html: ...