add site-wide JS caching through import maps
This commit is contained in:
parent
f3aee8f41a
commit
10ccb250c1
15 changed files with 169 additions and 48 deletions
|
@ -4,12 +4,15 @@
|
|||
extracting them way more painful than it needs to be. --}}
|
||||
|
||||
{{#each page.styles}}
|
||||
<link rel="stylesheet" href="{{ ../config.site }}/static/css/{{ this }}">
|
||||
<link rel="stylesheet" href="{{ asset (cat 'css/' this) }}">
|
||||
{{/each}}
|
||||
|
||||
{{#each page.scripts}}
|
||||
<script type="module" src="{{ ../config.site }}/static/js/{{ this }}"></script>
|
||||
{{/each}}
|
||||
<script type="module">
|
||||
{{!-- Go through the import map for each script. --}}
|
||||
{{#each page.scripts}}
|
||||
import "{{ this }}";
|
||||
{{/each}}
|
||||
</script>
|
||||
|
||||
{{{ page.tree }}}
|
||||
</main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue