Contributor Guide

Welcome to the Carlisle Scouts website team! This guide walks you through setting up your computer and making updates to our site.

What You Need

  • A GitHub account — sign up free at github.com
  • Git for Windows — download from git-scm.com (use default install options)
  • VS Code — download from code.visualstudio.com
  • That’s it — Hugo (the tool that builds the site) is already included in the repo

One-Time Setup

1. Get Added to the Repository

Ask the scoutmaster or current site admin to add your GitHub username as a collaborator on the repo. You’ll get an email invite — accept it.

2. Configure Git

Open a terminal (PowerShell or VS Code terminal) and set your name and email:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

3. Clone the Repository

cd ~\source\repos   # or wherever you keep projects
git clone https://github.com/CarlisleScouts/carlislescouts-org.git
cd carlislescouts-org

Git will ask you to sign in to GitHub the first time.

4. Open the Project in VS Code

code .

Or: open VS Code → FileOpen Folder → select the carlislescouts-org folder.

Making Changes

Every change follows the same pattern: branch → edit → preview → commit → push → pull request.

Step 1: Start Fresh

Make sure you’re on main and have the latest code:

git checkout main
git pull

Step 2: Create a Branch

Name it after what you’re working on:

git checkout -b add-summer-camp-post

Some good naming examples:

  • update-calendar-page
  • add-hiking-trip-photos
  • fix-typo-contact-page

Step 3: Make Your Edits

Content files live in the content/ folder. Most updates will be:

  • New posts — create a file in content/posts/ (copy an existing post as a template)
  • Page updates — edit the existing .md file
  • Images — add to static/img/your-post-name/ and reference as /img/your-post-name/filename.jpg

Post Frontmatter Template

Every post starts with frontmatter between --- markers:

---
title: My New Post Title
date: 2026-04-15
draft: false
tags: ["camping", "hiking"]
author: Your Name
---

Your content goes here...

After your opening paragraph(s), place the summary marker on its own line: <!--more-->

Everything above the marker appears as the summary on the home page. Everything below it is only visible when you click through to the full post.

Rest of the post that only shows on the full page...

Set draft: true while you’re still working on it. Change to false when it’s ready.

Step 4: Preview Locally

In VS Code, open the terminal and run:

.\scripts\Start-HugoServe.ps1

Then open http://localhost:1313 in your browser. The page auto-refreshes as you save changes. Press Ctrl+C in the terminal to stop the server.

To include draft posts in the preview:

.\scripts\Start-HugoServe.ps1 -Drafts

Step 5: Commit Your Changes

git add .
git commit -m "Add summer camp post with photos"

Write a short message describing what you changed.

Step 6: Push Your Branch

git push -u origin add-summer-camp-post

(Use whatever you named your branch in Step 2.)

Step 7: Open a Pull Request

Still untested…

  1. Go to github.com/CarlisleScouts/carlislescouts-org
  2. You’ll see a yellow banner: “add-summer-camp-post had recent pushes — Compare & pull request” — click it
  3. Add a title and short description of your changes
  4. Click Create pull request

An admin will review your changes, might leave comments, and will merge it when everything looks good. Once merged, the site updates automatically.

Quick Reference

TaskCommand
Get latest codegit checkout main then git pull
Create a branchgit checkout -b branch-name
See what changedgit status
Stage all changesgit add .
Commitgit commit -m "description"
Pushgit push -u origin branch-name
Preview site.\scripts\Start-HugoServe.ps1
Preview with drafts.\scripts\Start-HugoServe.ps1 -Drafts

Where Things Live

WhatWhere
Blog postscontent/posts/
Parent info pagescontent/ForParents/
Scout info pagescontent/ForScouts/
Eagle Scout pagescontent/TrailToEagle/
Imagesstatic/img/
Downloadable filesstatic/files/

Tips

  • Copy an existing post when creating a new one — it’s the easiest way to get the format right
  • Keep image file sizes reasonable — resize large photos before adding them (under 500 KB is ideal)
  • One topic per branch — don’t mix unrelated changes in the same pull request
  • Ask questions — it’s totally fine to ask for help in your pull request comments
0%