常用命令
内容转载自(https://chars.tech/blog/build-blog-by-hexo/)
| 常用命令: hexo help #查看帮助 hexo init #初始化一个目录 hexo new "postName" #新建文章 hexo new page "pageName" #新建页面 hexo generate #生成网页,可以在 public 目录查看整个网站的文件 hexo server #本地预览,'Ctrl+C'关闭 hexo deploy #部署.deploy目录 hexo clean #清除缓存,强烈建议每次执行命令前先清理缓存,每次部署前先删除 .deploy 文件夹
简写: hexo n == hexo new hexo g == hexo generate hexo s == hexo server hexo d == hexo deploy
|
常用配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
title: subtitle: description: author: email: language: zh-CN
url: root: / permalink: :year/:month/:day/:title/ tag_dir: tags archive_dir: archives category_dir: categories code_dir: downloads/code permalink_defaults:
source_dir: source public_dir: public
new_post_name: :title.md default_layout: post titlecase: false external_link: true filename_case: 0 render_drafts: false post_asset_folder: false relative_link: false highlight: enable: true line_number: true tab_replace:
default_category: uncategorized category_map: tag_map:
2: 开启分页 1: 禁用分页 0: 全部禁用 archive: 2 category: 2 tag: 2
port: 4000 server_ip: localhost logger: false logger_format: dev
date_format: YYYY-MM-DD time_format: H:mm:ss
per_page: 10 pagination_dir: page
disqus_shortname:
theme: landscape-plus exclude_generator: plugins: - hexo-generator-feed - hexo-generator-sitemap
deploy: type: git repo: github创库地址.git branch: master
|