This is the repository for the Swedish Reference Genome Portal, a service facilitating access and discovery of genome data of non-model eukaryotic species studied in Sweden
This PR started as a question: would it be possible to use the Hugo archetype system to replace our scripts/template directory? A new species would be created with (a wrapper around):
hugo new species/species_name
Experiment
All the experimental changes are found in the following sections:
content/halloween/jacobus_lanternibus for an example species
archetypes/halloween for the archetype
layouts/halloween and partials/halloween for templates
I have kept the file names to ease diffing with the originals to emphasize changes. For example:
The page resources found under assets and data are now grouped in the species page bundle
See in particular how the assembly page (now a leaf bundle) can include a separate contrib.md
The taxonomy is rendered directly from ENA XML in partials/halloween/lineage.html. The idea being that a wrapper script can just curl the file. I don't know if it's good move, but it was fun to practice Hugo-fu 🥷
The assembly metadata and stats are now packed in a single assembly.yaml
I moved the labels from the configuration to the templates (see partials/halloween/assembly_stats.html for example), for better data/display separation of concerns (so that labels can be changed/reordered in a single place, for example).
The front matters uses hugo-reserved keys when possible (ex: resources or lastmod) and group the remaining ones under params for clarity
I may have forgotten some points, but halloween is almost over so I move along :)
Next steps
If you want to create your own halloween species and push it to this branch, feel free ;)
But other than that, this can stay as an experiment. If we do identifies bits and pieces to include, I will think further on how to integrate the changes.
Context
This PR started as a question: would it be possible to use the Hugo archetype system to replace our
scripts/template
directory? A new species would be created with (a wrapper around):Experiment
All the experimental changes are found in the following sections:
content/halloween/jacobus_lanternibus
for an example speciesarchetypes/halloween
for the archetypelayouts/halloween
andpartials/halloween
for templatesI have kept the file names to ease diffing with the originals to emphasize changes. For example:
Points of interest
assets
anddata
are now grouped in the species page bundleassembly
page (now a leaf bundle) can include a separatecontrib.md
partials/halloween/lineage.html
. The idea being that a wrapper script can justcurl
the file. I don't know if it's good move, but it was fun to practice Hugo-fu 🥷assembly.yaml
partials/halloween/assembly_stats.html
for example), for better data/display separation of concerns (so that labels can be changed/reordered in a single place, for example).resources
orlastmod
) and group the remaining ones underparams
for clarityI may have forgotten some points, but halloween is almost over so I move along :)
Next steps
If you want to create your own halloween species and push it to this branch, feel free ;) But other than that, this can stay as an experiment. If we do identifies bits and pieces to include, I will think further on how to integrate the changes.
Happy Halloween :)