preface

With Docusaurus + Vercel, you can build your own blog in 5 minutes at the flick of your finger. Check out the blog I set up on the last day of 2021.

Set up some sites

Vercel, by contrast, is the most convenient and highly recommended.

  • My blog:Vuepress + GitHub Pages
  • My blog:Docusaurus + Vercel
  • Color generation algorithm:Docsify + Kubernetes

verceladvantage

  • Free domain name
  • Certificate of free
  • An automated build
  • Multiple templates are available
  • serverlessinterface

How do I choose a documentation tool

Now have too many tools, such as I listed above Docsify | Vuepress | Docusaurus is waited a moment, I feel or according to the individual needs and preferences, such as do with Docsify more suitable tool to document, do blog (including documentation) Docusaurus more appropriate, Vuepress is more suitable for those who like Vue.

Set up

Select a template

Open vercel website can be found that it provides a very rich template, including common Next. Js | Nuxt. Js | Vue, js, etc., you can choose what you want in the template, I choose here is Docusaurus 2

The login

After selecting a template, you will be prompted to log in to Vercel. You are advised to use GitHub to log in to Vercel

Create a warehouse

Once you’ve logged in, Create a custom GitHub repository name, click Create, and Vercel will help you Create the private repository and initialize the project

subdomain

Upon success, Vercel generates an accessible subdomain

Writing a blog

Go to GitHub and clone the repository, then modify it, push it to the main branch or submit pr, it will automatically trigger the build, see here for details, Vercel will provide you with a preview address

An automated build

After the pr is merged, the automatic build will be triggered. After the build is successful, the GitHub mailbox will receive a message indicating that the build is successful. It is really very convenient and saves us the operation of configuring GitHub Action. The basic principle is that Vercel has a GitHub App. When we log in to Vercel, we will authorize the App, which can be viewed at GitHub-Settings-Applications