-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscully.metex.config.ts
99 lines (95 loc) · 2.05 KB
/
scully.metex.config.ts
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
87
88
89
90
91
92
93
94
95
96
97
98
99
import { ScullyConfig, setPluginConfig } from '@scullyio/scully';
import { getHttp404Plugin } from '@gammastream/scully-plugin-http404';
import { getFlashPreventionPlugin } from '@scullyio/scully-plugin-flash-prevention';
import { getSitemapPlugin } from '@gammastream/scully-plugin-sitemap';
require('dotenv').config();
const Http404Plugin = getHttp404Plugin();
const FlashPreventionPlugin = getFlashPreventionPlugin({
appRootSelector: 'metex-root'
});
const SitemapPlugin = getSitemapPlugin();
setPluginConfig(SitemapPlugin, {
urlPrefix: 'https://www.metex.app',
sitemapFilename: 'sitemap.xml',
changeFreq: 'monthly',
priority: [
'1.0',
'0.9',
'0.8',
'0.7',
'0.6',
'0.5',
'0.4',
'0.3',
'0.2',
'0.1',
'0.0',
],
ignoredRoutes: ['/404'],
routes: {
'/blog/:slug': {
changeFreq: 'weekly',
priority: '0.9',
sitemapFilename: 'sitemap-blog.xml',
},
'/lines/:slug': {
changeFreq: 'monthly',
priority: '0.9',
sitemapFilename: 'sitemap-lines.xml',
},
'/lines/:linesSlug/:stationSlug': {
changeFreq: 'monthly',
priority: '0.8',
sitemapFilename: 'sitemap-lines-stations.xml',
},
'/places/:slug': {
changeFreq: 'monthly',
priority: '0.9',
sitemapFilename: 'sitemap-places.xml',
}
}
});
export const config: ScullyConfig = {
projectRoot: './src',
projectName: 'metex',
outDir: './dist/static',
defaultPostRenderers: [
Http404Plugin,
FlashPreventionPlugin,
'seoHrefOptimise'
],
routes: {
'/blog/:slug': {
type: 'json',
slug: {
url: `${process.env.API_URL}/blogs`,
property: 'slug'
}
},
'/lines/:slug': {
type: 'json',
slug: {
url: `${process.env.API_URL}/lines`,
property: 'slug'
}
},
'/lines/:lineSlug/:stationSlug': {
type: 'json',
lineSlug: {
url: `${process.env.API_URL}/lines`,
property: 'slug'
},
stationSlug: {
url: `${process.env.API_URL}/stations?line.slug=` + '${lineSlug}',
property: 'slug'
},
},
'/places/:slug': {
type: 'json',
slug: {
url: `${process.env.API_URL}/places`,
property: 'slug'
}
}
}
};