www/README.md
Michał Szczepanik 1138f4d3b6 Display portrait also in absence of text content
Previously, a portrait would be shown only if the page had
content (beyond the front matter in markdown file). This became
apparent when we switched to pages generated from the Pool metadata
which only had the front matter if the Person's description was empty.

Given that this behavior goes back to ff7bd673 and 577d7810 it would
seem that it was an unintended consequence of extending the default
template, and we can safely extend it further.

In the html output, the portrait and text content share a section. It
seems that adding an "or" allows us to show the portrait regardless of
content presence while still avoiding an empty section.
2026-02-25 11:50:01 +00:00

88 lines
3.4 KiB
Markdown

# Website of TRR379
This is a [hugo](https://gohugo.io) project, meaning that the online website
is built from the content of this repository using a static website generator.
This repository is also a [DataLad](https://datalad.org) dataset, meaning
the main website itself is also integrated with the TRR379 data management,
and is version-controlled with auditable changes.
## Edit and test the website locally
In order to work on the website locally and independently clone this dataset
and run `hugo` (v0.152!) to serve a website draft on your own computer
(using [uv](https://docs.astral.sh/uv/getting-started/installation/), this hugo version can be installed via `uv tool install hugo==0.152`).
The following command achieve that.
With DataLad installed, do the following:
```sh
datalad clone ssh://git@hub.trr379.de/q04/www.trr379.de.git
# and enter the directory for any of the following commands to work
cd www.trr379.de
```
This created a clone of the dataset in the directory `www.trr379.de`.
Now obtain the website theme. It provides the website "looks" and is only
needed for actually rendering the site, but not for making edits.
The next command downloads the theme and all media files.
This requires an SSH account on the TRR379 webserver. Contact
m.hanke@fz-juelich.de to obtain one.
```
datalad get -r .
```
Now you are ready to run hugo. It will build the site and output a URL to
open in a browser to test it.
```
hugo server
```
Make any edits, test them out locally, then save and push them with
`datalad push`
## Adding media files
Media files (images, videos, etc) should not be added directly to the Git
repository to avoid bloat and the resulting technical difficulties of
maintaining the website.
Instead, media files are added to the repository's annex with DataLad or
git-annex. A `datalad save -m "<message>"` to save an update will do the right
thing automatically. If you are using Git directly, instead of using `git add
<file>` use `git annex add <file>` and afterwards commit normally.
## Image properties
Each page can have images. Images should be placed into the directory
that contains the `_index.md` file with the content of that page.
Images should be scaled to a meaningful size to avoid bloat.
- Contributor portraits should be no wider than 400 pixels.
- Page thumbnails should be a minimum of 320x240 pixels. Importantly, they should have an aspect ratio of 4:3.
Contributor pages can declare a particular image to be used as a portrait with the `portrait` page parameter in the front matter.
It is also possible to use one and the same image as portrait and thumbnail (see page of Michael Hanke). For that to work, the face needs to be centered in the thumbnail image.
## Function as a taxonomy for TRR379
This website is not just a public-facing view on the consortium. It also
serves as a collection of canonical definitions of entities essential
for the function of TRR379. Such entities include
- projects of the TRR
- contributors to the TRR
- publication from the TRR membership
- site of the consortium
- ...
Any such entity has a dedicated page on the website, with a stable URL that
serve as a [IRI](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)
for that entity. As such, these URLs can be used in any TRR379-related metadata
to declare relationships to TRR379 entities, for example, the authorship of
a publication, the origin project of a data release, etc.