Commit Graph

7 Commits

Author SHA1 Message Date
Charis
e4d76be290 chore(docs): allow partners fetch to be revalidated by tag (#35676)
## Before

Partners fetch is showing stale data from a few months ago

## After

Partners fetch can be revalidated by tag. The revalidation will be
triggered by a DB function when the partners table is changed.
2025-05-14 14:13:11 -04:00
Ivan Vasilov
0cb08341f6 chore: Bump nextjs for the docs app (#35333)
* Bump all versions of postcss to 8.5.3.

* Run next/codemod on the docs app.

* Move two experimental flags into stable. Add next-mdx-remote as a transpiled package.

* Add extra folders to the clean command in docs.

* Fix type errors in docs test.

* Run prettier on the new files.

* remove turbopack, fix fetch revalidation, fix metadata awaits

Couple of minor fixes:
- Turbopack doesn't work in dev because of known MDX loader limitations
(cannot load functions in MDX plugin config)
- Fetches not cached by default anymore in Next 15 so need to manually
cache the ones we need
- Missing a few awaits for metadata generation with page params

* Bump the graphiql version because headlessui/react is not building with Next 15.

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-05-08 09:27:22 +00:00
Charis
9d9fdcd9fc feat (docs): on-demand revalidation for graphql and wrappers (#35177)
Before:

Revalidation was turned off entirely for wrappers pages, and done daily for GraphQL pages.

After:

Revalidation is via tag. There is an /api/revalidate endpoint that is used by GitHub Actions on the federated repos to trigger the revalidation. This decreases the number of unnecessary page generations by Vercel, and gives the maintainers of federated repos more fine-grained control over when to reploy their docs (see the docs deployment playbook for more info).
2025-04-24 14:59:38 -04:00
Charis
699f708b0c fix: make examples available for isr (#32610)
The examples folder needs to be explicitly included in the Vercel Serverless bundle. Because it's at the root of the monorepo rather than being within the `app/docs` folder, we copy it over pre-build (and pre-dev).

Test the examples/prompts fix by re-enabling revalidations on graphql pages. Added a temp version of the fetch function so we can gradually reenable and monitor Vercel error rates over time.
2025-01-14 18:38:21 -05:00
Charis
e6efee12e7 hotfix: disable guide revalidation (#31948) 2024-12-28 18:27:59 -03:30
Charis
c2fe11850d feat: embed code samples from github (#29519)
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.

Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).

Adjusted one of the example tutorials to use this new feature as a test.
2024-09-26 15:54:57 -04:00
Charis
9fb97becb9 fix: revalidate fetches every day (#27828)
The Vercel Data Cache caches data across deployments, and we want to
check for updates in federated content, so let's revalidate the data
once a day.

It may be more efficient to revalidate on-demand, since we don't change
most of these sources once a day, but that requires setting up an API
endpoint (and figuring out how to authenticate it), so this is
quick-and-easy for now.
2024-07-08 13:12:19 -04:00