This guide will walk you through setting up and running the MAP Tournament Wiki locally for HELPING ME CODE (I SUCK AT IT).
Before you begin, ensure you have the following installed on your system:
- Git
- Docker Desktop
- A text editor of your choice (VS Code recommended)
-
Clone the Repository
# Both Windows and Linux/Mac git clone https://github.com/sponnify/map_tournament_wiki.git cd map_tournament_wiki
-
Create Development Configuration Create a file named
_config_dev.yml
in the root directory with the following content:baseurl: "" # Empty for local development
This file is already in
.gitignore
to prevent conflicts with GitHub Pages deployment.
-
Start Docker Desktop
- Open Docker Desktop
- Wait for Docker Engine to fully start (check the status in the taskbar)
-
Build and Start the Container
# Both Windows and Linux/Mac docker-compose up
The first time you run this, it will:
- Build the Docker image (this may take a few minutes)
- Install all necessary dependencies
- Start the development server
-
Access the Site
- Open your browser
- Navigate to http://localhost:4000
- You should see the MAP Tournament Wiki homepage
-
LiveReload The development server includes LiveReload, which means:
- Changes to files will automatically trigger a rebuild
- Your browser will automatically refresh to show changes
- No need to manually restart the server for most changes
-
Edit Files
- All content is written in Markdown
- Files are organized in the following structure:
. ├── _tournament-info/ # Main tournament information ├── _includes/ # Reusable components ├── _layouts/ # Page layouts ├── _sass/ # Stylesheets └── assets/ # Images and other static files
-
Adding New Pages
- Create a new
.md
file in the appropriate directory - Include the necessary front matter:
--- layout: page title: Your Page Title parent: Parent Page Title (if applicable) nav_order: X ---
- Create a new
-
Local Testing
- Changes will appear automatically at http://localhost:4000
- Check the Docker console output for any build errors
# If running in foreground:
# Windows: Ctrl+C, then type 'Y' when prompted
# Linux/Mac: Ctrl+C
# If running in background:
# Both Windows and Linux/Mac:
docker-compose down
If you modify Gemfile
or Dockerfile
:
# Both Windows and Linux/Mac:
docker-compose down
docker-compose build --no-cache
docker-compose up
# Windows:
docker-compose down
rmdir /s /q .jekyll-cache
docker-compose up
# Linux/Mac:
docker-compose down
rm -rf .jekyll-cache
docker-compose up
-
Port Already in Use
Error: A server is already running at port 4000
Solution:
# Both Windows and Linux/Mac: docker-compose down # If persists: # Both Windows and Linux/Mac: docker ps # Check for running containers docker kill <container-id> # Alternative for Windows (if port 4000 is still blocked): netstat -ano | findstr :4000 taskkill /PID <PID> /F
-
Permission Issues If you encounter permission errors with generated files:
# Windows (Run PowerShell as Administrator): takeown /F . /R icacls . /reset /T # Linux/Mac: sudo chown -R $USER:$USER .
-
Build Failures If the site fails to build:
- Check the Docker console output for error messages
- Verify your front matter syntax in recently changed files
- Ensure all required files are present
-
Line Ending Issues (Windows) If you encounter strange errors about line endings:
# Configure Git to handle line endings git config --global core.autocrlf true # Then re-clone the repository cd .. rm -rf map_tournament_wiki # Linux/Mac rmdir /s /q map_tournament_wiki # Windows git clone https://github.com/sponnify/map_tournament_wiki.git
If you encounter issues not covered here:
- Check the Jekyll Documentation
- Create an issue on the GitHub repository
- Contact the development team through Discord
-
Create a Branch
# Both Windows and Linux/Mac: git checkout -b feature/your-feature-name
-
Make Your Changes
- Follow the existing code style
- Update documentation as needed
- Test thoroughly locally
-
Commit Your Changes
# Both Windows and Linux/Mac: git add . git commit -m "Descriptive commit message"
-
Create a Pull Request
- Push your branch to GitHub
- Create a Pull Request with a clear description
- Wait for review and address any feedback
The site automatically deploys to GitHub Pages when changes are pushed to the main branch. The production site uses the configuration in _config.yml
with the correct baseurl for GitHub Pages hosting.
- The site uses the Just the Docs theme for documentation
- All development should follow the Jekyll best practices
- Maintain compatibility with GitHub Pages when making changes
- Test all changes locally before pushing to production
map_tournament_wiki/
├── _tournament-info/ # Tournament documentation
├── _includes/ # Reusable components
├── _layouts/ # Page layouts
├── _sass/ # Stylesheets
├── assets/ # Static files
├── .gitignore # Git ignore rules
├── _config.yml # Production configuration
├── _config_dev.yml # Development configuration
├── Gemfile # Ruby dependencies
├── docker-compose.yml # Docker configuration
└── README.md # This file