Copyright (c) 2022 Cybersecurity UW @ University of Wisconsin-Madison.
Currently deployed on Github Pages with the domain: https://cybersecurityuw.com.
Content is copied from the previous iteration of the site. Site is forked from the Doks theme example.
This project is built on:
- Hugo (https://gohugo.io), a static site generator written in Go. It takes markdown articles and json-like configuration files as input, and outputs static html. The main advantage of Hugo is its speed.
- Doks, a theme for Hugo (https://getdoks.org). This is (currently the only) theme implementation of Netlify's reccomended site setup.
- Bootstrap for the frontend, via Doks.
- Node, as a dependency for Doks. The build pipeline and package management are used directly when working on the site, and the output indirectly uses Node for progressive rendering. See the Doks readme for more details.
- Free static hosting via Github Pages.
- Install Node. I find nvm helpful but have only used it for a week. Here are the DigitalOcean instructions if you find them helpful.
- Clone this repo. (specifically this branch for now, later maybe not)
$ git clone -b csec_website https://github.com/Cybersecurity-UW/cybersecurity-uw.github.io
- Following installation, run
npm install
to download needed modules. This should also install Hugo, if it does not you can follow these directions.
🎉 You're done! hugo serve
will start the local development environment, usually at http://localhost:1313.
All blog posts are located in /contents/blog/
.
A sub-folder in that directory contains a single post.
- Create a new post by running the following command at the root of the repo:
- (Replace NAME_OF_POST with the name of the new post without any spaces.)
$ hugo new -k blog blog/NAME_OF_POST/index.md
- Add the desired title, description, and the author name to
index.md
, and compose the post using markdown.
- If you wish to add an image, you may do so by putting an image file in the same directory.
- Finally, after you have finished composing the post, change the draft status from true to false.
Before you push commits, please do the following:
- Check that the site looks as you want it to in your browser.
$ hugo serve # local development server, see output
- To keep styling consistent, verify that your edits match the style guide inherited from the theme project.
$ npm test # check for style issues, please fix and re-check until none are identified
- Double-check that the site builds without error. The generated static website contents will be stored in the
/docs
folder.
$ npm run clean # delete reminants of previous build
$ hugo # build the site from the current code