Jekyll is a simple, extendable, static site generator. You give it text written in your favorite markup language and it churns through layouts to create a static website. Throughout that process you can tweak how you want the site URLs to look, what data gets displayed in the layout, and more.

Any file that contains a YAML front matter block will be processed by Jekyll as a special file. The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines.

---
layout: post
title: "Jekyll"
categories: [ technology_physical_building-blocks ]
date:   2017-12-01 12:00:00 +0100
abstract: abstract
---

Layouts in this repository

There are two layouts available in this repo:

  • biz\marketing\website_layouts\default.html
  • biz\marketing\website_layouts\presentation_v1.0.1.html

The first implements from http://www.initializr.com/ the Responsive template, the latter a https://revealjs.com/ presentation.

Difference between pages and blog posts

Blogging is baked into Jekyll. You write blog posts as text files and Jekyll provides everything you need to turn it into a blog.

The _posts folder is where your blog posts live. You typically write posts in Markdown, HTML is also supported. To create a post, add a file to your _posts directory with the following format: YEAR-MONTH-DAY-title.MARKUP

In addition to any collections you create yourself, the posts collection is hard-coded into Jekyll. It exists whether you have a _posts directory or not.

This repo uses blog post for e.g. this very page, located underneath tec\phy\building-blocks_posts and includes in its categories: [ technology_physical_building-blocks ] the very string that tec\phy\building-blocks\index.md also contains. Its layout biz\marketing\website_layouts\categorylist.html then loops over the collection of posts with that category:


These categories can also be set as a default from _config.yml like this:

defaults:
  -
    scope:
      path: "app/log/building-blocks"
      type: "posts" #index.md is of type application_logical_building-blocks
    values:
      permalink: /app/log/building-blocks/:title.html
      categories: application_logical_building-blocks

Custom domains

GitHub pages allows custom domains to be pointed ia CNAME to the owner’s main repository YOUR-GITHUB-USERNAME.github.io and then a CNAME file in individual repositories determines from which repo static pages are being served. @see https://help.github.com/en/articles/using-a-custom-domain-with-github-pages

Pushing to the GitHub repo will trigger a build, and the site will be served with PRODUCTION environment setting.

Jekyll can be used to test develop locally.

In the production environment some things behave different from e.g. development: For example a domain name will be used in production only, and localhost in development.

https://jekyllrb.com/docs/configuration/environments/

JEKYLL_ENV=production jekyll server

Running Jekyll

Run with bundle exec jekyll servee.g. from a WSL Ubuntu installation.

Requirements

On Ubuntu 18.04 gem ... needed make and gcc:

ruby:
  pkg.installed

ruby-dev:
  pkg.installed

ruby-bundler:
  pkg.installed

zlib1g:
  pkg.installed

make:
  pkg.installed

build-essential:
  pkg.installed

bundler:
  gem.installed

jekyll:
  gem.installed