🚑 Rename vendor directory to lib

pull/26/head
James Panther 2021-11-04 14:19:02 +11:00
parent 648fd47798
commit dfd189ee05
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
68 changed files with 18 additions and 13 deletions

View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] ## [Unreleased]
### Fixed
- Hugo failing to build site when deploying as a module
## [1.5.0] - 2021-11-04 ## [1.5.0] - 2021-11-04
### Added ### Added

View File

@ -1,7 +1,8 @@
{{/* Mermaid */}} {{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }} {{ if .Page.HasShortcode "mermaid" }}
{{ $mermaidJS := resources.Get "vendor/mermaid/mermaid.min.js" }} {{ $mermaidJS := resources.Get "lib/mermaid/mermaid.min.js" }}
{{ $mermaidJS := $mermaidJS | resources.Fingerprint "sha512" }} <script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script> {{ $mermaidJS := $mermaidJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $mermaidJS.RelPermalink }}" integrity="{{ $mermaidJS.Data.Integrity }}"></script>
<script> <script>
document.addEventListener('DOMContentLoaded', (event) => { document.addEventListener('DOMContentLoaded', (event) => {
function css(name) { function css(name) {
@ -13,7 +14,7 @@
{{ end }} {{ end }}
{{/* Chart */}} {{/* Chart */}}
{{ if .Page.HasShortcode "chart" }} {{ if .Page.HasShortcode "chart" }}
{{ $chartJS := resources.Get "vendor/chart/chart.min.js" }} {{ $chartJS := resources.Get "lib/chart/chart.min.js" }}
{{ $chartJS := $chartJS | resources.Fingerprint "sha512" }} {{ $chartJS := $chartJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script> <script defer src="{{ $chartJS.RelPermalink }}" integrity="{{ $chartJS.Data.Integrity }}"></script>
<script> <script>
@ -35,20 +36,20 @@
{{ end }} {{ end }}
{{/* Katex */}} {{/* Katex */}}
{{ if .Page.HasShortcode "katex" }} {{ if .Page.HasShortcode "katex" }}
{{ $katexCSS := resources.Get "vendor/katex/katex.min.css" }} {{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }} {{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
<link <link
type="text/css" rel="stylesheet" type="text/css" rel="stylesheet"
href="{{ $katexCSS.RelPermalink }}" href="{{ $katexCSS.RelPermalink }}"
integrity="{{ $katexCSS.Data.Integrity }}" integrity="{{ $katexCSS.Data.Integrity }}"
/> />
{{ $katexJS := resources.Get "vendor/katex/katex.min.js" }} {{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }} {{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script> <script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
{{ $katexRenderJS := resources.Get "vendor/katex/auto-render.min.js" }} {{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }} {{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}" onload="renderMathInElement(document.body);"></script> <script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}" onload="renderMathInElement(document.body);"></script>
{{ $katexFonts := resources.Match "vendor/katex/fonts/*" }} {{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }} {{ range $katexFonts }}
<!-- {{ .RelPermalink }} --> <!-- {{ .RelPermalink }} -->
{{ end }} {{ end }}

View File

@ -43,27 +43,27 @@
"devVendorCopy": [ "devVendorCopy": [
{ {
"from": "node_modules/mermaid/dist/mermaid.min.js", "from": "node_modules/mermaid/dist/mermaid.min.js",
"to": "assets/vendor/mermaid/mermaid.min.js" "to": "assets/lib/mermaid/mermaid.min.js"
}, },
{ {
"from": "node_modules/chart.js/dist/chart.min.js", "from": "node_modules/chart.js/dist/chart.min.js",
"to": "assets/vendor/chart/chart.min.js" "to": "assets/lib/chart/chart.min.js"
}, },
{ {
"from": "node_modules/katex/dist/katex.min.js", "from": "node_modules/katex/dist/katex.min.js",
"to": "assets/vendor/katex/katex.min.js" "to": "assets/lib/katex/katex.min.js"
}, },
{ {
"from": "node_modules/katex/dist/katex.min.css", "from": "node_modules/katex/dist/katex.min.css",
"to": "assets/vendor/katex/katex.min.css" "to": "assets/lib/katex/katex.min.css"
}, },
{ {
"from": "node_modules/katex/dist/contrib/auto-render.min.js", "from": "node_modules/katex/dist/contrib/auto-render.min.js",
"to": "assets/vendor/katex/auto-render.min.js" "to": "assets/lib/katex/auto-render.min.js"
}, },
{ {
"from": "node_modules/katex/dist/fonts/", "from": "node_modules/katex/dist/fonts/",
"to": "assets/vendor/katex/fonts/" "to": "assets/lib/katex/fonts/"
} }
] ]
} }