How informatics-sa/website works
Project type and purpose
• This is a static website for the Saudi Informatics Team (SIT), implemented as a Jekyll-powered site with a pre-processing step.
• Its purpose is to preserve and display SIT history: olympiads, participations, members, images, and contact details in a static, easy-to-host format.
File structure
• Top level:
• build.py (Python preprocessing script)
• Gemfile / Gemfile.lock (Ruby/Jekyll dependencies)
• .github/workflows/jekyll-gh-pages.yml (CI/CD for GitHub Pages)
• lib/utils.py (supporting Python code)
• “root/”: the Jekyll source:
• _layouts/ & _includes/ (Liquid templates for pages)
• _config.yml (Jekyll config)
• data/ (JSON/YAML files—site’s public data)
• img/ & resources/ (static assets and JS)
• index.md, 404.html
• No traditional backend or database—data is flat‐file JSON fed into templates.
README for additional insights
• Build process:
1. python build.py transforms or validates data.
2. jekyll serve -s ./root generates and serves static HTML from templates + data.
• CI/CD: GitHub Actions deploys to GitHub Pages.
Main components
a. Data Layer
• JSON files under root/data/ (olympiads.json, people.json, etc.)
b. Preprocessing
• build.py & lib/utils.py (Python) read/transform data, write back to root/data/ or to other source files.
c. Templating Engine
• Jekyll (Ruby) and its Liquid templates in _layouts/ and _includes/.
• Uses _config.yml settings.
d. Static Asset Layer
• root/img/ and root/resources/ (CSS, JS).
e. CI/CD Pipeline
• .github/workflows/jekyll-gh-pages.yml: on push → run build.py → install Ruby gems → run jekyll build → push _site to gh-pages.
f. Hosting
• GitHub Pages serves the generated static site.
Relationships and data flows
• Developer Machine → push code → GitHub → triggers GitHub Actions.
• GitHub Actions:
1. Check out repo
2. Run python build.py (data preprocessing).
3. Run bundle install & jekyll build (template rendering + static asset bundling).
4. Deploy output (_site) to GitHub Pages.
• End-user Browser requests pages from GitHub Pages.
Architectural patterns and principles
• Static Site Generator: strict separation of data, templates, and assets.
• Pipeline Pattern: Python step → Jekyll step → deploy step.
• Convention over Configuration via Jekyll’s file-naming and folder structure.
Technologies, frameworks, and libraries
• Python 3.x (build.py)
• Ruby + Jekyll (Liquid templating)
• Bundler (manages Jekyll dependencies)
• GitHub Actions (CI/CD)
• Flat JSON data (no dynamic server or database)
Essential elements
• Clear component names (Data Store, Preprocessor, Template Engine, CI/CD, Hosting)
• Optional zoom-in for “root/” folder structure (data vs. templates vs. assets)
• the static site generation pipeline,
• separation of concerns (data vs. templates vs. build tooling),
• CI/CD deployment flow, and
• the absence of a traditional dynamic server or database.