This repository contains the assets required to build the PonyFest website.
In order to build the website, you will need to install the hugo framework.
hugo -D
hugo server -D
The website utilizes GitHub pages (static website). The repo is configured with an action script to automatically build and deploy the website to the gh-pages (GitHub Pages) branch.
Here's the process of creating a new version. Script TBD. In the meantime follow in a linux shell. Example uses bash syntax.
- Pick the version name ($version)
version=6.25
- Create the versioned folder
mkdir static/${version}
- Open the site and save the resulting json for schedule/guest/vendors/panels/etc. See examples below:
- Schedule:
- Go the developer tools (F12) -> network
- Open up the site and go to "http://ponyfest.horse/schedule/"
- Find the Name "schedule" and open up the Response
- Prettify the results with the "{}" on the bottom (Under Chrome)
- Save results to static (static/$version/schedule.json)
- Schedule:
- Edit the config.toml, update the paths to /$version
sed -i "s/baseURL = \"https:\/\/ponyfest.horse\/\"/baseURL = \"https:\/\/ponyfest.horse\/${version}\/\"/g" config.toml
sed -i "s/https:\/\/schedule-api.ponyfest.horse\/schedule/\/${version}\/schedule.json/g" config.toml
- Update the java scripts to point to the correct details
sed -i "s/https:\/\/schedule-api.ponyfest.horse\/schedule/\/${version}\/schedule.json/g" static/scripts/menu-script.js
- Update the css static file for new version
sed -i "s/\.\.\/images\//\/${version}\/images\//g" static/css/main.css
sed -i "s/url(\/images\//url(\/${version}\/images\//g" static/css/main.css
sed -i "s/\/images\//\/${version}\/images\//g" content/_index.md
sed -i "s/\/images\//\/${version}\/images\//g" content/pages/shirt.md
- Type
hugo -D
to generate the site in "public" - Copy the generated output (Minus the versioned folders) into your /static/$version folder
- Vendor / Guest - Make sure to change the image links
sed -i "s:\"/images/guests:\"/$version/images/guests:g" static/$version/vendors/index.html
sed -i "s:\"/images/guests:\"/$version/images/guests:g" static/$version/guests/index.html
- cp public/* (minus versioned files) static/$version/.
find public -maxdepth 1 -type f -exec cp -t static/$version {} +
find public -maxdepth 1 -type d -regextype posix-basic -regex 'public\/[a-zA-Z-]*' -exec cp -r -t static/$version {} +
- Vendor / Guest - Make sure to change the image links
- Test the versioned output with
hugo server -D
- Go to the new subdirectory (Bare in mine, dns resolve may point to 404)
- Verify the versioned sites point to the correct json file
- Once everything is set, revert the following temp changes
git checkout HEAD -- config.toml
git checkout HEAD -- static/scripts/menu-script.js
git checkout HEAD -- static/css/main.css
git checkout HEAD -- content/_index.md
git checkout HEAD -- content/pages/shirt.md
- Update the footer to point to the new version (layouts/partials/footer.html)
- Inspect few files to make sure pathing is correct
- Regenerate the new base version
- hugo server -D
- Add the new static files in
git add static/$version/*
git add layouts/partials/footer.html
git commit -m "Added version $version into archive"
- Save and push to GitHub. Don't forget to test the new website once it's deployed.