-
Notifications
You must be signed in to change notification settings - Fork 35
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
Unwanted attributes appearing in index #172
Comments
is it possible that your ci hasn't run since you updated the configuration to avoid those nodes? it looks to me as if it's failing for another reason: https://travis-ci.org/github/gazconroy/digital-comma/builds/767322353 |
Cheers. Travis has never worked so have been updating the index manually from the command line as required. Any other ideas abut why the Algolia update is failing to remove those classes? |
Unfortunately I have no further idea what could cause it. if you manually add logging to the plugin, do you see whether your method is called? |
What flag adds logging? I have a bit more of an insight into this, though. It has partially worked in that it has reduced the number of classes from over 140 down to 25. I suspect some of them may be 'protected'. Here are the those I attempted to remove but could not:
Some of them may well be required for Algolia to work but it would be nice to have a list of such 'protected' items. |
objectID is required, maybe indeed trying to remove that is causing the index to no longer be consistent. Others aren't required |
Mmm. Doesn't seem to make a difference. Perhaps those protections are within the jekyll-algolia code? |
Hello @gazconroy, The Algolia API does not forced any specific attribute, except the You can find here in the JSON example the base keys added by the plugin (and needed for it to correctly sort your results): https://community.algolia.com/jekyll-algolia/how-it-works.html I don't remember if those keys are added after the hook or before, though. If they are added after you won't be able to remove them. If they are added before you can remove them, but you might then break the relevance of the plugin. |
Thank you for the update @pixelastic . It does look like those keys are added after the hook. However, I also can't remove other keys outside that 'how it works' list:
Tthe |
Wait, I had a look at your hook code and I think there might be some confusion here. You're talking about removing keys from Algolia records, but the hook you shared seem to remove entire records based on their CSS classes. So I'm thinking we might not be talking about the same thing here. The way the plugin works is by creating one Algolia record (the items you see in your dashboard) per HTML node (the things you're matching against in your hook). If the hook returns Does that help? If not, could you share a screenshot of what you see when you mentioned "However, the dashboard tells me that they still have been [indexed]."? |
@gazconroy Could you also share the frontmatter of the matching post? |
|
Minimal mistakes theme with a customised layout for this post but all other content (standard minimal mistakes posts/pages) exhibit the same behaviour |
I want to report a bug:
What is the current behavior?
I've defined an algolia_hooks.rb in the _plugins directory and filled it with classes/attrributes that I don't want indexed. However, the dashboard tells me that they still have been.
What is your expected behavior?
None of these classes should turn up on the site's index.
Git repository to reproduce the issue:
https://github.com/gazconroy/digital-comma/tree/gh-pages
Ruby version used:
2.5
Jekyll version used:
3.9
The text was updated successfully, but these errors were encountered: