gbif / hp-beaty-biodiversity-museum

This repository is for the GBIF Hosted Portal for the Beaty Biodiversity Museum
https://collections.beatymuseum.ubc.ca
Apache License 2.0
1 stars 3 forks source link

Load `treasure-#.md` pages from `_data` directory instead of having individual `.md` pages #5

Closed mpitblado closed 11 months ago

mpitblado commented 11 months ago

Problem

There are too many individual treasure-#.md files. It is not creating any problems, however as all treasures follow the same format, there is definitely a better way to go about doing things.

Description

Each treasure consists of a:

The mini cards on the base /100-treasures page already pull data from images.yml, so it is probably best to just add a description value and pull all data from images.yml. For example:

treasure_1:
  src: "/assets/images/treasure_1.jpg"
  title: Krill; Euphausiacea; San Lucas, Baja, CA; Collected by M.H.N
  description: Some description for the image
  caption: "[CC BY-NC-ND](http://creativecommons.org/licenses/by-nc-nd/4.0)"

Solution

Using the permalink functionality, all treasures can then be rendered from one template page. Link could look something like /100-treasures/{id}