I have the following use case: The featured image on a documentation page should use the icon from its entry in the sidebar menu.
My current solution is to write the ID of the icon into the page scratch when the menu entry is found while generating the sidebar menu. Later on the page I read the ID from the scratch to get the icon again. This avoids to range through the menu twice. This solution will probably cease to work with the next Hugo release. It was fragile because the menu had to be rendered always before the content.
Is there a way to read a menu parameter from the front-matter directly?
The menu entries for the sidebar are always configured in the frontmatter of a page. The menu map is site.Menus.doc but there a no url or pageref parameters necessary.