Skip to content

Commit 305f17f

Browse files
committed
fix: gatsby-plugin-react-i18next config
1 parent 02237bf commit 305f17f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gatsby-config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ module.exports = {
6565
},
6666
nsSeparator: false,
6767
},
68+
/**
69+
* `getLanguageFromPath` being true means you manually add the /:lang/ prefix, and the i18n plugin will not automatically create the corresponding page.
70+
* If it is false, the opposite is true, and the default is false
71+
*/
6872
pages: [
6973
{
7074
matchPath: "/:lang?/404/",
@@ -75,7 +79,7 @@ module.exports = {
7579
getLanguageFromPath: false,
7680
},
7781
{
78-
matchPath: `/:lang?/(${Object.keys(docs.docs).join("|")})/(.*)/`,
82+
matchPath: `/:lang?/(${Object.keys(docs.docs).join("|")})/(.*)`,
7983
getLanguageFromPath: true,
8084
},
8185
{

0 commit comments

Comments
 (0)