Skip to content

Commit 1e8afe1

Browse files
use npm run serve to test production builds
(i.e. with minification, use `npm run dev` otherwise)
1 parent 0657cd3 commit 1e8afe1

File tree

16 files changed

+20
-18
lines changed

16 files changed

+20
-18
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
## Building
1212
1. `npm install`
1313
1. run hugo
14-
* for production simply run `hugo`
15-
* for local development run `HUGO_ENV=development hugo server`
14+
* for production builds simply run `npm run build`
15+
* for local development run `npm run dev`
16+
* for local production tests `npm run serve`

layouts/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1>Sorry, the page you were looking for was not found.</h1>
1212
</div>
1313
{{ end }}
1414
{{ define "script" }}
15-
{{ if hugo.IsServer }}
15+
{{ if hugo.IsDevelopment }}
1616
{{ $404Js := resources.Get "js/404.js" }}
1717
<script type="text/javascript" src="{{ $404Js.RelPermalink }}" defer></script>
1818
{{ else }}

layouts/_default/baseof.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<meta property="og:locale:alternate" content="{{ .Language.Params.LanguageCode }}" />
5252
{{ end }}
5353
<meta name="apple-itunes-app" content="app-id=1560822163">
54-
{{ if hugo.IsServer }}
54+
{{ if hugo.IsDevelopment }}
5555
{{ $css := resources.Get "css/main.css" | postCSS }}
5656
<link rel="stylesheet" href="{{ $css.RelPermalink }}" media="screen" />
5757
{{ else }}
@@ -76,7 +76,7 @@
7676
{{ end }}
7777
</div>
7878
{{ partial "footer.html" . }}
79-
{{ if hugo.IsServer }}
79+
{{ if hugo.IsDevelopment }}
8080
<script data-domain="cryptomator.local" src="https://plausible.skymatic.de/js/script.file-downloads.hash.outbound-links.tagged-events.local.js" integrity="sha384-eSdyNyMq4w2Hzeb7A3pkbi2+zvI/skXuKlWsX5uzccigZEHDhHyBYoTASuSW+ZUQ" crossorigin="anonymous" defer></script>
8181
{{ $baseJs := resources.Get "js/base.js" }}
8282
<script type="text/javascript" src="{{ $baseJs.RelPermalink }}" defer></script>

layouts/android/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h3 id="keyrecovery" class="font-headline text-xl md:text-2xl leading-relaxed mb
4747
</section>
4848
{{ end }}
4949
{{ define "script" }}
50-
{{ if hugo.IsServer }}
50+
{{ if hugo.IsDevelopment }}
5151
{{ $storeJs := resources.Get "js/store.js" }}
5252
<script type="text/javascript" src="{{ $storeJs.RelPermalink }}" defer></script>
5353
{{ $keyRecoveryJs := resources.Get "js/keyrecovery.js" }}

layouts/blog/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h1><a href="{{ .Parent.RelPermalink }}">{{ .Parent.Title }}</a> / {{ .Title }}<
5757
{{ end }}
5858
{{ end }}
5959
{{ if gt (len $discourseEmbedUrl) 0 }}
60-
{{ if hugo.IsServer }}
60+
{{ if hugo.IsDevelopment }}
6161
{{ $discourseJs := resources.Get "js/discourse.js" }}
6262
<script type="text/javascript" src="{{ $discourseJs.RelPermalink }}" x-url="{{ $discourseEmbedUrl }}" defer></script>
6363
{{ else }}

layouts/donate/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4">{{ i18n "dona
6969
</section>
7070
{{ end }}
7171
{{ define "script" }}
72-
{{ if hugo.IsServer }}
72+
{{ if hugo.IsDevelopment }}
7373
{{ $customerPortalJs := resources.Get "js/customerportal.js" }}
7474
<script type="text/javascript" src="{{ $customerPortalJs.RelPermalink }}" defer></script>
7575
{{ $recaptchaJs := resources.Get "js/recaptcha.js" }}

layouts/downloads/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h2 id="faq" class="font-headline font-medium text-xl md:text-2xl leading-snug m
5252
</section>
5353
{{ end }}
5454
{{ define "script" }}
55-
{{ if hugo.IsServer }}
55+
{{ if hugo.IsDevelopment }}
5656
{{ $downloadJs := resources.Get "js/download.js" }}
5757
<script type="text/javascript" src="{{ $downloadJs.RelPermalink }}" defer></script>
5858
{{ else }}

layouts/hub-billing/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ <h3 class="font-headline text-xl md:text-2xl leading-relaxed mb-4">
450450
</div>
451451
{{ end }}
452452
{{ define "script" }}
453-
{{ if hugo.IsServer }}
453+
{{ if hugo.IsDevelopment }}
454454
{{ $storeJs := resources.Get "js/store.js" }}
455455
<script type="text/javascript" src="{{ $storeJs.RelPermalink }}" defer></script>
456456
{{ $hubSubscriptionJs := resources.Get "js/hubsubscription.js" }}

layouts/hub-demo/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h2 class="font-headline font-medium text-xl md:text-2xl leading-snug mb-4">{{ i
7878
</section>
7979
{{ end }}
8080
{{ define "script" }}
81-
{{ if hugo.IsServer }}
81+
{{ if hugo.IsDevelopment }}
8282
{{ $storeJs := resources.Get "js/store.js" }}
8383
<script type="text/javascript" src="{{ $storeJs.RelPermalink }}" defer></script>
8484
{{ $hubDemoJs := resources.Get "js/hubdemo.js" }}

layouts/hub-managed/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ <h2 class="font-headline font-medium text-xl md:text-2xl leading-snug mb-4">{{ i
106106
</section>
107107
{{ end }}
108108
{{ define "script" }}
109-
{{ if hugo.IsServer }}
109+
{{ if hugo.IsDevelopment }}
110110
{{ $storeJs := resources.Get "js/store.js" }}
111111
<script type="text/javascript" src="{{ $storeJs.RelPermalink }}" defer></script>
112112
{{ $hubManagedJs := resources.Get "js/hubmanaged.js" }}

0 commit comments

Comments
 (0)