vmware-tanzu-labs / educates-training-platform

A platform for hosting interactive workshop environments in Kubernetes, or on top of a local container runtime.
https://docs.educates.dev
Apache License 2.0
63 stars 15 forks source link

Workshop title not populating correctly in TOC. #373

Closed GrahamDumpleton closed 1 month ago

GrahamDumpleton commented 1 month ago

Describe the bug

When the TOC is viewed from the dashboard the title of the workshop is supposed to be displayed. When using the Hugo renderer, it is just showing "Workshop" and the title specified in the workshop definition is not used. If a title specific to a pathway is used then it does show.

Most likely issue is when calculating list of workshop variables, where by it says:

#@ workshop_title = xgetattr(data.values, "workshop_name", "Workshop")
#@ workshop_title = path.get("title", workshop_title)

Instead of workshop_name it should be using workshop_title. This would have previously been set using:

WORKSHOP_TITLE=$(workshop-definition -r '(.spec.title // "Workshop")')
WORKSHOP_DESCRIPTION=$(workshop-definition -r '(.spec.description // "")')

YTT_ARGS+=(--data-value workshop_title="$WORKSHOP_TITLE")
YTT_ARGS+=(--data-value workshop_description="$WORKSHOP_DESCRIPTION")

in script that triggers rebuilding of content.

Additional information

No response