-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.sitemaprc.js
55 lines (51 loc) · 1.16 KB
/
.sitemaprc.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
const path = require('path');
function toSnakeCase(str) {
return str.replace(/(?:^|\.?)([A-Z])/g, function (x,y){return "-" + y.toLowerCase()}).replace(/^-/, "");
}
function mapComponent(component, pathname) {
if (typeof pathname === 'undefined') {
pathname = toSnakeCase(component);
}
return {
url: pathname,
lastmodrealtime: true,
lastmodfile: path.join(__dirname, `src/components/${component}.vue`)
}
}
module.exports = {
hostname: 'http://hucrsapporo.php.xdomain.jp',
urls: [
{
changefreq: 'monthly',
priority: 1.0,
...mapComponent('Home', '/')
},
{
changefreq: 'monthly',
priority: 0.8,
...mapComponent('Activity')
},
{
changefreq: 'yearly',
priority: 0.8,
...mapComponent('Schedule')
},
{
changefreq: 'yearly',
priority: 0.8,
...mapComponent('Contact')
},
{
changefreq: 'yearly',
priority: 0.3,
...mapComponent('PrivacyPolicy')
},
{
changefreq: 'yearly',
priority: 0.3,
url: '/secure.php',
lastmodrealtime: true,
lastmodfile: path.join(__dirname, 'static/secure.php'),
},
]
}