Skip to content

Fix the build of new docs #2303

Merged
jcstein merged 1 commit intodocs-glow-upfrom
gb/fix-build
Nov 13, 2025
Merged

Fix the build of new docs #2303
jcstein merged 1 commit intodocs-glow-upfrom
gb/fix-build

Conversation

@gbarros
Copy link
Copy Markdown
Contributor

@gbarros gbarros commented Nov 12, 2025

No description provided.

- Introduced frontmatter with `landingPage: true` to the main page and section pages (Learn, Operate) for better content management.
- Updated ContentFooter styling for improved layout consistency.
- Refactored WrapperWithFooter to determine landing pages based on frontmatter instead of URL path depth.
@gbarros gbarros requested a review from jcstein November 12, 2025 23:01
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gbarros, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses issues with the documentation build by enhancing the system's ability to correctly identify and handle landing pages. It shifts the mechanism for distinguishing landing pages from an implicit URL structure check to an explicit declaration within the page's frontmatter, ensuring that components like the ContentFooter are applied consistently and as intended across different page types. This change improves the robustness and maintainability of the documentation site's structure.

Highlights

  • Landing Page Detection Logic: The method for identifying landing pages has been refactored from a URL path-based approach to an explicit frontmatter-based detection using landingPage: true.
  • MDX Frontmatter Updates: Several MDX files (app/learn/page.mdx, app/operate/page.mdx, app/page.mdx) have been updated to include landingPage: true in their frontmatter, aligning with the new detection mechanism.
  • ContentFooter Styling: The ContentFooter component received minor styling adjustments, including the removal of a <br /> tag and the addition of Tailwind CSS classes for spacing and borders.
  • WrapperWithFooter Refinement: The WrapperWithFooter component was updated to remove usePathname, incorporate Nextra's EvaluateResult type, and streamline the logic for conditionally rendering the ContentFooter.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the logic for detecting landing pages to avoid showing them a content footer. The new approach uses frontmatter (landingPage: true) in MDX files, which is more robust and explicit than the previous URL path-based detection. This is a good architectural improvement. However, I've found a critical issue in the implementation where an incorrect property is being accessed, which will cause the logic to fail. I've also included a suggestion for improving code consistency in one of the components.

Comment on lines +25 to +29
const isLandingPage = Boolean(
props.metadata &&
"landingPage" in props.metadata &&
(props.metadata as Record<string, unknown>).landingPage
);
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.

critical

There's an issue in how the landing page is detected. The WrapperProps interface correctly gets page data from Nextra's EvaluateResult type, which provides frontmatter data in the frontMatter property. However, the code attempts to access props.metadata, which is undefined.

This will cause isLandingPage to always be false, and as a result, the ContentFooter will be incorrectly displayed on all pages, including landing pages where it is not intended.

Suggested change
const isLandingPage = Boolean(
props.metadata &&
"landingPage" in props.metadata &&
(props.metadata as Record<string, unknown>).landingPage
);
const isLandingPage = Boolean(
props.frontMatter &&
"landingPage" in props.frontMatter &&
(props.frontMatter as Record<string, unknown>).landingPage
);

<br />
<h3>
<div className="mt-12 border-t pt-8">
<h3 style={{ marginTop: '1.5rem' }}>
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.

medium

For consistency with the rest of the codebase that uses Tailwind CSS, it's better to use utility classes instead of inline styles. The inline style marginTop: '1.5rem' can be replaced with the Tailwind class mt-6.

Suggested change
<h3 style={{ marginTop: '1.5rem' }}>
<h3 className="mt-6">

@jcstein jcstein merged commit ea6520d into docs-glow-up Nov 13, 2025
2 of 3 checks passed
@jcstein jcstein deleted the gb/fix-build branch November 13, 2025 01:13
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