使用Hexo和github搭建个人博客
一、准备工作1.github账号
2.git for Windows
3.node.js
4.npm
Github账号Github 仓库是你博客存储的地方,是构建博客的起点,点击这里去官网注册一个就好了。
Git for windowsGit for Windows是用来将你的博客生成并部署到github上,当然在其他步骤中它的作用也不可或缺。但是Git for Windows. 国内直接从官网下载比较困难,需要翻墙。这里提供一个国内的下载站,方便网友下载。
node.js和npm官网下载适合你的node.js,推荐下载.msi文件,因为.msi文件可以自动帮你配置环境变量,省时方便,何乐而不为呢(但是这里要注意以管理员身份运行,不然会因没有权限更改环境变量而出现the error code is 2502,the error code is 2503)点这里学会如何以管理员身份运行.msi文件。最新版的node.js已经集成了npm,所以不需要额外安装npm。安装完成后可以运行Git Bush,在其中输入:
12node -vnpm -v
出现相应版本号即安装成功。
为了能有一 ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment