Skip to content

Show real page title in wiki sidebar

Himanshu Kapoor requested to merge himkp-wiki-page-real-title-in-sidebar into master

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.

image

How to set up and validate locally

  1. Create a new wiki page.
  2. Uncheck "Generate page path from title".
  3. Make sure the page path and title are different.
  4. 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)

Edited by Himanshu Kapoor

Merge request reports

Loading