Skip to content

fix(docs): render Markdown in page titles#372

Merged
mostafa merged 1 commit into
mainfrom
fix/docs-title-markdown
Jul 21, 2026
Merged

fix(docs): render Markdown in page titles#372
mostafa merged 1 commit into
mainfrom
fix/docs-title-markdown

Conversation

@mostafa

@mostafa mostafa commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

On pages whose first heading is inline code, for example # `rsigma engine discover-schemas` , the top-of-page title rendered the raw Markdown, so literal backticks showed in the header bar (and in the <title> and social meta). docmd derives the page title from the first H1 but keeps the raw text; the in-body H1 renders correctly, only the derived title does not.

Fix

The local docmd-plugin-rsigma post-build hook now normalizes derived titles per page:

  • the visible <span class="header-title"> renders the inline-code span as <code>, matching the in-body H1;
  • the plain-text <title> and the Open Graph / Twitter title meta strip the backticks (HTML does not render there).

Pages whose title has no backticks are left untouched (this build reported 40 titles rendered). docmd build and docmd validate pass.

Before / after

Header bar for cli/engine/discover-schemas:

  • before: `rsigma engine discover-schemas`
  • after: rsigma engine discover-schemas (rendered as <code>)

docmd derives the page title from the first Markdown H1 but keeps the raw text,
so a heading like `# `rsigma engine discover-schemas`` left literal backticks
in the header bar, the <title>, and the Open Graph / Twitter meta. The
post-build hook now renders the inline-code span as <code> in the visible header
(matching the in-body H1) and strips the markers from the plain-text <title> and
social meta. Titles without backticks are untouched.
@mostafa
mostafa merged commit ce6628e into main Jul 21, 2026
3 checks passed
@mostafa
mostafa deleted the fix/docs-title-markdown branch July 21, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant