leigh-hackspace / website-hugo

A Hugo re-implementation of the Leigh Hackspace Website
https://leighhack.org/
MIT License
1 stars 0 forks source link
hugo hugo-site

Leigh Hackspace Website - Hugo Edition

Hugo version: 0.124.1

Contributing

Looking for something to contribute to the website? Check out the "Good First Issues" tag in the Issues section for tasks that are simple, but need doing.

All changes to the website must be done on a branch and pushed through the GitHub pull requests workflow. If you have any questions about this process then contact the Tech Infrastructure people.

Build the site locally

To build the site locally you can do the following:

The site will be updated in real-time with any changes made to the site files.

Deployment

Branches are automatically deployed to https://web-test.leighhack.org with subfolders for each of the branches in the repository. Once merged into main it'll be deployed out to the live website.

Common Tasks

How do I add images to posts / What custom shortcodes are available?

We have a few shortcodes that you can use:

image

image adds a image and manages the sizing and formatting.

{{< image src="https://github.com/leigh-hackspace/website-hugo/raw/main/netatalk.png" width="400x" class="is-pulled-right" title="The Netatalk logo.">}}

gallery

gallery surrounds a group of image tags and makes a rotating gallery of the images:

{{< gallery >}}
{{< image src="https://github.com/leigh-hackspace/website-hugo/raw/main/network-browser.jpg" title="Mac OS 9.2.2 'Network Browser' showing the 'nas-afp' service available via AFP over AppleTalk.">}}
{{< image src="https://github.com/leigh-hackspace/website-hugo/raw/main/osx-finder.png" title="Mac OS X 10.4 Finder showing the 'nas-afp' service available via AFP over TCP/IP.">}}
{{< image src="https://github.com/leigh-hackspace/website-hugo/raw/main/sonoma-finder.png" title="macOS Sonoma Finder showing the 'nas-afp' service available via AFP over TCP/IP.">}}
{{< /gallery >}}

rawhtml

rawhtml can be used to inject HTML from your Markdown post into the finished page. It is really not advised to do this, the retro theme will ignore any HTML in these tags.

For example, this is used on the map page to inject the div required to render to OpenLayers map:

{{< rawhtml >}}
<div id="map" class="map"></div>
{{</ rawhtml >}}

How to create a new blog post

How to update the membership plans

The membership plan data is held in a YAML file, this is used by the Hackspace API and other tools as well.