Reference
Blog posts
Overview
Your agent can write, edit and illustrate your StoreFront blog posts. It builds a post as a draft, adds its images, sets its SEO fields, and publishes it last.
A post's visibility decides who sees it: D for a draft, P for public, or L for logged-in customers only.
Example requests
- "Write a draft post about caring for waxed cotton, with a hero image from the storefront's files, and show it to me before publishing."
- "Update the SEO title and description on the five most recent posts."
- "Find every post that mentions the old return policy."
- "Publish the fall lookbook post on Monday at 9 a.m."
Commands
| Command | What it does |
|---|---|
sf blog-posts list, get | Find posts, newest first, or read one in full |
sf blog-posts create | Create a post from a JSON file, as a draft unless its visibility says otherwise |
sf blog-posts update | Change a post; only the fields in the file change |
sf blog-posts images | Attach or detach a post's images |
sf blog-posts delete | Take a post off every page and delete it, with your approval |
sf pages blog-posts add | Put a post on a page |
Live changes
Creating a draft needs no --live. Every change to an existing post needs --live, even a draft, because another editor can publish it between the read and the write. A post that is public or members-only before or after the write also needs publish permission.
The body and excerpt are stored exactly as sent, and anything that could run a script is refused.
What it cannot do
- Undo a deletion. A deleted post cannot be restored.
What needs approval
Deleting a post with sf blog-posts delete needs approval, because there is no undo. See Changes that need approval.
Related documentation
- StoreFront Blogs: how blogs fit into your storefront
- Create and manage blog posts: blog posts in the admin
- Files and assets: uploading images for a post
Was this page helpful?