-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
resources.Get throwing error with argument from shortcode parameter #8896
Comments
Is this related to #7960? |
How are you calling the shortcode? |
Curious, what do you mean by leaky abstraction in this particular context? That said, |
@jmooring I'm not using page bundles. The shortcode is called by the following on {{< image src="/img/subdir/image.jpeg" alt="Description" width="640" height="400">}} Note: I moved the Note 2: Currently I'm using it without problems with |
In the future, please use the forum (https://discourse.gohugo.io) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements. Thanks. |
Because in my limited high level (superficial) undestanding the method
It is but the later does not work. |
@jmooring Thanks and in the future I will to that. But as far as I know this is not invalid and not solved. Why it is invalid? |
Link to dicussion (just opened): https://discourse.gohugo.io/t/resources-get-throw-error-if-argument-is-a-shortcode-parameter/34299 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Environment
hugo v0.87.0+extended linux/amd64 BuildDate=unknown
Issue
I don't know if this is a bug or just a leaky abstraction but inside a shortcode...
...this work as expected:
while this doesn't:
throwing this error:
Error: Error building site: "/site/content/my-page.md:56:1": failed to render shortcode "image": failed to process shortcode: "/site/themes/my-theme/layouts/shortcodes/image.html:8:18": execute of template failed: template: shortcodes/image.html:8:18: executing "shortcodes/image.html" at <$image.RelPermalink>: nil pointer evaluating resource.Resource.RelPermalink
The text was updated successfully, but these errors were encountered: