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
ghis defined, the image is pulled from GitHub. Otherwise, add a custom image tostatic/img/instructors/.
To remove someone from the team, delete their entry. To reorder, use weight or simply rearrange the list.
Editing the Homepage Carouselο
The top homepage carousel is one of the signature visual features of the site. Each slide is defined in a separate YAML file under:
data/en/carousel/
Examples include:
βββ code.yaml
βββ brainhack_school.yaml
βββ hpc.yaml
βββ ml.yaml
βββ neuroimaging.yaml
βββ open_data.yaml
βββ visu.yaml
The file brainhack_school.yaml is typically used for the first (main) slide and must be updated each year.
Sample structure:
weight: 0
title: "Brainhack School"
description: >
<ul class="list-style-none">
<li>Worldwide</li>
<li>2025</li>
</ul>
image: "img/carousel/fig_data_science.png"
You can control the order of the slides with the weight field. Lower values appear first.
Images must be stored in static/img/carousel/.
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.mdfile with the siteβs description and metadataa site logo/image referenced from the markdown (can be
.jpg,.png, or.jpeg)
To add a new site:
Create a new subfolder under
content/en/sites/Add
index.mdwith front matterAdd a representative image
π‘ The
_index.mdfile 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:
Fork the current repository into a dedicated organization (e.g.
2025-school-brainhack)Set GitHub Pages to publish from
mainordocs/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-embeddedfor 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
maintrigger 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 -Dfor local development with draftsUse
tree -L 2liberally to stay sane and map your environment