mirror of
https://github.com/cliffe/HacktivityLabSheets.git
synced 2026-02-20 13:50:46 +00:00
- Added a new Action Items Guide to provide styling classes for highlighting important sections in lab sheets. - Introduced an INSTALL.md file detailing Jekyll installation and testing procedures. - Implemented action item and warning item styles in the main stylesheet for better visual distinction. - Updated lab content to utilize new action item classes for clarity and emphasis on critical instructions. - Enhanced JavaScript functionality to process custom highlight syntax in lab content.
2.3 KiB
2.3 KiB
Jekyll Installation and Testing Guide
Prerequisites Installation
Option 1: Using Snap (Recommended)
sudo snap install ruby --classic
Option 2: Using APT
sudo apt update
sudo apt install ruby-full build-essential
Option 3: Using rbenv (For development)
# Install rbenv
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
# Add to your shell profile (~/.bashrc or ~/.zshrc)
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
# Install Ruby
rbenv install 3.1.0
rbenv global 3.1.0
Install Bundler and Dependencies
Once Ruby is installed, run these commands in the project directory:
# Install Bundler
gem install bundler
# Install project dependencies
bundle install
Test the Site
Build the Site
bundle exec jekyll build
Serve Locally
bundle exec jekyll serve
The site will be available at http://localhost:4000
Serve with Live Reload
bundle exec jekyll serve --livereload
Troubleshooting
If you get permission errors:
# Install gems to user directory
bundle config set --local path 'vendor/bundle'
bundle install
If you get SSL errors:
# Update certificates
sudo apt-get update
sudo apt-get install ca-certificates
If Jekyll build fails:
# Clean and rebuild
bundle exec jekyll clean
bundle exec jekyll build --verbose
Expected Output
When you run bundle exec jekyll serve, you should see:
- Site building successfully
- Server starting on http://localhost:4000
- No errors in the output
Features to Test
- Main Page: Should show labs organized by category
- Dark Mode: Should be the default theme
- Theme Toggle: Should switch between dark and light modes
- Lab Pages: Should display individual lab content
- Fonts: Should use Do Hyeon for headings and Source Code Pro for code
- Responsive Design: Should work on different screen sizes
GitHub Pages Deployment
If you want to deploy to GitHub Pages:
# Switch to GitHub Pages compatible setup
./switch-to-github-pages.sh
# Build for production
bundle exec jekyll build
Then commit and push to your GitHub repository.