ブログを作成hexo基づき(GitHubのホスティング)

ベースのhexoのブログ

ビルドステップ

  • 1.ファイルをダウンロード依存Node.jsの

  • 2.Hexoインストール

  • 3.のGithubに展開

  • ブログを作成するための基本的な操作4.Hexo

  • 5.Hexoテーマスキン交換

依存ファイルのNode.js

あなたは最初のノード、NPMフロントエンドサポートベースのファイルをインストールする必要があります。

NPMパッケージ管理、cnpmを使用してより高速なダウンロード速度

npm install -g cnpm --registry=https://registry.npm.taobao.org

Hexoフレーム取付

1.取付フレーム

cnpm install -g hexo-cli

作成2. 空のフォルダをファイルにブログを作成し、

mkdir blog

3.hexo生成、初期化ブログ

sudo hexo  init

4.スタート開始ブログ

hexo s

ローカル缶プレビュー

http:// localhostを:4000

5.編集新品

hexo n "文章名称"

hexo g 生成

Githubのに展開

ツールの展開githubのをインストールします。1.

cnpm install --save hexo-deployer-git
vim _config.yml

プロファイル

 # Deployment
 ## Docs: https://hexo.io/docs/deployment.html
 deploy:
    type: git
    repo: https://github.com/GeekDengshuo/GeekDengshuo.github.io.git
    branch: master

2.展開コマンド

hexo d

ブログを作成するための基本的な操作Hexo

// 1.init 
hexo init [folder]     // Initializes a website. If no folder is provided, Hexo will set up the website in the current directory.

// 2.new
hexo new [layout] <title>    
// Creates a new article. If no layout is provided, Hexo will use the default_layout from _config.yml. 
// If the title contains spaces, surround it with quotation marks.


//3.generate
hexo generate

//Option    Description
//-d, --deploy  Deploy after generation finishes
//-w, --watch   Watch file changes
//-b, --bail    Raise an error if any unhandled exception is thrown during generation
//-f, --force   Force regenerate
//-c, --concurrency Maximum number of files to be generated in parallel. Default is infinity


// 4.publish
hexo publish [layout] <filename>

// 5.server
hexo server
// Starts a local server. By default, this is at http://localhost:4000/.
//Option    Description
//-p, --port    Override default port
//-s, --static  Only serve static files
//-l, --log Enable logger. Override logger format.

// 6.deploy
$ hexo deploy  //Deploys your website.

//Option    Description
//-g, --generate    Generate before deployment

// 7.clean
$ hexo clean
//Cleans the cache file (db.json) and generated files (public).

hexo g   // hexo generate

hexo s   // hexo server

hexo d   // hexo deploy

Hexoテーマスキン交換

1.クローニングテーマ

git clone https://github.com/litten/hexo-theme-yilia   下载主题
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia  // 拷贝到主题目录下

2. [変更_config.yml

vim _config.yml
# Extensions
  ## Plugins: https://hexo.io/plugins/
  ## Themes: https://hexo.io/themes/
  theme: yilia

参照

hexoドキュメント

おすすめ

転載: www.cnblogs.com/GeekDanny/p/11963755.html