This website is powered by the hugo static site generator and GitHub actions. Any edits made in the files here should appear on the marinebon.org website within a few minutes.
- create a new
.mdfile incontent/blog/cp content/blog/2017-08-seascapes.md content/blog/new-post.md
- edit file
- set header data
- add content in markdown format
- any images should be uploaded to
static/img/blog/
To send visitors from an alternate path like marinebon.org/BioSound to the real page elsewhere on the site, add the old path to the aliases field in the destination page's front matter.
Hugo builds a small redirect page at each alias that immediately forwards to the canonical URL.
Example — content/bons_thematic/biosound.md keeps /bons_thematic/biosound/ as the main URL and also answers at legacy paths:
+++
title = "BioSound"
aliases = ["/BioSound", "/biosound", "/BioSound.html"]
+++| location | description |
|---|---|
| content | .md files for blogs, project pages, etc |
| data | information for the custom widget partials (carousel, etc) |
| static | raw files to be hosted (images, pdf, etc) |
| layouts | hugo html templates |
This website uses the static-site generator hugo to translate .md (markdown) and .html templates into files for hosting as a static site.
Static-site hosting has several benefits including page fetch speed and ease of hosting.
For testing the site is hosted using the free service GitHub pages.
Deployment and rendering of the .md and .html templates is performed by a GitHub action.
This makes it possible for files to be edited directly on GitHub.com and changes will appear on the site within a few minutes.
gh-actions is set up to build & deploy the site upon commit push. A local server can be run for testing changes before pushing to GitHub:
hugo server -wPut a favicon.png in /static/img/, then run:
convert favicon.png \
-resize 48x48 \
-background transparent \
-gravity center \
-extent 48x48 \
favicon.ico
convert favicon.png -resize 32x32 favicon-32x32.png
convert favicon.png -resize 16x16 favicon-16x16.png
convert favicon.png -resize 180x180 apple-touch-icon.png
convert favicon.png -resize 32x32 -unsharp 0x1 favicon-32x32.png
convert favicon.png -resize 16x16 -unsharp 0x1 favicon-16x16.pngwalk through config steps
- The hugo theme used: devcows/hugo-universal-theme