This site is a Jekyll static website for UBC Open Robotics. It is hosted on GitHub Pages and built from the prod branch. Day-to-day development happens on main and feature branches.
Install the following tools before getting started:
- Ruby 3.1 or newer (the CI uses 3.1; match this to avoid surprises)
- Bundler (
gem install bundler) - Python 3.x (only needed if you want to regenerate the recruitment positions locally)
- Git
On Ubuntu/Debian:
sudo apt update
sudo apt install -y ruby-full build-essential zlib1g-dev python3 python3-pip git
gem install --user-install bundler jekyllOn macOS (with Homebrew):
brew install ruby python git
gem install bundler jekyll-
Clone the repository
git clone https://github.com/UBC-OpenRobotics/website.git cd website -
Install Ruby dependencies
bundle install
This reads the
Gemfileand installs Jekyll 4.4.1, the Minima theme, andjekyll-feed. -
(Optional) Install Python dependencies
Only needed if you plan to regenerate the
_join/position files locally:pip install pyyaml
Start the Jekyll dev server:
bundle exec jekyll serveOr use the npm script shortcut:
npm run serveThe site will be available at http://localhost:4000. Jekyll watches for file changes and rebuilds automatically, so edits to pages, layouts, or collections appear after a refresh.
To do a one-off production-style build without the live server:
bundle exec jekyll build
# or
npm run buildThe output is written to _site/.
Note: Changes to
_config.ymlare not picked up by the watcher. Restart the server after editing it.
web_opbot/
├── _config.yml # Site-wide Jekyll config
├── _data/ # Global data (navigation, info)
├── _includes/ # Reusable HTML snippets
├── _layouts/ # Page templates
├── _pages/ # Top-level pages (join, learn, projects, roster, sponsors)
├── _projects/ # Project collection (each subfolder is a project)
├── _learn/ # Learn collection
├── _join/ # Generated recruitment positions (do not hand-edit)
├── assets/ # Images, CSS, JS
├── scripts/
│ └── fetch_positions.py # Syncs positions from Google Sheets
├── index.markdown # Homepage content
└── Gemfile # Ruby dependencies
-
Create an HTML or Markdown file in
_pages/(or at the repo root for top-level pages). -
Include front matter at the top, for example:
--- layout: default title: My Page permalink: /my-page/ ---
-
Add a link to
_data/navigation.ymlif you want it in the nav bar.
-
Create a new folder under
_projects/, e.g._projects/my_project/. -
Add a Markdown file (e.g.
my_project.md) with front matter:--- layout: project-detail title: My Project status: active ---
-
Reference existing projects like
_projects/6dof_arm/for structure.
Projects are a Jekyll collection defined in _config.yml and served at /projects/:name/.
Use the wip include to flag unfinished pages:
{% include wip.html %}Edit _data/navigation.yml. The nav is rendered by _includes/navigation.html.
The _join/ folder is auto-generated from a Google Sheet by GitHub Actions. To regenerate locally for testing:
python scripts/fetch_positions.py "YOUR_GOOGLE_SHEET_URL"See recruitment-setup.md for the full sheet format and column requirements.
-
Create a feature branch off
main:git checkout main git pull git checkout -b my-feature
-
Make your changes and test locally with
bundle exec jekyll serve. -
Commit and push:
git add . git commit -m "Describe your change" git push -u origin my-feature
-
Open a pull request against
main. Once merged, the change is live in staging. -
To ship to production, see deployment.md.
bundle installfails on native extensions - ensure you have build tools (build-essentialon Linux, Xcode command-line tools on macOS).- Port 4000 already in use - run
bundle exec jekyll serve --port 4001. - Changes don't appear - you probably edited
_config.yml; restart the server. Otherwise, hard-refresh the browser. bundle exec jekyll serveis slow - add--incrementalfor faster rebuilds during development.- Ruby version mismatch - match CI's Ruby 3.1 to avoid gem compatibility issues.