{# Wave 2 graph primitives in action: {% trending %} + {% recommend %}.

  Use case: end of a blog post / lesson page, show what's trending
  site-wide AND what the engine thinks the reader should see next.

  Why this is the StaticOwl differentiator: every flat-CMS does
  "recent posts" via createdAt order. We do pageRank-weighted trending
  AND graph-similarity recommendations as two one-liners. No external
  recommender stack, no Cypher in the template.

  Drop into a post / lesson template after the body. #}

<section class="post-tail">

  <aside class="recommend">
    <h2>Continue reading</h2>
    <ul>
      {% recommend after:"{{ id }}" type:"blog_post" algo:"jaccard" limit:3 as next %}
        <li>
          <a href="{{ next.url }}">{{ next.title }}</a>
          {% if next.reason %}<span class="why">{{ next.reason }}</span>{% endif %}
        </li>
      {% else %}
        <li class="empty">No recommendations yet.</li>
      {% endrecommend %}
    </ul>
  </aside>

  <aside class="trending">
    <h2>Trending this week</h2>
    <ol>
      {% trending type:"blog_post" window:"7d" limit:5 as t %}
        <li>
          <a href="{{ t.url }}">{{ t.title }}</a>
        </li>
      {% else %}
        <li class="empty">Quiet week — check back later.</li>
      {% endtrending %}
    </ol>
  </aside>

</section>
