algolia / algolia/jekyll-algolia

<code> blocks should get split automatically to avoid exceeding the 10k record size limit

Open
#119 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
211
Forks
35
PR merge metrics
No merged PRs in 30d

Description

### What is the current behavior?

Large `` blocks cause an error: **"The jekyll-algolia plugin detected that one of your records exceeds the 10.00 Kb record size limit."**

### What is your expected behavior?

**jekyll-algolia** should automatically split these blocks into smaller records to avoid exceeding the size limit.

These `` blocks are coming from Markdown ``` blocks. So there isn't a straightforward way for me to split them up: additional chunks would be visually rendered with separate borders around them. Whereas it seems that **jekyll-algolia** could do this pretty easily. It doesn't really matter where it chooses to split the code. I just want my search index to be able to find the page that contains that text.

### Git repository to reproduce the issue:

Example documentation page with a large code block:

https://rushjs.io/pages/configs/rush_json/

Source code for this page:

https://github.com/Microsoft/rushjs.io-website/edit/master/pages/configs/rush_json.md

### Ruby version used:

ruby 2.5.3p105

### Jekyll version used:

jekyll 3.7.4

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with the rush_json.md example page and inspect jekyll-algolia's record generation for Markdown code blocks. The work is complete when the large block is split into records accepted by Algolia's 10 KB limit and searches can still find the page text without requiring separate visual code-block borders.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.