docs: fix rewrites for markdown and plain content (#13916)

This commit is contained in:
Shahed Nasser
2025-10-31 08:54:51 +02:00
committed by GitHub
parent 4dac80a320
commit 0da22a8a13
5 changed files with 10 additions and 65 deletions

View File

@@ -122,23 +122,12 @@ const nextConfig = {
destination: "/md-content/:path*",
},
{
source: "/:path*",
source: "/:path((?!resources|api|ui|user-guide|cloud).*)*",
has: [
{
type: "header",
key: "Accept",
value: "text/markdown",
},
],
destination: "/md-content/:path*",
},
{
source: "/:path*",
has: [
{
type: "header",
key: "Accept",
value: "text/plain",
value: ".*(text/markdown|text/plain).*",
},
],
destination: "/md-content/:path*",

View File

@@ -164,23 +164,12 @@ const nextConfig = {
has: [
{
type: "header",
key: "accept",
value: "text/markdown",
key: "Accept",
value: ".*(text/markdown|text/plain).*",
},
],
destination: "/md-content/:path*",
},
{
source: "/:path*",
destination: "/md-content/:path*",
has: [
{
type: "header",
key: "accept",
value: "text/plain",
},
],
},
],
}
},

View File

@@ -298,23 +298,12 @@ const nextConfig = {
has: [
{
type: "header",
key: "accept",
value: "text/markdown",
key: "Accept",
value: ".*(text/markdown|text/plain).*",
},
],
destination: "/md-content/:path*",
},
{
source: "/:path*",
destination: "/md-content/:path*",
has: [
{
type: "header",
key: "accept",
value: "text/plain",
},
],
},
],
}
},

View File

@@ -153,23 +153,12 @@ const nextConfig = {
has: [
{
type: "header",
key: "accept",
value: "text/markdown",
key: "Accept",
value: ".*(text/markdown|text/plain).*",
},
],
destination: "/md-content/:path*",
},
{
source: "/:path*",
destination: "/md-content/:path*",
has: [
{
type: "header",
key: "accept",
value: "text/plain",
},
],
},
],
}
},

View File

@@ -141,23 +141,12 @@ const nextConfig = {
has: [
{
type: "header",
key: "accept",
value: "text/markdown",
key: "Accept",
value: ".*(text/markdown|text/plain).*",
},
],
destination: "/md-content/:path*",
},
{
source: "/:path*",
destination: "/md-content/:path*",
has: [
{
type: "header",
key: "accept",
value: "text/plain",
},
],
},
],
}
},