Using Craft.do as a blog - Next-Craft
date
Apr 25, 2022
slug
next_craft_en
status
Published
tags
Website
Craft.do
Next.js
summary
Using Craft.do API and Next.js to generate a static site, and manage all content in Craft.do.
type
Post
Chinese Version: 用 Craft.do 生成一个博客 — Next-Craft
Last year, I had released a script based on Cloudflare Worker to custom Craft.do share page domain. Recently I tried to improve that script and ported it to Next.js.
Source Code
Demo
Quick Start
Create a config page
Create a new page in Craft.do, with a title of your choice (e.g. "Site Configuration"), and make it public, the content of the page should follow this format:
- Post Title 1
- post-path-1
- the craft.do page share link (e.g. "https://www.craft.do/s/xxxxxxxxx")
- Post Title 2
- post-path-2
- the craft.do page share link (e.g. "https://www.craft.do/s/ooooooooo")
- ...
Refer to this page for the format:
You can use backlinks in the title.
Deploy
Two ways:
- Clone or fork a copy of the Next-Craft repository to your computer or Github, then deploy it.
- Click the link: Deploy to Vercel.
Anyway, please don't forget modify the contents of
blog.config.js
, copy the new config page share link above and paste it to craftConfigShareUrl
in blog.config.js
.All done.