- Add partials in the resources folder for each of the major resources of my site - Consolidate .css and .js files via resources.Concat where possible
8 lines
372 B
HTML
8 lines
372 B
HTML
{{ $parentID := .Parent.Get "id" -}}
|
|
{{ $narrowOnly := not (not (.Get "narrow")) | default false }}
|
|
<script defer type="module">
|
|
import { railroadDiagram } from {{ (partial "resources/railroad_utils.html" .).RelPermalink }};
|
|
railroadDiagram(rr => {
|
|
{{ .Inner | safeJS }}
|
|
}, "{{ $parentID }}", {{ cond $narrowOnly "true" "false" | safeJS }});
|
|
</script>
|