The crap written up front

This is the blog I just set up, you can see what it looks like zander2014.github

Hi, I’m a pony farmer, and I’m sure when you open my gorgeous blog, you’re already eager to ask, “Hey, how did this happen? It’s so cool. How much did it cost? I want to do one.”

Don’t worry big brother, today since you come, elder brother also know your mind, this slowly give you way, this cool blog does not spend a penny, move a finger, you have.

About making Pages

Here it is, Github Pages, a service we use to build our own blogs, which is like a free server.

  • Benefits:

    Completely free, no maintenance, DIY theme, Https by default, can be tied to your own domain name, after a simple operation, you just write your article.

  • Limitations:

    Your repository (i.e. your website) should be no more than 1 GIGAByte, do not submit frequent updates (<=10 times/hour), and limit bandwidth to 100 gigabytes per month. In short, as a small personal blog is fully enough, if not enough, then congratulations you have a small achievement, spend some money to build their own service is also a small case.

About Jekyll

With a server, how do we write our own blog interface? If you’ve used WordPress or any other front-end framework before, you know how much trouble it is to build your own wheels by hand unless you have a framework to write in.

Down, down, down! Jekyll is such a framework, you can go to the official website (Chinese /English) to learn how to build an environment, create a website, find template resources and so on.

  • Benefits:

    Github Pages natively supports a framework that generates purely static websites that are easy to use, with fewer problems and faster resolution. In addition to the resources on Github, you can also find many open source templates on Github. Search keywords, of course! Everyone’s taste is different, so I won’t give you any examples).

  • Limitations:

    To be honest, the templates on the official website have a foreign style, so there are not many acceptable ones to choose from. Of course, we can also choose other static template frameworks, such as Hexo, Hugo, Pelican and Gridea. You can refer to official templates or search some blogs to learn how to use them. Or find some H5 templates.

On the NexT

NexT is a Jekyll template selected by my website. It had hexo version before, and then rewrote Jekyll version. I believe you have seen the style of this template by now.

Start building Blog

Log on to making

What? You don’t have an account on this big gay dating site? If you have not registered before, go to the official website to register and log in.

Related to the registration of the relevant information to fill in, as well as login after the completion of personal information, not one introduction, I believe that every day you online, have begun to build their own blog, these processes have been thoroughly familiar with the heart.

The new Repository

  1. Select New repository

    Click on the “+” sign in the upper right corner of the page and select New Repository in the popover

  2. Fill in the Repository name

    * * note: Github. IO. XXX is your user name. For example, mine is zander2014.github. One account can only create one blog repository on Github.

    Then click the Create Repository button at 2 and the repository is created.

Enter Setting to set GitHub Pages

  1. If there is no accident, the interface will automatically jump to your warehouse home page, select the Setting interface.

  2. Then scroll down to GitHub Pages and click Choose a Theme

  3. Enter the Theme interface, Select a Theme you like (in fact, there are not a few themes, I believe you will not like it, first choose a look at the past, then replace your favorite template), click Select Theme

  4. Jump to a screen, scroll down, and click Commit Changes

Look at your Blog

At this point your website is set up, just go to the address you filled in before, such as my zander2014.github

Then write your own post in your Github->Code interface

This is just an example to understand what files are on Github. Can you skip it

  1. For example, if I click Add File, I can choose to Create new file directly or upload files. If I choose to Create a new file directly, it will jump to an edit interface.

  2. Then write something and name it test.html. The file should be in markDown format. Click Commit New File on the bottom of the page

  3. At this time we are in the browser to access zander2014. Making. IO/test. The HTML

GitHub-> GitHub-> zander2014.github. IO -> zander2014.github. IO -> GitHub-> zander2014.github.

Website synchronous

Manually create and upload files, we will doubt life, and there is no way to control the version, so we need to use the version control tool to manage, in fact, use Git, students who are not familiar with Git go to the official website, or dashen website to learn.

Then there are two ways to operate:

  • Command line (you need to install the Git environment first, and then use git command in the terminal, god generally use this)
  • Client (that is, graphical interface to manage commands, small white generally use this)

Command-line mode

  1. Open Terminal and go to the directory you want to store your site in (for example, I’m in my home directory)

  2. Create a new directory to store my website repository (for example, if I create a blog) and go to the blog directory

  3. Clone my website repository to blog directory click the Code button, in the box 2, you can switch to using HTTPS or SSH mode, and then click the icon at 3 to copy the address.

    As SSH relates to create a key and add some of the key steps, we will use the HTTPS address, simple to use, git clone https://github.com/Zander2014/Zander2014.github.io.git

  4. In our cloned directory, we can create files, submit files and so on, the main use of the command is nothing more than the following:

    Git add (Add files to local repository)

    Git commit (commit to local repository)

    Git push -- git push -- git push -- git push

    Git pull (pull files from remote repository to local repository)

Client mode

Official client https://desktop.github.com/ to other client, such as [Sourcetree] (https://confluence.atlassian.com/get-started-with-sourcetree/), etc. These clients have a graphical interface, there are introductory tutorials, very simple, follow a learn to learn.Copy the code

Install the NexT

  1. Make sure you have Ruby 2.1.0 or later installed:

    $ ruby --version
    Copy the code

    If not, use Homebrew to install ruby

    If Homebrew is slow to install, it may be a resource problem. Using mirroring resources is much faster

  2. Install the Bundler:

    $ gem install bundler
    Copy the code

    If an error

    ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

    Sudo gem install bundler sudo gem install bundler

  3. Download the NexT theme:

    $ git cloneHTTP: / / https://github.com/Simpleyyt/jekyll-theme-next.git / / command can be usedcloneTo the local, or directly download the projectCopy the code

    Since we have already created our own repository, we will copy all the downloaded NexT resources into our repository directory and copy it to the same level, which will overwrite the previous _config.yml file.

    Then go to our warehouse directory

    $ cd Zander2014.github.io
    Copy the code
  4. Install dependencies:

    $ bundle install
    Copy the code
  5. Running Jekyll.

    $ bundle exec jekyll server
    Copy the code

At this point, use a browser to visit http://localhost:4000 and check that the site is running correctly.

After submitting the code to the remote GitHub repository, you can see it by typing zander2014.github

If you need to use other templates, each resource has its own way of using it. For details, refer to the tutorial of the template. The process is the same: download the resource, replace the resource, and run it

Write a Blog

Now all you need is a Markdown editor: Typora, Bear’s Paw, Evernote, Zen, Youdao Cloud Note, Ulysses.

Edit your posts on your computer, put them in the _posts folder in your repository project, and sync them to GitHub using the two methods mentioned earlier.

Note:

  • ** File format: ** year-month-date-title. Markdown

  • At the top of the article: must have the following YAML header:

    ---
    layout: post
    title: Blogging Like a Hacker
    ---
    Copy the code