Create a blog via Jekyll and post to Github

Table of Contents
Install Jekyll
Jekyll is a static website generation framework written in Ruby language. The following is the official website introduction.
Jekyll is a static site generator. You give it text written in your favorite markup language and it uses layouts to create a static website. You can tweak how you want the site URLs to look, what data gets displayed on the site, and more. –Jekyll1
When installing Jekyll, you first need a Ruby package management
environment. The commonly used package manager of the Ruby programming
environment is gem
. For example, executing the following statement in
Ubuntu will also install gem
.
apt install ruby-dev
After installing gem
, make sure its execution path is in our PATH
environment variable. If you do not use the above method, but use
virtual environment management tools such as rbenv
, just call the
gem
configured in the virtual environment. Then you can install Jekyll
by executing the following statement.
gem install jekyll
Publish blog to Github
After installing Jekyll, you must hope to post something to Github first to see the effect. Especially understand this mood.
Then next, before blogging, let's firstly use Jekyll installed to generate a default site and publish it to Github. Execute the following command in the current path where you want to manage the blog locally.
jekyll new folder-name-for-your-blog
Then a folder called folder-name-for-your-blog
will be generated under
the current path, which is the new blog source code created by Jekyll.
Then create a repository called your-user-name-of-github.github.io
on
Github. After creating the repository, Github will prompt how to use
git
to push
local content to the repository. Follow the wizard to
push
the contents of the folder-name-for-your-blog
folder you just
created to this repository.
Then wait a few minutes to open your-user-name-of-github.github.io
through your browser, and you can see Jekyll's welcome page if nothing
unexpected happens.
This site is also created by the above method.
(Postscript on June 14, 2020)
This site has now been created using the
hugo
static website generation framework, To refer to the original
site, please click here to visit.
Welcome to contact and leave a message.