Blog post form for blog.kubosho.com.
Required write environment variables in .env file when submit articles to microCMS.
| key | value |
|---|---|
| X_MICROCMS_API_KEY | Authentication key for microCMS API requests. |
| X_MICROCMS_API_SUB_DOMAIN | Sub domain of microCMS. X_MICROCMS_API_SUB_DOMAIN is the <service-id> part of <service-id>.microcms.io. |
| X_MICROCMS_API_NAME | API name of microCMS. X_MICROCMS_API_NAME is the <endpoint> part of api/v1/<endpoint>. |
.env Example:
X_MICROCMS_API_KEY=abcdefg
X_MICROCMS_API_SUB_DOMAIN=example-sub-domain
X_MICROCMS_API_NAME=example
The format of microCMS API schema for this blog:
export type ApiSchema = {
title: string;
body: string;
slug: string;
categories?: string[];
tags?: string[];
excerpt?: string;
heroImage?: {
url: string;
width: number;
height: number;
};
};Launch development server:
npm run dev
Execute build:
npm run build
Run test runner:
npm test
