-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-local.sh
More file actions
executable file
·38 lines (31 loc) · 1.05 KB
/
start-local.sh
File metadata and controls
executable file
·38 lines (31 loc) · 1.05 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
#!/bin/bash
# Start Jekyll server for local development at help.codefrog.local
# Make sure to add this to /etc/hosts first:
# 127.0.0.1 help.codefrog.local
cd "$(dirname "$0")"
# Check if help.codefrog.local is in /etc/hosts
if ! grep -q "help.codefrog.local" /etc/hosts 2>/dev/null; then
echo "⚠️ WARNING: help.codefrog.local not found in /etc/hosts"
echo ""
echo "Please add this line to /etc/hosts:"
echo " 127.0.0.1 help.codefrog.local"
echo ""
echo "You can do this by running:"
echo " sudo sh -c 'echo \"127.0.0.1 help.codefrog.local\" >> /etc/hosts'"
echo ""
read -p "Press Enter to continue anyway, or Ctrl+C to exit..."
fi
# Set up environment for local gems
export GEM_HOME="$HOME/.gem"
export PATH="$GEM_HOME/bin:$PATH"
# Start Jekyll server
echo "🚀 Starting Jekyll server..."
echo "📍 Site will be available at: http://help.codefrog.local:4000/"
echo ""
echo "Press Ctrl+C to stop the server"
echo ""
bundle exec jekyll serve \
--host help.codefrog.local \
--port 4000 \
--livereload \
--watch