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:
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.