Closed galeksic90 closed 10 years ago
I've been thinking about adding this functionality into the plugin itself. Perhaps something like a source file that has the Prismic YAML containing
This one file could then generate the multiple files based on the collection returned by the query.
Exactly! I had been thinking about the same solution, that would be great.
Do you plan to make it this days?
I need to publish 1 site in few days so i don't know what i should do, make files manually or wait for feature. :)
Thanks
Currently in progress. We need this too. Hopefully something in a day or two if all goes according to plan.
Available in 0.4.0. Give it a try and provide any feedback. Thanks!
Hello,
Great job!
I have tried and its working wonderful but when i want to use link resolver nothing happen.
.use(prismic({
"url": "xxxxxxxxxxxxxxxxx",
"linkResolver": function(doc) {
return '/news/' + doc.slug;
}
}
))
Also i have tried your code from test folder.
"linkResolver": function (ctx, doc) {
if (doc.isBroken) return false;
return '/' + doc.type + '/' + doc.slug + (ctx.maybeRef ? '?ref=' + ctx.maybeRef : '');
}
And still nothing happen..
It builds always by default linkresolver funcion.
Thanks. Created Issue #7 to track this.
Hi,
I have one more question, how metalsmith can loop the prismic for example blog posts and create .md file for each?
Here is example how to loop metalsmith collection, but how i can loop prismic query? http://www.gelatindesign.co.uk/blog/post/creating-a-blog-with-metalsmith/