Hexo 快速入门

简介

Hexo 是一个快速、简单且功能强大的博客框架。你用 Markdown(或其他标记语言)写帖子,Hexo 会在几秒钟内生成带有漂亮主题的静态文件。

个人理解:

hexo 是一个解释器,将 标记语言(markdown 等.) 转化成 html 代码,并赋能 分类,标签,评论,搜索 等 博客功能 进行集中管理,是一个非常轻便管理工具.

官网:

https://hexo.io/

注意:

本文使用的版本:

hexo: 5.4.0
hexo-cli: 4.2.0
node: 14.16.1

安装

# 手脚架
npm i -g hexo-cli

# 初始化项目
hexo init hexo-frist-project

# 运行服务
hexo s -o
INFO  Validating config
INFO  Start processing
INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

# 恭喜你拥抱了 Hexo 

常用命令

# 启动博客服务
hexo s

# 生成静态页面
hexo g


命令大全

hexo --help
INFO  Validating config
Usage: hexo <command>

Commands:
	# 清除缓存
  clean     Remove generated files and cache.
  # 获取当前 config 内容
  config    Get or set configurations.
  # 发布博客到网页
  deploy    Deploy your website.
  # 生成静态文件
  generate  Generate static files.
  # 查看命令帮助
  help      Get help on a command.
  # 创建新项目
  init      Create a new Hexo folder.
  # 列出站点信息
  list      List the information of the site
  # 从其他站点迁移到 Hexo
  migrate   Migrate your site from other system to Hexo.
  # 创建新页面
  new       Create a new post.
  # 从草稿箱发布
  publish   Moves a draft post from _drafts to _posts folder.
  # 使用渲染插件渲染文件
  render    Render files with renderer plugins.
  # 开启服务
  server    Start the server.
  # 查看版本
  version   Display version information.

Global Options:
  --config  Specify config file instead of using _config.yml
  --cwd     Specify the CWD
  --debug   Display all verbose messages in the terminal
  --draft   Display draft posts
  --safe    Disable all plugins and scripts
  --silent  Hide output on console
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值