Skip to content

Commit 005b27b

Browse files
authored
Minify smaller js files (#3990)
1 parent 7575b01 commit 005b27b

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed
File renamed without changes.
File renamed without changes.

docs/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ aliases:
5050
</div>
5151

5252
<div class="img-overlay-wrap aligncenter">
53-
<img src="platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:371.58px" >
54-
<img src="platform/platform-build-all.svg" alt="Platform diagram with connect elements highlighted" class="aligncenter overlay-platform" id="build-platform" style="width:800px;height:371.58px" loading="lazy" >
55-
<img src="platform/platform-data-all.svg" alt="Platform diagram with apps element highlighted" class="aligncenter overlay-platform" id="data-platform" style="width:800px;height:371.58px" loading="lazy" >
56-
<img src="platform/platform-fleet-all.svg" alt="Platform diagram with motion elements highlighted" class="aligncenter overlay-platform" id="fleet-platform" style="width:800px;height:371.58px" loading="lazy" >
53+
<img src="platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:auto" >
54+
<img src="platform/platform-build-all.svg" alt="Platform diagram with connect elements highlighted" class="aligncenter overlay-platform" id="build-platform" style="width:800px;height:auto" loading="lazy" >
55+
<img src="platform/platform-data-all.svg" alt="Platform diagram with apps element highlighted" class="aligncenter overlay-platform" id="data-platform" style="width:800px;height:auto" loading="lazy" >
56+
<img src="platform/platform-fleet-all.svg" alt="Platform diagram with motion elements highlighted" class="aligncenter overlay-platform" id="fleet-platform" style="width:800px;height:auto" loading="lazy" >
5757
</div>
5858

5959
</div>

docs/data-ai/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ You can also monitor your machines through teleop, power your application logic,
4545
{{< /how-to-expand >}}
4646

4747
<div class="img-overlay-wrap aligncenter">
48-
<img src="../platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:371.58px">
49-
<img src="../platform/platform-data-capture.svg" alt="Platform diagram with data capture elements highlighted" class="aligncenter overlay" id="data-platform-capture" style="width:800px;height:371.58px" loading="lazy" >
50-
<img src="../platform/platform-data-work.svg" alt="Platform diagram with data usage elements highlighted" class="aligncenter overlay" id="data-platform-work" style="width:800px;height:371.58px" loading="lazy" >
51-
<img src="../platform/platform-data-ai.svg" alt="Platform diagram with AI elements highlighted" class="aligncenter overlay" id="data-platform-ai" style="width:800px;height:371.58px" loading="lazy" >
48+
<img src="../platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:auto">
49+
<img src="../platform/platform-data-capture.svg" alt="Platform diagram with data capture elements highlighted" class="aligncenter overlay" id="data-platform-capture" style="width:800px;height:auto" loading="lazy" >
50+
<img src="../platform/platform-data-work.svg" alt="Platform diagram with data usage elements highlighted" class="aligncenter overlay" id="data-platform-work" style="width:800px;height:auto" loading="lazy" >
51+
<img src="../platform/platform-data-ai.svg" alt="Platform diagram with AI elements highlighted" class="aligncenter overlay" id="data-platform-ai" style="width:800px;height:auto" loading="lazy" >
5252
</div>
5353

5454
</div>

docs/manage/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Viam's fleet management tooling allows you to remotely deploy and manage softwar
5555
{{< /how-to-expand >}}
5656

5757
<div class="img-overlay-wrap aligncenter">
58-
<img src="../platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:371.58px" >
59-
<img src="../platform/platform-fleet-team.svg" alt="Platform diagram with team management elements highlighted" id="fleet-platform-team" class="aligncenter overlay" style="width:800px;height:371.58px" loading="lazy">
60-
<img src="../platform/platform-fleet-management.svg" alt="Platform diagram with deploy and manage elements highlighted" class="aligncenter overlay" id="fleet-platform-management" style="width:800px;height:371.58px" loading="lazy" >
61-
<img src="../platform/platform-fleet-monitor.svg" alt="Platform diagram with monitoring elements highlighted" class="aligncenter overlay" id="fleet-platform-monitor" style="width:800px;height:371.58px" loading="lazy" >
58+
<img src="../platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:auto" >
59+
<img src="../platform/platform-fleet-team.svg" alt="Platform diagram with team management elements highlighted" id="fleet-platform-team" class="aligncenter overlay" style="width:800px;height:auto" loading="lazy">
60+
<img src="../platform/platform-fleet-management.svg" alt="Platform diagram with deploy and manage elements highlighted" class="aligncenter overlay" id="fleet-platform-management" style="width:800px;height:auto" loading="lazy" >
61+
<img src="../platform/platform-fleet-monitor.svg" alt="Platform diagram with monitoring elements highlighted" class="aligncenter overlay" id="fleet-platform-monitor" style="width:800px;height:auto" loading="lazy" >
6262
</div>
6363

6464
</div>

docs/operate/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ To get started, install Viam on any device and integrate your hardware. Then you
4646
{{< /how-to-expand >}}
4747

4848
<div class="img-overlay-wrap aligncenter">
49-
<img src="../platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:371.58px" >
50-
<img src="../platform/platform-build-connect.svg" alt="Platform diagram with connect elements highlighted" class="aligncenter overlay" id="build-platform-connect" style="width:800px;height:371.58px" loading="lazy" >
51-
<img src="../platform/platform-build-apps.svg" alt="Platform diagram with apps element highlighted" class="aligncenter overlay" id="build-platform-apps" style="width:800px;height:371.58px" loading="lazy" >
52-
<img src="../platform/platform-build-motion.svg" alt="Platform diagram with motion elements highlighted" class="aligncenter overlay" id="build-platform-motion" style="width:800px;height:371.58px" loading="lazy" >
49+
<img src="../platform/platform-all.svg" alt="Platform diagram" id="fleet-platform-all" class="aligncenter overview" style="width:800px;height:auto" >
50+
<img src="../platform/platform-build-connect.svg" alt="Platform diagram with connect elements highlighted" class="aligncenter overlay" id="build-platform-connect" style="width:800px;height:auto" loading="lazy" >
51+
<img src="../platform/platform-build-apps.svg" alt="Platform diagram with apps element highlighted" class="aligncenter overlay" id="build-platform-apps" style="width:800px;height:auto" loading="lazy" >
52+
<img src="../platform/platform-build-motion.svg" alt="Platform diagram with motion elements highlighted" class="aligncenter overlay" id="build-platform-motion" style="width:800px;height:auto" loading="lazy" >
5353
</div>
5454

5555
</div>

layouts/partials/scripts.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@
7777
<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader"></script>
7878
{{ end }}
7979

80-
<script src='{{ "js/tabpane-persist.js" | relURL }}'></script>
81-
8280
<!-- load the deflate.js for plantuml support -->
8381
{{ if .Site.Params.plantuml.enable }}
8482
<script src='{{ "js/deflate.js" | relURL }}'></script>
@@ -107,6 +105,7 @@
107105

108106

109107
{{ $jsIndex := resources.Get "js/index.js" }}
108+
{{ $jsTabpanePersist := resources.Get "js/tabpane-persist.js" }}
110109
{{ $jsPrismViam := resources.Get "js/prism.js" }}
111110
{{ $jsToc := resources.Get "js/toc.js" }}
112111
{{ $jsBase := resources.Get "js/base.js" }}
@@ -117,17 +116,16 @@
117116
{{ $jsMarkmap := resources.Get "js/markmap.js" | resources.ExecuteAsTemplate "js/markmap.js" . }}
118117
{{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . }}
119118
{{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/plantuml.js" .}}
120-
121119
{{ $jsSentry := resources.Get "js/sentry.js" }}
122120

123121
{{ if .Site.Params.offlineSearch }}
124122
{{ $jsSearch = resources.Get "js/offline-search.js" }}
125123
{{ end }}
126124
{{ if not hugo.IsProduction }}
127-
{{ $js := (slice $jsIndex $jsToc $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio $jsPrismViam $jsZoom) | resources.Concat "js/main.js" }}
125+
{{ $js := (slice $jsIndex $jsTabpanePersist $jsToc $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio $jsPrismViam $jsZoom) | resources.Concat "js/main.js" }}
128126
<script src="{{ $js.RelPermalink }}"></script>
129127
{{ else }}
130-
{{ $js := (slice $jsIndex $jsToc $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio $jsPrismViam $jsZoom) | resources.Concat "js/main.js" }}
128+
{{ $js := (slice $jsIndex $jsTabpanePersist $jsToc $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio $jsPrismViam $jsZoom) | resources.Concat "js/main.js" }}
131129
{{ $js := $js | minify | fingerprint }}
132130
{{ $jsSentry := $jsSentry | minify }}
133131
<script async src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous"></script>
@@ -136,7 +134,9 @@
136134

137135
<!-- INKEEP start -->
138136
<script type="module" src="{{ "js/embed.min.js" | relURL }}" defer></script>
139-
<script type="module" src="{{ "js/embed.js" | relURL }}" defer></script>
137+
{{ $jsInkeep := resources.Get "js/inkeep.js" }}
138+
{{ $jsInkeep := $jsInkeep | minify }}
139+
<script type="module" src="{{ $jsInkeep.RelPermalink }}" defer></script>
140140
<!-- INKEEP end -->
141141

142142
{{ partial "hooks/body-end.html" . }}

0 commit comments

Comments
 (0)