preface

Recently, I have reconsidered things on a large scale. I feel that living in this world is always something to leave behind, if better, something to take with you.

I’ve written about hexo building sites before, but the instability of Hexo and the frequent hexo d hexo G manual commands put me off. As luck would have it, I saw a fast site-building software on Zhihu.

It is small in size and young, and the configuration is maintained by one person except for the theme, but the overall operation is very stable now. Thanks to the benefits of this software, I write this quick website building manual for newcomers, hoping to help others who have the same idea.

This is my Blog address, welcome to play: Giria’s Blog

A simple introduction

Originally called Hve Notes, Gridea was renamed Gridea to make it easier to read and remember. It works on Windows and Mac platforms, and its basic interface is very small and fresh.

With a simple configuration, you can graphically and interactively synchronize blog uploads and subject changes. These will be described in more detail later, including some pit directions.

Software installation and configuration

Git installed

This piece of needless to say, write more than I detailed big someone go, Git official website download the platform corresponding installation program. Installation has no special requirements, all the way the next step.

Google would help you if you have a problem

Gridea installation

Download the installation program of the corresponding platform from Gridea’s official website for installation.

The initial configuration

Gridea.dev /gridea-star gridea.dev/gridea-star

Github Pages repository created and opened

  1. First, you need to create a repository. The recommended repository is username. Github. According to [] official document (zhuanlan.zhihu.com/p/71681116/… GitHub will set repositories with appropriate names to GitHub Pages accessible types by default. For example, if my username is giriawsh, my repository name is giriawsh.github. IO

  2. Go to Settings in the project repository once you have successfully created it

  3. Go to the GitHub Pages Settings and click Choose a Theme to randomly select a theme. Since we will later use Gridea to set the theme, the theme is selected only to enable the GitHub Pages accessible type. (Otherwise Po will not go up)

Creating an access Token

This official document reads:

Gridea requires a token to manage GitHub Pages. Log in to GitHub and click here to create a new token.

Check the repO related permissions.

Remember to copy the Token to your local site after it is generated, as it will no longer be visible once the page is closed.

Gridea configuration

Enter Gridea for remote Settings. Follow the example below and click Detect Remote links to check the configuration.

  • Domain name: Domain name of Github Pages
  • Repository: The repository where your static files are stored
  • Branch: the branch to which your Github Pages correspond (for example, Master)
  • Username: The username of the user that the repository belongs to (usually the nickname of your Github account)
  • Email: The email you use to push Git (usually your Github account)
  • Github Personal Access Tokens Github Personal Access Tokens Github Personal Access Tokens
  • CNAME: Use this option to configure your own domain name

Possible causes of the error:

  1. The domain name is not filled in correctly. If the HTTPS domain name is not available, use HTTP
  2. Warehouse name error
  3. Token adds an extra space at the beginning (copied pot)

Synchronization. Click the Sync button in Gridea. Wait a few minutes for the initial deployment and then go to the browser (maybe half an hour). The default address is the domain name you entered in step 3.

Godaddy domain name configuration

To get your own unique and memorable domain name, go to GoDaddy and buy it. If you buy in China, you need to register.

Choose what you like (pay attention to the annual renewal fee) and buy it with Alipay

Then find the domain name you purchased in “My Products” :

Click DNS to enter the configuration page

Add two records to the record:

(Note that you replace giriawsh with your own user name)

Values of type A can pass

ping <your username>.github.io
Copy the code

To obtain.

Next, open Gridea and set CNAME to your domain name.

After the synchronization, the github repository shows that the CNAME has been synchronized and the site has been synchronized to the new domain name. Just wait for the global server to buffer for a while and your domain name will be accessible. After a period of time, you can enable the Enforce HTTPS option.

Gitalk comment configuration

Gridea supports both Gitalk and Disqus commenting systems, and I’m using Gitalk commenting systems here.

First you need to have a GitHub OAuth Applicatio, click here to create it. Here I use another blogger’s image:

After the Client ID and Client Secret are created, copy them to a local PC.

Open Gridea- Remote – Comment configuration and paste

After setting, saving, and synchronizing, the comment module is available.

Hit the pit

After the initial configuration was completed, although the comment interface was displayed at the end of the article, as long as I clicked the login comment, it would jump to the home page. This often happens to bloggers with their own domain names. I remove the WWW from the Authorization callback URL to log in normally, as shown in the picture below:

The effect is as follows:

The topic configuration

This site uses the Pro version modified by SERENCE.

Some personal modifications were made on this basis. Thank you again for your outstanding contribution to star.

After downloading the zip package from the website, place the bitcron-Pro folder in ~/Gridea/ Themes [default folder] or manually modified website source folder, unzip it and restart Gridea.

More themes can be found in the official theme supermarket: gridea.dev/themes/

Hit the pit

  • If you create a new tag, be sure to refer to it in time, otherwise you won’t be able to post it
  • There is no category concept in Gridea, and you can link to a page or TAB in the menu bar if you want
  • Too many posts at once can lead to some strange bugs
  • Do not use special characters such as ~ in titles

Reference thanks

Gridea Tutorial – GitHub Pages build tools for Gridea

Gridea makes it easier to manage Github Pages

Configure Gitalk comment system in Gridea -> This blogger’s theme is very nice, I don’t know from what modification?

Gridea official documentation