Pos

Jellky | Static Web Generator

Fungsi

Jellky adalah simple tetapi berkuasa static website generator. Saya sendiri menggunakan Jellky untuk melari website ini.

Environment

  • Ubuntu 22.04 LTS
  • Docker 20.10.12

Install docker

1
2
sudo apt install docker.io
sudo apt install docker-compose

Bina folder

1
2
mkdir jellky
cd jellky

Download Theme chirpy-starter

1
git clone https://github.com/cotes2020/chirpy-starter.git

Bina docker-compose.yaml file

1
touch docker-compose.yaml

Edit docker-compose.yaml file

1
nano docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
version: "3"
services:
  drafts:
    command: jekyll serve --drafts
    image: jekyll/jekyll:latest
    volumes:
      - .:/srv/jekyll
    ports:
      - 4000:4000

  site:
    command: jekyll serve
    image: jekyll/jekyll:latest
    volumes:
      - .:/srv/jekyll
    ports:
      - 4000:4000

  build:
    command: jekyll build
    environment:
      - JEKYLL_ENV=production
    image: jekyll/jekyll:latest
    volumes:
      - .:/srv/jekyll

Run docker-compose

1
sudo docker-compose up site

Layari webserver

http://localhost:4000

Generate Production File

1
sudo docker-compose up build

Production File boleh di dapati di dalam folder _site

Pos ini dilesenkan di bawah CC BY 4.0 oleh penulis.