statamic / ssg

The official Statamic Static Site Generator
230 stars 23 forks source link

Every page but the home generates HTML #26

Closed austriker27 closed 3 years ago

austriker27 commented 3 years ago

For some reason my homepage is the only page that doesn't have HTML get generated.

My repo is public here on a branch for netlify: https://github.com/austriker27/davidalindahl__3.0/tree/netlify

With my SSG config here: https://github.com/austriker27/davidalindahl__3.0/blob/netlify/config/statamic/ssg.php I looked at the statamic official starters and didnt see any key differences in my versus yours ssg.php files.

Here's my ENV has the APP_URL and PHP_VER

I tried adding APP_NAME to see if that helped as well.

This is deployed here: https://elated-hugle-e6394a.netlify.app/

jasonvarga commented 3 years ago

Do you get any errors when running the command?

austriker27 commented 3 years ago

@jasonvarga thanks so much for looking!

Nope- no errors. The one odd thing is it looks like it generates the / route many, many times.

Here's the full build log: https://gist.github.com/austriker27/7e41e544893e810750076a35b6ea9e30

Also I didn't mention this initially but I'm using PHP 7.4 via the ENVs because of this error: image

michaellindahl commented 3 years ago

This is due to #27, the collections that do not have an associated route are overriding the home page. You can work around this bug by making sure all collections have routes, simply add the following:

route: /do-not-show/{id}

And then either remove this folder when deploying or just ignore it as it's unlikely someone will navigate to:

do-not-show/1f1c336e-3fe2-4709-8bbf-263cdead55e5/index.html