@wisp-cms/client
v0.0.20
Published
A JavaScript client for wisp - a delightfully simple blogging CMS.
Downloads
1,043
Readme
WISP CMS JS Client
A JavaScript client for wisp - a delightfully simple blogging CMS.
Installation
npm i @wisp-cms/client
Documentation
For more detailed information about wisp and its features:
- Visit wisp website
- Read the JavaScript SDK documentation
- If you prefer to use the API directly, check out the Content API documentation
Basic Usage
Initializing the client
First, import and initialize the wisp client:
import { buildWispClient } from "@wisp-cms/client";
export const wisp = buildWispClient({
baseUrl: process.env.NEXT_PUBLIC_SITE_URL || "https://www.wisp.blog",
blogId: process.env.NEXT_PUBLIC_BLOG_ID!,
});
Listing All Blog Posts
const blogPostResult = await wisp.getPosts({ limit: "all" });
Fetching a Single Blog Post
const post = await wisp.getPost({ slug: "your-post-slug" });
More functions
To see the full list of supported function, read the JS SDK Documentation
License
This project is licensed under the MIT License.