hexo博客搭建使用
搭建
Hexo
演示主题为:Keep
使用
文章
创建新文章
➜ zymore-blog-keep git:(main) ✗ hexo new "告别H5嵌入!uniApp小程序文件下载与分享完整解决方案"
INFO Validating config
INFO Created: ~/Desktop/HelloWorld/zymore-blog-keep/source/_posts/告别H5嵌入!uniApp小程序文件下载与分享完整解决方案.md
修改文章的标签和分类
在md文档内顶部添加 YAML Front Matter(YAML 头部信息块)。
- 点击目录可查看同目录下的文章
- 点击标签可以查看相同标签的文章
效果
菜单
增加TAGS和CATEGORIES
以TAGS距离
- 创建 tags 页面
首先,您需要创建一个 tags 页面。在终端中运行以下命令:
hexo new page tags
这将在 source/tags/ 目录下创建一个 index.md 文件。
- 在 _config.yml 中配置菜单
详细配置与配置结构见文末
menu:Home: /Tags: /tags
_config.yml配置
theme_config:home:announcement:category: true # Option values: true | falsetag: true # Option values: true | falsepost_datetime: created # Option values: updated | createdpost_datetime_format: ago # Option Values: ago | YYYY-MM-DD HH:mm:ssbase_info:primary_color: '#0066cc'title: 123author: 123first_screen:enable: truedescription: 人生海海 不过尔尔menu:Home: /Tags: /tagsCategories: /categoriespost:author_badge:enable: truetext: 创造&解决#目录toc:enable: true # Option values: true | falsenumber: false # Option values: true | falseexpand_all: true # Option values: true | falseinit_open: true # Option values: true | falselayout: right # Option values: left | rightcode_block:tools:enable: true # Option values: true | falsestyle: mac # Option values: default | machighlight_theme: default # Option values: default | obsidianwebsite_count:busuanzi_count:enable: true # Option values: true | falsesite_uv: true # Option values: true | falsesite_pv: true # Option values: true | falsepage_pv: true # Option values: true | falsetheme: keep
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:type: gitrepo: https://github.com/123/123.github.io.gitbranch: main