Files
HacktivityLabSheets/start-server-github-pages.sh
Z. Cliffe Schreuders 3a76837965 Add configuration files and enhance lab content
- Introduced a new local configuration file (_config_local.yml) for local development.
- Updated Gemfile to include 'webrick' for Ruby 3.0+ compatibility and removed specific version constraints for 'github-pages'.
- Created a new Gemfile.local for local development with updated dependencies.
- Added multiple new lab sheets covering topics such as scanning, exploitation, and vulnerability analysis, enhancing the educational content.
- Improved lab layout and content presentation, including enhanced syntax highlighting and image handling.
- Added various images to support the new lab content and improve visual learning.
2025-09-26 16:12:28 +01:00

39 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
echo "🚀 Starting Hacktivity Lab Sheets server (GitHub Pages compatible)..."
# Change to project directory
cd "$(dirname "$0")"
# Install bundler locally if not available
if ! command -v bundle &> /dev/null; then
echo "📦 Installing bundler locally..."
gem install --user-install bundler
export PATH="$HOME/.local/share/gem/ruby/3.2.0/bin:$PATH"
fi
# Install dependencies
echo "📦 Installing dependencies..."
bundle install --path vendor/bundle
# Check if installation was successful
if [ $? -ne 0 ]; then
echo "❌ Failed to install dependencies. Trying alternative approach..."
# Try using system gems with local bundler
export GEM_HOME="$HOME/.local/share/gem/ruby/3.2.0"
export GEM_PATH="$HOME/.local/share/gem/ruby/3.2.0"
export PATH="$HOME/.local/share/gem/ruby/3.2.0/bin:$PATH"
bundle install --path vendor/bundle
fi
echo "🌐 Starting Jekyll server..."
echo "📱 Site will be available at: http://localhost:4000"
echo "🌐 Also available at: http://0.0.0.0:4000"
echo "🛑 Press Ctrl+C to stop the server"
echo ""
# Start the server with local configuration
bundle exec jekyll serve --host 0.0.0.0 --port 4000 --livereload --config _config_local.yml