Merge pull request #20 from koirand/asset

Asset management
Close #18
This commit is contained in:
Kazuki Koide 2019-03-27 00:52:20 +09:00 committed by GitHub
commit edf4e926af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 4 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
.DS_Store
resources

View file

@ -20,8 +20,10 @@
{{ end }}
</div>
{{ partial "footer.html" . }}
<script src="/js/jquery-3.3.1.min.js"></script>
<script src="/js/jquery.mark.es6.min.js"></script>
<script src="/js/lunr.js"></script>
<script src="/js/search.js"></script>
{{ $jquery := resources.Get "js/jquery-3.3.1.min.js" }}
{{ $mark := resources.Get "js/jquery.mark.es6.min.js" }}
{{ $lunr := resources.Get "js/lunr.js" }}
{{ $search := resources.Get "js/search.js" }}
{{ $js := slice $jquery $mark $lunr $search | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint }}
<script src="{{ $js.Permalink }}"></script>
{{ end }}