# Blogs

> This page documents the **new** Vitrin blog function and shows the old Zid equivalent.

All functions are available via **`window.zid.blog`**.

---

## Get Blog Post

**New:** `zid.blog.get(slug)`
**Old:** `zid.store.page.fetch({ id, slug })`

**Description:** Retrieve details of a specific blog post. You must provide the blog **slug**.

### Arguments

* **`slug`** *(string, required)* — The unique slug of the blog post.

### Usage

```js
const blog = await zid.blog.get("my-post-slug");
console.log(blog);

// Or using then/catch
zid.blog.get("my-post-slug")
  .then(blog => {
    console.log(blog);
  })
  .catch(error => {
    console.log(error.status, error.code);
  });
```

