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
Last year, I 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

  1. Duplicate this demo config page to your space, then share your config page.
  1. Star and Fork Next-Craft repository.
  1. Replace your craftConfigShareUrl in blog.config.js file.
  1. Deploy on Vercel or other Hosting Providers.

Deployment Detail

Duplicate this demo config page to your space, then share your config page.
notion image
Open Next-Craft repository, star and fork it:
notion image
In your repository, find the blog.config.js file, click the Modify button, and replace the craftConfigShareUrl item in the file with the link to the config page you shared above:
notion image
Your site is now ready for deployment. Here's how to deploy the service. First, open the Vercel, which you can login directly from GitHub.
Create a new Vercel project, select your GitHub repository and click Import button, skip creating a team (Paid Service), leave everything else as default, and click Deploy to complete the deployment.
notion image
💡
If you are having trouble deploying, please click here to get in touch with me quickly.

Set Domain

Open your Vercel project, then select Setting->Domains, add your domain name, follow the prompts and wait for the settings to take effect.
notion image
If you have any questions, please contact me.