Blog
Edit blog posts in the admin and control which ones are live on the storefront.
The blog is a set of articles on the storefront. Use this page to edit posts in the admin, add new ones and hide posts you aren't ready to show.
Litestore stores blog posts as Markdown files in the storefront's public/blog folder. They aren't database records. Each post appears at /blog/ followed by its filename.
The file is the real source of the post, and the admin only edits part of it. When you save, Litestore leaves anything the editor doesn't touch exactly as it was.
Navigation
Content → BlogThe admin lists the posts here. Tabs split the list into All, Published and Drafts.
Editing posts
Blog list
Pick the post to change.
Post editor
Change its title, description and body. The body uses a visual Markdown editor.
Saving
Litestore rewrites the file.
When you save, Litestore only rewrites three parts of the file, the title line, the description line and the body:
title
description
bodyEverything else in the file stays exactly as it was. That includes the cover image, the publish date, the author and any linked products.
New posts
There's no New post button, because a new post is a new file. To add a post, add a .md or .mdx file to public/blog with the fields the storefront reads.
| Field | What it does | Required |
|---|---|---|
| Title | Names the post. | Yes |
| Description | Summarises the post for search engines and social previews. | Yes |
| Publish date | Sorts the post in the list. | Yes |
| Author block | Names the author. | Yes |
| Cover image | Shows an image for the post. | No |
| Update date | Records when the post last changed. | No |
| Product slugs | Lists products to show inside the post. | No |
Hidden posts
To hide a post, mark it as a draft in the file. Litestore then doesn't list it, doesn't serve it at its URL and doesn't build a page for it. Nobody can find a draft post, and search engines can't index it. A post is either fully visible or fully hidden.
A future date doesn't hold a post back
If a post's publish date is in the future, the admin shows a Draft badge, but the post is still live on the storefront. Litestore only uses the date to sort the list, and there's no scheduler. To keep a post hidden until a certain date, leave it as a draft until then.
Visual editor limits
Some posts open as raw Markdown instead of in the visual editor. This happens when a post contains components or Markdown tables. The visual editor can't show either of them and would remove them when you save, and it opens the raw Markdown instead of quietly deleting them.
Description
Search engines and social previews show the description. Keep it under about 160 characters.
Litestore also adds article structured data to each post. It builds it from the post's title, description, cover image, publish date and author.