zjedi / hugo-scroll

Clean, responsive, single-page Hugo website theme.
https://themes.gohugo.io/hugo-scroll/
MIT License
279 stars 199 forks source link

Allow baseURL with subdirectory and multilang support #169

Closed ilja-radusch closed 8 months ago

ilja-radusch commented 8 months ago

Hugo scroll does not allow for a baseURL with subdirectory.

I suggest to add relURL in layouts/index.html for the cover image:

-<header id="site-head" class="withCenteredImage" {{ with .Params.header_image }}style="background-image: url({{ . }})"{{ end }}>
+<header id="site-head" class="withCenteredImage" {{ with .Params.header_image }}style="background-image: url({{ . | relURL }})"{{ end }}>

I suggest to add relLangURL in layouts/index.html for the cover image:

-<a id="blog-logo" href="{{ "/" }}"><i class="fa fa-chevron-left" aria-hidden="true"></i> {{ .site.title }}</a>
+<a id="blog-logo" href="{{ "" | relLangURL }}"><i class="fa fa-chevron-left" aria-hidden="true"></i> {{ .site.title }}</a>
zjedi commented 8 months ago

Thanks for suggestions @ilja-radusch , would you care to open a PR?

zjedi commented 8 months ago

seems to be part of #119