diff --git a/gridsome.config.js b/gridsome.config.js index 5d8c0fb1e..f34eb997f 100644 --- a/gridsome.config.js +++ b/gridsome.config.js @@ -69,7 +69,7 @@ module.exports = { typeName: 'Membership', create: true }, - + project_ids: 'Project' }, } }, diff --git a/gridsome.server.js b/gridsome.server.js index 0cd7a3c9b..554ea1a56 100644 --- a/gridsome.server.js +++ b/gridsome.server.js @@ -41,6 +41,7 @@ module.exports = function (api) { if (options.internal.typeName === 'Person') { + options.project_ids = (typeof options.project_ids === 'string') ? options.project_ids.split(',').map(string => string.trim()) : options.project_ids; options.memberships = (typeof options.memberships === 'string') ? options.memberships.split(',').map(string => string.trim()) : options.memberships; options.countries = (typeof options.countries === 'string') ? options.countries.split(',').map(string => string.trim()) : options.countries; options.cities = (typeof options.cities === 'string') ? options.cities.split(',').map(string => string.trim()) : options.cities; diff --git a/src/pages/People.vue b/src/pages/People.vue index 157fdbff2..dee6c594a 100644 --- a/src/pages/People.vue +++ b/src/pages/People.vue @@ -28,7 +28,6 @@ query { bio linkedin websites - project_ids countries cities image(width:800) diff --git a/src/pages/Search.vue b/src/pages/Search.vue index 28bbb5259..2a51da2a7 100644 --- a/src/pages/Search.vue +++ b/src/pages/Search.vue @@ -70,7 +70,6 @@ query { bio linkedin websites - project_ids countries cities image(width:800) diff --git a/src/templates/Author.vue b/src/templates/Author.vue deleted file mode 100644 index c33d4de14..000000000 --- a/src/templates/Author.vue +++ /dev/null @@ -1,139 +0,0 @@ - - - - query($id: ID!, $page:Int) { - author(id: $id) { - name - path - bio - image(width:150, height:150) - facebook - twitter - linkedin - content - belongsTo(perPage: 5, page: $page) @paginate { - totalCount - pageInfo { - totalPages - currentPage - } - edges { - node { - ... on Blog { - title - excerpt - image(width:800) - path - timeToRead - humanTime : created(format:"DD MMM YYYY") - datetime : created - author { - id - name - image(width:64, height:64, fit:inside) - path - } - } - } - } - } - } - } - - - \ No newline at end of file diff --git a/src/templates/Membership.vue b/src/templates/Membership.vue index a7a0361f4..7973fe3b7 100644 --- a/src/templates/Membership.vue +++ b/src/templates/Membership.vue @@ -61,7 +61,6 @@ excerpt linkedin websites - project_ids countries cities private diff --git a/src/templates/Person.vue b/src/templates/Person.vue index 3c96ca854..29483f245 100644 --- a/src/templates/Person.vue +++ b/src/templates/Person.vue @@ -25,27 +25,32 @@ {{ $page.person.bio }}

- {{ $page.person.belongsTo.totalCount }} Projects -  ·  - +
+
+
+
+
+
    +
  • + + + +
  • +
+
+ +
+
+
@@ -70,21 +75,13 @@ /> - + - query($id: ID!, $page:Int) { + query($id: ID!) { person(id: $id) { path content @@ -95,16 +92,21 @@ title path } + project_ids{ + id + title + path + logo + } bio excerpt linkedin websites - project_ids countries cities private image(width:150, height:150) - belongsTo(perPage: 5, page: $page) @paginate { + belongsTo { totalCount pageInfo { totalPages @@ -113,6 +115,7 @@ edges { node { ... on Blog { + id title excerpt image(width:800) @@ -128,9 +131,11 @@ } }, ... on Project { + id title excerpt image(width:800) + logo path humanTime : startdate(format:"DD MMM YYYY") datetime : created diff --git a/src/templates/Project.vue b/src/templates/Project.vue index 7d1ba7809..2822d2b9b 100644 --- a/src/templates/Project.vue +++ b/src/templates/Project.vue @@ -114,21 +114,13 @@ - + - query($id: ID!, $page:Int) { + query($id: ID!) { project(id: $id) { id title @@ -166,8 +158,8 @@ } rank excerpt - content - belongsTo(perPage: 5, page: $page) @paginate { + + belongsTo { totalCount pageInfo { totalPages @@ -180,6 +172,13 @@ name image(width:64, height:64, fit:inside) path + project_ids{ + id + title + path + logo + image + } } } }