hexo常用命令

作者: JouyPub | 来源:发表于2018-08-04 12:23 被阅读0次

npm install hexo -g 安装
npm update hexo -g 升级
hexo init 初始化

hexo n "我的博客" or hexo new "我的博客" 新建文章
hexo p or hexo publish
hexo g or hexo generate 生成Html至public目录
hexo s or hexo server 启动服务(默认端口4000,'ctrl + c'关闭server)
hexo d or hexo deploy 部署

hexo server Hexo 会监视文件变动并自动更新,您无须重启服务器。
hexo server -s 静态模式
hexo server -p 5000 更改端口
hexo server -i 192.168.1.1 自定义 IP
hexo clean 清除缓存 网页正常情况下可以忽略此条命令

hexo new "postName" 新建文章
hexo new page "pageName" 新建页面
hexo new draft "pageName" 新建草稿文章

各变量的含义

变量 描述
layout 布局
title 标题
date 件建立日期
title 使用Hexo搭建个人博客
layout post
date 2014-03-03 19:07:43
comments true
categories Blog
tags [Hexo]
keywords Hexo, Blog
description 描述

相关文章

网友评论

    本文标题:hexo常用命令

    本文链接:https://www.haomeiwen.com/subject/cjxmvftx.html