Product Advanced Guide ๐
Ready to take your products to the next level? Here you will learn about handling assets, auto-detection, and the rules to keep your products shining.
Folder Structure
When using the directory approach, your setup should look like this:
my-product/
โโโ product.md
โโโ attachments/
โโโ image.png (auto-detected as `image`)
โโโ attachment.zip (auto-detected as `attachment`)
โโโ screenshots/
โโโ dashboard.pngThe .md file lives in the root of the directory. Any other referenced file must be inside the attachments/ folder (subfolders inside attachments/ are perfectly fine).
Associated Files
imagereferences the cover image of the product (the one that appears in the catalog). It is independent of the images used in the body.attachmentreferences a single attached file (e.g., terms, a spec sheet, or a downloadable package).
Both are uploaded along with the Markdown in the same ZIP bundle.
Auto-detection
If image or attachment are not explicitly specified in the frontmatter, the CLI automatically resolves them by convention from the contents of ./attachments/:
image: The first file matchingattachments/image.{png,jpg,jpeg,webp}(in that priority order). If none exists, the field remainsnull.attachment: The first file matchingattachments/attachment.zip. If none exists, the field remainsnull.
If the frontmatter explicitly defines the field, auto-detection is skipped and the provided path is validated. If there are multiple matching files (e.g., both image.png and image.jpg exist), the CLI will throw an error asking you to explicitly pick one via the frontmatter.
Validation Rules
To ensure everything runs smoothly, keep these rules in mind:
- All referenced files (
image,attachment, body images, and videos) must exist and be inside the root directory (no..or escape paths allowed). - Every local asset (image, video, zip, pdf, etc.) must be inside
./attachments/. References like./cover.pngor./media/clip.mp4in the root will fail; they must be./attachments/cover.pngor./attachments/media/clip.mp4. - The
.mdfile lives in the root of the directory, never insideattachments/. - In "single file" mode, references to local assets are not allowed (since there is no
attachments/folder). - Remote URLs must use
http(s)://. - Web links should not point directly to multimedia files.
pressUrl, if provided, must be an absolutehttp(s)://URL.- If
price> 0,currencyis mandatory. pricemust be a number โฅ 0.- If
kindisdigital,attachmentis mandatory. - Local links to other
.mdfiles are not allowed (products are independent entries and do not have children).
Complete Example
---
name: "Pro UI Kit"
slug: "pro-ui-kit"
kind: digital
category: "Design Resources"
status: published
visibility: public
price: 19.99
currency: USD
image: ./attachments/image.png
attachment: ./attachments/attachment.zip
pressUrl: "https://sentilis.me/demo/press/sentilis-v2-launch"
---
# Pro UI Kit
A comprehensive UI kit for your next big project. Includes hundreds of components, icons, and templates.
## What's Included
- 500+ UI Components.
- 200+ Custom Icons.
- Lifetime updates.
You can read the full announcement in the [launch press release](https://sentilis.me/demo/press/sentilis-v2-launch).