Hexo记录

来源:互联网 发布:ubuntu arp攻击 编辑:程序博客网 时间:2024/06/01 08:56

搭建Hexo流程记录


参考资料:
nvm和nodejs安装使用
hexo官方安装流程


重装服务器
home下新建blog文件夹

git clone nvm

直接从 github clone nvm 到本地

这里假设大家都使用 ~/git 目录存放 git 项目:

$ cd ~/git   $ git clone https://github.com/creationix/nvm.git

配置终端启动时自动执行
source ~/git/nvm/nvm.sh

在 ~/.bashrc, ~/.bash_profile, ~/.profile, 或者 ~/.zshrc 文件添加以下命令:

source ~/git/nvm/nvm.sh

重新打开你的终端, 输入 nvm

$ nvmNode Version ManagerUsage:    nvm help                    Show this message    nvm --version               Print out the latest released version of nvm    nvm install [-s] <version>  Download and install a <version>, [-s] from source    nvm uninstall <version>     Uninstall a version    nvm use <version>           Modify PATH to use <version>    nvm run <version> [<args>]  Run <version> with <args> as arguments    nvm current                 Display currently activated version    nvm ls                      List installed versions    nvm ls <version>            List versions matching a given description    nvm ls-remote               List remote versions available for install    nvm deactivate              Undo effects of NVM on current shell    nvm alias [<pattern>]       Show all aliases beginning with <pattern>    nvm alias <name> <version>  Set an alias named <name> pointing to <version>    nvm unalias <name>          Deletes the alias named <name>    nvm copy-packages <version> Install global NPM packages contained in <version> to current versionExample:    nvm install v0.10.24        Install a specific version number    nvm use 0.10                Use the latest available 0.10.x release    nvm run 0.10.24 myApp.js    Run myApp.js using node v0.10.24    nvm alias default 0.10.24   Set default node version on a shellNote:    to remove, delete or uninstall nvm - just remove ~/.nvm, ~/.npm and ~/.bower folders

通过 nvm 安装任意版本的 node


参考资料:nvm安装node.js


查看当前可获得node版本

nvm ls-remote

安装node.js
nvm install 4.7.3

安装Git
apt-get install git-core

安装hexo
npm install -g hexo-cli

报错 node: Permission denied


解决办法
如何在vps上安装node和nvm

全局nvm


安装 Hexo 完成后,请执行下列命令,Hexo 将会在指定文件夹中新建所需要的文件。

$ hexo init <folder>$ cd <folder>$ npm install

 

在 _config.yml 中修改大部份的配置。 Untitled Image


语言 语言代码
修改vim中文乱码


基本完成,访问我的博客

0 0
原创粉丝点击