InnovationX Africa Summit
The website for the InnovationX Commons Africa Summit, held at the Kenyatta International Conference Centre (KICC) in Nairobi.
Live at https://rmiyoyo.github.io/Conference-Website/. There is also a video walkthrough of the first version.
How the site is built
The pages are plain HTML, CSS and a little JavaScript, served by GitHub Pages straight from main. They are generated by a small Go program so the content lives in one place:
| File |
What it holds |
event.go |
Name, dates, program, schedule, speakers and partners |
venue.go |
Where KICC is and how far it is from each county |
templates/ |
The page layout and the home and about pages |
style/style.css |
All the styling |
scripts/script.js |
The mobile menu, the countdown and the county picker |
index.html, about_page.html, 404.html, summit.ics |
The generated pages and calendar file; edit the Go and templates, not these |
The venue section uses kenya-geo. At build time it finds the ward, constituency and county that KICC sits in, and works out the straight-line distance from the middle of every county to KICC, along with each county's headquarters and whether it borders Nairobi. Nothing is fetched when someone opens the page.
The site works without JavaScript. The menu is a normal list of links, and the county distances are in a table under "Distance to KICC from every county". With JavaScript on, the menu folds behind a button on small screens and a dropdown answers for one county at a time.
Working on it
You need Go 1.24 or newer. After changing anything in event.go, venue.go or templates/, regenerate the pages:
go run .
Then open index.html in a browser. Commit the regenerated HTML with your change.
Before committing:
gofmt -l .
go vet ./...
go test ./...
go test fails if the committed pages don't match what the generator would write, and so does go run . -check, which CI runs on every pull request.
The lint workflow also runs Lighthouse, webhint, stylelint and ESLint. To run the last three locally:
npm install
npx hint .
npx stylelint "**/*.{css,scss}"
npx eslint .
Author
Raphael Miyoyo
Acknowledgements
The original design is by Cindy Shin, used under a Creative Commons licence.
License
The code is MIT licensed. The design is used under a Creative Commons licence.