在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ HTML/ 部署
配置
本地化(i18n)
建站
輔助函數(shù)(Helpers)
主題
服務(wù)器
指令
數(shù)據(jù)文件
模版
部署
遷移
標(biāo)簽插件(Tag Plugins)
Front-matter
生成文件
貢獻(xiàn)
問題解答
變量 | Hexo
資源文件夾
插件
寫作
永久鏈接(Permalinks)

部署

Hexo 提供了快速方便的一鍵部署功能,讓您只需一條命令就能將網(wǎng)站部署到服務(wù)器上。

$ hexo deploy

在開始之前,您必須先在 _config.yml 中修改參數(shù),一個正確的部署配置中至少要有 type 參數(shù),例如:

deploy:
  type: git

您可同時使用多個 deployer,Hexo 會依照順序執(zhí)行每個 deployer。

    deploy:
    - type: git
      repo:
    - type: heroku
      repo:  

Git

安裝 hexo-deployer-git

    $ npm install hexo-deployer-git --save  

修改配置。

    deploy:
      type: git
      repo: 
      branch: [branch]
      message: [message]  
參數(shù) 描述
repo 庫(Repository)地址
branch 分支名稱。如果您使用的是 GitHub 或 GitCafe 的話,程序會嘗試自動檢測。
message 自定提交信息 (默認(rèn)為 Site updated: {{ now("YYYY-MM-DD HH:mm:ss") }})

Heroku

安裝 hexo-deployer-heroku

    $ npm install hexo-deployer-heroku --save  

修改配置。

    deploy:
      type: heroku
      repo: 
      message: [message]  
參數(shù) 描述
repo Heroku 庫(Repository)地址
message 自定提交信息 (默認(rèn)為 Site updated: {{ now("YYYY-MM-DD HH:mm:ss") }})

Rsync

安裝 hexo-deployer-rsync

    $ npm install hexo-deployer-rsync --save  

修改配置。

    deploy:
      type: rsync
      host: 
      user: 
      root: 
      port: [port]
      delete: [true|false]
      verbose: [true|false]
      ignore_errors: [true|false]  
參數(shù) 描述 默認(rèn)值
host 遠(yuǎn)程主機的地址
user 使用者名稱
root 遠(yuǎn)程主機的根目錄
port 端口 22
delete 刪除遠(yuǎn)程主機上的舊文件 true
verbose 顯示調(diào)試信息 true
ignore_errors 忽略錯誤 false

OpenShift

安裝 hexo-deployer-openshift

    $ npm install hexo-deployer-openshift --save  

修改配置。

    deploy:
      type: openshift
      repo: 
      message: [message]  
參數(shù) 描述
repo OpenShift 庫(Repository)地址
message 自定提交信息 (默認(rèn)為 Site updated: {{ now("YYYY-MM-DD HH:mm:ss") }})

FTPSync

安裝 hexo-deployer-ftpsync

    $ npm install hexo-deployer-ftpsync --save  

修改配置。

    deploy:
      type: ftpsync
      host: 
      user: 
      pass: 
      remote: [remote]
      port: [port]
      ignore: [ignore]
      connections: [connections]
      verbose: [true|false]  
參數(shù) 描述 默認(rèn)值
host 遠(yuǎn)程主機的地址
user 使用者名稱
pass 密碼
remote 遠(yuǎn)程主機的根目錄 /
port 端口 21
ignore 忽略的文件或目錄
connections 使用的連接數(shù) 1
verbose 顯示調(diào)試信息 false

其他方法

Hexo 生成的所有文件都放在 public 文件夾中,您可以將它們復(fù)制到您喜歡的地方。

上一篇:本地化(i18n)下一篇:問題解答