From 6c4efbca5301d8cf80f530e760a791024be5a47c Mon Sep 17 00:00:00 2001 From: yinkanglong Date: Sun, 17 Dec 2023 19:18:03 +0800 Subject: [PATCH] hexo --- blog/hexo.sh | 5 +++++ blog/创建博客.md | 0 blog/部署博客.md | 0 blog/配置博客.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 blog/hexo.sh create mode 100644 blog/创建博客.md create mode 100644 blog/部署博客.md create mode 100644 blog/配置博客.md diff --git a/blog/hexo.sh b/blog/hexo.sh new file mode 100644 index 00000000..6cf9fc02 --- /dev/null +++ b/blog/hexo.sh @@ -0,0 +1,5 @@ +//hexo deploy a blog +1、hexo clean清空public目录 +2、hexo generate把Markdown源文件渲染成HTML输出到public目录 +3、hexo server可以在本地启动静态文件服务器,预览网站效果 +4、hexo deploy把public目录中的文件push到Github \ No newline at end of file diff --git a/blog/创建博客.md b/blog/创建博客.md new file mode 100644 index 00000000..e69de29b diff --git a/blog/部署博客.md b/blog/部署博客.md new file mode 100644 index 00000000..e69de29b diff --git a/blog/配置博客.md b/blog/配置博客.md new file mode 100644 index 00000000..2a6c9d85 --- /dev/null +++ b/blog/配置博客.md @@ -0,0 +1,43 @@ +https://hexo.io/zh-cn/docs/configuration + +## 主要命令 + +_config.yml +```yml + +``` + + +scaffold/ 模板变量 -> source/post/page文章内容和变量实现 -> public/渲染结果 + +* 配置_config.yml + * 网站配置 + * title + * subtitle + * description + * keywords + * author + * URL配置 + * url + * root + * 目录配置 + * 文章配置 + * new_post_name新文章名称 + * default_layout 默认模板 + * 分页 + * per_page 每页文章数量 + * pagination_dir 文章目录 + * 扩展 + * theme + * theme_config +* 编写 + * 模板scaffold: +* 命令生命周期 + * hexo init & npm install初始化 + * hexo new [layout] title创建文章 + * hexo generate 渲染生成静态html + * hexo server -p 启动一个简单服务器 + * hexo deploy 部署脚本 + * hexo render -o 渲染到指定目录 + * hexo clean 删除自动生成的结果 + * hexo list [layout] 列出所有的文章 \ No newline at end of file