@@ -88,20 +88,17 @@ const config = {
8888 return config ;
8989 } ,
9090 async redirects ( ) {
91+ // Users browse only /docs in the {version}.rescript.org website.
92+ // Otherwise they are redirected to the main website.
9193 const redirects = [
9294 {
93- source : "/blog" ,
94- destination : "https://rescript-lang.org/blog" ,
95- permanent : true ,
96- } ,
97- {
98- source : "/blog/:slug*" ,
99- destination : "https://rescript-lang.org/blog/:slug*" ,
95+ source : "/" ,
96+ destination : `https://rescript-lang.org` ,
10097 permanent : true ,
10198 } ,
10299 {
103- source : "/" ,
104- destination : ` https://rescript-lang.org` ,
100+ source : "/blog " ,
101+ destination : " https://rescript-lang.org/blog" ,
105102 permanent : true ,
106103 } ,
107104 {
@@ -114,13 +111,18 @@ const config = {
114111 destination : "https://rescript-lang.org/community" ,
115112 permanent : true ,
116113 } ,
114+ ] ;
115+ const splatRedirects = [
116+ {
117+ source : "/blog/:slug*" ,
118+ destination : "https://rescript-lang.org/blog/:slug*" ,
119+ permanent : true ,
120+ } ,
117121 {
118122 source : "/community/:slug*" ,
119123 destination : "https://rescript-lang.org/community/:slug*" ,
120124 permanent : true ,
121125 } ,
122- ] ;
123- const splatRedirects = [
124126 {
125127 source : "/docs/manual/latest/:slug*" ,
126128 destination : `https://rescript-lang.org/docs/manual/${ process . env . VERSION_LATEST } /:slug*` ,
0 commit comments