lukeocodes / netlify-plugin-algolia-index Goto Github PK
View Code? Open in Web Editor NEWNetlify plugin to build a Algolia search index file to import manually
Home Page: https://netlify-plugins-by-lukeocodes.netlify.app
License: MIT License
Netlify plugin to build a Algolia search index file to import manually
Home Page: https://netlify-plugins-by-lukeocodes.netlify.app
License: MIT License
The Algolia client is created and initialized on the top-level scope. If an error was thrown, it would not be properly handled as a user error (using utils.build.failBuild()
).
Would it be possible to initialize it inside onPostBuild()
instead, and add some error handling around it?
Add option to clear
the index before running saveObjects
, making unpublishing possible.
Describe the bug
When you don't filter /
or /index.html
then the object we expect has an empty string as a path. Paths are used as objectID to ensure records are updated when we republish. An empty objectID throws an error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Hello luke,, I tried using your plugin for my website,, I actually works great. I wanted to understand better how i can exclude particular files or folders from the indexing. In your setup you gave an example like this:
[[plugins]]
package = 'netlify-plugin-algolia-index'
So,, then the 404.html should be excluded. I wanted to do this on multiple files. I tried something like this : # exclude = ['/404.html','downloads','blog','privacy','staff'] and after downloading the json file at the generated url,, i uploaded it to algolia,, and I was still getting those excluded files in the search results. Perhaps the commas shouldn't be used as the separator? . I would be greatful if you can assist to achieve it . Thanks, chel
When saveObjects()
fails, the error is printed, but the build or plugin does not fail because the error is not propagated. Is this intended?
Is your feature request related to a problem? Please describe.
Not really, I just wish that there was a way to have this plugin also submit the index it creates during deployment to an index in my Algolia account automatically after it creates it.
Describe the solution you'd like
A clear and concise description of what you want to happen.
I'm imagining that I could edit the plugin to enter in the information needed to tell it which index on Algolia to submit it to and then it would be able to submit the new index to the specified index on Algolia right after it is created.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I've looked for other ways to automatically submit an index to Algolia on build but was not able to find anything that seemed like it would be easy to figure out.
I was hoping that I could use Zapier to connect Netlify & Algolia but Algolia is not available on there sadly.
Allow configuration of the algoliasearch
library from the netlify.toml
plugin section.
Calls to saveObjects()
are done serially. Would it create a problem to perform them in parallel instead (for better performance)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.