Skip to content

Publishing Workflow ​

This page explains how to get your content changes live on the website — from making edits to seeing them deployed.

How Deployment Works ​

The Ongehoord website is hosted on Vercel. Every time changes are merged into the main branch on GitHub, Vercel automatically builds and deploys the updated website. You don't need to do anything special — just get your changes into main.

The Git Workflow ​

For simple content changes ​

If you're making a small change (fixing a typo, updating a description):

bash
# 1. Make sure you're on the latest main
git checkout main
git pull

# 2. Create a branch for your change
git checkout -b content/fix-investigation-typo

# 3. Make your edits...

# 4. Stage and commit
git add content/
git commit -m "content: fix typo in varken investigation"

# 5. Push to GitHub
git push -u origin content/fix-investigation-typo

# 6. Create a Pull Request on GitHub
# Go to https://github.com/Ongehoord/website
# Click "Compare & pull request"

For larger changes (new investigation) ​

bash
# 1. Start from latest main
git checkout main
git pull

# 2. Create a descriptive branch
git checkout -b content/add-investigation-23-new-topic

# 3. Create all your files (see Investigation guide)
# 4. Commit as you go — don't wait until everything is done

git add content/nl/onderzoek/23.new-topic/
git commit -m "content: add Dutch investigation 23 draft"

git add content/en/onderzoek/23.new-topic/
git commit -m "content: add English translation for investigation 23"

git add public/images/investigations/new-topic/
git commit -m "content: add images for investigation 23"

# 5. Push and create PR
git push -u origin content/add-investigation-23-new-topic

Commit Messages ​

This project uses semantic commit messages enforced by a linter. Your commit messages must follow this format:

type: short description

Common types for content editors ​

TypeWhen to useExample
contentAdding or editing contentcontent: add investigation 23
fixFixing a bug or errorfix: correct GPS coordinates for Aalten location
featAdding a new featurefeat: add new animal type "goat"
choreMaintenance taskschore: update translation log

Examples of good commit messages ​

bash
git commit -m "content: add investigation 23 - dierenleed bij pluimveebedrijf"
git commit -m "content: translate investigation 22 chapters to English"
git commit -m "content: update about page hero text"
git commit -m "fix: correct typo in investigation 15 description"
git commit -m "content: add 3 new locations to investigation 22"

What NOT to do ​

bash
# Too vague
git commit -m "update"
git commit -m "fix stuff"

# Wrong format (missing type prefix)
git commit -m "added new investigation"

# Type must be lowercase
git commit -m "Content: add investigation"  # Wrong — use lowercase "content:"

TIP

If your commit is rejected, read the error message. It will tell you exactly what's wrong with the format. Usually it's a missing type prefix.

Pull Requests ​

A Pull Request (PR) lets others review your changes before they go live.

Creating a PR ​

  1. Push your branch to GitHub
  2. Go to the repository on GitHub
  3. Click the green "Compare & pull request" button
  4. Write a clear title and description:
Title: content: add investigation 23 - dierenleed bij pluimveebedrijf

Description:
- Added Dutch investigation with 5 chapters
- Added 12 locations with GPS coordinates
- Added 15 annotation sources
- Added English translation
- Cover image and chapter images included
  1. Click "Create pull request"

What happens after you create a PR ​

  1. Automated checks run — linting, tests, and a preview build
  2. A preview URL is generated — you can check your changes live before merging
  3. A team member reviews — they may suggest changes
  4. Merge — once approved, click "Merge pull request"
  5. Auto-deploy — Vercel automatically deploys the updated site

Drafts and Unpublishing ​

Working on a draft ​

Set published: false in the investigation's index.md:

yaml
---
title: Nieuw Onderzoek
published: false    # Hidden from the site
---

This way you can merge your branch without the investigation being visible on the website. When ready, change to published: true in a follow-up PR.

Unpublishing content ​

To take content offline, change published: true to published: false and merge. The content files remain in Git but won't appear on the website.

WARNING

Remember to update both the Dutch and English index.md when changing the published status.

Vercel Preview Deployments ​

Every PR gets its own preview URL on Vercel. This lets you see exactly how your changes will look on the real website before merging.

  • The preview URL appears as a comment on your PR from the Vercel bot
  • Share this URL with others for review
  • The preview is automatically updated when you push new commits to the branch

Emergency: Reverting Changes ​

If something goes wrong after merging:

Revert via GitHub ​

  1. Go to the merged PR on GitHub
  2. Click "Revert" — this creates a new PR that undoes the changes
  3. Merge the revert PR

Revert via Git ​

bash
# Find the commit to revert
git log --oneline -10

# Revert a specific commit
git revert <commit-hash>

# Push the revert
git push

TIP

Don't panic. Git tracks every change, so nothing is ever truly lost. You can always revert, and Vercel will redeploy automatically.

Quick Reference ​

ActionCommand
Start dev serverpnpm dev
Create branchgit checkout -b content/description
Stage changesgit add content/
Commitgit commit -m "content: description"
Pushgit push -u origin branch-name
Switch to maingit checkout main
Get latestgit pull
See what changedgit diff
Undo unstaged changesgit checkout -- path/to/file
Undo all unstaged changesgit checkout .