惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
D
Docker
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
美团技术团队
V
V2EX
Last Week in AI
Last Week in AI
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Microsoft Security Blog
Microsoft Security Blog
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
B
Blog RSS Feed
博客园_首页
B
Blog
博客园 - 叶小钗
I
InfoQ
WordPress大学
WordPress大学
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
Latest news
Latest news
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
N
News and Events Feed by Topic
S
Secure Thoughts
The Hacker News
The Hacker News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News

Acmic

Doordash 和 披萨套利 2022年编程语言热度排行榜 堵住那只猫 暗物质开发者 Open is smart. Smart is open. GPL维权小故事 建造就是活着 真实方位是如何暴露的 2分钟规则 Defensive CSS【持续更新】 37%法则:寻找-决策过程 MySQL5.7 支持的存储引擎 学习笔记 Linux快捷键、终端常用指令(最新版Ubuntu20.04) 程序员的那些事 CDN是什么?一分钟带你了解CDN 世界名著最智慧的10句话 爬取网站视频命令行工具you-get安装及使用方法
Hexo自定义不受主题渲染的独立页面
蔚蓝星辰mic · 2021-08-19 · via Acmic

Hexo的配置文件中提供了配置项skip_render ,是用来对不需要的目录或者文件进行渲染排除。

实现方法

1、打开根目录下的配置文件:_config.yml

2、找到 skip_render配置

3、根据需求设置不渲染

  • 设置单篇文章不受渲染:
    skip_render: "_post/test-post.md"
  • 设置多篇文章不受渲染:
    1
    2
    3
    skip_render:
    - "_post/test-post1.md"
    - "_post/test-post2.md"
  • 设置某一页面不受渲染:
    1
    skip_render: "Other/**"
  • html也是一样,在不想被渲染的 html 文件最上面添加如下代码:
    1
    2
    3
    ---
    layout: false
    ---
  • 也可正则表达式匹配
    1
    skip_render: '*.html'

    注意:skip_render匹配的文件夹为source,这样会排除所有source文件夹下以html结尾的文件,但是不会匹配到子目录。

  • 排除目录
    1
    skip_render: 'demo/*'

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Acmic

打赏

  • wechat

    wechat