Show real page title in wiki sidebar
What does this MR do and why?
Show real page title in wiki sidebar
Fetch real title from document's front matter if available to show in the sidebar
In !150646 (merged) we separated wiki page title and path fields. The real title is now stored in frontmatter but the sidebar still loads the old title from page's path. This is now fixed by fetching first 512 bytes of each file's contents to get the frontmatter.
Changelog: added
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
In the screenshot below, note that the title of the page is "Real title of the page" but the slug is "Test-page". Both the page and the sidebar show the real title.
How to set up and validate locally
- Create a new wiki page.
- Uncheck "Generate page path from title".
- Make sure the page path and title are different.
- Save Changes
Notice that once the saved page loads, the real title of the page is correct both on the wiki page and in the sidebar.
Related to #471367 (closed)