{{#
blogList:
  filter: layout=layouts/blog-single.vto
  order: date=desc
  limit: 0
  showAuthor: true
  showDate: true
  showMins: false
#}}

<ul class="blog-list">
  {{
    for 
    single of search.pages(
      filter ?? "layout=layouts/blog-single.vto",
      order ?? "date",
      (limit === 0 ? undefined : limit) ?? undefined,
    )

  }}
    <li>
      <a href="{{ single.url}}">
        <h3>{{ single.title }}</h3>
        <span class="desc">
          {{ if (showAuthor ?? true) && single.author }}
            <span class="author">
              by <span class="name">{{ single.author }}</span>
            </span>
          {{ /if }}
          {{ if (showDate ?? true) && single.date }}
            <span class="date">
              {{ comp.dateDisplay({ date: single.date }) }}
            </span>
          {{ /if }}
          {{ set mins = single.readingInfo?.minutes || 0 }}
          {{ if (showMins ?? false) && mins >= 1 }}
            <span class="readTime">
              <span class="mins">{{ mins }}</span> min read
            </span>
          {{ /if }}
        </span>
      </a>
    </li>
  {{ /for }}
</ul>
