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

Default Values For Faceting #122

Open
BryanSchuetz opened this issue Mar 26, 2019 · 1 comment
Open

Default Values For Faceting #122

BryanSchuetz opened this issue Mar 26, 2019 · 1 comment

Comments

@BryanSchuetz
Copy link

I set default layout values for collection documents in my _config.yml file. I also want to use layout as an attribute for faceting. I used to be able to do this—However, I recently upgraded to the latest version of the gem (1.4.11) and this seems to no longer work. Looking at the dashboard in Algolia under facets—it says that layout is an unknown attribute.

Any thoughts on how I can add layout as an attribute for faceting?

@dshevtsov
Copy link

dshevtsov commented May 5, 2021

I have similar issue and I did some research with REPL.
It seems like the plugin takes records using Jekyll's data method, which does not return defaults from _config.yml. I was able to only extract defaults with .instance_variable_get '@defaults' on a page object using Jekyll hooks. So, at the moment, to make custom keys visible to Algolia, they can be added via a front matter; or using a Jekyll plugin, which would push custom keys from @defaults to data.

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

2 participants