Hexo默认会对 /source/
里的所有页面(一般是markdown文件)应用主题模板渲染,将其转化为html文件。
但如果自己有一些自定义的页面,希望hexo在generator的时候简单的将他们拷贝到public相应目录中而不做任何渲染,就需要设置跳过渲染的方法。Hexo 提供了跳过渲染的功能: 在站点配置文件 _config.yml
中配置 skip_render
:
如果要跳过 source 文件夹下的 test.html
,可以这样配置:
skip_render: test.html |
如果要跳过 source 文件夹下 test 目录中的所有文件,可以这样配置:
skip_render: test/* |
如果要跳过 source 文件夹下 test 目录中的所有.html
文件,可以这样配置:
skip_render: test/*.html |
如果要跳过 source 文件夹下 test 目录以及所有子目录中的所有文件,可以这样配置:
skip_render: test/** |
如果要跳过多个路径的文件或目录,可以这样配置:
skip_render: |