-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelder.config.js
57 lines (57 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
require('dotenv').config();
module.exports = {
origin: process.env.NETLIFY ? process.env.URL : 'http://localhost:3000', // TODO: update this. The URL of your site's root, without a trailing slash
sitename: 'Chris Phan',
TRACKING_ID: process.env.TRACKING_ID,
lang: 'en',
srcDir: 'src',
distDir: 'public',
rootDir: process.cwd(),
build: {},
prefix: '', // If you want your site to be built within a sub folder within your `distDir` you can use this.
server: {},
props: {
hydration: 'hybrid',
compress: false,
},
debug: {
stacks: false, // output details of the stack consolidation process.
hooks: false, // outputs the details of each hook as they are run.
performance: false, // outputs a full performance report of how long it took to run each page.
build: false, // gives additional details about the build process.
automagic: false,
},
hooks: {
// disable: ['elderWriteHtmlFileToPublic'], // this is used to disable internal hooks. Uncomment this hook to disabled writing your files during build.
},
plugins: {
'@elderjs/plugin-sitemap': {
origin: process.env.URL, // the https://yourdomain.com
exclude: ['404/', 'resume/'], // an array of permalinks or permalink prefixes. So you can do ['500'] and it will match /500**
routeDetails: {
blog: {
priority: 0.8,
changefreq: 'daily',
},
}, // set custom priority and change freq if not it falls back to default
lastUpdate: {
blog: async () => {
return new Date(Date.now());
},
}, // configurable last update for each route type.
},
'@elderjs/plugin-markdown': {
routes: ['blog', 'project'],
},
'@elderjs/plugin-browser-reload': {
// this reloads your browser when nodemon restarts your server.
port: 8080,
reload: true, // if you are having issues with reloading not working, change to true.
},
'@elderjs/plugin-seo-check': {
display: ['errors', 'warnings'], // If the errors are too verbose remove 'warnings'
writeLocation: './report.json', // if you want to write a report of errors
},
},
shortcodes: { closePattern: '}}', openPattern: '{{' },
};