Hexo 必装插件
1.hexo-abbrlink#
可以优化博客路径,默认路径 https://xcmaster.com/2022/07/07/hexo必装插件
,还会带上标题,这款插件可以将路径优化为 https://xcmaster.com/posts/51727
等等,还支持 16进制。
安装
npm install hexo-abbrlink --save
_config,yml
加入配置
abbrlink:
alg: crc16 #support crc16(default) and crc32
rep: dec #support dec(default) and hex
drafts: false #(true)Process draft,(false)Do not process draft. false(default)
# Generate categories from directory-tree
# depth: the max_depth of directory-tree you want to generate, should > 0
auto_category:
enable: true #true(default)
depth: #3(default)
over_write: false
auto_title: false #enable auto title, it can auto fill the title by path
auto_date: false #enable auto date, it can auto fill the date by time today
force: false #enable force mode,in this mode, the plugin will ignore the cache, and calc the abbrlink for every post even it already had abbrlink. This only updates abbrlink rather than other front variables.
详情请看 github: https://github.com/rozbo/hexo-abbrlink
2.hexo-asset-image#
自动为文章中的图片提供绝对路径,需要设置 _config.yml
post_asset_folder: true
比如新建一片博客名为 hexo-plugin,那么在创建文章 md 文件的同时会创建一个 hexo-plugin 的目录,文章对应的图片放入这个目录就行。
Typora 可以将图像设为 ./${filename}
便可自动适配
3.sitemap#
SEO 可以增加搜索引擎对我们博客的收录和结果排名,所以我们还是有必要做一下 SEO,增加文章的曝光率。
hexo 具有 sitemap 插件,可以生成站点地图,然后提交给搜索引擎,增加文章被索引的几率。
安装:
npm i hexo-generator-baidu-sitemap --save # 百度用
npm i hexo-generator-sitemap --save # Google 用
安装好这两个插件以后,生成博客时会在 public 目录下生成 sitemap.xml 和 baidusitemap.xml,我们向搜索引擎提交这两个文件就可以了。
作者:晓晨Master(李志强)
出处:https://www.cnblogs.com/stulzq/p/16445025.html
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
目前学习.NET Core 最好的教程 .NET Core 官方教程 ASP.NET Core 官方教程
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律