hexo-netlify-cms-vercel
A templete to deploy a Hexo blog with Netlify-CMS on Vercel.
✔ Totally free of charge
✔ Static web pages, no rendering time
✔ Edit online, just as simple as using a dynamic CMS, supported by Netlify-CMS
✔ No local environment required, you can edit your pages on any devices, everywhere
✔ Zero coding
✔ Preview is supported by Netlify-CMS and Netlify
✔ Vercel CDN makes your pages to load quickly from anywhere in the world, including China Mainland
✔ Easy to bind to your domain, and enable SSL encrypt, supported by Vercel
Additional improvements
- Customized 404 page
Usage
Click
Use this template
to fork this repository. It can be private.Modify
/source/admin/config.yml
. Change the value ofbackend.repo
andbackend.base_url
to yours.Go to Github Developer applications and create a new oauth app. The only important field is
Authorization callback URL
, inputhttps://<domain>/callback
, where<domain>
is domain from step 2, also note that HTTPS is required. And then generate a new client secret.Go to Vercel to import your repository and create a new project. Before clicking
Deploy
button, add the Environment VariablesOAUTH_GITHUB_CLIENT_ID
andOAUTH_GITHUB_CLIENT_SECRET
and set the values as generated in the previous step.Click
Deploy
button and waiting for the deployment finished.Maybe you need to change the Vercel provided domain in Settings > Domains.
Open
https://<domain>/admin/
and login to the Netlify-CMS back-end.Test whether Netlify-CMS is working properly.
If you need the preview feature provided by Netlify-CMS, that is, provides you a preview link on the article writing page once you click
save
button, you also need to link your blog repository to Netlify. This is similar to link to Vercel, but you do not need to add Environment Variables since you do not use Netlify-CMS on the Netlify provided domain.Congratulations! You have successfully deployed a Hexo blog with Netlify-CMS on Vercel.
Thanks
The oauth gateway for Netlify CMS is implemented by ublabs/netlify-cms-oauth.