feat: add custom.ts

This commit is contained in:
chenlianghong 2022-01-13 11:02:51 +08:00
parent 86cbc1b682
commit 822d5ad445
2 changed files with 4 additions and 1 deletions

1
assets/ts/custom.ts Normal file
View File

@ -0,0 +1 @@
/* Place your custom TS in HUGO_SITE_FOLDER/assets/ts/custom.ts */

View File

@ -2,5 +2,7 @@
{{- $opts := dict "minify" hugo.IsProduction -}} {{- $opts := dict "minify" hugo.IsProduction -}}
{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}} {{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
{{- $customScript := resources.Get "ts/custom.ts" | js.Build $opts -}}
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script> <script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
<script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>