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

Add tpl/site #5470

Closed
regisphilibert opened this issue Nov 25, 2018 · 3 comments
Closed

Add tpl/site #5470

regisphilibert opened this issue Nov 25, 2018 · 3 comments

Comments

@regisphilibert
Copy link
Member

If it's not much more complicated than #5467, it would be useful to also have site globally available.

It would save having to pass the Page Context to a template which only a needs few params on top of being able to use a few .Site variable/method. (ex: .Site.IsServer #4981 (comment))

@bep
Copy link
Member

bep commented Nov 25, 2018

I guess that makes sense. But we should probably stop with this one ... Note that I'm not sure about the "how complicated", because there is a dependency graph that may make this harder than trivial...

@bep bep added this to the v0.53 milestone Nov 25, 2018
@regisphilibert
Copy link
Member Author

Got it. It's all about the complexity/critical ratio.
It would makes sense that site variables are accessible globally, but again not a critical.

@bep bep self-assigned this Nov 26, 2018
@bep bep modified the milestones: v0.53, v0.52 Nov 26, 2018
@bep bep removed their assignment Nov 26, 2018
bep added a commit to bep/hugo that referenced this issue Dec 6, 2018
This means that the current `Site` is available as a global, so you can do `site.IsServer` etc.

Fixes gohugoio#5470
This was referenced Dec 6, 2018
bep added a commit to bep/hugo that referenced this issue Dec 6, 2018
This means that the current `Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer` `hugo.Version` etc.

Fixes gohugoio#5470
Fixes gohugoio#5467
Fixes gohugoio#5503
bep added a commit to bep/hugo that referenced this issue Dec 6, 2018
This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc.

Fixes gohugoio#5470
Fixes gohugoio#5467
Fixes gohugoio#5503
bep added a commit to bep/hugo that referenced this issue Dec 6, 2018
This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc.

Fixes gohugoio#5470
Fixes gohugoio#5467
Fixes gohugoio#5503
@bep bep closed this as completed in 831d23c Dec 6, 2018
jygastaud added a commit to jygastaud/hugo-microtypo that referenced this issue Dec 11, 2019
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants