Home Intro to Jekyll
Post
Cancel

Intro to Jekyll

Setup

Ubuntu

  1. Install dependencies
    1
    
    apt install ruby-full build-essential zlib1g-dev
    
  2. Avoid installing gems as the root user by creating a user specific gem installation directory (assuming bash)
    1
    2
    3
    4
    
    echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
    echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
    echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
    
  3. Install jekyll and bundler
    1
    
    gem install jekyll bundler
    
  4. (Optional) Install a template plugin Jekyll-Chirpy

Writing

Markdown Syntax

Page entries should be put in the _pages/ directory. File naming convention is YYYY-MM-DD-file-name.md

  • Each note must start with Liquid frontmatter, for example:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    
    ---
    title: Intro to Jekyll
    author: knut
    date: 2023-06-20 20:09:00 +0200
    categories: [Blog]
    tags: [Administration]
    pin: true
    math: true
    mermaid: true
    ---
    
  • You can add the following to show a image preview on the home page
    1
    2
    3
    
    image:
    path: https://jekyllrb.com/img/logo-2x.png 
    alt: Transform your plain text into static websites and blogs.
    
  • To add a regular image without scaling, use
    1
    2
    
    ![Jekyll-Logo](https://jekyllrb.com/img/logo-2x.png)
    _Source: https://jekyllrb.com/img/logo-2x.png_
    

This post is licensed under CC BY 4.0 by the author.
Trending Tags
Contents
Trending Tags