-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgridsome.server.js
More file actions
64 lines (58 loc) · 2.31 KB
/
gridsome.server.js
File metadata and controls
64 lines (58 loc) · 2.31 KB
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
// module.exports = function (api) {
// // // api.loadSource(({ addContentType }) => {
// // // // Use the Data Store API here: https://gridsome.org/docs/data-store-api
// // // })
// // @desc Use the Pages API here: https://gridsome.org/docs/pages-api
// api.createPages(async ({ graphql, createPage }) => {
// const { data: { allContentPages } } = await graphql(`
// {
// allContentPages {
// edges {
// node {
// id
// content
// dataType
// homepage
// lede
// template
// title
// slug
// form
// formSubmit
// formSuccess
// navigation {
// id
// navLabel
// }
// localNavigation {
// id
// navLabel
// }
// actionIcon
// }
// }
// }
// }
// `)
// allContentPages.edges.forEach(({ node }) => {
// let name = `${ node.id }`
// let path = node.homepage ? "/" : `/${ node.slug }`
// name = name == "error404" ? "404" : name
// path = node.slug == "error404" ? "/404" : path
// // let component = `./src/views/SiteView.vue`
// // node.template && (component = `./src/views/${ node.template }View.vue`)
// // node.dataType && node.template && (component = `./src/views/${ node.dataType }${ node.template }View.vue`)
// createPage({
// name,
// path,
// component: node.template
// ? `./src/views/${ node.template }View.vue`
// : `./src/views/SiteView.vue`,
// context: {
// ...node,
// }
// })
// })
// return
// })
// }