LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Jekyll generated site urls do not work while served (https://www.linuxquestions.org/questions/general-10/jekyll-generated-site-urls-do-not-work-while-served-4175612443/)

pusrob 08-22-2017 01:15 PM

Jekyll generated site urls do not work while served
 
Hi.

I don't know where else to post it, so I'm just gonna put this here. My problem is, that when I create a website using Jekyll, everything works fine while serving it locally with 'jekyll serve'. But as soon as I upload the site to a host, only the index.html seems to work, but the links do not. No special subdomains or any other url related setting is used, everything seems to be using default settings.

Some additional info: when I check the served site in FF's web console , I get this:

ReferenceError: jQuery is not defined js/vendor/jquery.jpanelmenu.min.js:7:2
ReferenceError: $ is not defined js/main.js:103:1

Also, loading of two .js files fails. When I browse the site to manually access these two .js files, I get a 403 page saying that access to these specific .js files is forbidden. All other js files can be accessed. Interestingly, none of this happens on the locally served site. I also checked for possible file naming problems, but that does not seem to be the case.

Also, the site uses "pretty"-ish links to different content, meaning there is no trailing .html in the links.

Could someone please give me a couple of suggestions what to check?

Thanks very much.

pusrob 08-22-2017 01:55 PM

A solution for the link problems: just use a config in your _config.yml file that gives a proper .html ending to every link. My _config.yml now contains this: permalink: /:categories/:title.html
Now all posts load as they should.
Now I need to fix the .js errors only...

pusrob 08-26-2017 05:20 AM

A solution for the .js files not loading:
Set all file and directory permissions to 644 and 755, respectively. That will do the trick.


All times are GMT -5. The time now is 07:35 AM.