Replies: 4 comments 7 replies
-
|
麻烦问下,我点击文章里的vercel图片,跳转到部署页面,需要填入token和仓库名,仓库名的形式是什么样呢? |
Beta Was this translation helpful? Give feedback.
4 replies
-
|
這種部署方法的問題在於,Gihtub Discussion 似乎不支持導出之類的功能,是故遷移起來可能會很困難。 |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
这个项目真是太棒了,之前看到有一个 Gatsby + GitHub 名为 GG 的项目,好像都有异曲同工之处。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
补充说明: 如果使用Vercel部署完成后博文下方有 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hakuba
一个非常快速的博客启动器,通过 Github Discussion 数据驱动。
如果你喜欢这个项目,那么可以 star 或者 fork 它。
如何运作的
Hakuba 会通过 GitHub GraphQL API 拉取 Github Discussion 的数据,并配置 webhooks 实现自动打包部署。
快速开始
推荐使用以下部署服务:
Deploy with Vercel:

…… 或者查看手动部署相关信息
配置
可以通过环境变量或者 Discussion 配置 Blog 信息。
public_repo范围的 token,对于私有仓库,需要repo范围的 token。Config。Post。Page。@(e.g. SvelteJS),出现在首页的 about 区域enGMT,请参考Date.prototype.toLocaleDateString(locals, options)的option.timezone配置 GitHub Discussion
创建配置、文章、页面的讨论分类,并将其格式设置为 Announcement。
只有名为
index的文章会被视为配置文件。这里是一个 示例。配置 webhook
如果你使用 vercel、netlify 或 Cloudflare Pages, 当 Discussion 发生改动,可以使用 webhooks 自动更新内容。
手动部署
Clone 这个仓库,并使用
git命令进行更新:然后,生成页面:
# 根据你的爱好使用不同包管理器 yarn build npm run build pnpm build最后,将
build目录上传到你的服务器。更新代码
如果是 fork 或者 clone 代码的方式,更新代码需要执行一下命令:
页面和文章额外的配置
页面和文章支持 Markdown front matter,用于配置页面和文章的 SEO meta data 和展示设置。
针对页面的 Front matter
添加的页面会显示在导航栏。
针对文章的 Front matter
这里有一个 示例
GMT,请参考Date.prototype.toLocaleDateString(locals, options)的option.timezone限制
因为使用 Mdsvex 来预处理 Markdown,所以也有以下限制:
了解更多: https://mdsvex.com/docs#limitations
自动合并 Dependabot 的 PR
这个项目使用了 action-dependabot-auto-merge 自动更新依赖的功能。如果 CI 失败,请尝试配置 Dependabot 的秘钥。
迁移
clone 这个仓库,配置
GITHUB_TOKEN和REPOSITORY环境变量,使用包管理器安装依赖之后执行:# 选择你喜欢的包管理器 npm run generateData yarn generateData pnpm generateData文章路径在
src/routes/post/_source下,页面路径在src/routes/_page下。路线图
详情请参考: https://github.com/YeungKC/Hakuba#roadmap
感谢
License
GPL-3.0
Beta Was this translation helpful? Give feedback.
All reactions