Skip to content

About

All in Github 使用 Github Issues 作为博客的内容管理系统,配合 Github Actions 实现自动化的博客生成与部署。

原理

Github Issues 中需要两个重要的标签 NoteBlog,带有这些标签的 Issues 评论会作为博客的内容,配合指定动作开始触发 Github workflows 生成静态博客内容,内容创建完成后就会自动部署到 Github Pages。这两个标签在系统中作为分类(category)存在,在适用场景和触发动作上有如下区别:

具有 Note 标签的 Issues:

具有 Blog 标签的 Issues:

静态站点使用开源 Astro 博客模版 AstroPaper 作为基础,我们进行了一些修改使其适合部署到 Github Pages。

AstroPaper is a minimal, accessible and SEO-friendly blog theme built with Astro and Tailwind CSS.

注意事项

具有 Note 标签的 Issues 本质上是一个分类,由于每条评论都是一条博客文章,就无法使用 issue 标题作为博客标题。我们可以在评论中插入下述内容,makeNote 会将其解析为博客的标题和标签,作为 HTML 注释,它们不会在博客中展示:

<!-- title: 博客的文章 -->
<!-- tags: tag1,tag2 -->