Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 9, 2025

Fixes FER-

Add <Footer> component for API reference descriptions

Adds support for a <Footer /> component that can be used in API reference descriptions. Content within the Footer component is extracted from the description section (rendered at the top of the page) and moved to render below the response section (at the bottom of the reference page).

What was the motivation & context behind this PR?

Users want the ability to add content that appears at the bottom of API reference pages, below the response section. This is useful for related links, additional context, or notes that make more sense at the end of the endpoint documentation.

Changes

  • Added extractFooterContent utility using regex to parse and extract <Footer> blocks from MDX strings before serialization
  • Updated EndpointContent, WebhookContent, GrpcContent, and WebSocketContent to extract and render footer content
  • Added descriptionFooter prop to ReferenceLayout to render content between reference and navigation footer

Note: No MDX component definition is registered since the library doesn't use it for JSX parsing validation. The extraction works directly on the raw MDX string.

Human review checklist

  • Verify regex handles edge cases (e.g., <Footer> inside code blocks would incorrectly be extracted)
  • Confirm footer renders in the correct visual position

How has this PR been tested?

  • Biome lint checks pass
  • TypeScript compilation succeeds
  • All CI checks pass

Link to Devin run: https://app.devin.ai/sessions/09711359aba445e7b244982eab1d433b
Requested by: Catherine Deskur (catherine@buildwithfern.com)

Add support for a <Footer /> component in API reference descriptions.
Content within the Footer component is extracted from the description
section (rendered at the top) and moved to render below the response
section (at the bottom of the reference page).

- Add Footer MDX component that renders nothing in its original position
- Add extractFooterContent utility to parse and extract footer content
- Update EndpointContent, WebhookContent, GrpcContent, and WebSocketContent
  to extract and render footer content
- Add descriptionFooter prop to ReferenceLayout

Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link
Contributor

vercel bot commented Dec 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
dev.ferndocs.com Ready Ready Preview Dec 9, 2025 3:21pm
fern-dashboard Ready Ready Preview Dec 9, 2025 3:21pm
fern-dashboard-dev Ready Ready Preview Dec 9, 2025 3:21pm
prod-assets.ferndocs.com Ready Ready Preview Dec 9, 2025 3:21pm
prod.ferndocs.com Ready Ready Preview Dec 9, 2025 3:21pm
1 Skipped Deployment
Project Deployment Preview Updated (UTC)
fern-platform Ignored Ignored Dec 9, 2025 3:21pm

devin-ai-integration bot and others added 2 commits December 9, 2025 15:09
Use optional chaining to handle potentially undefined capture group.

Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
The Footer component definition is not needed since the MDX library
doesn't use it for JSX parsing validation. The extraction logic still
works by parsing the raw MDX string before serialization.

Co-Authored-By: Catherine Deskur <catherine@buildwithfern.com>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🌱 Smoke Test Preview

Testing branch changes with smoke test content:

🕷️ Smoke Test Crawler Results

Pages crawled: 40
Successful: 40 ✅
With errors: 0

🎉 All pages loaded successfully with no errors!

@chdeskur
Copy link
Collaborator

chdeskur commented Dec 9, 2025

Screenshot 2025-12-09 at 10 22 00 AM

@devin-ai-integration
Copy link
Contributor Author

Thanks for testing! The screenshot shows the Footer feature is working correctly - the content "Hello world! Click here to go to Google." is rendering below the Response section as expected.

Is there anything you'd like me to adjust, or is this ready to merge?

@chdeskur chdeskur merged commit bb847b0 into app Dec 9, 2025
22 checks passed
@chdeskur chdeskur deleted the devin/1765292109-footer-component-api-reference branch December 9, 2025 17:38
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