Website Overview

This document provides a technical overview of the Brainhack School website infrastructure. It is intended for developers and maintainers. The main website repository is hosted at: https://github.com/school-brainhack/school-brainhack.github.io and the website is live at: https://school-brainhack.github.io

Goals

The Brainhack School website serves several purposes:

  • Central hub for course materials, lectures, and projects

  • Archive of past editions

  • English-only content

  • Static and easily deployable via GitHub Pages

We use Hugo for its static site generation, GitHub Pages compatibility, and scalability, despite its… eccentricities.


Directory Layout (as of 2025)

β”œβ”€β”€ config.yaml                 # Site configuration
β”œβ”€β”€ content/                   # Markdown-based content
β”‚   └── en/                    # English pages
β”‚       └── sites/             # One folder per local site (each with image + index.md)
β”œβ”€β”€ data/                      # Structured data for modules, instructors, etc.
β”‚   └── en/
β”‚       β”œβ”€β”€ clients/           # YAML files defining sponsor entries (1.yaml, 2.yaml, ...)
β”‚       β”œβ”€β”€ instructors.yaml   # List of global team members
β”‚       └── carousel/          # Slides for homepage carousel (data_science.yaml, etc.)
β”œβ”€β”€ static/                    # Static assets (img, css, etc.)
β”‚   └── img/                   # Logos, favicons, media
β”œβ”€β”€ layouts/                   # Custom Hugo templates
β”‚   └── partials/, _default/, etc.
β”œβ”€β”€ themes/                    # Contains hugo-universal-theme
β”œβ”€β”€ public/                    # Output folder (auto-generated)
β”œβ”€β”€ .github/workflows/         # GitHub Actions workflows

Updating config.yaml

This file contains the core Hugo configuration.

Top-Level Fields

baseURL: "https://school-brainhack.github.io/"
languageCode: "en"
title: "Brainhack School"
theme: "hugo-universal-theme"
defaultContentLanguage: "en"
style: green
logo: "img/logo_brainhack_2025.png"
logo_small: "img/logo-small_2025.png"

Disabling Sponsors Section

To hide the sponsors section (labeled β€œClients” in the theme), locate the following block in config.yaml and set enable: false:

clients:
  enable: true
  title: Sponsors
  subtitle: ""

Change to:

clients:
  enable: false

This will disable the rendering of the sponsors block from the homepage.

Editing Sponsors

Sponsor entries are defined in separate YAML files located in data/en/clients/:

data/en/clients/
β”œβ”€β”€ 1.yaml
└── 2.yaml

Each file typically contains:

title: Sponsor Name
image: "img/sponsor-logo.png"
url: "https://sponsor-website.com"

To add or remove sponsors, simply create, edit, or delete these numbered .yaml files.

Editing the Global Team

The list of instructors and organizers shown as the β€œGlobal Team” is stored in a single YAML file:

data/en/instructors.yaml

Each entry includes tags like:

- name: Lune Bellec
  gh: pbellec
  email: lune.bellec@criugm.qc.ca
  website:
  affiliation: University of Montreal
  urlaff: https://umontreal.ca

Supported tags: name, gh (GitHub handle), email, website, affiliation, urlaff, twitter, week, weight, and content.

πŸ’‘ Image: if gh is defined, the image is pulled from GitHub. Otherwise, add a custom image to static/img/instructors/.

To remove someone from the team, delete their entry. To reorder, use weight or simply rearrange the list.

Managing the List of Sites

Each participating site has its own folder and landing page under:

content/en/sites/

Example structure:

β”œβ”€β”€ criugm/
β”‚   β”œβ”€β”€ criugm.png
β”‚   └── index.md
β”œβ”€β”€ polytechnique/
β”‚   β”œβ”€β”€ polytechnique.jpeg
β”‚   └── index.md
β”œβ”€β”€ toronto/
β”‚   β”œβ”€β”€ toronto.png
β”‚   └── index.md
└── _index.md              # Overview index for all sites

Each site folder must include:

  • an index.md file with the site’s description and metadata

  • a site logo/image referenced from the markdown (can be .jpg, .png, or .jpeg)

To add a new site:

  1. Create a new subfolder under content/en/sites/

  2. Add index.md with front matter

  3. Add a representative image

πŸ’‘ The _index.md file provides the parent page that lists all sites.


πŸ”— Registration Page (Hugo site)

To edit the registration page on the main website, update the Markdown file:

content/en/register.md

Embed the Google Form using standard HTML inside the markdown file, for example:

<iframe src="https://docs.google.com/forms/d/e/EXAMPLE_FORM_ID/viewform?embedded=true" width="100%" height="1200" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>

Replace the EXAMPLE_FORM_ID with the actual form ID provided by Google.

🌐 Managing Past Editions

To ensure proper navigation between yearly editions of the website, it’s recommended to fork each year’s site into its own GitHub organization or repo (e.g. 2025-school-brainhack.github.io).

The past editions are referenced in the main site’s config (usually in the navigation menu) with entries like:

- parent: past
  name: 2024
  url: https://2024-school-brainhack.github.io/
- parent: past
  name: 2022
  url: https://2022-school-brainhack.github.io/
- parent: past
  name: 2021
  url: https://psy6983.brainhackmtl.org/
- parent: past
  name: 2020
  url: https://school2020.brainhackmtl.org/
- parent: past
  name: 2019
  url: https://brainhackmtl.github.io/school2019/
- parent: past
  name: 2018
  url: https://brainhackmtl.github.io/school2018/

When preparing a new edition:

  1. Fork the current repository into a dedicated organization (e.g. 2025-school-brainhack)

  2. Set GitHub Pages to publish from main or docs/

  3. Update the past editions list on the main site

πŸ—‚οΈ The i18n File as a Message Registry

The file i18n/en.yaml contains a list of string identifiers and their English translations. While originally intended for multilingual support, it is now used to centralize fixed text elements like button labels, form fields, and sidebar messages.

Example entries:

- id: home
  translation: "Home"
- id: contactTitle
  translation: "Contact"
- id: contactForm
  translation: "Contact form"
- id: contactName
  translation: "Your Name"
- id: contactSend
  translation: "Send Message"

To locate uneditable static text, search this file using grep.


Technology Stack

  • Hugo (v0.108.0, extended edition)

  • GitHub Pages for deployment

  • GitHub Actions for CI/CD

  • YAML/Markdown for content and config

  • Optional: dart-sass-embedded for themes using SASS


Deployment Process

  • A GitHub Actions workflow (.github/workflows/hugo.yml) builds the site and uploads it to GitHub Pages.

  • Only commits to main trigger production builds.

  • Artifacts are built into public/ by Hugo.


Known Pain Points

  • Hugo’s layout system is inconsistent across content types

  • Theme (hugo-universal-theme) is dated

  • Hugo GitHub Action needs regular updating


Developer Tips

  • Use hugo server -D for local development with drafts

  • Use tree -L 2 liberally to stay sane and map your environment