-
Notifications
You must be signed in to change notification settings - Fork 26
feat(docs): add Footer component for API reference descriptions #5762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
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>
🌱 Smoke Test PreviewTesting branch changes with smoke test content:
🕷️ Smoke Test Crawler ResultsPages crawled: 40 🎉 All pages loaded successfully with no errors! |
|
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? |

Fixes FER-
Add
<Footer>component for API reference descriptionsAdds 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
extractFooterContentutility using regex to parse and extract<Footer>blocks from MDX strings before serializationEndpointContent,WebhookContent,GrpcContent, andWebSocketContentto extract and render footer contentdescriptionFooterprop toReferenceLayoutto render content between reference and navigation footerNote: 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
<Footer>inside code blocks would incorrectly be extracted)How has this PR been tested?
Link to Devin run: https://app.devin.ai/sessions/09711359aba445e7b244982eab1d433b
Requested by: Catherine Deskur (catherine@buildwithfern.com)