Skip to content

green-coding-solutions/website

Repository files navigation

Caveats of HUGO

  • When you have an article under content that is in form of markdown page and it has a "date" value set in the future it will NOT render out. Please consider either putting the date to something that has passed or leave it out if no need.

CSS / JS Structure

  • CSS / JS files in HUGO are natively found in /static

  • In our case however we use bundling. This means most relevant files are under /assets and cannot be accessed through the URL structure directly. They are however loaded in the site-style.html and site-scripts.html. There the bundling code is visible. Add new files to the bundle there

Template

This site uses the Candy Flat Theme. (Internal: It is in the company Shared Drive.)

Multi-Language

HUGO offers two forms of multi-language support:

We decided to implement the filename extension route. Reason being that it is quicker to determine if an article has already been translated by just seeing if a same-named copy is located next to it in the filesystem tree. Also the language coding for layouts still works through filename extensions and it is more cohrent to have content AND layouts use the same mechanism.

When localizing a template in the layouts folder there are two options: