person-pages update: use params and hugo html template #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "persons-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This introduces a different approach to generating the person pages. It depends on an update to 'qri' that allows exposing the metadata record as a python dictionary via a specified key, as well as a new
toyamlfilter, to the jinja template. This allows injecting specific/required keys into the the markdown front matter under the 'params' key, which makes these record propertiesaccessible to hugo templating under '.Params'.
This meant a change to the person jinja template: required keys go into the front matter and jinja is not used anymore for content rendering.
It also meant introducing a new hugo html template that contains all page rendering logic. This logic mimics the previous jinja logic, but also includes a snippet to render a portrait image if an image file matching 'portrait.*' is found in the page bundle, i.e. alongside the '_index.md' file. There is also a snippet from standard congo theme that is responsible for rendering taxonomy related terms.
I looked at this PR. I understand that it (still) imports an entire person record into the website repo. We talked about this in a group meeting and the general feeling was that we need a more targeted approach that only imports information that is actually intended to be public on the webpage. Otherwise, seemingly unrelated changes could easily cause information to appear in places that are not desirable.
I am closing this PR for now. Please resubmit when adjusted.
Pull request closed