---
title: "article"

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


# article

<div className="code-flex">

<div>
  <ObjectSummary>
  An article, or [blog post](https://help.shopline.com/hc/articles/11318750463897-%E6%92%B0%E5%86%99%E5%8D%9A%E5%AE%A2%E6%96%87%E7%AB%A0), in a blog.
  </ObjectSummary>

  #### Properties

  <ObjectProperty
    name="author"
    types={["string"]}
  >
    <ObjectSummary>
The full name of the author of the article.
    </ObjectSummary>
  </ObjectProperty>
  <ObjectProperty
    name="comments"
    types={[<Mdx>array of [comment](https://developer.shopline.com/docs/handlebars/objects/comment.md)</Mdx>]}
  >
    <ObjectSummary>
  The published comments for the article.
  {/* TODO 如果禁用评论我们返回的依旧有值 */}
  {/* Returns an empty array if comments are disabled. */}
    </ObjectSummary>
    {/* TODO 用paginate标签一次最多显示50条评论待确认 */}
{/* > **Tip**
>
> Use the [paginate](https://developer.shopline.com/docs/handlebars/helpers/iteration/paginate.md) tag to choose how many comments to show at once, up to a limit of 50. */}
  </ObjectProperty>

  <ObjectProperty
    name="comments_count"
    types={["number"]}
  >
    <ObjectSummary>
     The number of published comments for the article.
    </ObjectSummary>
  </ObjectProperty>


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

    <ObjectProperty
    name="content"
    types={["string"]}
  >
    <ObjectSummary>
The content of the article.
    </ObjectSummary>
  </ObjectProperty>


    <ObjectProperty
    name="created_at"
    types={["string"]}
  >
    <ObjectSummary>
A timestamp for when the article was created.
    </ObjectSummary>
  > **Tip**
>
> Use the [date helper](https://developer.shopline.com/docs/handlebars/helpers/format/date.md) to format the timestamp.
  </ObjectProperty>

    <ObjectProperty
    name="excerpt"
    types={["string"]}
  >
    <ObjectSummary>
The excerpt of the article.
    </ObjectSummary>
  </ObjectProperty>

    <ObjectProperty
    name="excerpt_or_content"
    types={["string"]}
  >
    <ObjectSummary>
Returns the article [excerpt](#excerpt) if it exists. Returns the article [content](#content) if no excerpt exists.
    </ObjectSummary>
  </ObjectProperty>

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

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

    <ObjectProperty
    name="image"
    types={["image"]}
  >
    <ObjectSummary>
The featured [image](https://developer.shopline.com/docs/handlebars/objects/image.md) for the article.
    </ObjectSummary>
  </ObjectProperty>
{/* TODO published_at shopfiy是字符串，我们的是Number */}
    <ObjectProperty
    name="published_at"
    types={["string"]}
  >
    <ObjectSummary>
A timestamp for when the article was published.
    </ObjectSummary>
> **Tip**
>
> Use the [date helper](https://developer.shopline.com/docs/handlebars/helpers/format/date.md) to format the timestamp.
  </ObjectProperty>

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

    <ObjectProperty
    name="updated_at"
    types={["string"]}
  >
    <ObjectSummary>
A timestamp for when the article was updated.
    </ObjectSummary>
> **Tip**
>
> Use the [date helper](https://developer.shopline.com/docs/handlebars/helpers/format/date.md) to format the timestamp.
  </ObjectProperty>

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


</div>

<div>
  <ObjectAccess
    object="article"
    global={false}
    templates={[
      { name: 'article' },
    ]}
    parents={[
      { object: 'articles' },
      { object: 'blog.articles', link: '/docsv2/ec20/hdwvcvrgnfcjf4gq/ysxb57s3p8z99vpc#articles' }
    ]}
  />
</div>

</div>

