forked from theirc/signpost-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
86 lines (84 loc) · 2.63 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
const withLess = require('next-with-less');
const pack = require('./package.json');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: false,
// Keep in sync with locales configured in /lib/locale.ts.
i18n: {
locales: ['default', 'en-us'],
defaultLocale: 'default',
localeDetection: false,
},
async redirects() {
return [
// Redirect legacy Zendesk paths with slugs. For example, redirect
// /articles/123456-Article-Title to /articles/123456.
{
source: '/:resource/:id(\\d{1,}):rest(-.*)',
destination: '/:resource/:id',
permanent: true,
},
];
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'signpost-nigeria.zendesk.com',
},
{
protocol: 'https',
hostname: 'directus-irc.azurewebsites.net',
},
],
},
publicRuntimeConfig: {
version: pack.dependencies['@ircsignpost/signpost-base'],
},
};
module.exports = withLess({
...nextConfig,
lessLoaderOptions: {
lessOptions: {
// See full list of Ant styles here:
// https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less
modifyVars: {
'primary-color': '#242629',
'secondary-color': '#242629',
'accent-color': '#F3AE3D',
'info-color': '@accent-color',
'alert-info-bg-color': '@accent-color',
// Override Ant typography.
'heading-1-size': '3.75rem',
'heading-2-size': '1.875rem',
'typography-title-font-weight': '400',
// Set height and border radius for 'default' type elements, e.g. buttons, inputs, etc.
'height-base': '48px',
'height-sm': '32px',
'border-radius-base': '10px',
'border-color-base': '#141414',
// Set header styles.
'layout-header-height': 'auto',
'layout-header-min-height': '4.375rem',
'layout-header-padding': '0',
'header-background-color': '@primary-color',
'header-text-color': 'white',
'header-banner-background-color':
'linear-gradient(@secondary-color, @primary-color)',
'header-banner-text-color': 'white',
// Set search styles.
'search-icon-color': 'black',
'search-icon-bg-color': '@accent-color',
// Set card styles.
'card-padding-base': '16px',
'home-page-card-icon-color': '#141414',
// Set cookie banner styles.
'cookie-banner-text': '#000',
'cookie-banner-back': '@accent-color',
'link-color': '#0000ee',
'link-hover-color': '#0000eea8',
},
},
},
});