Skip to content

Commit

Permalink
Move Chart.js script to the end of the layout for improved loading pe…
Browse files Browse the repository at this point in the history
…rformance
  • Loading branch information
udaysinh-git committed Dec 31, 2024
1 parent bd36920 commit fecc1c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/_includes/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@
{% if title == "Contact" %}
<link rel="stylesheet" href="/styles/contact.css">
{% endif %}
{% if title == "GitHub Repos" %}
<script src="https://cdn.jsdelivr.net/npm/chart.js" defer></script>
{% endif %}

<!-- Defer non-critical CSS -->
<link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
Expand Down Expand Up @@ -279,5 +276,6 @@
});
</script>
<script src="/scripts/contact.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</body>
</html>

0 comments on commit fecc1c0

Please sign in to comment.