基于Notion+Hugo搭建博客

鉴于对上一个博客的构建 md 构建的不满,这一次尝试了通过 Notion 来构建,方便自己写博客。 这次我使用的是github模板,根据 README.md 进行快速搭建,进展很顺利。以下是我将部署过程翻译了的内容。 使用访问 github 模板地址,点击右上角“Use this template”按钮创建一个仓库,选择"public" 权限。 有经验的话,可以将仓库重命名为“昵称.github.io”。 创建Noiton集成 使用 Noiton 账户访问my integrations,点击“Create new integration”。 在能力项中,选择“Read Content”和“Read user information including email address”。这个"Read Content"权限是 Notion-Hugo 获取 Notion 必须的权限。同时,这个“Read user information including email address”权限可以用来填充 MD 中的“Front Matter 的作者信息”。Notion-Hugo 承诺不会收集你的任何信息用作他处。 勾选完成后,点击提交按钮就创建好 Notion 集成了。 创建Github Actions的密钥 首先,复制“Internal Integration Token”。 打开你之前克隆模板的仓库,点击此仓库的“Settings”,找到“Secrets-Actions”。在这里你需要点击右侧的“New Repository Secre”按钮,来创建 github Action 的密钥。 你需要在弹出窗口中,命名为 NOTION_TOKEN 并把之前复制的“Internal Integration Token”粘贴进“Secret”里,点击保存。 至此,你已经完成了 github Action 的配置了。 创建 Notion 模板副本 浏览器打开链接: https://pcloud.

文章来源:

Author:元否的工作坊
link:https://www.happyfou.com/posts/基于notion-hugo搭建博客/