[SOLVED!] Using a theme in production

Hi there !

First, it is my first time with Hugo and I was really enjoying it until I’ve tried to put my site into production.

I have written a doc for Google Classroom using the hugo-material-docs theme. Everything works perfectly locally. I mean, I use

hugo server

and I get the site working with the good theme, the links work, etc. I would like to upload this website to my githubpages.

I have followed this tutorial
So I have a folder with my source code in it named classroomdoc. Then I have two repos on github : one called google_classroom_doc where my source is and one called sylcha.github.io where all of the content of the public directory is pushed.

I have generate the website with

hugo -t hugo-material-docs

You can have a look at the result at sylcha.github.io : you can see that everything is working fine except for the theme that is not rendered. Files from the theme are not copied to the folders they should appear : I cannot figure out why…

Does anybody have any idea ?

Thanks for your help,
Sylvain

PS: Here is my config

$ uname -a
Linux black 4.6.2-1-ARCH #1 SMP PREEMPT Wed Jun 8 08:40:59 CEST 2016 x86_64 GNU/Linux
$ hugo version
Hugo Static Site Generator v0.16 BuildDate: 2016-06-12T12:55:14+02:00

Hello @sylcha,

the issue is that you are linking ressources both with http and https. Browsers ignore ressources that are requested over an unsecure way (http).

Visit your website, press F12 to open the developer tools in the browser, switch to the console and you will see what I mean.

Use https for the base url in your config file. This way you are linking every ressource secured over https.

Thanks a lot ! I would never find that by myself as I am really new in this field. I did not see this crucial piece of information anywhere, but it may be a classic one… if not, it should be mentioned! Again, I am really a freshman so I did not know… I own you one !

Now I can feel all the power of Hugo :slightly_smiling:

This post can be mark as SOLVED!

1 Like

You are not the first user that faced this issue. It’s a rather common mistake and we should definetely add a note to the documentation.

Just add a small indicator to the title of this post.

One simple thing when debugging a website is to use the developer console in the browser. Then you can spot errors and links that don’t work immediately. You can even develop in the browser…