-
Notifications
You must be signed in to change notification settings - Fork 0
Jekyll for static sites
Customers are asking to create static contents, corporate web sites, blogs and any other types of static sites. A static site is a site that does not require a server logic, usually when no user data is created,so no security logic (authorizations) and no persistence is required. Note that a static site may have a strong logic in the client side (may be a full reactJS app!).
Today most of static sites that must be edited by people not familiar with HTML/CSS will be likely using Wordpress, or Drupal. Other popular CMS (Content Management System) such as Jumla, and many others (see http://cms-software-review.toptenreviews.com/).
The drawbacks of these systems is that because they are full scale (PHP for the most) applications running on top of a database (mySQL most often) so they are slow, complex, rigid systems that requires more learning curve and hosting resources than necessary.
- Jekyll is a compiler, that translates simple text written in markdown or other simplified markup languages and will compile it to fully ready to deploy static site composed of html/css/Javascripts.
- Using a text editor, git software an author can create and update content easily.
- Jekyll compiler will process all files having a front matter, that is basically a YAML code defining metadata specific to the page, that is interpreted by the template engine (or by the Jekyll engine for predifined variables) to generate a final html.
---
layout: post
title: Blogging Like a Hacker
---
will mean that the variable 'layout' is assigned the value 'post'.
-
Jekyll template engine is Liquid templates that is like Jekyll a ruby based engine.
{{ site.time | date_to_string }}
-
Jekyll has two predefined type of pages (called collections): posts and pages, and its easy to create a new page type collections).
-
Jekyll includes is an easy alternative to custom tags since we can parametrize the include, so for example having the html5 video tag within an include, with
url
,width
andsize
as include parameters. -
Jekyll templates defines through a collection of Jekylls specific liquid tags and the standard liquid tags the way to define html templates.
-
Jekyll themes can be regular or Gem based and you can event convert them.
-
Jekyll themese defines layouts (template pages), includes, assets and stylesheets that can be used and overiden by the site using them.
-
There are many sites featuring Jekyll themes:
-
-
Jekyll can be easily extended and here are some of the great thing to do:
- Jekyll new tags can easily be created, see for example this valuable html5 video tag or this youtube one. In 50-100 lines of ruby code, it is easy to add any html control required.
- Jekylls new commands are interesting as well to create a new command that can parse the page YAML's and update a database.
- Jekylls generators can generate new contents from the parsed input, such as sitemap,redirect generators, RSS feed generator, ..
- Jekyll hooks enable fine grained customization on the compilation process.
- It has free hosting on github. See Github documentation page for details.
- It is possible to serve it simply from AWS S3 as documented here
- See the Deployment methods in Jekyll documentation for more deployement options
CloudCannon adds several important values to the basic Jekyll offering:
Make it trivial for business users to have a local directory synchronized with dropbox to update their site
Nice client side editing, see Visual Editor documentation.
It allows to have all sites served from .shefing.com, so all clients feel that they are in shefing hosting
And many other features: 404 pages, contact forms,
- AWS S3 hosting, see From Wordpress to Jekyll: My new blog setup
Knowledge is hope