{"id":10132,"date":"2021-09-20T13:58:14","date_gmt":"2021-09-20T13:58:14","guid":{"rendered":"https:\/\/linuxways.net\/?p=10132"},"modified":"2021-09-20T13:58:14","modified_gmt":"2021-09-20T13:58:14","slug":"how-to-install-jekyll-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-jekyll-on-ubuntu-20-04\/","title":{"rendered":"How to Install Jekyll on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Jekyll is a static site generator that takes simple files and folders and converts them into a static website. It is developed in the Ruby Language. Jekyll is quite simple when compared to other static site generators. In this tutorial, I will show you how to install and launch your first static website. I am using Ubuntu 20.04. All commands and instructions are Ubuntu-specific.<\/p>\n<h2>Install Jekyll<\/h2>\n<p>Follow the instructions step by step as below:<\/p>\n<h3><strong>Step 1.<\/strong> Setup Ruby development environment first.<\/h3>\n<pre>$ sudo apt install ruby-full build-essential zlib1g-dev<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"606\" height=\"17\" class=\"wp-image-10133\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-311.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-311.png 606w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-311-300x8.png 300w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/p>\n<p><strong>build-essential<\/strong>: this will install required dependency needed to execute ruby environments.<\/p>\n<p><strong>zlib1g-dev<\/strong>: this package includes development files. Mostly they are header files in C and C++ languages.<\/p>\n<h3><strong>Step 2.<\/strong> Configure Ruby gems path and install Jekyll.<\/h3>\n<p>In this step, I will set up my directory to install Ruby gems in a specific folder. I will also add environment paths and then source the <strong>~\/.bashrc<\/strong>. This is how I populated environmental variables in Debian Linux.<\/p>\n<h3><strong>Step 3.<\/strong> Install Jekyll and Bundler<\/h3>\n<p>Now I will install Jekyll and its companion gem \u201cbundler\u201d which is very helpful to keep gems updated.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"88\" class=\"wp-image-10134\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-312.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-312.png 614w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-312-300x43.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>Voila! Here we are with our all-installation process.<\/p>\n<h3><strong>Step 4.<\/strong> Now create a new folder for our static site and enter into it.<\/h3>\n<p>You will need the following commands to do so. Please refer to the given screenshot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"311\" height=\"50\" class=\"wp-image-10135\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-313.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-313.png 311w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-313-300x48.png 300w\" sizes=\"auto, (max-width: 311px) 100vw, 311px\" \/><\/p>\n<h3><strong>Step 5.<\/strong> Create a new Jekyll website in a new folder.<\/h3>\n<p>Process Jekyll command as shown below and create the site in our newly created folder. As shown below <strong>~\/myWebsite<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"15\" class=\"wp-image-10136\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-314.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-314.png 352w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-314-300x13.png 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/p>\n<h3><strong>Step 6.<\/strong> Run the build and see your website live on <a href=\"http:\/\/localhost:4000\/\">http:\/\/localhost:4000\/<\/a><\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"478\" height=\"188\" class=\"wp-image-10137\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-315.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-315.png 478w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-315-300x118.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/p>\n<p>Jekyll is now running with its full power.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"536\" class=\"wp-image-10138\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-316.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-316.png 790w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-316-300x204.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-316-768x521.png 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/p>\n<h2>Remove Jekyll<\/h2>\n<p>Why would you remove Jekyll? Maybe you don\u2019t need it. Anyway, It is simple to remove Jekyll. You would need to run the following commands to remove it.<\/p>\n<pre>$ gem remove jekyll<\/pre>\n<h2>Conclusion<\/h2>\n<p>In this tutorial, we learned how to install and publish a static website using Jekyll. I also examined how to set up the ruby environment to install gems. In the end, we learned how to remove Jekyll from our system, leaving the rest of the setup as it is. In a future post, I will discuss how you can further configure Jekyll.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction Jekyll is a static site generator that takes simple files and folders and converts them into a static website. It is developed in the Ruby Language. Jekyll&hellip;<\/p>","protected":false},"author":1,"featured_media":10313,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[547,100],"class_list":["post-10132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-jekyll","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=10132"}],"version-history":[{"count":1,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10132\/revisions"}],"predecessor-version":[{"id":10139,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10132\/revisions\/10139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/10313"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=10132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=10132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=10132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}