Skip to content

Add Blog link to landing header navigation - #81

Merged
suguanYang merged 2 commits into
Ontos-AI:mainfrom
kaiyu96:feat/add-blog-nav-link
Jul 27, 2026
Merged

Add Blog link to landing header navigation#81
suguanYang merged 2 commits into
Ontos-AI:mainfrom
kaiyu96:feat/add-blog-nav-link

Conversation

@kaiyu96

@kaiyu96 kaiyu96 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a "Blog" nav item to the right of "GitHub" in the landing page header
  • Link points to https://blog.knowhereto.ai/ and opens in a new tab (consistent with Docs/Playground)
  • Add English ("Blog") and Chinese ("博客") i18n labels
  • Register PostHog CTA tracking as blog_external

Verification

  • npm test — landing contract tests pass
  • Manual check: desktop nav shows Blog after GitHub
  • Manual check: mobile hamburger menu includes Blog
  • Manual check: Blog link opens blog.knowhereto.ai in new tab

Screenshots or Recordings

  • Add before/after screenshots after merge preview deploy

Deployment Notes

  • No environment variables or database changes required
  • Pure frontend nav link addition; safe to deploy independently

Checklist

  • Tests were added or updated when behavior changed
  • Public docs, examples, or screenshots were updated when needed
  • User-visible UI changes were checked on responsive layouts
  • Auth, billing, and API proxy changes avoid leaking secrets or user data
  • The pull request description explains any breaking or user-visible change

Made with Cursor

Surface the WordPress blog at blog.knowhereto.ai next to GitHub in the main site nav.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 27, 2026 03:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new external “Blog” entry to the landing header navigation (desktop + mobile) with i18n labels and PostHog CTA tracking, extending the existing nav/link tracking pattern used for Docs/Playground.

Changes:

  • Add blog to the landing header nav model and render it as an external link.
  • Register PostHog CTA id mapping for the new nav item (blog_external).
  • Add Landing.header.nav.blog translations for English and Chinese, plus a landing header contract test assertion.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
app/(landing)/_components/landing-header.tsx Adds the Blog nav item, extends labelKey union, and maps blog to blog_external CTA tracking.
i18n/locales/en.json Adds English translation for the new Landing.header.nav.blog label.
i18n/locales/zh.json Adds Chinese translation for the new Landing.header.nav.blog label.
lib/landing-figma-design.test.ts Extends landing header contract test to assert the Blog nav item is present.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 27 to 31
{ href: "#pricing", labelKey: "pricing" },
{ href: "https://docs.knowhereto.ai/", labelKey: "docs", external: true },
{ href: "/github", labelKey: "github" },
{ href: "https://blog.knowhereto.ai/", labelKey: "blog", external: true },
];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Updated LandingTrackedLink and LandingTrackedAnchor to use rel="noopener noreferrer" for all external links via a shared externalLinkRel constant, so Blog (and Docs/Playground) no longer expose window.opener.

Comment on lines 22 to +28
expect(landingHeaderSource).toContain(
'{ href: "https://notebook.knowhereto.ai", labelKey: "playground", external: true }'
);
expect(landingHeaderSource).toContain('{ href: "/github", labelKey: "github" }');
expect(landingHeaderSource).toContain(
'{ href: "https://blog.knowhereto.ai/", labelKey: "blog", external: true }'
);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added an ordering assertion in landing-figma-design.test.ts to verify the GitHub nav item appears before Blog in landingNavItems, so future refactors cannot silently reorder them while still passing existence checks.

Use noopener noreferrer on external tracked links and assert Blog appears after GitHub in the landing header contract test.

Co-authored-by: Cursor <cursoragent@cursor.com>
@suguanYang
suguanYang merged commit e562b8f into Ontos-AI:main Jul 27, 2026
2 checks passed
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.

3 participants