Skip to content

peterw18/peterw18.github.io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

567 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warwick Cyber Society Website

Hosting

Editing

To add new static assets add them to the public folder. To add new templated pages create a new template in the templates folder with the base file of:

{{define "head"}}
# This can be left empty but is needed to prevent errors
{{end}}
{{define "content"}}
# Content goes here
{{end}}

The go program follows the following logic:

  • Remove build folder if exists
  • Create new build folder
  • Copy all assets inside public to build folder
  • Load the config.yaml file
  • Run every template in the templates directory and add those to the build folder with the config context

Adding new config values

To add new values to a template you need to add the parameter to the Config stuct in config.go e.g

type Config struct {
    .... Existing data
    NewData string `yaml:"newData"`
}

and then to the config.yaml file

... Existing data
newData: new value

This can then be referenced in the templates by .NewData

Building

There is a github action set to automatically build and publish the site when pushed to the master branch

Troublshooting

variable is an unexported field

Variables in structs need to start with a capital letter to be exported

Other

Feel free to contact the creator on discord (tomsteer) or email (tom@tomsteer.me)

Or the active maintainer, on either discord (peterw18) or email (contact@peter-walker.com)

About

Website source for the Warwick Cyber Society, forked for automatic testing and deployment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CSS 55.4%
  • Go 42.7%
  • JavaScript 1.9%