LoginSignup
4

More than 5 years have passed since last update.

Jekyllテンプレートの一覧表示処理。

Posted at

投稿一覧

  {% for post in site.posts %}
    <li>&raquo; <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li>
  {% endfor %}

カテゴリ別投稿一覧

    {% for category in site.categories %}
        <h3>{{ category | first }}</h3>
        <ul id="categories">
        {% for posts in category %}
            {% for post in posts %}
                <li><a href="{{ post.url }}">{{ post.title }}</a></li>
            {% endfor %}
        {% endfor %}
        </ul>
    {% endfor %}

固定ページ一覧

        {% for page in site.pages %}
          {% if page.layout == 'page' %}
          <a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.link_title }}</a>
          {% endif %}
        {% endfor %}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4