Skip to content

docs: title a single migration guide's page with its H1 - #972

Closed
gewenyu99 wants to merge 2 commits into
mainfrom
docs/migration-page-title
Closed

gewenyu99 wants to merge 2 commits into
mainfrom
docs/migration-page-title

Conversation

@gewenyu99

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

The migration page on posthog.com shows two titles: the front matter title "PostHog Android SDK migration guides", then the guide's own H1. With one guide, the generator now uses the guide's H1 as the page title and drops the H1 from the body. With more than one guide, nothing changes.

The guide rewrites that use this are in separate PRs. The Python SDK has the same change in PostHog/posthog-python#1244.

💚 How did you test it?

Ran migration_page on a one-guide and a two-guide input. The script has no test suite.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

🤖 Agent context

Human-driven (agent-assisted)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gewenyu99
gewenyu99 requested a review from a team as a code owner November 12, 2026 16:52
@gewenyu99 gewenyu99 self-assigned this Nov 12, 2026
@veria-ai

veria-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

Comment thread bin/docs_scripts/generate_markdown.py Outdated
@@ -252,8 +261,7 @@ def main() -> None:
if not opts.experimental:
write("posthog-android-reference.md", [front_matter("PostHog Android SDK", body), *body])
if guides := sorted((ROOT / "docs").glob("migration-*.md"), reverse=True):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] We glob docs/migration-*.md, but the guide lives at the root MIGRATION.md (the one #973 edits), so guides is always empty and migration_page never runs. Could we point it at the root file, like Flutter does?

Suggested change
if guides := sorted((ROOT / "docs").glob("migration-*.md"), reverse=True):
if guides := [g for g in [ROOT / "MIGRATION.md"] if g.exists()]:

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gewenyu99

Copy link
Copy Markdown
Contributor Author

Combined into #973.

@gewenyu99 gewenyu99 closed this Nov 12, 2026
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.

2 participants