A magical and interactive tutorial to teach Python programming to children through game development, culminating in a 2D RPG game.
This tutorial is designed for children around 10 years old who want to learn programming in a fun and engaging way. The lessons build upon each other, starting with basic Python concepts and gradually introducing game development topics until the student can create their own 2D RPG game.
- Step-by-step lessons with clear explanations
- Fun, interactive examples with a magical theme
- Challenges to reinforce learning
- Direct URL multilingual support with clean, SEO-friendly URLs (English and German)
- Smart language switching that preserves current page context
- Browser language detection with automatic redirection on first visit
- Child-friendly design and magical theme
_config.yml: Jekyll configuration file with site settings and multilingual configurationindex.md: Main landing page with language selectoren/: English content directoryindex.md: English homepagelessons/: English lesson files (outline.md, lesson1.md, lesson2.md, etc.)
de/: German content directoryindex.md: German homepagelessons/: German lesson files (outline.md, lesson1.md, lesson2.md, etc.)
_layouts/: HTML templates for the sitedefault.html: Main layout template with header, footer, and language selectorlesson.html: Template for lesson pages with language-aware navigation
_data/: Data files for the sitetranslations.yml: Translations for UI elements in different languages
assets/: CSS, images, and other static filescss/main.css: Main stylesheet for the site
You can set up this project locally using either Docker or by installing the dependencies directly.
- Docker
- Docker Compose (usually included with Docker Desktop)
-
Clone this repository:
git clone https://github.com/yourusername/Spellcode.git cd Spellcode -
Build and start the Docker container:
docker compose up -
Open your browser and go to
http://localhost:4000/Spellcode/
Note for Linux users: You might encounter permission issues with the mounted volumes. If this happens, you can fix it by running the Docker container with your user ID:
docker-compose up -d --user "$(id -u):$(id -g)"or by adjusting the permissions of the generated files after running the container.
-
Clone this repository:
git clone https://github.com/yourusername/Spellcode.git cd Spellcode -
Install dependencies:
bundle install -
Run the site locally:
bundle exec jekyll serve -
Open your browser and go to
http://localhost:4000/Spellcode/
This site features a direct URL multilingual system that provides clean, SEO-friendly URLs and excellent user experience.
The site uses a clean, direct URL approach:
- Main page:
/(language selector) - English content:
/en/and/en/lessons/lesson1/ - German content:
/de/and/de/lessons/lesson1/
- Direct URLs: Each language has its own URL path (
/en/or/de/) - Language switching: Dropdown preserves current page context when switching languages
- Browser detection: Automatically redirects to user's preferred language on first visit
- Local storage: Remembers user's language preference for future visits
- Bookmarkable: All URLs are directly accessible and shareable
When creating content, always use language-specific links with Jekyll's relative_url filter:
✅ Good (Language-Specific Links):
[Quest Map]({{ '/en/lessons/outline/' | relative_url }})
[Lesson 1]({{ '/en/lessons/lesson1/' | relative_url }})
For German content:
[Questkarte]({{ '/de/lessons/outline/' | relative_url }})
[Lektion 1]({{ '/de/lessons/lesson1/' | relative_url }})To add a new language (e.g., Spanish):
-
Create directory structure:
es/ ├── index.md └── lessons/ ├── outline.md └── lesson1.md -
Update
_config.yml:languages: - code: en name: English flag: 🇬🇧 default: true - code: de name: Deutsch flag: 🇩🇪 - code: es name: Español flag: 🇪🇸
-
Update
_data/translations.yml:nav: lessons: en: "Lessons" de: "Quests" es: "Lecciones"
-
Create content files with proper permalinks:
--- layout: lesson title: "Lección 1" lang: es permalink: /es/lessons/lesson1/ ---
- English:
en/index.md,en/lessons/lesson1.md - German:
de/index.md,de/lessons/lesson1.md - Spanish:
es/index.md,es/lessons/lesson1.md
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all contributors and translators
- Special thanks to the Python and Pygame communities for their excellent documentation