We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I certify that I have first consulted (check all with "x")
我确认我已经查看了 (使用 "x" 选择)
I'm submitting a (check one with "x")
我正在申请 (使用 "x" 选择)
Material 原质 主题提供了很好的归档功能,但是出于若干需求,有时候可能不希望某些文章出现在首页(当然可以在文章的归档中找到它)因而建议增加一个隐藏在主页显示的设置。例如文章头中添加visible: hide即可以在主页隐藏这篇文章 Hexo的某主题的对应实现可以参考这个. 这里我们对应的找到themes/layout/index.ejs 然后将
visible: hide
themes/layout/index.ejs
<% if(theme.scheme === 'Paradox') { %> <!-- Paradox Thumbnail --> <%- partial('_partial/Paradox-post_entry', { post: post, index: true }) %> <% } %> <% if(theme.scheme === 'Isolation') { %> <!-- Isolation Thumbnail --> <%- partial('_partial/Isolation-post_entry', { post: post, index: true }) %> <% } %>
修改为:
<% if ( !( (post.visible === 'hide') && (page.path === "index.html") ) ) { %> <% if(theme.scheme === 'Paradox') { %> <!-- Paradox Thumbnail --> <%- partial('_partial/Paradox-post_entry', { post: post, index: true }) %> <% } %> <% if(theme.scheme === 'Isolation') { %> <!-- Isolation Thumbnail --> <%- partial('_partial/Isolation-post_entry', { post: post, index: true }) %> <% } %> <% } %>
即可。
只是增加了一个判断。
(希望主题越来越好w)
The text was updated successfully, but these errors were encountered:
We suggest you to create a new page instead of post, then it will not be shown in the archives.
Sorry, something went wrong.
No branches or pull requests
I certify that I have first consulted (check all with "x")
我确认我已经查看了 (使用 "x" 选择)
I'm submitting a (check one with "x")
我正在申请 (使用 "x" 选择)
Material 原质 主题提供了很好的归档功能,但是出于若干需求,有时候可能不希望某些文章出现在首页(当然可以在文章的归档中找到它)因而建议增加一个隐藏在主页显示的设置。例如文章头中添加
visible: hide
即可以在主页隐藏这篇文章Hexo的某主题的对应实现可以参考这个. 这里我们对应的找到
themes/layout/index.ejs
然后将修改为:
即可。
只是增加了一个判断。
(希望主题越来越好w)
The text was updated successfully, but these errors were encountered: