Repository navigation
feat(modules): host nuxt/devtools docs, with images kept in their docs - #2569
Merged
Merged
Conversation
Module docs instances get comark-content's media() plugin, and a relative image source (./images/tab.png) now points at the media item it names, under the module page: /modules/<name>/images/tab.png. server/middleware/docs-media.ts serves it from the instance the page is read from (local checkout in dev, the PR's head commit in a preview), so a docs repo keeps its screenshots in its own docs/ directory. Amp-Thread-ID: https://ampcode.com/threads/T-01a18296-d1f3-75e5-9fa1-f749b3e3f1fa Co-authored-by: Sébastien Chopin <atinux@gmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a18296-d1f3-75e5-9fa1-f749b3e3f1fa Co-authored-by: Sébastien Chopin <atinux@gmail.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Production bundleComparing Initial page load
All client assets
Largest module increases
|
Amp-Thread-ID: https://ampcode.com/threads/T-01a18296-d1f3-75e5-9fa1-f749b3e3f1fa Co-authored-by: Sébastien Chopin <atinux@gmail.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a18296-d1f3-75e5-9fa1-f749b3e3f1fa Co-authored-by: Sébastien Chopin <atinux@gmail.com>
nuxt.com previewThis pull request is closed: its preview is no longer available. |
atinux
marked this pull request as ready for review
October 28, 2026 17:24
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosts the nuxt/devtools docs under /modules/devtools, on top of #2550. The docs side is nuxt/devtools#1144.
devtoolsinMODULE_DOCS(nuxt/devtools,docs/,NUXT_DEVTOOLS_PATH), with the.env.exampleline, anddevtoolsinPULL_REPOSfor/pull/devtools/<number>previews.media()plugin. A relative image (./images/overview.webp, which GitHub renders too) is rewritten bydocsMedia()to/modules/<name>/images/overview.webp, andserver/middleware/docs-media.tsserves it from the instance the page is read from: the local checkout in dev, the PR's head commit in a preview (DocsProseImgadds the/pull/...prefix). Root-relative images keep resolving against the repo root (repoImages()).CONTENT_PARSER_VERSIONis bumped since the module instances' output changes.Before merging
MODULE_DOCS.devtools.branchback tomain.preview:enabledlabel on nuxt/devtools.The two blog posts linking the old DevTools docs (
devtools.nuxt.com,devtools.nuxtjs.org) now link/modules/devtools/....Checked locally
With
NUXT_DEVTOOLS_PATHpointing at the docs branch, then again reading it from GitHub:::code-group,::warning,::callout,::note,:kbdand tables render./modules/devtools/images/*.webpreturn the images (image/webp), an unknown image 404s./raw/modules/devtools/*.mdreturn 200 with absolute image URLs;/llms.txtand/sitemap.mdlist the 9 pages under "Nuxt DevTools Documentation"; the OG image of a docs page renders (1200×600).pnpm lint,vue-tscon the app/server/shared tsconfigs, andvitest --project unit(449 tests) pass. PR previews of nuxt/devtools were not exercised.