Get up and running with Gridea and make your little blogging dream come true!

If you’ve used Github before to build your own website or blog, you can easily get started with Gridea.

If you’ve ever used static site generation tools like Hugo, Hexo, Jekyll, etc., you’ll see how human Gridea can be

If you are not a developer or a little white, you can still easily build your website or blog by following these steps!

First, preparatory work

Github is used as an example in this paper, and the configuration of Coding is similar with minor differences.

⚠️⚠️ Note: To install Gridea and Git on your machine, check out Git installation tutorials here

2. Create a Github account and create a repository

If the warehouse has been registered and successfully created, skip this step

If you haven’t used Github before, the default login page is github.com.

Create a Github account, and then create a repository to store the site’s code. Click the New button in the image

Then jump to the new warehouse details page and fill in the basic information of the warehouse.

Note: Xiao Bai had better follow the instructions in the picture to avoid unnecessary problems

My github repository is named Suremotoo, so my repository name will be suremotoo.github

3. Apply for Personal Access token (⚠️⚠️ token value must be saved)

Next we need to apply for a Personal Access token so that Gridea can push the website files to your warehouse. I will not directly give the link to apply for the token, so that everyone can forget to find this function later. Click “The small arrow on the right of my profile picture in the upper right corner” → “Settings” → “Developer Settings” in the order of the ICONS below.

Then select “Developer Settings” → “Personal Access Tokens” → “Generate New Tokens”

Let’s give a name (or note) to what the token is used for. We select only Repo.

Successful application will give you a string of numbers + letters of information, this is the Token, we must keep! This will be used later in the configuration.

Configure Gridea and Github

Take me as an example. My Github user name is Suremotoo

Configure Gridea to connect to Github. You can refer to the following method to configure:

  • Github Pages domain name (for example:Suremotoo.github.io 或 suremotoo.site)
  • Repository: the repository where your static files are stored (e.g.Suremotoo.github.io
  • Branch: the branch to which your Github Pages correspond (e.g.The master or gh – pages)
  • Username: The username of the repository user (usually the nickname of your Github account, for example:Suremotoo)
  • Email: the email you use to push Git (usually your Github account, for example:[email protected])
  • Token: Git push Token used to submit built files to GithubSo the token here isThe third stepGithub Personal Access Tokens
  • CNAME: This is optional for configuring your own domain name (e.g.suremotoo.site)

After filling in the above information, click “Test remote connection” button, if the prompt “remote connection succeeded” that is OK ~

5. Use Gitalk to add comments to your website

the third step

Enter the personal “Settings” and then select “Developer Settings” → “OAuth Apps” → “New OAuth App” to create an application.

Then fill in the registration application information as shown in the following figure

After filling in, there will be ClientID and ClientSecret, we save these two information to configure Gridea

Open Gridea, enter “Configuration” → “Comment Configuration” and fill in the following information:

The comment plugin is now set up to display the comment module on the article page during the preview, but not the specific comment information, because this is a local preview and Github OAuth set the domain name to the online domain. When the blog is synchronized to the online can be displayed!

Here I also recorded a small video and put it in station B:

Gridea Quick Start – 3-Gridea with Github configuration _bilibili _bilibiliwww.bilibili.com

Note:

1. After blog synchronization, you need to manually activate the comments on each post, that is, you need to log in to Github first, so that the initialization is complete, others can comment on it

2. The resulting blog is a static web page

This article has been compiled by @suremotoo.

Because the community can not manage the file, you can also follow my public account: berry mousseweed, the article will be updated synchronously, of course, the public account will also store some file resources to share with you ~

  • Material links:

  • Gridea makes Github easier to manage