Skip to content

Commit 5428c3a

Browse files
Rust-Trendsclaude
andcommitted
Add cache busting to search.js to resolve browser caching issues
- Add timestamp-based version parameter to search.js URL - Forces browsers to fetch the updated ElasticLunr-based search implementation - Resolves "Failed to load search index: JSON.parse" error caused by cached old version - Uses Zola's now() function with date formatting for automatic cache invalidation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d6d806e commit 5428c3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
{# Include search functionality #}
3131
{% if config.build_search_index %}
32-
<script src="{{ get_url(path='search.js') }}"></script>
32+
<script src="{{ get_url(path='search.js') }}?v={{ now() | date(format='%Y%m%d%H%M') }}"></script>
3333
{% endif %}
3434
</body>
3535

0 commit comments

Comments
 (0)