ʕ ꈍᴥꈍʔ Bear docs

Embedding blog post lists

The blog post embed allows you to inject a list of blog posts into your content dynamically. This can be done in any content on your blog including posts, the homepage, and footer. This feature supports various filters and settings that you can apply to customize the output.

Syntax

The base syntax for embedding posts is as follows:

{{ posts }}

Optional Filters and Parameters

Additional filters and parameters can be appended to the base syntax following a separator |.

  1. tag: Filters posts by a specific tag.
## Posts with tag "news"
{{ posts|tag:"news" }}
  1. limit: Limits the number of posts to display.
## Check out my last 5 posts
{{ posts|limit:5 }}
  1. order: Orders the posts by publication date. Posts are descending by default.
## Ordered ascending
{{ posts|order:asc }}

## Or descending 
{{ posts|order:desc }}
  1. description: Controls the visibility of the meta_description of the post.
## Show excerpt
{{ posts|description:True }}

Note: Additional CSS work will be required to format the blog list with descriptions correctly. The embedded posts have a classname of embed.

Patterns can be combined in any order:

{{ posts|tag:"tagname"|limit:5|order:asc|description:True }}

Spaces are optional around the filter delimiters. The following examples are equivalent:

{{ posts|limit:5 }}
{{ posts | limit:5 }}

Here's an example running on this site:

### Most recent posts
{{ posts|limit:5 }}

Most recent posts