Skip to content

chore: optimize script loading and math rendering - #40

Merged
iasonliu merged 1 commit into
masterfrom
perf-optimization
Jul 27, 2026
Merged

chore: optimize script loading and math rendering#40
iasonliu merged 1 commit into
masterfrom
perf-optimization

Conversation

@iasonliu

Copy link
Copy Markdown
Collaborator

This PR introduces two performance optimizations:

  1. Extracted inline scripts from index.html and default.html into a separate js/main.js file for better browser caching.
  2. Made KaTeX math rendering conditional, loading only when math: true is set in a post's front matter, which speeds up load times for non-math pages.

- Extract inline scripts from default.html and index.html into js/main.js for better caching
- Conditionally load KaTeX only when page.math is true in front matter
@iasonliu
iasonliu merged commit 6c3772d into master Jul 27, 2026
@iasonliu
iasonliu deleted the perf-optimization branch July 27, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant