-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (58 loc) · 1.82 KB
/
Makefile
File metadata and controls
68 lines (58 loc) · 1.82 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Makefile for BleachBit documentation site
.PHONY: help clean serve build install install-local update
# Default target
help:
@echo "Available targets:"
@echo " help - Show this help message"
@echo " clean - Remove generated files and dependencies"
@echo " serve - Start local development server"
@echo " build - Build the static site"
@echo " install - Install Ruby dependencies"
@echo " install-local - Install Ruby dependencies under vendor/bundle"
@echo " update - Update Ruby dependencies"
# Clean generated files and dependencies
clean:
@echo "Cleaning generated files..."
rm -rf _site/
rm -rf .jekyll-cache/
rm -rf _pages/
@echo "Cleaning Ruby dependencies..."
rm -rf .bundle/
rm -rf vendor/
rm -f Gemfile.lock
@echo "Cleaning editor temporary files..."
find . -name "*.sw?" -delete
find . -name "*~" -delete
@echo "Collecting garbage in git..."
git gc
@echo "Clean complete."
# Install Ruby dependencies
install:
@echo "Installing Ruby dependencies..."
bundle install
@echo "Dependencies installed."
# Install Ruby dependencies locally (no global gems required)
install-local:
@echo "Configuring Bundler to install into vendor/bundle..."
bundle config set --local path 'vendor/bundle'
@echo "Installing Ruby dependencies locally..."
bundle install
@echo "Dependencies installed in vendor/bundle."
# Update Ruby dependencies
update:
@echo "Updating Ruby dependencies..."
bundle update
@echo "Dependencies updated."
# Build the static site
build:
@echo "Building site..."
bundle exec jekyll build
@echo "Site built in _site/"
# Serve locally for development
serve:
@echo "Starting development server..."
bundle exec jekyll serve --watch --drafts
# Serve locally without drafts (production-like)
serve-prod:
@echo "Starting production-like server..."
bundle exec jekyll serve --watch