Skip to content

Commit b1a4083

Browse files
committed
Migrate Jekyll setup from Docker to native Ruby
Remove Docker/Podman configuration and switch to github-pages gem for better GitHub Pages compatibility. Update serve script to run Jekyll natively instead of in containers.
1 parent 930edbe commit b1a4083

File tree

4 files changed

+39
-82
lines changed

4 files changed

+39
-82
lines changed

assets/jekyll-site/Dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

assets/jekyll-site/Gemfile

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
source "https://rubygems.org"
22

3-
# Use Jekyll directly instead of github-pages to avoid native extensions
4-
gem "jekyll", "~> 4.3"
5-
gem "minima", "~> 2.5"
6-
7-
# Essential plugins that don't require native compilation
8-
group :jekyll_plugins do
9-
gem "jekyll-feed", "~> 0.12"
10-
gem "jekyll-seo-tag", "~> 2.8"
11-
gem "jekyll-sitemap", "~> 1.4"
12-
gem "jekyll-relative-links"
13-
gem "jekyll-optional-front-matter"
14-
gem "jekyll-readme-index"
15-
gem "jekyll-titles-from-headings"
16-
end
3+
# Use github-pages gem for GitHub Pages compatibility
4+
# This includes Jekyll and all plugins with versions tested to work together
5+
gem "github-pages", "~> 232", group: :jekyll_plugins
176

187
# Windows and JRuby does not include zoneinfo files
198
platforms :mingw, :x64_mingw, :mswin, :jruby do
@@ -23,3 +12,7 @@ end
2312

2413
# Performance-booster for watching directories on Windows
2514
gem "wdm", "~> 0.1", :platforms => [:mingw, :x64_mingw, :mswin]
15+
16+
# Lock http_parser.rb gem to v0.6.x on JRuby builds since newer versions of the gem
17+
# do not have a Java counterpart.
18+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

assets/jekyll-site/docker-compose.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

assets/jekyll-site/serve.sh

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
11
#!/bin/bash
22

3-
echo "========================================="
4-
echo "Jekyll Local Development Server (Docker)"
5-
echo "=========================================="
6-
echo ""
3+
# Jekyll Local Development Server (Native Ruby)
4+
echo "========================================"
5+
echo "Jekyll Local Development Server (Native)"
6+
echo "========================================"
77

8-
# Check if podman or docker is available
9-
if command -v podman &> /dev/null; then
10-
CONTAINER_CMD="podman"
11-
COMPOSE_CMD="podman-compose"
12-
echo "✓ Using Podman"
13-
elif command -v docker &> /dev/null; then
14-
CONTAINER_CMD="docker"
15-
COMPOSE_CMD="docker compose"
16-
echo "✓ Using Docker"
17-
else
18-
echo "❌ Error: Neither Docker nor Podman found."
19-
echo "Please install Docker or Podman to run Jekyll locally."
20-
exit 1
8+
# Copy README.md from root to be served as index page
9+
echo "📄 Copying README.md from root..."
10+
cp ../README.md ./index.md
11+
12+
# Copy images directory from root assets
13+
echo "🖼️ Copying images from assets/images..."
14+
if [ -d "../images" ]; then
15+
cp -r ../images ./
2116
fi
2217

2318
echo ""
24-
echo "🚀 Starting Jekyll server..."
19+
echo "🚀 Starting Jekyll server with native Ruby..."
2520
echo ""
2621
echo "The site will be available at:"
2722
echo " 👉 http://localhost:4000"
2823
echo ""
2924
echo "Press Ctrl+C to stop the server"
3025
echo ""
3126

32-
# Run with docker-compose or podman compose
33-
if [ "$CONTAINER_CMD" = "podman" ]; then
34-
podman compose up --build
35-
else
36-
docker compose up --build
27+
# Check if Ruby and bundler are available
28+
if ! command -v ruby &> /dev/null; then
29+
echo "❌ Ruby not found. Please install Ruby:"
30+
echo " brew install ruby"
31+
exit 1
3732
fi
33+
34+
if ! command -v bundle &> /dev/null; then
35+
echo "❌ Bundler not found. Installing..."
36+
gem install bundler
37+
fi
38+
39+
# Install gems if needed
40+
if [ ! -f "Gemfile.lock" ]; then
41+
echo "📦 Installing gems..."
42+
bundle install
43+
fi
44+
45+
# Start Jekyll
46+
bundle exec jekyll serve --livereload

0 commit comments

Comments
 (0)