Skip to content
BuildBase

Write and publish a blog post in the console

Create a blog post in the console, set its slug, folder, thumbnail, body, author and tags, suggest related posts, publish it, and read it by its path.

A blog post goes from a title to a live page in one screen. This guide writes "Introducing cohort reports" for Acme Analytics, files it under a Product updates folder, and publishes it. Docs pages work the same way; the last section says what differs.

Before you start

A console role that can create and update blog posts, folders and tags, and upload assets for the thumbnail. Room on your plan for blogs, posts, folders and tags. An image exactly 1200x630 for the thumbnail.

1. Open Blogs

Open Blogs in the console (opens the console in a new tab)

In the left rail choose Content, then Blogs under Pages. Blog drafts lists your unpublished posts and Blog posts the published ones.

The Blogs page under Content, with the Blogs menu item highlighted as step 1 and the Create blog post button as step 4

2. Make a folder

A post's address is its folder path plus its slug, such as product-updates/introducing-cohort-reports (paths). Press Manage folders, then Create folder, fill Name and Slug, pick a Parent folder to nest it, and press Create.

The Create folder dialog: Name Release notes, Slug release-notes, with the Create button highlighted as step 2

3. Make tags

Back on Blogs, press Manage blog tags. Create opens a form for the tag's Title, Slug, whether it is Public, and its SEO fields.

The Blog tags sheet: the Analytics tag, public, with Archive and Edit, and the Create button highlighted as step 3

4. Create the post

Press Create blog post, type the Blog title and press Create. The post starts as a draft.

The Create blog post dialog: the Blog title Introducing cohort reports highlighted as step 4, and the Create button

5. Open it

It is listed under Blog drafts. Press Edit on its row.

Blog drafts: Introducing cohort reports, Draft, with the Edit button highlighted as step 5

6. Fill in its details

Blog details holds the Blog title, Short description, Blog slug, Blog folder, SEO title, SEO description and SEO keywords. Each field has its own Save, shown once you change it; saving one leaves the others as you typed them.

Set the slug and the folder now: both lock once the post is published.

Blog details, a Draft: the Short description, the Blog slug introducing-cohort-reports with its Save button highlighted as step 6, and the Blog folder Product updates (/blogs/product-updates), each with its own Save

7. Add a thumbnail

Press Change thumbnail. The Assets tab lists only images exactly 1200x630; with none, it says so. On the Upload tab, Upload file takes a new one, and the post uses it as soon as it is uploaded.

The Choose thumbnail dialog: no assets for the selected filter, and the hint to upload an image with the dimensions 1200x630 highlighted as step 7, beside the Upload tab

8. Write the body

Write in the editor under Blog content and press that card's Save. An image you drop into the body is uploaded as a public asset (content is not assets).

The Blog content card with two lines of text, and its Save button highlighted as step 8

9. Credit an author and apply a tag

Press Manage authors, pick a name under Available (or make one with Create: Name, Username, Image URL and links), and press Save. Manage tags works the same way for the tags from step 3.

The Manage authors sheet: Maya Chen under Credited, Every author is credited, and the Save button highlighted as step 9

Under Suggested blogs, press Add beside a published post and then the card's Save. Readers see these at the bottom of the post.

Suggested blogs: Weekly retention emails selected, and the Save button highlighted as step 10

11. Publish it

Press Publish at the top and confirm with Publish. The post goes live and moves to Blog posts; Unpublish takes it back to draft.

The Publish blog post dialog: This will make the post live and visible to readers, the link How a published post reaches your site, and the Publish button highlighted as step 11

The badge beside Blog details now reads Published, and the slug says it is locked.

Blog details with the Published badge highlighted, the Cohort reports thumbnail, and the slug: locked while the post is published

Publishing does not rebuild a static site. Start a deploy from the banner that counts changed blog posts, or with Deploy under Settings, then Deploy hooks (deploy hooks).

12. Docs pages

Open Docs in the console (opens the console in a new tab)

In the left rail choose Content, then Docs. It has the same screens: Manage folders, Manage doc tags, Create doc post and Suggested docs, read from /api/docs. Doc drafts lists everyone's drafts, while Blog drafts lists only the ones you created.

The Docs page under Content, with the Docs menu item highlighted as step 12

Check it works

Read the post by its path with your org API key:

curl -G https://api.console.buildbase.app/api/blogs/path \
  -H "Authorization: Bearer $BUILDBASE_TOKEN" \
  --data-urlencode 'path=product-updates/introducing-cohort-reports'

Or with the server client from @buildbase/sdk/server:

const post = await content.blogs.byPath(
  'product-updates/introducing-cohort-reports'
);

With draftPreview=true the same path answers 404, because that flag reads drafts only (previewing drafts).

Things to watch out for

  • The slug and folder lock once a post is published. The API answers "Cannot update slug of published post" (or folder); unpublish it to change either.
  • Each field saves on its own Save. Leaving the page drops a field you did not save.
  • Blog drafts shows only the drafts you created. Doc drafts shows everyone's.
  • The thumbnail picker lists only 1200x630 images. Resize one before you upload it.
  • Publishing does not deploy your site. A static site needs a deploy, or a content webhook that starts one.
  • Your plan caps posts, folders, tags and authors. Create is refused at the limit; archiving a folder or tag frees its place.

Next Steps