Table of Contents






OVERVIEW




Jekyll Documentation

I'm going to go through the Jekyll documentation to familiarise myself with how it works. This will include everything from the installation to blogging etc



Compiling the site

Setup

To build the site

jekyll build

To compile the code then host this on localhost:4000

jekyll serve

The livereload flag can be used to ensure that changes are update to the localhost view when saving the document

jekyll serve --livereload

These two flags can be used to manually set the address / port if there are conflicts locally

--host or --port




LIQUID




What is Liquid

Liquid is the thing which drives the templating system used by Jekyll. It does this using three main components


Components:

  • Objects
  • Tags
  • Filters

Objects

Example:

{{ page.title }}

The above is a variable, if printed it would display the title defined in the pages header which is written inbetween the liquid tags


Tags

Control flow

Example:

{% if customer.name == "kevin" %}
   Hey Kevin!
{% elsif customer.name == "anonymous" %}
   Hey Anonymous!
{% else %}
   Hi Stranger!
{% endif %}

The above is an if statement with else if statements. When it runs it will first check if the pages title contained within the liquid tags is "awesome shoes". If it is then it would output these shoes are awesome to









FRONT MATTER




Front matter defaults

Defaults article

You can setup front matter defaults within the _config.yml file. To do this you would first define a scope e.g. any file in the _projects folder then you would set certain default variables

You would set a default such as the post "type"


Things to note:

  • Globbing causes perfomance issues
  • Presedence when defining from config is top to bottom, when defining from the post itself any liquid will overwrite the defaults which are showing on config



LAYOUTS







INCLUDES







DATA FILES







ASSETS







BLOGGING







COLLECTIONS







DEPLOYMENT




Time Tracking

Research 2

14/02/24 | start 22:44 | end 00:10 | 1 hour 26 minutes

  • Formatted headings for each section within the Jekll docs
  • Created TOC and linked to said headings
  • Complete initial research around Liquid and front matter
  • Touched on front matter defaults which can be added to the config.yml file