Jekyll Construction Process

Source: Internet
Author: User
Jekyll Construction Process about Jekyll

Jekyll itself is based on Ruby, and it can actually be seen as an extension of the template engine liquid. The main extension of Jekyll to liquid is two: the built-in object for the blog site, which can be referenced in the Template: page, site, etc. to the liquid to expand, easy to build blog site

Like other template engines, markup is the key to template engine parsing, and liquid has designed the following two types of tags: {{}}: This tag represents the conversion of variables into text {%}: This tag is used to contain control flow keywords, such as: {% if%}, {% for × in xx%}

Jekyll mainly help me to build a template to quickly build a page, implemented in the above programming language. MD automatic loading on the page. Jeckyll requires a ruby environment, the installation steps are as follows: Ruby installation Rubydevkit installation RubyGems installation Jekyll installation

Note: The environment used in this article is Windows64 bit, and all of the following are performed in this environment Ruby

A Rubyinstaller installation is required in the Windows environment. This article uses the Ruby2.2.3 version. After installation in terminal input

Ruby-v

If you can see the Ruby version later, the installation is successful Rubydevkit

Installing Devkit needs to be consistent with the Ruby version, with devkit-mingw64-64-4.7.2. When the download is complete, double-click it and unzip it to open it to the path you want to put. The terminal enters the directory where the Devkit is located, and runs the following command, which is generated in this directory config.yml

DK.RB Init

The generated config.yml file is the location of the Ruby that detects the system and can be opened config.yml view

Execute the installation command in this directory:

Setup.rb

If there is no setup.rb or if the command is invalid, execute:

DK.RB Install Rubygems

Rubygems, here is the 2.5.1 version, Rubygems similar to the Apt-get on Ubuntu belongs to the Ruby-based application packaging deployment solution on Windows. After downloading the extract, go to the directory to execute:

SETUP.RB Jekyll

When the above environment is ready, execute:

Gem Install Jekyll

The Jekyll Component Input command is automatically downloaded after you encounter the Error:while executing gem ... (Gem::remotefetcher::fetcherror) Errno::econnreset:an existing connection was forcibly closed by the remote host. The problem. The reason is that gems cannot be used domestically.
Workaround: Change the source address of the gem, enter the command gem sources--add https://ruby.taobao.org/--remove https://rubygems.org and then re-download it to Jekyll test

Execute in a folder with index.html:

Jekyll Serve–safe–watch

The

Jekyll listens for network requests in 127.0.0.1:4000, which is ruby22-x64\lib\ruby\gems\2.2.0\gems\jekyll-3.0.1\lib\jekyll\ CONFIGURATION.RB is configured within the # serving field, the page will appear with a browser access http://127.0.0.1:4000/index.html. This Jekyll is configured to complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.