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

fix bug in picture with params #730

Merged
merged 1 commit into from
Jan 21, 2024

Conversation

stereobooster
Copy link
Contributor

I found a bug in implementation. Apparently $.Page.Site.Params... always evaluates to undefined in the context of picture.html. One way to fix it is always pass params explicitly. Other way would be to pass .Page, I guess

Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for hugo-congo ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f2af019
🔍 Latest deploy log https://app.netlify.com/sites/hugo-congo/deploys/656742871b3342000817a131
😎 Deploy Preview https://deploy-preview-730--hugo-congo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@wolfspyre wolfspyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it “better” to eval the current page’s params context as well for $lazy?
thus enabling it to be configurable per page?

i honestly dunno.. just asking

@stereobooster
Copy link
Contributor Author

I don't quite understand what you propose. Can you post a code snippet?

@jpanther
Copy link
Owner

Does this need to reference .Page anyway? Given these are site config variables, can't we just access the global .Site directly?

@jpanther jpanther added the bug Something isn't working label Dec 23, 2023
@wolfspyre
Copy link
Contributor

Does this need to reference .Page anyway? Given these are site config variables, can't we just access the global .Site directly?

wouldn’t using .Page enable one to disable lazy (or configure other attrs) at a per-page level?

if the only knobs this looks at are site-scoped doesn’t one lose this?

When asking on the hugo forums on how to enable a clean lookup hierarchy for partial config variables in site config[^] , I was steered towards Page scoped variables and using cascade…

not sure if that’s helpful or not… but it steers my thinking towards setting things to look for page-scoped knobs and set the page vars’ default to site …

@jpanther
Copy link
Owner

Well potentially, but why would you need to adjust the lazy loading preference on a per-page basis? That seems like something that you'd only control at a site level.

@jpanther jpanther merged commit c282e97 into jpanther:dev Jan 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants