Hexo中引入另一个文件内容

有的时候博客内容会有变动,首发博客是最新的,其他博客地址可能会未同步,认准https://blog.zysicyj.top

首发博客地址


安装插件

npm install hexo-include-markdown --save

创建模板目录

source/_template

创建模板

source/_template/tj.md

配置_config.yml

配置模板路径

include_markdown:
  dir: source/_template   # Base directory of template markdown
  verbose : true          # If you want to check the path of markdown that use <!-- md --> tag , please set the true.

配置不解析

skip_render:
  - 'CNAME'
  - '_template/**'
  - 'love/static/**'

使用

<!-- md tj.md -->

这样就大工告成啦,你所看到的所有的下面的关注就是使用模板生成的哦!

本文由 mdnice 多平台发布

猜你喜欢

转载自blog.csdn.net/njpkhuan/article/details/132846834