Skip to content

feat(modules): host nuxt/devtools docs, with images kept in their docs - #2569

Merged
atinux merged 6 commits into
mainfrom
feat/devtools-docs
Oct 28, 2026
Merged

atinux merged 6 commits into
mainfrom
feat/devtools-docs

Conversation

@atinux

@atinux atinux commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Opened by an AI agent (Amp) on behalf of @atinux, as a draft to iterate on.

Hosts the nuxt/devtools docs under /modules/devtools, on top of #2550. The docs side is nuxt/devtools#1144.

  • devtools in MODULE_DOCS (nuxt/devtools, docs/, NUXT_DEVTOOLS_PATH), with the .env.example line, and devtools in PULL_REPOS for /pull/devtools/<number> previews.
  • Images kept next to the docs pages. Module docs instances get comark-content's media() plugin. A relative image (./images/overview.webp, which GitHub renders too) is rewritten by docsMedia() to /modules/<name>/images/overview.webp, and server/middleware/docs-media.ts serves it from the instance the page is read from: the local checkout in dev, the PR's head commit in a preview (DocsProseImg adds the /pull/... prefix). Root-relative images keep resolving against the repo root (repoImages()). CONTENT_PARSER_VERSION is bumped since the module instances' output changes.

Before merging

The two blog posts linking the old DevTools docs (devtools.nuxt.com, devtools.nuxtjs.org) now link /modules/devtools/....

Checked locally

With NUXT_DEVTOOLS_PATH pointing at the docs branch, then again reading it from GitHub:

  • All 9 pages return 200 and render at 1440px and 390px (no horizontal overflow), with the docs nav aside and mobile drawer; ::code-group, ::warning, ::callout, ::note, :kbd and tables render.
  • /modules/devtools/images/*.webp return the images (image/webp), an unknown image 404s.
  • /raw/modules/devtools/*.md return 200 with absolute image URLs; /llms.txt and /sitemap.md list the 9 pages under "Nuxt DevTools Documentation"; the OG image of a docs page renders (1200×600).
  • pnpm lint, vue-tsc on the app/server/shared tsconfigs, and vitest --project unit (449 tests) pass. PR previews of nuxt/devtools were not exercised.

ampagent and others added 2 commits October 28, 2026 14:18
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>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

1 Skipped Deployment
Project Deployment Actions Updated
nuxt Ignored Ignored Preview Oct 28, 2026 4:59pm UTC

Request Review

@nuxt-com-bundle-report

nuxt-com-bundle-report Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Production bundle

Comparing ad5aa0cf with 0cf9fd78. Compressed sizes are calculated from the emitted production assets.

Initial page load

Page Base JS (Brotli) PR JS (Brotli) Δ JS Δ CSS Δ files
/ 555.0 KiB 555.1 KiB +160 B (+0.0%) — —
/docs/4.x/getting-started/introduction 613.3 KiB 613.5 KiB +194 B (+0.0%) — —
/modules/ui 545.4 KiB 545.6 KiB +133 B (+0.0%) — —
/updates 450.2 KiB 450.3 KiB +122 B (+0.0%) — —
/blog/v4-6 573.7 KiB 573.9 KiB +193 B (+0.0%) — —
/templates 431.0 KiB 431.1 KiB +121 B (+0.0%) — —

Entry script, modulepreload chunks and stylesheets referenced by the prerendered HTML. Lazy and prefetched chunks are excluded.

All client assets

Metric Base (Brotli) PR (Brotli) Δ Brotli Δ gzip
Client JavaScript 2.20 MiB 2.20 MiB +204 B (+0.0%) +144 B (+0.0%)
Client CSS 34.3 KiB 34.3 KiB — -2 B (-0.0%)
Other client assets 339.3 KiB 339.3 KiB -4 B (-0.0%) -1 B (-0.0%)
Total client assets 2.56 MiB 2.56 MiB +200 B (+0.0%) +141 B (+0.0%)

Largest module increases

Module Base (Brotli) PR (Brotli) Δ Brotli
virtual:nuxt-workers.mjs?source=%2Fhome%2Frunner%2Fwork%2Fnuxt.com%2Fnuxt.com%2Fapp%2Fworkers%2Fsearch.ts 0 B 408 B +408 B
/app/composables/async-data-chunk-27.js 0 B 248 B +248 B
/app/pages/nuxters/async-data-chunk-12.js 0 B 240 B +240 B
/app/pages/modules/[slug]/async-data-chunk-2.js 0 B 213 B +213 B
/app/async-data-chunk-25.js 0 B 187 B +187 B
/app/pages/docs/async-data-chunk-6.js 0 B 161 B +161 B
/app/pages/modules/[slug]/async-data-chunk-3.js 0 B 145 B +145 B
/app/pages/modules/async-data-chunk-23.js 0 B 118 B +118 B
/app/pages/enterprise/agencies/async-data-chunk-18.js 0 B 115 B +115 B
/app/pages/enterprise/agencies/async-data-chunk-9.js 0 B 114 B +114 B

Module values come from Nuxt’s analyzer and are attribution estimates. This workflow is currently report-only.

Workflow run

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

nuxt.com preview

This pull request is closed: its preview is no longer available.

@atinux
atinux marked this pull request as ready for review October 28, 2026 17:24
@atinux
atinux merged commit 5e6922a into main Oct 28, 2026
15 checks passed
@atinux
atinux deleted the feat/devtools-docs branch October 28, 2026 17:24
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