Jekyll download and installation tutorial: Build a static blog website from scratch on your local computer

This Jekyll Download the installation tutorial and teach you step by step✨You can have your own blog without spending money!

Build a static blog website from scratch, even if you are a novice you can easily do it! No need to complicateBuilding website, say goodbye to the trouble of building a website, have your own exclusive blog in minutes, and let your talents and creativity shine! 🚀🎉

What is Jekyll?

Jekyll download and installation tutorial: Build a static blog website from scratch on your local computer

Jekyll, a static website generator, is very suitable for building blog websites.

It can use text written in markup language and use layout to build static websites.

You can modify the appearance of the website, the URL, the data displayed on the page, and more...

The shortcomings of Jekyll are obvious. Because it does not use a database, it is completely unsuitable for buildingE-commercetype of website.

What are the advantages of Jekyll?

  • Jekyll is easy to use and learn.
  • Jekyll can generate fast and secure static websites.
  • Jekyll has a large number of themes and plugins available.

How to get started using Jekyll?

  1. Install Jekyll.
  2. Create a new Jekyll website.
  3. Choose a Jekyll theme.
  4. Add your content.
  5. Preview your website.
  6. Build your website.
  7. Deploy your website:Jekyll static blog is deployed to Surge.sh for free

Install Jekyll by downloading RubyInstaller

The easiest way to install Ruby and Jekyll is to use the RubyInstaller for Windows.

RubyInstaller is a Windows-based independent installer that includes the Ruby language, execution environment, important documentation, etc.

We only cover RubyInstaller-2.4 and higher here. Older versions require manual installation of Devkit.

Step 1:Download RubyInstaller

  • Download and install from RubyInstaller DownloadsRuby+Devkitversion.
  • Install using default options.

Step 2:Enter cmd

PressWIN key + R key, then enter cmd, then press Enter ▼

Step 2: Enter cmd and press the WIN key + R key, then enter cmd, and then press Enter

Step 3:Enter command input ridk installSteps in the final stages of installation.

  • This is required to install gems with native extensions.
  • Choose from optionsMSYS2 and MINGW development tool chain.
  • Run command ruby -vgem -v to check the version number to confirm whether the installation was successful.

Open the Windows Start menu and findStart Command Prompt with Ruby, to enable the Ruby command line.

Step 4:Switch gem source to Chinese source

Due to network connection and speed issues, before considering updating the gem, it is strongly recommended to switch the gem source to the Chinese source▼

gem sources --remove https://rubygems.org/
gem sources -a https://gems.ruby-china.com/

Or

gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/

Step 5:Let’s check out the current sources ▼

gem sources -l
  • Make sure there are only gems.ruby-china.com

Step 6:Update Ruby gem▼

gem update

Step 7:We install components ▼

gem install jekyll bundler

Step 8:Check whether Jekyll is fully installed▼

jekyll -v

Build a Jelly static blog website on your local computer

Step 1:Change drive letter▼
Enter directly in cmdd:

Step 2:Change current folder▼

cd d:\Jekyll\

Step 3:Create a new Jekyll website using the following command ▼

jekyll new site1

Step 4:Enter the project directory▼

cd site1

Step 5:Start Jekyll service▼

jekyll serve

transfer--livereloadoptions toserveAutomatically refresh the page every time changes are made to the source file▼

bundle exec jekyll serve --livereload
  • When you develop your website, usejekyll serveOr jekyll build
  • To force the browser to refresh on every change, usejekyll serve --livereload.
  • jekyll serveBuilt-in site version_siteNot suitable for deployment.
  • Use links and asset URLs from the created site jekyll serve will use https://localhost:4000 The value is set through the command line configuration, rather than in the site's configuration file.

Step 6:访问 http://localhost:4000 View project.

Things to note

  • If the file is placed in xxx.github . io/blog, it may cause the Github Page not to be updated.
  • The reason for this phenomenon is that GitHub will only read xxx.github . io/_includes in Jekyll and will not go deep into blog/_includes.
  • Fortunately, this problem is not a difficult problem. Just set up a Github Page on GitHub and the problem will be solved in an instant!

How to delete the Jekyll website installed on the local computer through commands?

You can use the following command to delete a locally installed Jekyll website.

Delete the generated files:

Step 1:Run the following command to clear the generated files▼

jekyll clean

Step 2:Delete all website directories

  • If you want to completely delete the entire website directory, you can manually delete the C:/Users/a/myblog folder.

Jekyll resources

Jekyll is a simple, blog-style framework for building static websites.

it uses Markdown and Liquid template language, allowing you to easily create beautiful, dynamic websites.

See the Jekyll documentation for more information.

Here are some useful resources about Jekyll. I hope these resources can help you use Jekyll to build a website!

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Jekyll Download and Installation Tutorial: Build a Static Blog Website from scratch on a local computer", which will be helpful to you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-31549.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top