Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending the background-image feature to multiple content types within the theme #461

Open
TunnelThruTime opened this issue Jan 13, 2024 · 0 comments

Comments

@TunnelThruTime
Copy link

Hello, I've been attempting to extend the background-image feature within the theme
for about a week inside my hectic schedule, which hasn't really allowed me much time
to delve into the matter, however it seems recommendable to reach out the the developers
for help in the matter.

In my layouts, 'layout/about/single.html', i've included the file mentioned here. my method for
extending the feature was to simply cut and paste the lines in the list template. However doing so
triggers a context disparity, and the error

 'render: failed to render pages: render of \"page\" failed: execute of template failed: 
html/template:about/single.html:5:23: {{if}} branches end in different contexts:
 {stateTag delimNone urlPartNone jsCtxRegexp attrNone elementNone <nil>}, 
{stateAttr delimDoubleQuote urlPartNone jsCtxRegexp attrNone elementNone <nil>}'

appears. An AI states that the insurance of "expressions, variables, and tags" should be
consistent throughout 'if' and 'else' branches.

single.txt

as you can see from the link I've just copied and pasted a '{{define "about"}}' statement into the single.html that I wrote into the appropriate hugo context. Any help extending the background image feature would be appreciated, and if no I will try to post the solution here for others wishing to extend or facing similar issues elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant