mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.05k stars 24.98k forks source link

Need Algolia API key to update search index #4893

Closed iBug closed 1 week ago

iBug commented 1 week ago

The theme's search feature is still returning stale results from 2022. I believe this is due to a lack of update of Algolia's index.

If you can add an Actions secret named ALGOLIA_API_KEY, I can copy the Actions workflow from my own repo to get this fixed and kept updated automatically.

I also plan to automate more tasks like populating the per-page last_updated_at from Git history with Actions. CI is the best way to keep these things tidy and in order.

mmistakes commented 1 week ago

@iBug Doesn't look like there's an Algolia index anymore for the MM site. I seem to remember I was using Travis CI to run the Algolia index build with it (this was way before GitHub added Actions).

Looks like that was purged, which caused Algolia to dump my account due to inactivity years ago.

Can you create a new instance or do you need me to set something up?

iBug commented 1 week ago

Doesn't look like there's an Algolia index anymore

I strongly doubt that, as otherwise the current site search wouldn't produce any result. Could you try digging for that account and index?

If I have to set up a new Algolia account, I have no confidence that the current free tier would suffice. Note that a decade ago Algolia used to offer unlimited search queries for free which is no longer the case.

mmistakes commented 1 week ago

Found it. Which type of secret do you need it added as? Environment or Repository?

Screenshot 2024-06-26 at 5 34 00 PM

Also, might be worth switching to Pagefind. I've been meaning to use it on my personal site, but haven't gotten around to it yet. Seems performant and there wouldn't be a worry of hitting limits with Algol.

iBug commented 1 week ago

Repository secret is the way to go, just make sure you name it ALGOLIA_API_KEY.

BTW, I have two sites running on Algolia's legacy unlimited free plan and have yet to run into any issue (besides network ones). But their traffic, even summed up, are nowhere near that of this site.

Re: Pagefind: Maybe one day someone finds it useful and decides to contribute with their implementation. For documentation sites I've been using Material for MkDocs. It uses Lunr and runs like butter, so personally I have little interest in searching for an alternative.

mmistakes commented 1 week ago

@iBug Should be all set. I've added the ALGOLIA_API_KEY as a repository secret.

iBug commented 1 week ago

I've added build.yml and can confirm the index is up to date after run #1