chore(website): tighten middleware matcher; drop unused 'use client' by Jocs · Pull Request #4351 · marktext/marktext · GitHub
Skip to content

chore(website): tighten middleware matcher; drop unused 'use client' - #4351

Merged
Jocs merged 1 commit into
developfrom
chore/website-misc-cleanups
Jun 2, 2026
Merged

Jocs merged 1 commit into
developfrom
chore/website-misc-cleanups

Conversation

@Jocs

@Jocs Jocs commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

Two unrelated micro-cleanups bundled together.

  • middleware.ts: extend the matcher exclusion list with /assets/, /docs/, /docs-index.json, /sitemap.xml, /robots.txt, /favicon.png. The middleware exists only to 301 www.marktext.me/* → marktext.me/*; with these out, the Cloudflare Worker no longer wakes up for static-asset / static-route requests (the apex versions return immediately anyway).
  • DocsTabs.tsx: not a client component — it renders <Link> plus a couple of static SVGs, no hooks, no state. Drop 'use client' so it stays in the RSC tree.

Test plan

  • pnpm --filter marktext-website type-check
  • pnpm --filter marktext-website lint
  • pnpm --filter marktext-website build (37 static pages)
  • CI

🤖 Generated with Claude Code

- middleware.ts: extend the matcher exclusion list with /assets/, /docs/,
  /docs-index.json, /sitemap.xml, /robots.txt, /favicon.png so the
  Cloudflare Worker no longer wakes up for those static-asset requests.
- DocsTabs.tsx: not a client component (Link + static SVGs, no hooks).
  Drop 'use client' so it stays in the RSC tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Build artifacts for PR #4351:

Run: https://github.com/marktext/marktext/actions/runs/26832365854

Artifact Size Link
marktext-windows-arm64 270.6 MB Download
marktext-macos-x64 271.7 MB Download
marktext-linux 592.9 MB Download
marktext-windows-x64 271.9 MB Download
marktext-macos-arm64 261.4 MB Download

@Jocs
Jocs merged commit 4fe7e06 into develop Jun 2, 2026
11 checks passed
@Jocs
Jocs deleted the chore/website-misc-cleanups branch June 2, 2026 16:38
thimbleberrysystems pushed a commit to thimbleberrysystems/WordBird that referenced this pull request Jun 21, 2026
…arktext#4351)

- middleware.ts: extend the matcher exclusion list with /assets/, /docs/,
  /docs-index.json, /sitemap.xml, /robots.txt, /favicon.png so the
  Cloudflare Worker no longer wakes up for those static-asset requests.
- DocsTabs.tsx: not a client component (Link + static SVGs, no hooks).
  Drop 'use client' so it stays in the RSC tree.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant