projects one by one

This commit is contained in:
hamdy
2020-11-10 11:09:46 +02:00
parent ea3b478ff0
commit 32b7f65358
81 changed files with 18 additions and 1651 deletions

View File

@@ -29,8 +29,10 @@ module.exports = function (api) {
}
if (options.internal.typeName === 'Project') {
options.countries = (typeof options.tags === 'string') ? options.tags.split(',').map(string => string.trim()) : options.tags;
options.cities = (typeof options.tags === 'string') ? options.tags.split(',').map(string => string.trim()) : options.tags;
options.tags = (typeof options.tags === 'string') ? options.tags.split(',').map(string => string.trim()) : options.tags;
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;
options.members = (typeof options.cities === 'string') ? options.members.split(',').map(string => string.trim()) : options.members;
options.author = (typeof options.author === 'string') ? options.author.split(',').map(string => string.trim()) : options.author;
return {
...options
@@ -77,45 +79,4 @@ module.exports = function (api) {
});
});
// api.createPages(async ({
// graphql,
// createPage
// }) => {
// // Use the Pages API here: https://gridsome.org/docs/pages-api
// const {
// data
// } = await graphql(`{
// allProject {
// edges {
// previous {
// id
// }
// next {
// id
// }
// node {
// id
// path
// }
// }
// }
// }
// `);
// data.allProject.edges.forEach(function (element) {
// console.log(element)
// createPage({
// path: element.node.path,
// component: './src/templates/Project.vue',
// context: {
// previousElement: (element.previous) ? element.previous.id : '##empty##',
// nextElement: (element.next) ? element.next.id : '##empty##',
// id: element.node.id
// }
// });
// });
// });
}