# Article

The Liquid `article` object and its properties, with examples.

The `article` object has the following attributes:

## article.author

Returns the full name of the article's author.

## article.comments

Returns the published [comments](https://developer.versacommerce.de/articles/liquid-objects-comment) of the article. Returns an empty array if comments are disabled.

## article.comments_count

Returns the number of published comments of the article.

## article.comments_enabled?

Returns `true` if comments are enabled, `false` if they are disabled.

## article.comment_post_url

Returns the relative URL that POST requests are sent to when new comments are created.

```liquid
{{ article.comment_post_url }}
```

```text
/blogs/news/10582441-sale-starts-today/comments
```

## article.content

Returns the content of the article.

## article.created_at

Returns the timestamp of when the article was created. Use the [date filter](https://developer.versacommerce.de/articles/liquid-filters-additional-filters#date) to format it.

```liquid
{{ article.created_at | date: "%a, %b %d, %y" }}
```

```text
Fri, Sep 16, 11
```

## article.excerpt

Returns the excerpt of the article.

## article.excerpt_or_content

Returns `article.excerpt` if it exists. Returns `article.content` if the article has no excerpt.

## article.handle

Returns the [handle](https://developer.versacommerce.de/articles/liquid-objects-handle) of the article.

## article.id

Returns the ID of the article.

## article.image

Returns the [image object](https://developer.versacommerce.de/articles/liquid-objects-image) of the article.

## article.image.alt

Returns the `alt` text of the article image.

## article.image.src

Returns the relative URL of the article image.

```liquid
{{ article.image.src | image_url: width: 500 }}
```

```text
//cdn.versacommerce.de/s/files/1/0087/0462/blogs/summer_article.png?v=1334084726&width=500
```

## article.moderated?

Returns `true` if the blog the article belongs to moderates comments. Returns `false` if the blog is not moderated.

## article.published_at

Returns the date and time the article was published. Use the [date filter](https://developer.versacommerce.de/articles/liquid-filters-additional-filters#date) to format it.

## article.tags

Returns all tags of the article.

```liquid
{% for tag in article.tags %}
    {{ tag }}
{% endfor %}
```

```text
news new-products photography
```

## Total tag count

When you loop through `article.tags`, `tag.total_count` outputs how often a tag is used. This shows visitors how many blog posts have a given tag:

```liquid
{% for tag in article.tags %}
    {{ tag }} ({{ tag.total_count }})
{% endfor %}
```

```text
news (5) new-products (2) photography (1)
```

## article.title

Returns the title of the article.

## article.updated_at

Returns the date and time the article was last updated. Use the [date filter](https://developer.versacommerce.de/articles/liquid-filters-additional-filters#date) to format it.

## article.url

Returns the relative URL of the article.

```liquid
{{ article.url }}
```

```text
/blogs/news/10582441-my-new-article
```

## article.user

Returns an object with information about the author of the article. This information can be edited in the staff account options of the shop admin.

## article.user.account_owner

Returns `true` if the author is the account owner of the shop, `false` otherwise.

## article.user.bio

Returns the bio of the author.

## article.user.email

Returns the email address of the author.

## article.user.first_name

Returns the first name of the author.

## article.user.homepage

Returns the homepage of the author.

## article.user.image

Returns the [image object](https://developer.versacommerce.de/articles/liquid-objects-image) of the author.

```liquid
{% if article.user.image %}
  {{ article.user.image | image_url: width: 200, height: 200 }}
{% endif %}
```

```text
//cdn.versacommerce.de/s/files/1/0087/0462/users/user-image.png?v=1337103726&width=200&height=200
```

## article.user.last_name

Returns the last name of the author.


## More properties

VersaCommerce also provides these properties on the `article` object:

| Properties | Returns |
|---|---|
| `blog`, `metafields`, `mediafiles`, `full_url`, `template_suffix`, `content_title_tag`, `content_meta_description`, `content_meta_keywords`, `option_01` | Parent blog, uploaded files and article metadata |
