Skip to main content
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​

CommandWhat it does
sf blog-posts list, getFind posts, newest first, or read one in full
sf blog-posts createCreate a post from a JSON file, as a draft unless its visibility says otherwise
sf blog-posts updateChange a post; only the fields in the file change
sf blog-posts imagesAttach or detach a post's images
sf blog-posts deleteTake a post off every page and delete it, with your approval
sf pages blog-posts addPut 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.

Was this page helpful?