phenomic icon indicating copy to clipboard operation
phenomic copied to clipboard

Avoid `.json` files for static output

Open andyjansson opened this issue 7 years ago • 5 comments

I'm getting the following error when navigating from the startpage to '/guides/' (it works when accessing it directly, as the static build suceeded):

An item is in error state path=content%2Fguides&id=

I suspect this might be because Github Pages can't serve up the .json file, as the file is clearly there in the repo.

Maybe index routes should be stored as index.json rather than .json?

andyjansson avatar Jul 27 '18 00:07 andyjansson

Can you try to put a .nojekyll (empty) file at the root of your public/ folder (or directly at the root of gh-pages branch just to try) if that is making the situation better?

MoOx avatar Jul 27 '18 13:07 MoOx

That did nothing, unfortunately.

andyjansson avatar Jul 27 '18 13:07 andyjansson

I already got similar issues in the past and found this https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/ that helped me. I will try to have a look in a few days. Contribution welcome if you have the time. So not hesitate to ask for help if you struggle with a contribution, I will do my best even if I don’t have a computer atm.

MoOx avatar Jul 27 '18 13:07 MoOx

I think creating a _config.yml with the following content fixed it:

include:
- *.json

andyjansson avatar Jul 27 '18 14:07 andyjansson

I will try to make this invisible to end users, probably by avoiding this .../.json files.

MoOx avatar Jul 27 '18 20:07 MoOx