appernetic / hugo-nederburg-theme

Nederburg is a fast and secure hugo theme and is a port of the Tracks WP theme
Other
107 stars 89 forks source link

home bottom on header pointing to wrong address #4

Closed cbenitez81 closed 6 years ago

cbenitez81 commented 6 years ago

When creating a website in a folder different than the root, for example www.somepage.com/blog/, the home bottom on the header always poinst to www.somepage.com, instead of the main page of blog. I notice this in the header of the partial

<div id='site-title' class='site-title'>
    {{ with .Site.Title }}
    <a href="/"> {{ . }} </a>
    {{ end }}</div>
 </div>

It seems that the third line above always poinst to the root site. I think that a better behavior would change that line to <a href="./"> {{ . }} </a> , meaning changing "/" to "./"

Similar trick can be applied in line 20 and 26 of the header.html.

I used hugo version 0.37 on windows 7.

thanks!

appernetic commented 6 years ago

Or maybe use absURL instead?

Den fre 30 mars 2018 14:52cbenitez81 notifications@github.com skrev:

When creating a website in a folder different than the root, for example www.somepage.com/blog/, the home bottom on the header always poinst to www.somepage.com, instead of the main page of blog. I notice this in the header of the partial

{{ with .Site.Title }} {{ . }} {{ end }}

It seems that the third line above always poinst to the root site. I think that a better behavior would change that line to {{ . }} , meaning changing "/" to "./"

Similar trick can be applied in line 20 and 26 of the header.html.

I used hugo version 0.37 on windows 7.

thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/appernetic/hugo-nederburg-theme/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AOdUYygA68LvqDsmd1i9bCqDkb-r8jVnks5tjiqWgaJpZM4TBqS8 .

cbenitez81 commented 6 years ago

That is a possibility or the other one is to attach the baseurl that we use in config.toml

appernetic commented 6 years ago

I have added .SiteBaseURL to line: https://github.com/appernetic/hugo-nederburg-theme/blob/920700a5a728db8d6ab0b368c775404b64e4ddeb/layouts/partials/header.html#L4