-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
29 lines (26 loc) · 784 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const { subDays, format } = require('date-fns');
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx'
});
module.exports = withNextra({
/*async redirects() {
// Get today's date
const today = new Date();
// Subtract 13 days from today's date
const thirteenDaysAgo = subDays(today, 13);
// Format the date using date-fns
const destination = format(thirteenDaysAgo, "MMMM/do").toLowerCase();
return [
{
source: '/',
destination: `/${destination}`,
permanent: false,
},
];
}, */ /* Uncomment this redirect if you would like to display today's Prologue entry on the default route */
i18n: {
locales: ['en', 'sr'],
defaultLocale: 'en'
}
});