generated from skills/github-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.39 KB
/
Makefile
File metadata and controls
51 lines (42 loc) · 1.39 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Jekyll Blog Makefile
# Containerized environment for local development
.PHONY: help install update serve build clean doctor
IMAGE_NAME = blog-jekyll
DOCKER_RUN = docker run --rm -v "$$(pwd)":/site
# Default target
help:
@echo "Jekyll Blog Development Commands:"
@echo " make install - Build the Docker image"
@echo " make serve - Run local development server"
@echo " make build - Build the site"
@echo " make clean - Clean generated files"
@echo " make doctor - Check Jekyll environment"
@echo " make update - Rebuild image without cache"
# Build Docker image
install:
@echo "Building Docker image..."
docker build -t $(IMAGE_NAME) .
@echo "✓ Image built successfully"
# Rebuild image without cache
update:
@echo "Rebuilding Docker image (no cache)..."
docker build --no-cache -t $(IMAGE_NAME) .
@echo "✓ Update complete"
# Run development server
serve:
@echo "Starting Jekyll development server..."
$(DOCKER_RUN) -p 4000:4000 -p 35729:35729 $(IMAGE_NAME)
# Build the site
build:
@echo "Building site..."
$(DOCKER_RUN) $(IMAGE_NAME) bundle exec jekyll build --future
@echo "✓ Build complete"
# Clean generated files
clean:
@echo "Cleaning generated files..."
rm -rf _site .jekyll-cache .jekyll-metadata
@echo "✓ Clean complete"
# Check Jekyll environment
doctor:
@echo "Checking Jekyll environment..."
$(DOCKER_RUN) $(IMAGE_NAME) bundle exec jekyll doctor