请问侧边栏挂件的逻辑是什么 #129
Answered
by
xaoxuu
glimmeringlight
asked this question in
Q&A
请问侧边栏挂件的逻辑是什么
#129
-
在 sidebar:
widget_layout:
index: [welcome] # for home/wiki/categories/tags/archives/404 pages
page: [] # for pages using 'layout:page'
post: [toc] # for pages using 'layout:post'
wiki: [] # for pages using 'layout:wiki' |
Beta Was this translation helpful? Give feedback.
Answered by
xaoxuu
Oct 17, 2022
Replies: 1 comment
-
hexo 的覆盖规则是优先合并,所以空数组不能覆盖掉数组。 https://hexo.io/zh-cn/docs/configuration#%E4%BD%BF%E7%94%A8%E4%BB%A3%E6%9B%BF%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 这里默认值设置的不合适,后续我会想办法优化的,现在你可以通过设置一个无效的 recent: # 后面什么都不写
ghuser: # 后面什么都不写 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
glimmeringlight
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hexo 的覆盖规则是优先合并,所以空数组不能覆盖掉数组。 https://hexo.io/zh-cn/docs/configuration#%E4%BD%BF%E7%94%A8%E4%BB%A3%E6%9B%BF%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6
这里默认值设置的不合适,后续我会想办法优化的,现在你可以通过设置一个无效的
recent
和ghuser
来阻止其显示,在source/_data/widgets.yml
中将组件本体覆盖为空: