English 中文(简体)
如何将所有员额类别列入杰基尔?
原标题:How to list all post categories in Jekyll?

我正在考虑使用以下法典,但并不归还任何东西......

{% for category in site.categories %}
        <li><a href="{{ category.url }}"><strong>{{ category.title }}</strong></a></li>
{% endfor %}

I m还使用了Jekyll s original 的网页生成者Plugin,但我无法说明如何列出正在使用的所有员额类别(用于博客网页旁栏)?

问题回答

为此:

{% for category in site.categories %}
    <li><a href="{{category.url}}"><strong>{{category|first}}</strong></a></li>
{% endfor %}




相关问题
Using liquid with haml

I m planning to develop a CMS with ruby/rails. One of the main key features that I m planning is to give the user to edit their layout (I m planning to do this through liquid) meanwhile i have red ...

Extending Jekyll and Liquid to parse post s content

My blog, powerred by Jekyll, serves out a Atom feed. --- layout: nill rooturi: http://stefan.artspace44.com --- <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/...

Liquid templates - accessing members by name

I m using Jekyll to create a new blog. It uses Liquid underneath. Jekyll defines certain "variables": site, content, page, post and paginator. These "variables" have several "members". For instance, ...

How to make will_paginate work with liquid

I managed to make a little hack to make will_paginate work with liquid: http://gist.github.com/426737 I wonder if this is safe? Ideas?

undefined method `call for LiquidView:Class

I trying to use Liquid template engine plugin , but I m getting the following error while controller tries to render a .liquid template . "undefined method `call for LiquidView:Class" ...

Liquid Templates Not Parsing!

Im trying to use Liquid Template Language in my Rails Application, i ve watched Ryan Bates video over at rails cast, i pretty much follow the instructions but it just doesnt seem to work! When I try ...

Having difficulties with Jekyll / Liquid

I m tring to do a loop for Nav links below my posts. This is going into the _layout of posts.html I can t get the link to not show if the post is the last or the first. Any help would be awesome. {% ...

热门标签