victorvoid / space-jekyll-template

A simple spacemacs template on jekyll. https://victorvoid.github.io/space-jekyll-template/
Other
400 stars 323 forks source link

Links not working #38

Closed chuleh closed 5 years ago

chuleh commented 5 years ago

Hi Victor, thank you for your template. I'm having an issue when I try to make it work on production. Testing, it works fine, I run jekyll serve and the website runs properly in local.

However, when I try to make it work in production, I run into a lot of issues. I'm running Nginx, the rootdir is /mnt/efs/blog. And the index is index _site/index.html otherwise, if I don't change it, it will read the first index.html file that finds and the content is:

---
layout: default
---

So far this works, however when I click on a link, it gives a 404 error. I checked my log and it's looking for the posts in the root. Take a look at the log, please:

2018/12/20 15:05:44 [error] 30796#30796: *4677 "/mnt/efs/blog/sharding/_site/index.html" is not found (2: No such file or directory), client: XXXXX, server: lcasaretto.com, request: "GET /sharding/ HTTP/1.1", host: "lcasaretto.com", referrer: "http://lcasaretto.com/"

Can you please provide help? Thanks.

Vonfry commented 5 years ago

I suggest you to read jekyll doc about Automated Deployment.

Only files under _sites is needed for nginx to demonstrate the website.

Or you can config nginx that the website root dir is _sites