-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelder.config.js
71 lines (70 loc) · 2.18 KB
/
elder.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
const sharp = require('sharp');
require('dotenv').config();
module.exports = {
origin: 'https://apop.tech',
lang: 'en',
srcDir: 'src',
distDir: 'public',
rootDir: process.cwd(),
build: {},
prefix: '',
server: {},
debug: {
stacks: false,
hooks: false,
performance: false,
build: false,
automagic: false,
},
hooks: {
// disable: ['elderWriteHtmlFileToPublic'], // this is used to disable internal hooks. Uncommenting this would disabled writing your files on build.
},
plugins: {
'@elderjs/plugin-markdown': {
routes: [],
useSyntaxHighlighting: {
theme: 'material-darker' // available themes: https://github.com/shikijs/shiki/blob/master/packages/themes/README.md#literal-values - try material-theme-darker
// theme is the only option available - for now.
},
useElderJsPluginImages: true
},
// '@elderjs/plugin-browser-reload': {
// // this reloads your browser when nodemon restarts your server.
// port: 8080,
// },
'@elderjs/plugin-images': {
folders: [
{
src: '/images/*', // glob of where your original images are. Relative to rootDir/process.cwd() defined in your elder.config.js. Careful with **.
output: '/images/', // where files should be put within the distDir defined in your elder.config.js.
},
{
src: '/uploads/*', // glob of where your original images are. Relative to rootDir/process.cwd() defined in your elder.config.js. Careful with **.
output: '/uploads/', // where files should be put within the distDir defined in your elder.config.js.
},
],
placeholder: {
resize: {
width: 20,
fit: sharp.fit.cover,
},
jpeg: {
quality: 50,
progressive: true,
optimizeScans: true,
chromaSubsampling: '4:2:0',
trellisQuantisation: true,
quantisationTable: 2,
},
},
},
'elderjs-plugin-google-fonts': {
fonts: {
'Poppins': ['400', '700'],
'Alegreya': ['600'],
},
swap: true,
}
},
shortcodes: { closePattern: '}}', openPattern: '{{' },
};