In Jekyll How Do I Work With a Specific Post? -
i have sidebar in site want able highlight specific post.
how work specific post?
i tried this:
{% assign workingpost = site.posts.2014-09-08-we-convert-all-dollars-to-bitcoin %} <div>{{workingpost.title}}</div> but title blank. title post we convert dollars bitcoin , expected get.
you can pages :
<ul class="nav navbar-nav"> {% p in site.pages %} <li{% if p.url == page.url %} class="active"{% endif %}> <a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a> </li> {% endfor %} </ul> note: in answer, loop may collides page variable if in post or page page. that's why use {% p in site.pages %} instead of {% page in site.pages %}
Comments
Post a Comment