> ## Documentation Index
> Fetch the complete documentation index at: https://docs-loja.usecorvex.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Blog (resource)

> Objeto blog e artigos expostos pela Storefront Data API.

# Blog

Namespace: `storefront.blogs`

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
const blogs = await storefront.blogs.list();
const blog = await storefront.blogs.get('news');
const articles = await storefront.blogs.listArticles('news', { page: 1, limit: 12 });
const article = await storefront.blogs.getArticle('news', 'como-escolher-tamanho');
```

`get` e `getArticle` devolvem `null` se o handle vier vazio. `listArticles` aceita `page`, `limit` (ou `first`) e `tag`. Sem blog, a lista volta vazia.

`list` e `listArticles` usam o resumo. O resumo não inclui `bodyHtml`. `getArticle` inclui `bodyHtml` quando a API manda `bodyHtml` ou `contentHtml`, além de `author` e `updatedAt`. O mapper não sanitiza esse HTML.

Na página de blog, o runtime chama `listArticles` com `page: 1` e `limit: 12`. Esse teto está no resolvedor de contexto, não num setting do tema.

## Contexto de página

| Template | Contexto |
| - | - |
| **BLOG** | `page.blog`, `page.articles` |
| **ARTICLE** | `page.blog`, `page.article` |
| Preview | `?blog=news&article=slug` |

Veja [Menus e Blog](https://docs-loja.usecorvex.com.br/data/menus-blog.md) e [Contexto de página](https://docs-loja.usecorvex.com.br/data/page-context.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.