Hugo-based website for the eMoflon project.
Find a file
2024-10-11 11:56:02 +02:00
.github/workflows Adapts CI hugo file name to newer releases of hugo 2024-09-18 13:39:20 +02:00
archetypes Adds theme example site 2022-07-18 10:21:29 +02:00
assets/img Renames all served files to lower case only 2022-09-01 10:46:41 +02:00
content Adds GCM 23 GIPS publication (to appear) 2024-10-10 08:56:23 +02:00
layouts Fixes another deprecated config name used in our theme 2024-09-18 13:41:35 +02:00
resources/_gen Adds theme example site 2022-07-18 10:21:29 +02:00
static Merge branch 'main' into feature/serve-all-resources 2022-09-02 10:57:43 +02:00
themes Adds IBeX TGG discontinuation warning 2024-10-08 11:13:54 +02:00
.gitignore Adds hugo build lock file to gitignore 2022-07-18 12:24:30 +02:00
.gitmodules Adds IBeX TGG discontinuation warning 2024-10-08 11:13:54 +02:00
.htmltest.yml Fix URL checks of GitHub URLs by setting HTTP headers 2022-11-07 09:13:40 +01:00
config.yaml Adds IBeX TGG discontinuation warning 2024-10-08 11:13:54 +02:00
LICENSE Adds license 2022-07-18 12:23:57 +02:00
README.md README.md: fixes newer hugo download links 2024-09-18 14:00:08 +02:00

eMoflon hugo website

This repository holds all content and build-related files for the eMoflon website: https://emoflon.org

Responsible for deployment and maintainment: Max Kratz <maximilian.kratz@es.tu-darmstadt.de>

Development environment

This web page is built using a static site generator Hugo. You may look into its documentation here.

Requirements

For contributing, you need the following things:

  • Hugo for building the page.
  • A git client like Gitkraken for versioning and contributing.
  • At least some write access in this repository.

Installation of Hugo

Please follow this (official) installation guide of Hugo.

This project uses Hugo version 0.134.2 extended or newer. Please notice that some standard packet sources like Debian/Ubuntu do not provide the minimum required version.

The easiest way to get the required version up and running is to download it from Github and install it by hand. Detailed steps for an installation from Github are described on this page.

It is important that you can start Hugo from your terminal and that it states the correct version number. You may check it using this command:

$ hugo version
hugo v0.134.2+extended darwin/arm64 BuildDate=2024-09-10T10:46:33Z VendorInfo=brew

Tip: Use the exact version stated above to prevent version incompatibilities. This version is also used by our CI-Pipeline.

Required downloads may be found here:

Usage of Hugo

In addition to the official Hugo documentation, you may find a collection of some useful commands here:

  • Build the page with Hugo: $ hugo
  • Build the page with Hugo including all drafts: $ hugo -D
  • Start a local webserver: $ hugo server --disableFastRender
    • --disableFastRender is optional.
    • Hugo serves the page at http://localhost:1313/.
    • Hint: Stop the service with CTRL+C.
  • Start a local webserver including all drafts: $ hugo server -D --disableFastRender
    • (Additional information as above.)

If you changed basic configuration parameters of the page, it may be neccessary to restart Hugos webserver completely to reload the configuration file(s).

Initialization of the project

  • Add your SSH key to Github.
  • Clone this git repository to your local workstation and enter the folder.
  • Initialize all submodules, as described here.
  • As a test, you may start a local webserver with hugo using $ hugo server -D --disableFastRender as command and verify, that the page is accessible using this url: http://localhost:1313
    • Please keep in mind that -D enables rendering of drafts.

Gitflow/Workflow

The workflow is heavily based on git-flow. A great summary may be found here: https://nvie.com/posts/a-successful-git-branching-model/

This means that the following rules apply in particular:

  • Nobody pushes directly to main branch except for maintainers.
  • For integration of changes, a so-called feature-branch has to be created, which is derived from the branch main.
    • A feature branch has to have the name feature/name-of-the-feature.
  • For integration of hotfixes, a so-called hotfix-branch has to be created, which is derived from the branch main.
    • A hotfix branch has to have the name hotfix/name-of-the-hotfix.
  • Once the change (feature or hotfix) is implemented, a Pull Request is created, which integrates the Feature-Branch into the branch main.
    • For pull requests, maintainers must always confirm that the changes will be integrated. (Please check the changes and do not just agree on them).

Responsible people should be entered as responsible for all issues and pull requests.

This section does not really refer to the content of the site, but to content tips and tricks for Hugo.

In the markdown pages for Hugo, there is a meta-information section at the top (for official documentation see here.). This can look like the following, for example:

---
title: "New Webpage"
date: 2022-07-18
draft: true
---

Declarations

  • title: Specifies the title of the page.
  • date: Here you can explicitly set the "last edited on".
  • draft: If true, then this page is a draft and will not be built/published. Locally, Hugo can be instructed by the parameter D to include this page(s) anyway.

Miscellaneous

Everything that did not really fit into the other sections.

Theme

The theme is the Cayman Hugo theme. It is integrated into the project as git submodule and must be initialized after the initial cloning of the repo.

$ git submodule update --init --recursive

Folder structure

The most important folders and files are listed here:

  • assets/ files that are processed by Hugo, e.g., css.
  • content/ Content of the pages, texts, structure etc.
  • layouts/ Own changes and/or extensions, e.g., of the theme.
  • static/ Static files that should be available on the finished web page in exactly the same way, e.g., images.
  • themes/ The theme of the page.
  • sources/ Source files for future graphics.
    • You should place all files, which are necessary for the creation of the integrated media, into this folder (e.g., Photoshop documents).

The basic folder structure is described in the official Hugo documentation.

External resources

Just a collection of some links, that may be helpful: