How to setup Jekyll – static website generator on Ubuntu

Jekyll is a static site generator. You give it text written in your favorite markup language and it uses layouts to create a static website. You can tweak how you want the site URLs to look, what data gets displayed on the site, and more.

Following steps describes how you can install and setup jekyll on Ubuntu.

Dependency

  • Ruby version 2.4.0 or above, including all development headers (ruby version can be checked by running ruby -v)
  • RubyGems (which you can check by running gem -v)
  • GCC and Make (in case your system doesn’t have them installed, which you can check by running gcc -v,g++ -v and make -v in your system’s command line interface)
$ sudo apt install ruby
$ sudo apt install ruby-dev

Install Jekyll and bundler gems.

$ sudo gem install jekyll bundler
$ mkdir server
$ cd server/
$ sudo jekyll new myblog
$ cd myblog
$ sudo bundle exec jekyll serve

Above steps needs root permission, to avoid root permission

Related :   HTML Tag formatter, CSS Minifier, CSS Formatter, JSON Validator tools

we need to change owner & group as,

$ cd ..
$ sudo chown -R myuser myblog/
$ sudo chgrp -R myuser myblog/
$ cd myblog/
$ bundle exec jekyll serve
Configuration file: /home/devlab/server/myblog/_config.yml
            Source: /home/devlab/server/myblog
       Destination: /home/devlab/server/myblog/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
                    done in 0.326 seconds.
 Auto-regeneration: enabled for '/home/devlab/server/myblog'
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
[2020-04-04 10:13:28] ERROR `/favicon.ico' not found.
      Regenerating: 1 file(s) changed at 2020-04-04 10:16:25
                    _posts/static_dtc.txt
       Jekyll Feed: Generating feed for posts
                    ...done in 0.112965662 seconds.

As we can see above the newly created blog is started at http://127.0.0.1:4000/ or http://localhost:4000/

Reference – https://jekyllrb.com/docs/


lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded