Css and other asset resources loading failed

Environment

  • I use academicpages
  • Ruby gem or remote theme version:
    ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
    gem 2.7.6
  • Jekyll version: 3.8.7
  • Git repository URL: https://github.com/Harrypotterrrr/Homepage
  • GitHub Pages hosted (if yes provide URL to site):
  • Operating system: Linux ubuntu6-1 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Expected behavior

Hi, I am using academicpages, a repository forked from this minimal-misktake which is very suitable to the academic propose. I am trying to debug and modify my homepage by using bundle exec jekyll serve --host 0.0.0.0 --port 8445 --incremental on the remote server. Note that this remote server is the one with inner IP and cannot be accessed from outside, so I use port forward technique to propagate the port to the public server IP by using ssh -NfR 8445:localhost:8445 root@106.13.xx.xx .

I manage to see all the text of my homepage, while I fail to load any CSS and asset images etc. As the below figure shows:
image

You can see the request is http://0.0.0.0:8445/assets/css/main.css . I change 0.0.0.0 to my public server IP 106.13.xx.xx , that is
http://106.13.xx.xx:8445/assets/css/main.css , I successfully get the main.css file as the following image shows, which means port forward success.
image

So I turn to the _config.yml to see if I could modify host or something else to direct assets request to 106.13.xx.xx instead of 0.0.0.0 but finally I failed.

Struggling for hours, I have to ask you for help for I am a newbie in front-end tech.
Hope I make my problem clear and easy to understand. I just wanna test my modification and debug on that remote server, which has an inner IP address and can not be accessed outside. I have no problem with deploying it to Github.
Thanks for your help in advance!

how are you trying to link to the css? as long as you do a relative url I would think it would work.

What do you have in the config file for url and baseurl? baseurl should probably not be set.

A lot of themes probably use the url and baseurl as a prefix to the css, that is probably not going to work for your setup or at least may cause trouble.

Hi, thanks for your reply. I have solved this problem by using local port forwarding together with remote port forwarding tech. It is my fault to meet this kind of problem.