File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,35 @@ const nextConfig = {
1212 // TODO: Remove after https://github.com/vercel/next.js/issues/49355 is fixed
1313 appDir : false ,
1414 scrollRestoration : true ,
15+ << < << << HEAD
1516 legacyBrowsers : false ,
17+ === === =
18+ reactCompiler : true ,
19+ } ,
20+ async rewrites ( ) {
21+ return {
22+ beforeFiles : [
23+ // Explicit .md extension also serves markdown
24+ {
25+ source : '/:path*.md' ,
26+ destination : '/api/md/:path*' ,
27+ } ,
28+ // Serve markdown when Accept header prefers text/markdown
29+ // Useful for LLM agents - https://www.skeptrune.com/posts/use-the-accept-header-to-serve-markdown-instead-of-html-to-llms/
30+ {
31+ source : '/:path((?!llms\\.txt|api/md).*)' ,
32+ has : [
33+ {
34+ type : 'header' ,
35+ key : 'accept' ,
36+ value : '(.*text/markdown.*)' ,
37+ } ,
38+ ] ,
39+ destination : '/api/md/:path*' ,
40+ } ,
41+ ] ,
42+ } ;
43+ > >>> >>> 1207 ee36e1c7e3f2737d8f1022015473ffa99adf
1644 } ,
1745 env: { } ,
1846 webpack : ( config , { dev, isServer, ...options } ) = > {
You can’t perform that action at this time.
0 commit comments