Featured image of post 博客向导

博客向导

Welcome to Blog Wizard

博客主题

Hugo Theme Stack参考文档

搭建参考教程

1、10分钟教你简单搭建个人博客(hugo篇)

2、10分钟教你简单部署hugo博客(github篇)

搭建教程相关指令

一、安装 Hugo及git

1
2
Hugo下载链接https://gohugo.io/getting-started/installing/
git下载链接https://git-scm.com/downloads

二、创建新站点

1
hugo new site myblog

这将在当前文件路径下生成一个 myblog 文件夹,里面是一个新的 Hugo 站点结构。

三、选择并安装主题

1
https://themes.gohugo.io/

建议直接将整个github下载为压缩包到本地。

四、添加内容,新建博客文章指令

1
hugo new text.md

这将在 content/posts 目录下创建一个新的 Markdown 文件。您可以使用 Markdown 编辑器编辑这个文件,添加文章内容。

五、本地预览网站

1
hugo server

这将启动 Hugo 服务器,您可以通过访问 http://localhost:1313 在浏览器中预览您的站点。

六、构建和部署

1
hugo

这将在 public 目录下生成您的站点静态文件

七、创建github仓库并将主题推送至仓库

在github上创建一个名称叫 https://github.com/yourname/yourname.github.io 的仓库

1
2
3
4
5
6
7
8
9
# 将生成的静态文件推送到该仓库, 相关信息修改成自己的 #
cd public
git init
git add -A
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
git commit -am "init"
git remote add origin https://github.com/wenke-chen/wenke-chen.github.io.git
git push -f origin master

推送完成打开https://yourname.github.io/ 即可看到和本地预览一样的博客网站(yourname为您的github名)。
我的网站是 https://wenke-chen.github.io/

🙈

Licensed under CC BY-NC-SA 4.0
Last updated on Feb 26, 2024 00:00 UTC
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy