feat: add million to docs (#169)
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
const million = require('million/compiler');
|
||||||
|
|
||||||
const env = process.env.NODE_ENV;
|
const env = process.env.NODE_ENV;
|
||||||
|
|
||||||
const withNextra = require('nextra')({
|
const withNextra = require('nextra')({
|
||||||
@@ -5,7 +7,7 @@ const withNextra = require('nextra')({
|
|||||||
themeConfig: './theme.config.tsx'
|
themeConfig: './theme.config.tsx'
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {
|
const nextConfig = {
|
||||||
basePath: env === 'production' ? '/docs' : undefined,
|
basePath: env === 'production' ? '/docs' : undefined,
|
||||||
env: {
|
env: {
|
||||||
imagePath: env === 'production' ? '/docs' : ''
|
imagePath: env === 'production' ? '/docs' : ''
|
||||||
@@ -15,3 +17,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
...withNextra()
|
...withNextra()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const millionConfig = {
|
||||||
|
auto: true
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = million.next(nextConfig, millionConfig);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
|
"homepage": "https://github.com/shuding/nextra-docs-template#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"million": "^3.0.3",
|
||||||
"next": "^13.0.6",
|
"next": "^13.0.6",
|
||||||
"nextra": "latest",
|
"nextra": "latest",
|
||||||
"nextra-theme-docs": "latest",
|
"nextra-theme-docs": "latest",
|
||||||
|
|||||||
Reference in New Issue
Block a user