---
title: "blog"

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


# blog

> **注意**
>
> 在非OS2.1主题，使用 blog_collection 获取相同的 object

<div className="code-flex">

<div>
  <ObjectSummary>
  商店中的一篇的[博客](https://help.shopline.com/hc/articles/4409354423833-%E6%B7%BB%E5%8A%A0%E5%8D%9A%E5%AE%A2)信息。
  </ObjectSummary>

  #### 属性

  <ObjectProperty
    name="all_tags"
    types={["array of string"]}
  >
    <ObjectSummary>
    文章集合中所有的标签。<br/>

    这包括不在当前分页视图中的文章标签。
    </ObjectSummary>
  </ObjectProperty>

  <ObjectProperty
    name="articles"
    types={[<Mdx>array of [article](https://developer.shopline.com/zh-hans-cn/docs/handlebars/objects/article.md)</Mdx>]}
  >
    <ObjectSummary>
      博客集合中的文章。
    </ObjectSummary>
{/* TODO 待确认 */}
{/* > **Tip**
>
> 使用[paginate](https://developer.shopline.com/zh-hans-cn/docs/handlebars/helpers/iteration/paginate.md)标签可以设置每页显示多少篇文章，最多显示50篇 */}
  </ObjectProperty>

  <ObjectProperty
    name="articles_count"
    types={["number"]}
  >
    <ObjectSummary>
      博客集合中的文章总数。此总数不包括隐藏的文章。
    </ObjectSummary>
  </ObjectProperty>


  <ObjectProperty
    name="comments_enabled?"
    types={["boolean"]}
  >
    <ObjectSummary>
      如果为博客集合启用了评论，则返回`true`,如果不是，则返回 `false`。
    </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>
博客集合的[handle](https://developer.shopline.com/zh-hans-cn/docs/handlebars/objects/handle.md)。
    </ObjectSummary>
  </ObjectProperty>


    <ObjectProperty
    name="id"
    types={["string"]}
  >
    <ObjectSummary>
博客集合的ID
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="moderated?"
    types={["boolean"]}
  >
    <ObjectSummary>
如果博客集合设置为'允许评论，需经过审核'，则返回`true`。如果不是，则返回 `false`。
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="tags"
    types={["array of string"]}
  >
    <ObjectSummary>
博客集合中所有文章的所有标签的列表。<br/>

与[blog_collection.all_tags](#all_tags)不同，此属性仅返回当前页面的文章标签。
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="title"
    types={["string"]}
  >
    <ObjectSummary>
博客集合的标题。
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="url"
    types={["string"]}
  >
    <ObjectSummary>
博客集合的相对 URL。
    </ObjectSummary>
  </ObjectProperty>


</div>

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

</div>

