diff --git a/content/cn/blog/2024-03-22-personal-website-tutorial.md b/content/cn/blog/2024-03-22-personal-website-tutorial.md index 6f435b246..f6df28203 100644 --- a/content/cn/blog/2024-03-22-personal-website-tutorial.md +++ b/content/cn/blog/2024-03-22-personal-website-tutorial.md @@ -40,6 +40,7 @@ git submodule add https://github.com/hongtaoh/hugo-ht themes/hugo-ht cp -r themes/hugo-ht/exampleSite/* . cp -r themes/hugo-ht/archetypes . rm hugo.toml +rm themes/hugo-ht/.git ``` 回到 quickstart 文件夹,你会看到一个文件为 `vercel.json` (受 [Rick Cogley 帖子](https://discourse.gohugo.io/t/vercel-tips/34766) 启发)。打开它,并把 `HUGO_VERSION` 改成你的 hugo version。 @@ -142,6 +143,24 @@ git push bash deploy.sh ``` +### 修改博客语言 + +你首先需要把 `themes/hugo-ht` 这个文件夹改名,比如,`themes/hugo-ht-theme`,然后 `config.toml` 中改成 + +```toml +theme = "hugo-ht-theme" +``` + +这是为了防止 Vercel 不更接下来我们要改的部分。 + +#### 只用一种语言 + +看[这里](/cn/2021/03/02/personal-website-tutorial/#只用一种语言) + +#### 中文为主,英文为辅 + +看[这里](/cn/2021/03/02/personal-website-tutorial/#中文为主英文为辅) + ### 添加评论 推荐使用 [giscus](https://giscus.app/zh-CN)。首先[把它安装到你的 github 账户](https://github.com/apps/giscus)。然后我们要确保目前的仓库(也就是 mywebsite)开启了 Discussion 功能。如果开启,请看[这里](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/enabling-or-disabling-github-discussions-for-a-repository#enabling-or-disabling-github-discussions-for-your-repository)。