biaslab / hugo-academic-group

An academic group website theme for Hugo.
MIT License
52 stars 18 forks source link

server works, but static build problems #47

Closed jerlich closed 5 years ago

jerlich commented 5 years ago

When I run hugo server -w everything works as expected. But when I run hugo -d /var/html/public/hugo -b http://my-url.org/hugo -w things do not work as expected.

In particular:

  1. The background-image: url("/img/header.jpg"); in hugo-academic-group.css doesn't properly add the {{ .Site.BaseURL }}. This can be fixed by commenting out that line of the css file and changing the first line of slogan.html to <header class="space-below " style='background-image: url("{{ .Site.BaseURL }}/img/header.jpg")'>. I haven't tested if this breaks hugo server -w versions of the theme.

  2. During the build process header.jpg from the themes folder overwrites header.jpg in content/img/ folder, so that the only way to change the header is to edit the theme. I haven't yet figured out how to fix that one.

ivan-bocharov commented 5 years ago

Hi @jerlich, thanks for opening this issue.

I have pushed a fix for issue number one to the theme repository. Could you possibly check that the template renders properly now? In order for Hugo to render a correct header picture file, it should be placed in /static/img folder and not in /content/img folder.

jerlich commented 5 years ago

Thanks for the tip on /static/img!