generated from devspacemx/template-proyectos
-
Notifications
You must be signed in to change notification settings - Fork 20
/
gridsome.config.js
118 lines (117 loc) · 2.6 KB
/
gridsome.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
const collections = [
{
query: `{
allCommunity {
edges {
node {
id
title
path
image (width: 50, quality: 40)
location {
title
}
tags {
title
path
}
}
}
}
}`,
transformer: ({ data }) => data.allCommunity.edges.map(({ node }) => node),
indexName: process.env.ALGOLIA_INDEX_NAME || "communities", // Algolia index name
itemFormatter: (item) => {
return {
objectID: item.id,
title: item.title,
path: item.path,
location: item.location.title,
tags: [...item.tags],
image: item.image.src,
};
},
},
];
module.exports = {
siteName: "Atlas de comunidades",
siteDescription:
"Conoce las comunidades tecnológicas que te rodean y súmate a ellas, ven y conoce la plataforma 👋",
siteUrl: "https://comunidades.lat",
// pathPrefix: "/atlas",
titleTemplate: "%s",
chainWebpack(config) {
config.mode("development");
},
plugins: [
{
use: "@gridsome/source-filesystem",
options: {
baseDir: "./comunidades",
path: "*.md",
typeName: "Community",
resolveAbsolutePaths: true,
remark: {
externalLinksTarget: "_blank",
externalLinksRel: ["nofollow", "noopener", "noreferrer"],
},
refs: {
tags: {
typeName: "Tag",
create: true,
},
location: {
typeName: "Location",
create: true,
},
},
},
},
{
use: "@gridsome/plugin-sitemap",
options: {
cacheTime: 600000,
},
},
{
use: "@gridsome/plugin-google-analytics",
options: {
id: "UA-201768696-1",
},
},
{
use: `gridsome-plugin-algolia`,
options: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_ADMIN_KEY,
collections,
chunkSize: 10000, // default: 1000
enablePartialUpdates: false, // default: false
},
},
{
use: "gridsome-plugin-seo",
},
],
templates: {
Tag: "/tag/:id",
Location: "/ubicacion/:id",
},
transformers: {
remark: {
autolinkClassName: "icon icon-link heading-anchor",
externalLinksTarget: "_blank",
externalLinksRel: ["nofollow", "noopener", "noreferrer"],
anchorClassName: "icon icon-link",
},
},
css: {
loaderOptions: {
scss: {},
},
},
devServer: {
host: "0.0.0.0",
port: 8080,
},
};