statamic / ssg

The official Statamic Static Site Generator
234 stars 24 forks source link

Generator outputting different results than dev server #31

Closed ozziexsh closed 4 years ago

ozziexsh commented 4 years ago

Hi! First of all, my experience with Statamic 3 so far has been nothing but enjoyable. Thanks a ton for making such a flexible system 😄

My issue:

When developing locally and previewing using php artisan serve my website behaves as normal.

When I build using ssg the pages output is not the right template.

Sourcecode: https://github.com/nehero/ozzie.sh Live: https://ozzie.sh

The home page on local is using the right template as seen here:

Screen Shot 2020-08-30 at 12 31 20 PM

And at the source level you can see that it is overriding the template via a field:

https://github.com/nehero/ozzie.sh/blob/master/content/collections/pages/home.md

But after generating it is displaying this:

Screen Shot 2020-08-30 at 12 31 26 PM

Which is the content from a different collection called "projects"

https://github.com/nehero/ozzie.sh/blob/master/content/collections/projects/unix-time-converter.md

Let me know if there is any more info I can provide!

jasonvarga commented 4 years ago

Your projects collection doesn't have a route, so it's being generated at /.

This is a duplicate of #27

ozziexsh commented 4 years ago

That was it, thanks!