Post

Renders a blog post selector and returns a BlogPost object.

Renders a select input from which a creator can choose a blog post from their published posts.

Returns: A BlogPost object.

Example

---
attributes:
  featured_post:
    type: post
    label: Featured post
    default: random
---
{% if featured_post %}
  <article>
    <h3>{{ featured_post.title }}</h3>
    <a href="{{ featured_post.url }}">Read more</a>
  </article>
{% endif %}

Setting defaults

The default value only accepts random, which selects a random post from the creator's published blog posts.

On this page