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
Is it possible to add an option, e.g. hidden: true, into front matter, and to remove this post from the index page?
hidden: true
The text was updated successfully, but these errors were encountered:
@zhang-stephen
Currently, the hexo-generator-index doesn't have such an option, but hexo themes can implement this very easily! Here is an example with .ejs:
hexo-generator-index
.ejs
<!-- Post List --> <% page.posts.each((post) => { %> <!-- Post Entry --> <%- partial('_partial/post-entry', { post }) %> <% }); %>
<!-- Post List --> <% page.posts.each((post) => { %> <!-- Post Entry --> + <% if (post.hidden !== true) { %> <%- partial('_partial/post-entry', { post }) %> + <% } %> <% }); %>
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Is it possible to add an option, e.g.
hidden: true
, into front matter, and to remove this post from the index page?The text was updated successfully, but these errors were encountered: