Fix the 404 nav bar to use the site configurable logo #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#103
I'm new to hugo, but from reading https://gohugo.io/variables/site/ it seems the
.
in a partial is the current context.The main site navbar.html partial seems to work because the whole site is passed as context https://github.com/hossainemruz/toha/blob/master/layouts/index.html#L26 . However, the 404 nav bar partial doesn't seem to work because a dictionary partial is passed in https://github.com/hossainemruz/toha/blob/master/layouts/404.html#L6
Changing to use the global
site
function appears to fix it. Alternatively i could pass in either the full site object as context or add the .Site.Params.logo as a dictionary item to https://github.com/hossainemruz/toha/blob/master/layouts/404.html#L6I've consumed this branch in my site to test
alex-bezek/blog#44
https://percy.io/alex-bezek/blog/builds/7343218
https://blog-git-demo-404-logo.alex-bezek.vercel.app/404.html