File: blog.liquid

package info (click to toggle)
ruby-liquid 5.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,176 kB
  • sloc: ruby: 10,561; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<div id="page">
  <h2>{{page.title}}</h2>

  {% paginate blog.articles by 20 %}

    {% for article in blog.articles  %}

    <div class="article">
      <div class="headline">
      <h3 class="title">
        <a href="{{article.url}}">{{ article.title }}</a>
      </h3>
      <h4 class="date">Posted on {{ article.created_at | date: "%B %d, '%y" }} by {{ article.author }}.</h4>
      </div>

      <div class="article-body textile">
        {{ article.content | strip_html | truncate: 250 }}
      </div>

      {% if blog.comments_enabled? %}
        <p style="text-align: right"><a href="{{article.url}}#comments">{{ article.comments_count }} comments</a></p>
      {% endif %}
    </div>

    {% endfor %}

    <div id="pagination">
      {{ paginate | default_pagination }}
    </div>

  {% endpaginate %}

</div>