---
title: "blog"

doc_type: static
doc_category: static
doc_version: v20260901
source_url:
  html: 'https://developer.shopline.com/docs/handlebars/objects/blog'
  md: 'https://developer.shopline.com/docs/handlebars/objects/blog.md'
---


# blog

> **Warning**
>
> In a non-OS2.1 theme, use `blog_collection` to retrieve the same object.


<div className="code-flex">

<div>
  <ObjectSummary>
Information about a specific [blog](https://help.shopline.com/hc/articles/4409354423833-%E6%B7%BB%E5%8A%A0%E5%8D%9A%E5%AE%A2) in the store.
  </ObjectSummary>

  #### Properties

  <ObjectProperty
    name="all_tags"
    types={["array of string"]}
  >
    <ObjectSummary>
All of the tags on the articles in the blog collection.<br/>

This includes tags of articles that aren't in the current pagination view.
    </ObjectSummary>
  </ObjectProperty>

  <ObjectProperty
    name="articles"
    types={[<Mdx>array of [article](https://developer.shopline.com/docs/handlebars/objects/article.md)</Mdx>]}
  >
    <ObjectSummary>
      The articles in the blog collection.
    </ObjectSummary>
    {/* TODO paginate标签可以设置每页显示多少篇文章，最多显示50篇 */}
{/* > **Tip**
>
> Use the [paginate](https://developer.shopline.com/docs/handlebars/helpers/iteration/paginate.md) tag to choose how many articles to show per page, up to a limit of 50. */}
  </ObjectProperty>

  <ObjectProperty
    name="articles_count"
    types={["number"]}
  >
    <ObjectSummary>
      The total number of articles in the blog collection. This total doesn't include hidden articles.
    </ObjectSummary>
  </ObjectProperty>


  <ObjectProperty
    name="comments_enabled?"
    types={["boolean"]}
  >
    <ObjectSummary>
      Returns `true` if comments are enabled for the blog collection. Returns `false` if not.
    </ObjectSummary>
  </ObjectProperty>


    {/* <ObjectProperty
    name="current_tags"
    types={["string"]}
  >
    <ObjectSummary>
The name of the custom template assigned to the page.<br/>

The name doesn't include the page. prefix, or the file extension (.json or .html).<br/>

If a custom template isn't assigned to the page, then nil is returned.<br/>
    </ObjectSummary>
  </ObjectProperty> */}

    <ObjectProperty
    name="handle"
    types={["string"]}
  >
    <ObjectSummary>
The [handle](https://developer.shopline.com/docs/handlebars/objects/handle.md) of the blog collection.
    </ObjectSummary>
  </ObjectProperty>


    <ObjectProperty
    name="id"
    types={["string"]}
  >
    <ObjectSummary>
The ID of the blog collection.
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="moderated?"
    types={["boolean"]}
  >
    <ObjectSummary>
Returns `true` if the blog collection is set to moderate comments. Returns `false` if not.
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="tags"
    types={["array of string"]}
  >
    <ObjectSummary>
A list of all of the tags on all of the articles in the blog collection.<br/>

Unlike [blog_collection.all_tags](#all_tags), this property only returns tags of articles that are in the filtered view.
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="title"
    types={["string"]}
  >
    <ObjectSummary>
The title of the blog collection.
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="url"
    types={["string"]}
  >
    <ObjectSummary>
The relative URL of the blog collection.
    </ObjectSummary>
  </ObjectProperty>


</div>

<div>
  <ObjectAccess
    object="blog"
    global={false}
    templates={[
      { name: 'blog' },
      { name: 'article' },
    ]}
  />
</div>

</div>

