Problem
The Algolia search logic currently exists in two places:
_includes/algolia.html — active inline implementation (used in production)
js/algolia-search.js — unused external implementation
This results in duplicate code and creates confusion about which version is canonical.
Why this matters
- Violates single source of truth (logic exists in two files)
- Makes future changes error-prone
- Inline JS cannot be browser-cached
- Increases complexity inside layout templates
- The external JS file currently appears unused
Proposed solution
- Keep
_includes/algolia.html only for passing Liquid configuration variables
- Load
js/algolia-search.js as the single implementation file
- Remove the duplicate inline logic
This would:
- Consolidate the implementation
- Enable browser caching
- Simplify templates
- Reduce maintenance risk
No visual or functional changes are intended.
Since _includes/algolia.html was recently modified (Escape-key improvement), I wanted to open this issue first before proceeding with any structural refactor.
Problem
The Algolia search logic currently exists in two places:
_includes/algolia.html— active inline implementation (used in production)js/algolia-search.js— unused external implementationThis results in duplicate code and creates confusion about which version is canonical.
Why this matters
Proposed solution
_includes/algolia.htmlonly for passing Liquid configuration variablesjs/algolia-search.jsas the single implementation fileThis would:
No visual or functional changes are intended.
Since
_includes/algolia.htmlwas recently modified (Escape-key improvement), I wanted to open this issue first before proceeding with any structural refactor.