Skip to content

Commit

Permalink
Fix optimize scripts loading (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean1572 authored Oct 15, 2024
1 parent 4e8c7be commit bab60aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
19 changes: 0 additions & 19 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="{{ "/cache/foundation.min.js" | absolute_url }}"></script>
<script>
$(document).ready(function(){
$(document).foundation();
});
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand All @@ -14,18 +7,6 @@
{%- endif -%}
{%- seo -%}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="{{ "/cache/foundation.min.js" | absolute_url }}"></script>
<!-- https://stackoverflow.com/questions/73978467/jekyll-datatables-below-sidebar -->
{%- if page.datatable == true -%}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css"> <!--add style sheet-->
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script> <!--add dataTables-->
<script>
$(document).ready( function () {
$('table.datatable').DataTable();
} );
</script>
{% endif %}
<link rel="stylesheet" href="{{ "/cache/foundation.min.css" | absolute_url }}">
<link rel="stylesheet" href="{{ "/assets/main.css" | absolute_url }}">
<link rel="apple-touch-icon" sizes="180x180" href={{"/assets/apple-touch-icon.png" | absolute_url}}>
Expand Down
12 changes: 12 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@

{%- include footer.html -%}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script src="{{ "/cache/foundation.min.js" | absolute_url }}"></script>
<!-- https://stackoverflow.com/questions/73978467/jekyll-datatables-below-sidebar -->
{%- if page.datatable == true -%}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css"> <!--add style sheet-->
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js"></script> <!--add dataTables-->
<script>
$(document).ready( function () {
$('table.datatable').DataTable();
} );
</script>
{% endif %}
</body>

</html>

0 comments on commit bab60aa

Please sign in to comment.