person-pages update: use params and hugo html template #8

Closed
jsheunis wants to merge 4 commits from persons-v2 into main
Member

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 toyaml filter, to the jinja template. This allows injecting specific/required keys into the the markdown front matter under the 'params' key, which makes these record properties
accessible 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.

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 `toyaml` filter, to the jinja template. This allows injecting specific/required keys into the the markdown front matter under the 'params' key, which makes these record properties accessible 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.
This introduces a different approach to generating the person pages. It depends on an
update to 'qri' that allows exposing a full metadata record as YAML to the template
in the 'render-record' command. This allows injecting the full metadata record into
the markdown front matter under the 'params' key, which makes all record properties
accessible to hugo templating under '.Params'.

This meant a change to the person jinja template: everything goes 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.
This goes along with a change to qri, where the data is included as a
python dictionary at a specific key, and the toyaml filter is made
available to the jinja template. The jinja template then extracts the
keys that it needs and adds it to a dictionary, then runs it through
the toyaml filter to add everything to frontmatter
Owner

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 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.
Owner

I am closing this PR for now. Please resubmit when adjusted.

I am closing this PR for now. Please resubmit when adjusted.
mih closed this pull request 2026-03-10 07:21:12 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
www/www-from-model!8
No description provided.