GitbookIO / GitbookIO/gitbook

Page link titles resolve to parent section title instead of target page's own title (editor vs. published/preview mismatch)

Open
#4,542 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
29k
Forks
4k
Avg merge
1d 2h
Merged PRs (30d)
71

Description

Bug description

Page Link blocks and inline Link content blocks that point to a page in another space display the correct target page title in the editor, but display the parent section's title instead in Preview mode and on the published site. This affects every cross-space page link across the site, not just an isolated page.

GitBook Editor Screenshot
Image

GitBook Preview Screenshot (same as live)
Image

How to reproduce

  1. In a space under the "Functional Guides" tab of the "Practical Guides" section, insert a Page Link block (or inline Link) pointing to the page "SNOMED CT EHR Requirements Guide".
  2. View the page in the editor — the link correctly displays "SNOMED CT EHR Requirements Guide."
  3. Switch to Preview, or view the published page.
  4. The same link now displays "Practical Guides" (the section title) instead of the page's own title.

Expected behavior
The link should display the title of the linked page (or its page link title, if set), consistently across editor, preview, and published output.

Actual behavior
Editor: correct page title shown.
Preview / Published: section title ("Practical Guides") shown instead, for every link on the page.

Additional context

Live example
https://docs.snomed.org/snomed-ct-practical-guides#functional-guides — under "Functional Guides," multiple distinct links all render as "Practical Guides" rather than their actual page titles.

Scope / impact

  • Affects all page links and inline links site-wide, not a single page.
  • Both the Page Link block and the inline Link block are affected identically, suggesting both share a title-resolution path that's pulling from the wrong node (section/collection level rather than page/space level) at publish/preview time.
  • Started within the last few weeks; no content or link structure changes were made on our end prior to this appearing.

Additional notes
Since the editor resolves the title correctly, this looks like a discrepancy specifically in the publish/preview rendering pipeline's title lookup, rather than a data issue with the pages themselves.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the editor with Preview and the published live example, then trace the shared title-resolution path used by Page Link blocks and inline Link content. Confirm the target page or its configured link title is selected consistently in editor, preview, and published output for cross-space links.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.