https://github.com/kubosho/instant-blog-post-form
Blog post form for https://blog.kubosho.com.
https://github.com/kubosho/instant-blog-post-form
blog form lexical microcms react vite vitest zustand
Last synced: about 2 months ago
JSON representation
Blog post form for https://blog.kubosho.com.
- Host: GitHub
- URL: https://github.com/kubosho/instant-blog-post-form
- Owner: kubosho
- License: mit
- Created: 2022-07-16T13:20:48.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-19T08:21:52.000Z (over 2 years ago)
- Last Synced: 2024-05-01T21:24:10.898Z (over 1 year ago)
- Topics: blog, form, lexical, microcms, react, vite, vitest, zustand
- Language: TypeScript
- Homepage:
- Size: 1.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Instant blog post form
Blog post form for blog.kubosho.com.

## Config
Required write environment variables in `.env` file when submit articles to [microCMS](https://microcms.io/).
| 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 `` part of `.microcms.io`. |
| X_MICROCMS_API_NAME | API name of microCMS. `X_MICROCMS_API_NAME` is the `` part of `api/v1/`. |`.env` Example:
```
X_MICROCMS_API_KEY=abcdefg
X_MICROCMS_API_SUB_DOMAIN=example-sub-domain
X_MICROCMS_API_NAME=example
```## API Schema
The format of microCMS API schema for this blog:
```typescript
export type ApiSchema = {
title: string;
body: string;
slug: string;
categories?: string[];
tags?: string[];
excerpt?: string;
heroImage?: {
url: string;
width: number;
height: number;
};
};
```## Development
Launch development server:
```
npm run dev
```Execute build:
```
npm run build
```Run test runner:
```
npm test
```