The blog object contains basic information about blog posts and articles. It’s available on blog pages and provides access to post listings, individual posts, and basic blog functionality.

Usage: Available on blog pages - use to display blog posts and basic blog functionality

Blog Context Detection

Check what type of blog page is being displayed:

{{#is_list}}
    <!-- Blog overview/list page -->
    <div class="blog-list-page">
        <h1>{{blog.title_current}}</h1>
        
        {{#isBlogTag}}
            <p class="blog-tag-info">{{#lang}}Posts tagged with{{/lang}}: {{current_tag}}</p>
        {{/isBlogTag}}
        
        <!-- Blog posts loop -->
        {{#posts}}
            <!-- Individual post content -->
        {{/posts}}
    </div>
{{/is_list}}

{{#is_post}}
    <!-- Individual blog post page -->
    <article class="blog-post-single">
        <h1>{{post.title}}</h1>
        <!-- Single post content -->
    </article>
{{/is_post}}

Blog Posts Listing

Display multiple blog posts using the posts loop:

{{#is_list}}
<div class="blog-page">
    <header class="blog-header">
        <h1>{{blog.title_current}}</h1>
        
        <div class="blog-meta">
            <a href="{{blog.rss}}" class="rss-link">
                <i class="icon-rss"></i>
                {{#lang}}RSS Feed{{/lang}}
            </a>
        </div>
    </header>
    
    {{#isBlogTag}}
        <div class="blog-tag-notice">
            <p>{{#lang}}Showing posts with selected tag{{/lang}}</p>
        </div>
    {{/isBlogTag}}
    
    <div class="blog-posts-grid">
        {{#posts}}
        <article class="blog-post-card">
            {{#hasImage}}
                <div class="post-image">
                    <a href="{{url}}">
                        <img src="{{#img}}{{image}}_400x250{{/img}}" 
                             alt="{{title}}"
                             loading="lazy">
                    </a>
                </div>
            {{/hasImage}}
            
            <div class="post-content">
                <h3 class="post-title">
                    <a href="{{url}}">{{title}}</a>
                </h3>
                
                <div class="post-meta">
                    <time class="post-date">{{date_pretty}}</time>
                    {{#author}}
                        <span class="post-author">{{#lang}}By{{/lang}} {{author}}</span>
                    {{/author}}
                </div>
                
                {{#content_short}}
                    <div class="post-excerpt">
                        {{&content_short}}
                    </div>
                {{/content_short}}
                
                <a href="{{url}}" class="read-more">
                    {{#lang}}Read More{{/lang}}
                </a>
            </div>
        </article>
        {{/posts}}
    </div>
</div>
{{/is_list}}

Single Blog Post

Display individual blog post content:

{{#is_post}}
<article class="blog-post-single">
    <!-- Breadcrumbs -->
    <nav class="breadcrumbs">
        {{#breadcrumbs}}
            <a href="{{url}}">{{title}}</a>
            {{^last}} > {{/last}}
        {{/breadcrumbs}}
    </nav>
    
    <!-- Post Header -->
    <header class="post-header">
        <h1 class="post-title">{{post.title}}</h1>
        
        <div class="post-meta">
            <time class="post-date">{{post.date_pretty}}</time>
            {{#post.author}}
                <span class="post-author">
                    {{#lang}}By{{/lang}} {{post.author}}
                </span>
            {{/post.author}}
        </div>
    </header>
    
    <!-- Featured Image -->
    {{#post.hasImage}}
    <div class="post-featured-image">
        <img src="{{#img}}{{post.image}}_1200x600{{/img}}" 
             alt="{{post.title}}"
             loading="lazy">
    </div>
    {{/post.hasImage}}
    
    <!-- Post Content -->
    <div class="post-content">
        {{&post.content}}
    </div>
    
    <!-- Post Footer -->
    <footer class="post-footer">
        <div class="post-navigation">
            <a href="{{blog.url}}" class="back-to-blog">
                <i class="icon-arrow-left"></i>
                {{#lang}}Back to Blog{{/lang}}
            </a>
        </div>
    </footer>
</article>
{{/is_post}}

Blog Tags

Display available blog tags when tag filtering is active:

{{#blog.filter_tags}}
<div class="blog-tags-section">
    <h3>{{#lang}}Browse by Tags{{/lang}}</h3>
    
    {{#available_tags}}
    <div class="blog-tags">
        {{#available_tags}}
        <a href="{{url}}" class="tag-link" rel="tag">
            {{title}}
        </a>
        {{/available_tags}}
    </div>
    {{/available_tags}}
</div>
{{/blog.filter_tags}}

Available Properties

Blog Context Properties

PropertyTypeDescription
is_listBooleanCheck if blog overview is being shown
is_postBooleanCheck if specific blog post is being shown
isBlogTagBooleanIs blog overview shown based on a tag

Blog Properties

PropertyTypeDescription
blog.urlStringBlog link address
blog.title_currentStringBlog title
blog.rssStringBlog RSS link address
blog.filter_tagsBooleanCheck if tags are active
blog.available_tagsArrayObject with blog tags
blog.postsArrayObject containing all blog posts

Available Tags Properties (within available_tags loop)

PropertyTypeDescription
titleStringTag designation
urlStringTag URL

Posts Properties (within posts loop)

PropertyTypeDescription
hasImageBooleanCheck if blog post has an image
imageStringBlog post image
titleStringBlog post title
content_shortStringShort preview of blog post
contentStringBlog post content
authorStringBlog post author
date_prettyStringBlog post date
urlStringBlog post link address

Post Properties (single post context)

PropertyTypeDescription
post.hasImageBooleanCheck if blog post has an image
post.imageStringBlog post image
post.titleStringBlog post title
post.content_shortStringShort preview of blog post
post.contentStringBlog post content
post.authorStringBlog post author
post.date_prettyStringBlog post date
post.urlStringBlog post link address

Complete Blog Template

<div class="blog-container">
    {{#is_list}}
        <!-- Blog List Page -->
        <div class="blog-list-page">
            <header class="blog-header">
                <h1>{{blog.title_current}}</h1>
                
                <div class="blog-actions">
                    {{#blog.rss}}
                        <a href="{{blog.rss}}" class="rss-link">
                            <i class="icon-rss"></i>
                            {{#lang}}RSS Feed{{/lang}}
                        </a>
                    {{/blog.rss}}
                </div>
            </header>
            
            {{#isBlogTag}}
                <div class="tag-filter-notice">
                    <p>{{#lang}}Filtered by tag{{/lang}}</p>
                </div>
            {{/isBlogTag}}
            
            <!-- Tags Navigation -->
            {{#blog.filter_tags}}
            <nav class="blog-tags">
                <h3>{{#lang}}Browse Tags{{/lang}}</h3>
                <div class="tags-container">
                    {{#available_tags}}
                    <a href="{{url}}" class="tag-button">{{title}}</a>
                    {{/available_tags}}
                </div>
            </nav>
            {{/blog.filter_tags}}
            
            <!-- Posts Grid -->
            <main class="blog-posts">
                {{#posts}}
                <article class="post-card">
                    {{#hasImage}}
                        <div class="post-image">
                            <a href="{{url}}">
                                <img src="{{#img}}{{image}}_400x250{{/img}}" alt="{{title}}">
                            </a>
                        </div>
                    {{/hasImage}}
                    
                    <div class="post-info">
                        <h2 class="post-title">
                            <a href="{{url}}">{{title}}</a>
                        </h2>
                        
                        <div class="post-meta">
                            <time>{{date_pretty}}</time>
                            {{#author}}<span>{{#lang}}By{{/lang}} {{author}}</span>{{/author}}
                        </div>
                        
                        {{#content_short}}
                            <div class="post-excerpt">{{&content_short}}</div>
                        {{/content_short}}
                        
                        <a href="{{url}}" class="read-more">{{#lang}}Read More{{/lang}}</a>
                    </div>
                </article>
                {{/posts}}
            </main>
        </div>
    {{/is_list}}
    
    {{#is_post}}
        <!-- Single Post Page -->
        <article class="single-post">
            <header class="post-header">
                <h1>{{post.title}}</h1>
                <div class="post-meta">
                    <time>{{post.date_pretty}}</time>
                    {{#post.author}}<span>{{#lang}}By{{/lang}} {{post.author}}</span>{{/post.author}}
                </div>
            </header>
            
            {{#post.hasImage}}
                <div class="post-image">
                    <img src="{{#img}}{{post.image}}_1200x600{{/img}}" alt="{{post.title}}">
                </div>
            {{/post.hasImage}}
            
            <div class="post-content">
                {{&post.content}}
            </div>
            
            <footer class="post-footer">
                <a href="{{blog.url}}" class="back-link">
                    {{#lang}}← Back to Blog{{/lang}}
                </a>
            </footer>
        </article>
    {{/is_post}}
</div>

Usage Notes

Limited Blog Object: The blog object only provides basic functionality (post listings, individual posts, and simple tag filtering). Advanced features like categories, related posts, pagination, SEO properties, and complex metadata are not available.

Best Practices

Context Detection

Always use is_list and is_post to determine the correct template structure

Image Handling

Check hasImage before displaying images and use proper image optimization

Content Display

Use content_short for excerpts and full content for complete posts

Tag Filtering

Implement tag filtering when blog.filter_tags is available

Common Blog Layouts

Layout TypeContextKey Elements
Blog Listis_listPosts loop, title_current, RSS link
Single Postis_postIndividual post content, navigation
Tagged PostsisBlogTagFiltered posts, tag navigation

Next Steps