使用 GitHub Pages 建立个人站点

使用 GitHub Pages建立个人站点

尝试使用 GitHub Pages 建立个人站点。希望是边建边记录,如果你看到了这篇文章, 那说明尝试成功了;如果没有看到,那可能是悲剧了。

第一步

建立 repository。 名字必须符合要求,如 username.github.io。其中 username 必须是你的 GitHub 用户名。

第二步

clone 远程仓库到本地。 使用命令: $ git clone https://github.com/username/username.github.io

第三步

添加 index.html 文件。

第四步

push 到远程仓库。 命令: $ git add –all $ git commit -m “Initial commit” $ git push -u origin master tips: git push 命令中 -u 表示 –set-upstream,以后直接使用 git push 就会默认 push 到这个 branch。

References:

GitHub Pages
Hexo+github 搭建个人博客

0%