Skip to content
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

feat: per-page md for llms #43

Merged
merged 7 commits into from
Mar 19, 2025
Merged

feat: per-page md for llms #43

merged 7 commits into from
Mar 19, 2025

Conversation

dtbuchholz
Copy link
Collaborator

@dtbuchholz dtbuchholz commented Mar 18, 2025

Summary

implements a per-page button where you can copy the md content to your clipboard, or view the raw md in another tab. modeled off of Stripe's docs
Screenshot 2025-03-18 at 4 13 16 PM

Screenshot 2025-03-18 at 4 21 01 PM

Details

  • all pages allow you to get the /raw/<docs_file>.md, served by a /raw/[[...slug] API that reads/serves the file
  • adds a new components/md-copy/actions.tsx component and app/raw/[...slug]/route.ts route to handle this
  • note: to make this possible, we had to "eject" a built-in page component from our docs framework, so the diff looks a bit larger than the actual changes. i.e., the diff includes components that were part of an external package, but they're now part of the actual docs codebase

Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 9:17pm

@@ -0,0 +1,27 @@
import { NextResponse } from "next/server";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

core functionality for the backend

@@ -0,0 +1,121 @@
"use client";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

core functionality for the frontend

@@ -0,0 +1,161 @@
"use client";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

everything hereafter are mostly "ejected" components, with small tweaks to add the features above

Copy link
Contributor

@carsonfarmer carsonfarmer left a comment

Choose a reason for hiding this comment

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

❤️

@dtbuchholz dtbuchholz merged commit bed757a into main Mar 19, 2025
2 checks passed
@dtbuchholz dtbuchholz deleted the dtb/llms-md branch March 19, 2025 03:53
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