File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,6 +354,7 @@ const siteConfig = {
354354 users,
355355 examples,
356356 onPageNav : 'separate' ,
357+ scripts : [ '/js/redirectToNewDoc.js' ] ,
357358 /* path to images for header/footer */
358359 headerIcon : "img/dummy.svg" ,
359360 footerIcon : "img/icon_50.png" ,
Original file line number Diff line number Diff line change 1+ /*
2+ * This code is not run through any build step! Don't add any fancy stuff
3+ */
4+
5+ ( function ( ) {
6+ var specializedDocsRedirect = {
7+ 'interop' : 'docs/manual/latest/introduction' ,
8+ 'syntax-cheatsheet' : 'docs/manual/latest/overview' ,
9+ 'pipe-first' : 'docs/manual/latest/pipe' ,
10+ 'promise' : 'docs/manual/latest/promise' ,
11+ 'libraries' : 'docs/manual/latest/libraries' ,
12+ 'converting-from-js' : 'docs/manual/latest/converting-from-js' ,
13+ }
14+ var path = window . location . pathname . split ( '/' ) ;
15+ var blogPageFullPath = path . slice ( 2 ) . join ( '/' )
16+ var page = path [ path . length - 1 ] ;
17+
18+ if ( path [ 1 ] === 'docs'
19+ && page != null
20+ // && page !== 'installation' uncomment to test more easily
21+ ) {
22+ if ( specializedDocsRedirect [ page ] != null ) {
23+ window . location = 'https://rescript-lang.org/' + specializedDocsRedirect [ page ]
24+ }
25+ }
26+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments