diff --git a/next.config.mjs b/next.config.mjs index 08aa3cee9..117196b67 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -158,9 +158,9 @@ const nextraConfig = withNextra({ }, // Content negotiation: /docs or /docs/observability/overview -> /md-src/... .md - // Excludes /api, /_next, and /md-src, and avoids double-appending .md. + // Excludes /api, /_next, md-src, .md files, and .txt files (served directly from public/). { - source: "/:path((?!api|_next|md-src)(?!.*\\.md$).*)", + source: "/:path((?!api|_next|md-src)(?!.*\\.md$)(?!.*\\.txt$).*)", has: [{ type: "header", key: "accept", value: ".*text/markdown.*" }], destination: "/md-src/:path.md", },