Content Management

This page details how to manage content in the ZTO SaaS Starter Kit. The Blog and Documentation are implemented using this feature.

The content feature is implemented using the Keystatic CMS.

Keystatic Configuration

To use the Keystatic CMS, you need to set up the following environment variables in the .env file:

.env

KEYSTATIC_STORAGE_KIND=local # local/cloud/github
KEYSTATIC_PATH_PREFIX=apps/web # Path prefix for the content
NEXT_PUBLIC_KEYSTATIC_CONTENT_PATH=content # Content path: apps/web/content
KEYSTATIC_STORAGE_PROJECT= # Project id for cloud storage (Optional)
KEYSTATIC_STORAGE_REPO= # Repository name for GitHub storage (Optional)
KEYSTATIC_GITHUB_TOKEN= # GitHub token for GitHub storage (Optional)

Blog

The blog is located in the apps/web/content/posts directory. You can add new blog posts by creating a new markdown file in this directory.

demo blog

---
title: "Blog Title"
description: "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups."
categories: []
tags: []
image: "/images/posts/demo.jpg"
publishedAt: 2021-08-11
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Learn more about Keystatic docs.

Documentation

The documentation is located in the apps/web/content/documentation directory. You can add new documentation pages by creating a new markdown file in this directory.

demo documentation

---
title: "Documentation Title"
description: "Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups."
publishedAt: 2021-08-11
order: 0
parent: "setup/configuration"
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.