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

Ability to access article frontmatter / Page object in extend-head.html #1781

Open
tigattack opened this issue Oct 9, 2024 · 0 comments
Open

Comments

@tigattack
Copy link

Is your feature request related to a problem? Please describe.

As far as I'm aware, it's currently not possible to access the current page's Page object (and by extension, any page parameters from frontmatter) in extend-head.html. This makes it impossible to perform any page-level logic.

For example, in my use case, I wish to add something in my extend_head.html which relies on a condition such as if page.HasShortcode "foo_bar", but (again, as far as I'm aware?) this is not possible with the way extend-head.html is currently implemented, since Blowfish only passes .Site into the partial.

Describe the solution you'd like

It would open up a lot of possibilities and be super handy to be able to access the current page from extend-head.html.

Describe alternatives you've considered

Given what I wish to do, I don't believe there is any alternative, but I'm open to correction!

Additional context

This is the same issue as #1425, which appears to be have been prematurely closed due to a misunderstanding.

tigattack added a commit to tigattack/blog.tiga.tech that referenced this issue Oct 9, 2024
This reverts commit a887598.

Until the following issue is solved, there is no option but to completely override this file to achieve the functionality I need.
nunocoracao/blowfish#1781
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