Fan site for ServiceNow's G(reatest) O(f) A(ll) T(ime). Submit Pull Requests to nominate a Snow GOAT. We're also Hacktoberfest 2021 official.
We've created a script to automate the process of adding a new goat:
npm run add-goat -- --name "Your Goat's Name" --image path/to/image.jpg --description "Your goat's description here"The script will:
- Copy the image to the correct directory with a standardized filename
- Update the goats.js file with the new entry
- Format everything correctly
You can use HTML in your description by enclosing it in quotes:
npm run add-goat -- --name "Jane Doe" --image ~/Pictures/jane.jpg --description "Jane is amazing! <br><br>She also has <b>bold</b> achievements."If you prefer to add a goat manually, follow these steps:
- Add your goat's photo to the
/img/goats/directory (JPEG, PNG, or other web-friendly format) - Add your goat's information to the
/goats.jsfile - Follow the existing format:
{ name: "Your Goat's Name", image: img("your-goat-filename.jpg"), // Just the filename, the path is handled by the img() function description: html` Your goat's description here. You can use HTML tags for formatting. Keep it respectful and fun! `, },
- Submit a Pull Request with your changes
Note: The site now uses a bundled approach where all goat data is defined in a single file (js/goats-bundle.js) that combines both the data and the loading logic. This approach eliminates path resolution issues and makes the build process more reliable for both local development and Cloudflare Pages deployment.
After installation, run npm install and then run npm start which will open up a preview of the site in your default browser, watch for changes to files, and reload the browser when changes are saved.
The project uses a simple development workflow with no additional tooling required beyond npm.
npm start: starts a local development server to preview changesnpm run build: builds a standalone directory of the project intodist/(alias for cloudflare-build)npm run cloudflare-build: builds the project for Cloudflare Pages deploymentnpm run add-goat: helper script to add a new goat to the site
The site is deployed to Cloudflare Pages automatically on successful pull requests to main. The deployment uses the bundled approach to ensure all goat images and data are properly included in the build.
The build process:
- Creates a
distdirectory with all necessary files - Bundles goat data directly into JavaScript for reliable loading
- Copies all images and assets to their correct locations
You should be able to see your changes right away on https://snowgo.at. If changes aren't reflected immediately, it could be a caching issue.