|  | 
| 1 |  | -# Settings in the [build] context are global and are applied to all contexts | 
| 2 |  | -# unless otherwise overridden by more specific contexts. | 
| 3 | 1 | [build] | 
| 4 |  | - # Directory to change to before starting a build. | 
| 5 |  | - # This is where we will look for package.json/.nvmrc/etc. | 
| 6 |  | - base = "" | 
| 7 |  | - | 
| 8 | 2 |  # Directory (relative to root of your repo) that contains the deploy-ready | 
| 9 |  | - # HTML files and assets generated by the build. If a base directory has | 
| 10 |  | - # been specified, include it in the publish directory path. | 
|  | 3 | + # HTML files and assets generated by the build | 
| 11 | 4 |  publish = "website/build/testing-library-docs" | 
| 12 | 5 | 
 | 
| 13 |  | - # Default build command. | 
|  | 6 | + # Default build command | 
| 14 | 7 |  command = "cd website; npm install; npm run format-docs; npm run build" | 
| 15 | 8 | 
 | 
| 16 |  | -# Shortcut to discord server invite | 
| 17 |  | -[[redirects]] | 
| 18 |  | - from = "https://testing-library.com/discord" | 
| 19 |  | - to = "https://discord.gg/c6JN9fM" | 
| 20 |  | - status = 301 | 
| 21 |  | - force = true | 
|  | 9 | +[dev] | 
|  | 10 | + # A Boolean value that determines if Netlify Dev launches the local server address in your browser | 
|  | 11 | + autoLaunch = true | 
|  | 12 | + | 
|  | 13 | +# Redirects | 
| 22 | 14 | 
 | 
| 23 |  | -# React root to React landing page | 
|  | 15 | +# Domains | 
| 24 | 16 | [[redirects]] | 
| 25 | 17 |  from = "https://react-testing-library.com/" | 
| 26 |  | - to = "https://testing-library.com/react/" | 
| 27 |  | - status = 301 | 
|  | 18 | + to = "/react/" | 
| 28 | 19 |  force = true | 
| 29 |  | - | 
| 30 |  | -# React to main domain | 
| 31 | 20 | [[redirects]] | 
| 32 | 21 |  from = "https://react-testing-library.com/*" | 
| 33 |  | - to = "https://testing-library.com/:splat" | 
| 34 |  | - status = 301 | 
|  | 22 | + to = "/:splat" | 
| 35 | 23 |  force = true | 
| 36 |  | - | 
| 37 |  | -# Netlify subdomain to main domain | 
| 38 | 24 | [[redirects]] | 
| 39 | 25 |  from = "https://testing-library.netlify.com/*" | 
| 40 |  | - to = "https://testing-library.com/:splat" | 
| 41 |  | - status = 301 | 
|  | 26 | + to = "/:splat" | 
| 42 | 27 |  force = true | 
| 43 | 28 | 
 | 
| 44 |  | -# Redirects due to reorganization | 
|  | 29 | +# Shortcut to Discord server invite | 
| 45 | 30 | [[redirects]] | 
| 46 |  | - from = "/docs/*" | 
| 47 |  | - to = "/docs/dom-testing-library/:splat" | 
| 48 |  | - status = 301 | 
| 49 |  | - force = false # do not redirect if route is not 404 | 
|  | 31 | + from = "/discord" | 
|  | 32 | + to = "https://discord.gg/c6JN9fM" | 
| 50 | 33 | 
 | 
| 51 | 34 | # Support page to help page | 
| 52 | 35 | [[redirects]] | 
| 53 | 36 |  from = "/support" | 
| 54 | 37 |  to = "/help" | 
| 55 |  | - status = 301 | 
| 56 |  | - force = true | 
| 57 | 38 | 
 | 
| 58 |  | -# DOM landing page to home page | 
|  | 39 | +# React Redux recipe to Redux's recipe | 
| 59 | 40 | [[redirects]] | 
| 60 |  | - from = "https://testing-library.com/dom/" | 
| 61 |  | - to = "https://testing-library.com/docs/dom-testing-library/intro" | 
| 62 |  | - status = 301 | 
| 63 |  | - force = true | 
|  | 41 | + from = "/docs/example-react-redux" | 
|  | 42 | + to = "https://redux.js.org/recipes/writing-tests#connected-components" | 
| 64 | 43 | 
 | 
| 65 |  | -# React landing page to home page | 
|  | 44 | +# Reorganization (do not redirect if route is not 404) | 
| 66 | 45 | [[redirects]] | 
| 67 |  | - from = "https://testing-library.com/react/" | 
| 68 |  | - to = "https://testing-library.com/docs/react-testing-library/intro" | 
| 69 |  | - status = 301 | 
| 70 |  | - force = true | 
|  | 46 | + from = "/docs/*" | 
|  | 47 | + to = "/docs/dom-testing-library/:splat" | 
| 71 | 48 | 
 | 
| 72 |  | -# React Native landing page to home page | 
|  | 49 | +# Landing pages | 
| 73 | 50 | [[redirects]] | 
| 74 |  | - from = "https://testing-library.com/react-native/" | 
| 75 |  | - to = "https://testing-library.com/docs/react-native-testing-library/intro" | 
| 76 |  | - status = 301 | 
| 77 |  | - force = true | 
| 78 |  | - | 
| 79 |  | -# Cypress landing page to home page | 
|  | 51 | + from = "/dom/" | 
|  | 52 | + to = "/docs/dom-testing-library/intro" | 
| 80 | 53 | [[redirects]] | 
| 81 |  | - from = "https://testing-library.com/cypress/" | 
| 82 |  | - to = "https://testing-library.com/docs/cypress-testing-library/intro" | 
| 83 |  | - status = 301 | 
| 84 |  | - force = true | 
| 85 |  | - | 
| 86 |  | -# Vue landing page to home page | 
|  | 54 | + from = "/react/" | 
|  | 55 | + to = "/docs/react-testing-library/intro" | 
| 87 | 56 | [[redirects]] | 
| 88 |  | - from = "https://testing-library.com/vue/" | 
| 89 |  | - to = "https://testing-library.com/docs/vue-testing-library/intro" | 
| 90 |  | - status = 301 | 
| 91 |  | - force = true | 
| 92 |  | - | 
| 93 |  | -# Angular landing page to home page | 
|  | 57 | + from = "/react-native/" | 
|  | 58 | + to = "/docs/react-native-testing-library/intro" | 
| 94 | 59 | [[redirects]] | 
| 95 |  | - from = "https://testing-library.com/angular/" | 
| 96 |  | - to = "https://testing-library.com/docs/angular-testing-library/intro" | 
| 97 |  | - status = 301 | 
| 98 |  | - force = true | 
| 99 |  | - | 
| 100 |  | -# Puppeteer landing page to home page | 
|  | 60 | + from = "/cypress/" | 
|  | 61 | + to = "/docs/cypress-testing-library/intro" | 
| 101 | 62 | [[redirects]] | 
| 102 |  | - from = "https://testing-library.com/pptr/" | 
| 103 |  | - to = "https://testing-library.com/docs/pptr-testing-library/intro" | 
| 104 |  | - status = 301 | 
| 105 |  | - force = true | 
| 106 |  | - | 
| 107 |  | -# Svelte landing page to home page | 
|  | 63 | + from = "/vue/" | 
|  | 64 | + to = "/docs/vue-testing-library/intro" | 
| 108 | 65 | [[redirects]] | 
| 109 |  | - from = "https://testing-library.com/svelte/" | 
| 110 |  | - to = "https://testing-library.com/docs/svelte-testing-library/intro" | 
| 111 |  | - status = 301 | 
| 112 |  | - force = true | 
| 113 |  | - | 
| 114 |  | -# Preact landing page to home page | 
|  | 66 | + from = "/angular/" | 
|  | 67 | + to = "/docs/angular-testing-library/intro" | 
| 115 | 68 | [[redirects]] | 
| 116 |  | - from = "https://testing-library.com/preact/" | 
| 117 |  | - to = "https://testing-library.com/docs/preact-testing-library/intro" | 
| 118 |  | - status = 301 | 
| 119 |  | - force = true | 
| 120 |  | - | 
| 121 |  | -# jest-dom landing page to home page | 
|  | 69 | + from = "/pptr/" | 
|  | 70 | + to = "/docs/pptr-testing-library/intro" | 
| 122 | 71 | [[redirects]] | 
| 123 |  | - from = "https://testing-library.com/jest-dom/" | 
| 124 |  | - to = "https://testing-library.com/docs/ecosystem-jest-dom" | 
| 125 |  | - status = 301 | 
| 126 |  | - force = true | 
| 127 |  | - | 
| 128 |  | -# Testcafe landing page to home page | 
|  | 72 | + from = "/svelte/" | 
|  | 73 | + to = "/docs/svelte-testing-library/intro" | 
| 129 | 74 | [[redirects]] | 
| 130 |  | - from = "https://testing-library.com/testcafe/" | 
| 131 |  | - to = "https://testing-library.com/docs/testcafe-testing-library/intro" | 
| 132 |  | - status = 301 | 
| 133 |  | - force = true | 
| 134 |  | - | 
| 135 |  | -# Nightwatch landing page to home page | 
|  | 75 | + from = "/preact/" | 
|  | 76 | + to = "/docs/preact-testing-library/intro" | 
| 136 | 77 | [[redirects]] | 
| 137 |  | - from = "https://testing-library.com/nightwatch/" | 
| 138 |  | - to = "https://testing-library.com/docs/nightwatch-testing-library/intro" | 
| 139 |  | - status = 301 | 
| 140 |  | - force = true | 
| 141 |  | - | 
| 142 |  | -# React Redux recipe to Redux's recipe | 
|  | 78 | + from = "/jest-dom/" | 
|  | 79 | + to = "/docs/ecosystem-jest-dom" | 
|  | 80 | +[[redirects]] | 
|  | 81 | + from = "/testcafe/" | 
|  | 82 | + to = "/docs/testcafe-testing-library/intro" | 
|  | 83 | +[[redirects]] | 
|  | 84 | + from = "/nightwatch/" | 
|  | 85 | + to = "/docs/nightwatch-testing-library/intro" | 
| 143 | 86 | [[redirects]] | 
| 144 | 87 |  from = "https://testing-library.com/docs/example-react-redux" | 
| 145 | 88 |  to = "https://redux.js.org/recipes/writing-tests#connected-components" | 
| 146 |  | - status = 301 | 
| 147 |  | - force = true | 
| 148 | 89 | 
 | 
| 149 |  | -# Redirect screen error messe to correct page | 
|  | 90 | +# Redirect screen error message to correct page | 
| 150 | 91 | [[redirects]] | 
| 151 | 92 |  from = "https://testing-library.com/s/screen-global-error" | 
| 152 | 93 |  to = "https://testing-library.com/docs/dom-testing-library/api-queries#screen" | 
| 153 |  | - status = 301 | 
| 154 |  | - force = true | 
0 commit comments