I am using jekyll with Github pages for my site. I am trying to make some messages invisible in the house, but they may be associated with another message. In the front, I tried to add a field visible like this:
--- layout: post title: excerpt: visible:1 ---
And then in the index.html file, I performed an if check:
<div class="posts"> {% for post in paginator.posts %} {% if post.visible== 1 %} <div class="post"> <h1> <a href="{{ post.url }}"> {{ post.title }} </a> </h1> <span class="post-date">{{ post.date | date_to_string }}</span> <a class="subtitle" href="{{ post.url }}"> {{ post.excerpt }} </a> </a> </div> {% endif %} {% endfor %} </div>
The idea is that when I set 0 in the visible field, the message will not be visible in the house. Unsuccessfully, this does not work, do you have any hints? Thanks
html post github github-pages jekyll
kilian
source share