Static HTML is almost a thing of the past. Sites are now database-bound applications that dynamically respond to user queries. However, this also has its drawbacks: higher requirements for computing resources and numerous vulnerabilities in the CMS. Today we will talk about how to raise your simple blog on
Step 1. Hosting: we take the cheapest on the market
For static sites, inexpensive shared hosting is enough. In this case, the content will be generated on the side: on the local machine or directly using hosting
Today we at RUVDS are reopening
Let's get on it and deploy our Jekyll blog.
After starting the VPS, you need to go to it via SSH and configure the necessary software: web server, FTP server, mail server, etc. In this case, the user does not have to install Jekyll on his own computer or endure the restrictions of GitHub Pages hosting, although the site sources can be kept in a GitHub repository.
Step 2Install Jekyll
In short, Jekyll is a simple static site generator that was originally designed to create blogs and then host them on GitHub Pages. The idea is to separate the content and design it using
Since Jekyll is a Ruby package (gem),
gem install bundler jekyll #
Use sudo if necessary.
As you can see, everything is very simple.
Step 3. Create a blog
To create a new site in the ./mysite subdirectory, run the following command:
jekyll new mysite
Let's go to it and see the contents
cd mysite
ls -l
Jekyll has its own server, which can be started with the following command:
bundle exec jekyll serve
It listens for content changes and listens on port 4000 on localhost (
In our case, it is worth generating a site and setting up a web server to view it (or upload files to a third-party hosting):
jekyll build
The generated files are located in the _site subdirectory of the mysite directory.
We have not told about all the intricacies of Jekyll. With its syntax highlighting code layout capabilities, this content generator is most suitable for creating developer blogs, but it can be used to create a wide variety of static sites based on templates available on the web. There are plugins for Jekyll that allow you to change the HTML generation process itself. If you need version control, content files can be placed in a repository on GitHub (then you will have to install Git on the VPS).
Most importantly, the user does not need expensive tariffs for this. Everything will work even on the same 30-ruble VPS.
Source: habr.com