feat: update for netlify dev support

This commit is contained in:
Henk Verlinde 2021-04-02 19:45:05 +02:00
parent 73cc63324e
commit 10d0b45203
37 changed files with 112 additions and 102 deletions

View File

@ -86,7 +86,7 @@ Source:
{{ range $index, $page := (where .Site.Pages "Section" "docs") -}} {{ range $index, $page := (where .Site.Pages "Section" "docs") -}}
{ {
id: {{ $index }}, id: {{ $index }},
href: "{{ .Permalink | absURL }}", href: "{{ .RelPermalink | relURL }}",
title: {{ .Title | jsonify }}, title: {{ .Title | jsonify }},
description: {{ .Params.description | jsonify }}, description: {{ .Params.description | jsonify }},
content: {{ .Content | jsonify }} content: {{ .Content | jsonify }}

View File

@ -1,4 +1,5 @@
baseurl = "/" baseurl = "/"
canonifyURLs = false
disableAliases = true disableAliases = true
disableHugoGeneratorInject = true disableHugoGeneratorInject = true
enableEmoji = true enableEmoji = true
@ -72,7 +73,7 @@ rel = "sitemap"
[taxonomies] [taxonomies]
contributor = "contributors" contributor = "contributors"
[permalinks] [RelPermalinks]
blog = "/blog/:title/" blog = "/blog/:title/"
[module] [module]

2
config/next/config.toml Normal file
View File

@ -0,0 +1,2 @@
baseurl = "https://doks-next.netlify.app/"
canonifyURLs = true

View File

@ -1 +1,2 @@
baseurl = "/" baseurl = "https://doks.netlify.app/"
canonifyURLs = true

View File

@ -27,7 +27,7 @@ Step-by-step instructions on how to start a new Doks project. [Tutorial →](htt
{{< alert icon="👉" text="The Quick Start is intended for intermediate to advanced users." >}} {{< alert icon="👉" text="The Quick Start is intended for intermediate to advanced users." >}}
One page summary of how to start a new Doks project. [Quick Start →]({{< ref "quick-start" >}}) One page summary of how to start a new Doks project. [Quick Start →]({{< relref "quick-start" >}})
## Go further ## Go further
@ -55,4 +55,4 @@ Find out how to contribute to Doks. [Contributing →](https://getdoks.org/docs/
## Help ## Help
Get help on Doks. [Help →]({{< ref "how-to-update" >}}) Get help on Doks. [Help →]({{< relref "how-to-update" >}})

View File

@ -57,4 +57,4 @@ Doks will start the Hugo development webserver accessible by default at `http://
## Other commands ## Other commands
Doks comes with commands for common tasks. [Commands →]({{< ref "commands" >}}) Doks comes with commands for common tasks. [Commands →]({{< relref "commands" >}})

View File

@ -31,6 +31,6 @@ We run [Plausible](https://plausible.io/) analytics on getdoks.org. The followin
## Contact us ## Contact us
[Contact us]({{< ref "contact/index.md" >}}) if you have any questions. [Contact us]({{< relref "contact/index.md" >}}) if you have any questions.
Effective Date: _27th August 2020_ Effective Date: _27th August 2020_

View File

@ -4,7 +4,7 @@ var docs = [
id: {{ $index }}, id: {{ $index }},
title: "{{ .Title }}", title: "{{ .Title }}",
description: "{{ .Params.description }}", description: "{{ .Params.description }}",
href: "{{ .URL | absURL }}" href: "{{ .URL | relURL }}"
}, },
{{ end -}} {{ end -}}
]; ];

View File

@ -1,5 +1,5 @@
{{- $.Scratch.Add "index" slice -}} {{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}} {{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "permalink" .Permalink) -}} {{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "RelPermalink" .RelPermalink) -}}
{{- end -}} {{- end -}}
{{- $.Scratch.Get "index" | jsonify -}} {{- $.Scratch.Get "index" | jsonify -}}

View File

@ -3,7 +3,7 @@
<div class="col-md-12 col-lg-10 col-xl-8"> <div class="col-md-12 col-lg-10 col-xl-8">
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
<article> <article>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Description }} {{ .Description }}
</article> </article>
{{ end }} {{ end }}

View File

@ -4,19 +4,19 @@
{{ range $i, $e := .Data.Pages -}} {{ range $i, $e := .Data.Pages -}}
{{ if ne .Params.sitemap_exclude true }} {{ if ne .Params.sitemap_exclude true }}
<url> <url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} <loc>{{ .RelPermalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }} <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Lang }}" hreflang="{{ .Lang }}"
href="{{ .Permalink }}" href="{{ .RelPermalink }}"
/>{{ end }} />{{ end }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Lang }}" hreflang="{{ .Lang }}"
href="{{ .Permalink }}" href="{{ .RelPermalink }}"
/>{{ end }} />{{ end }}
</url> </url>
{{ end -}} {{ end -}}
@ -25,19 +25,19 @@
{{ range $i, $e := .Data.Pages -}} {{ range $i, $e := .Data.Pages -}}
{{ if ne .Params.sitemap_exclude true -}} {{ if ne .Params.sitemap_exclude true -}}
<url> <url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} <loc>{{ .RelPermalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }} <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Lang }}" hreflang="{{ .Lang }}"
href="{{ .Permalink }}" href="{{ .RelPermalink }}"
/>{{ end }} />{{ end }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Lang }}" hreflang="{{ .Lang }}"
href="{{ .Permalink }}" href="{{ .RelPermalink }}"
/>{{ end }} />{{ end }}
</url> </url>
{{ end -}} {{ end -}}

View File

@ -5,10 +5,10 @@
<h1 class="text-center">{{ .Title }}</h1> <h1 class="text-center">{{ .Title }}</h1>
<div class="text-center">{{ .Content }}</div> <div class="text-center">{{ .Content }}</div>
<div class="card-list"> <div class="card-list">
{{ range .Data.Pages -}} {{ range .Data.Pages -}}
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h2 class="h3"><a class="stretched-link text-body" href="{{ .Permalink }}">{{ .Params.title }}</a></h2> <h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
<p>{{ .Params.lead | safeHTML }}</p> <p>{{ .Params.lead | safeHTML }}</p>
{{ partial "main/blog-meta.html" . -}} {{ partial "main/blog-meta.html" . -}}
</div> </div>

View File

@ -4,11 +4,11 @@
<article> <article>
<h1 class="text-center">{{ .Title }}</h1> <h1 class="text-center">{{ .Title }}</h1>
<div class="text-center">{{ .Content }}</div> <div class="text-center">{{ .Content }}</div>
<div class="card-list"> <div class="card-list">
{{ range .Data.Pages -}} {{ range .Data.Pages -}}
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h2 class="h3"><a class="stretched-link text-body" href="{{ .Permalink }}">{{ .Params.title }}</a></h2> <h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
{{ if eq .Section "blog" -}} {{ if eq .Section "blog" -}}
<p>{{ .Params.lead | safeHTML }}</p> <p>{{ .Params.lead | safeHTML }}</p>
{{ partial "main/blog-meta.html" . -}} {{ partial "main/blog-meta.html" . -}}

View File

@ -7,10 +7,10 @@
<div class="card-list"> <div class="card-list">
{{ $currentSection := .CurrentSection }} {{ $currentSection := .CurrentSection }}
{{ range where .Site.RegularPages.ByTitle "Section" .Section }} {{ range where .Site.RegularPages.ByTitle "Section" .Section }}
{{ if in (.Permalink | string) $currentSection.RelPermalink }} {{ if in (.RelPermalink | string) $currentSection.RelPermalink }}
<div class="card my-3"> <div class="card my-3">
<div class="card-body"> <div class="card-body">
<a class="stretched-link" href="{{ .Permalink }}">{{ .Params.title | title }} &rarr;</a> <a class="stretched-link" href="{{ .RelPermalink }}">{{ .Params.title | title }} &rarr;</a>
</div> </div>
</div> </div>
{{ end }} {{ end }}

View File

@ -6,7 +6,7 @@
</div> </div>
<div class="col-lg-9 col-xl-8 text-center"> <div class="col-lg-9 col-xl-8 text-center">
<p class="lead">{{ .Params.lead | safeHTML }}</p> <p class="lead">{{ .Params.lead | safeHTML }}</p>
<a class="btn btn-primary btn-lg px-4 mb-2" href="{{ "docs/prologue/introduction/" | absURL }}" role="button">Get started</a> <a class="btn btn-primary btn-lg px-4 mb-2" href="{{ "docs/prologue/introduction/" | relURL }}" role="button">Get started</a>
<p class="meta">Open-source MIT Licensed. <a href="https://github.com/h-enk/doks">GitHub v{{ .Site.Data.doks.version }}</a></p> <p class="meta">Open-source MIT Licensed. <a href="https://github.com/h-enk/doks">GitHub v{{ .Site.Data.doks.version }}</a></p>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
# redirects for Netlify - https://www.netlify.com/docs/redirects/ # redirects for Netlify - https://www.netlify.com/docs/redirects/
{{- range $p := .Site.Pages -}} {{- range $p := .Site.Pages -}}
{{- range .Aliases }} {{- range .Aliases }}
{{ . }} {{ $p.RelPermalink -}} {{ . }} {{ $p.RelRelPermalink -}}
{{- end }} {{- end }}
{{- end -}} {{- end -}}

View File

@ -9,7 +9,7 @@
<div class="col-lg-8 order-first order-lg-last text-lg-end"> <div class="col-lg-8 order-first order-lg-last text-lg-end">
<ul class="list-inline"> <ul class="list-inline">
{{ range .Site.Menus.footer -}} {{ range .Site.Menus.footer -}}
<li class="list-inline-item"><a href="{{ .URL | absURL }}">{{ .Name }}</a></li> <li class="list-inline-item"><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}} {{ end -}}
</ul> </ul>
</div> </div>

View File

@ -53,18 +53,18 @@
{{ if eq (hugo.Environment) "development" -}} {{ if eq (hugo.Environment) "development" -}}
{{ if .Site.Params.options.bootStrapJs -}} {{ if .Site.Params.options.bootStrapJs -}}
<script src="{{ $bs.Permalink }}" defer></script> <script src="{{ $bs.RelPermalink }}" defer></script>
{{ end -}} {{ end -}}
{{ if .Site.Params.options.highLight -}} {{ if .Site.Params.options.highLight -}}
<script src="{{ $highlight.Permalink }}" defer></script> <script src="{{ $highlight.RelPermalink }}" defer></script>
{{ end -}} {{ end -}}
{{ if .Site.Params.options.kaTex -}} {{ if .Site.Params.options.kaTex -}}
<script src="{{ $katex.Permalink }}" defer></script> <script src="{{ $katex.RelPermalink }}" defer></script>
<script src="{{ $katexAutoRender.Permalink }}" onload="renderMathInElement(document.body);" defer></script> <script src="{{ $katexAutoRender.RelPermalink }}" onload="renderMathInElement(document.body);" defer></script>
{{ end -}} {{ end -}}
<script src="{{ $js.Permalink }}" defer></script> <script src="{{ $js.RelPermalink }}" defer></script>
{{ if .Site.Params.options.flexSearch -}} {{ if .Site.Params.options.flexSearch -}}
<script src="{{ $index.Permalink }}" defer></script> <script src="{{ $index.RelPermalink }}" defer></script>
{{ end -}} {{ end -}}
{{ else -}} {{ else -}}
{{ $js := $js | minify | fingerprint "sha512" -}} {{ $js := $js | minify | fingerprint "sha512" -}}
@ -74,17 +74,17 @@
{{ $katex := $katex | minify | fingerprint "sha512" -}} {{ $katex := $katex | minify | fingerprint "sha512" -}}
{{ $katexAutoRender := $katexAutoRender | minify | fingerprint "sha512" -}} {{ $katexAutoRender := $katexAutoRender | minify | fingerprint "sha512" -}}
{{ if .Site.Params.options.bootStrapJs -}} {{ if .Site.Params.options.bootStrapJs -}}
<script src="{{ $bs.Permalink }}" integrity="{{ $bs.Data.Integrity }}" crossorigin="anonymous" defer></script> <script src="{{ $bs.RelPermalink }}" integrity="{{ $bs.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}} {{ end -}}
{{ if .Site.Params.options.highLight -}} {{ if .Site.Params.options.highLight -}}
<script src="{{ $highlight.Permalink }}" integrity="{{ $highlight.Data.Integrity }}" crossorigin="anonymous" defer></script> <script src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}} {{ end -}}
{{ if .Site.Params.options.kaTex -}} {{ if .Site.Params.options.kaTex -}}
<script src="{{ $katex.Permalink }}" integrity="{{ $katex.Data.Integrity }}" crossorigin="anonymous" defer></script> <script src="{{ $katex.RelPermalink }}" integrity="{{ $katex.Data.Integrity }}" crossorigin="anonymous" defer></script>
<script src="{{ $katexAutoRender.Permalink }}" integrity="{{ $katexAutoRender.Data.Integrity }}" crossorigin="anonymous" defer></script> <script src="{{ $katexAutoRender.RelPermalink }}" integrity="{{ $katexAutoRender.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}} {{ end -}}
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script> <script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ if .Site.Params.options.flexSearch -}} {{ if .Site.Params.options.flexSearch -}}
<script src="{{ $index.Permalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script> <script src="{{ $index.RelPermalink }}" integrity="{{ $index.Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}

View File

@ -1,5 +1,5 @@
<meta name="theme-color" content="{{ $.Site.Params.themeColor }}"> <meta name="theme-color" content="{{ $.Site.Params.themeColor }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absURL }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}"> <link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}"> <link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}"> <link rel="manifest" href="{{ "site.webmanifest" | relURL }}">

View File

@ -3,14 +3,14 @@
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
{{ if $.Scratch.Get "paginator" -}} {{ if $.Scratch.Get "paginator" -}}
{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "blog" ) -}} {{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "blog" ) -}}
<meta property="og:url" content="{{ .Paginator.URL | absURL }}"> <meta property="og:url" content="{{ .Paginator.URL | relURL }}">
{{ else -}} {{ else -}}
<meta property="og:url" content="{{ .Permalink }}"> <meta property="og:url" content="{{ .RelPermalink }}">
{{ end -}} {{ end -}}
{{ with $.Params.images -}} {{ with $.Params.images -}}
{{ range first 6 . -}} {{ range first 6 . -}}
<meta property="og:image" content="{{ $.Permalink }}{{ . }}"> <meta property="og:image" content="{{ $.RelPermalink }}{{ . }}">
{{ end -}} {{ end -}}
{{ else -}} {{ else -}}
{{ $images := $.Resources.ByType "image" -}} {{ $images := $.Resources.ByType "image" -}}
@ -19,10 +19,10 @@
{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }} {{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}
{{ end -}} {{ end -}}
{{ with $featured -}} {{ with $featured -}}
<meta property="og:image" content="{{ $featured.Permalink }}"/> <meta property="og:image" content="{{ $featured.RelPermalink }}"/>
{{ else -}} {{ else -}}
{{ with $.Site.Params.images -}} {{ with $.Site.Params.images -}}
<meta property="og:image" content="{{ index . 0 | absURL }}"/> <meta property="og:image" content="{{ index . 0 | relURL }}"/>
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
@ -54,18 +54,18 @@
{{ end -}} {{ end -}}
{{ with .Params.videos -}} {{ with .Params.videos -}}
{{ range . -}} {{ range . -}}
<meta property="og:video" content="{{ . | absURL }}"> <meta property="og:video" content="{{ . | relURL }}">
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
{{ $permalink := .Permalink -}} {{ $RelPermalink := .RelPermalink -}}
{{ $siteSeries := .Site.Taxonomies.series -}} {{ $siteSeries := .Site.Taxonomies.series -}}
{{ with .Params.series -}} {{ with .Params.series -}}
{{ range $name := . -}} {{ range $name := . -}}
{{ $series := index $siteSeries $name -}} {{ $series := index $siteSeries $name -}}
{{ range $page := first 6 $series.Pages -}} {{ range $page := first 6 $series.Pages -}}
{{ if ne $page.Permalink $permalink -}} {{ if ne $page.RelPermalink $RelPermalink -}}
<meta property="og:see_also" content="{{ $page.Permalink }}"> <meta property="og:see_also" content="{{ $page.RelPermalink }}">
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}

View File

@ -1,6 +1,6 @@
<link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-regular.woff2" | absURL }}" type="font/woff2" crossorigin> <link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-regular.woff2" | relURL }}" type="font/woff2" crossorigin>
<link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-700.woff2" | absURL }}" type="font/woff2" crossorigin> <link rel="preload" as="font" href="{{ "fonts/vendor/jost/jost-v4-latin-700.woff2" | relURL }}" type="font/woff2" crossorigin>
{{ if .Site.Params.options.kaTex -}} {{ if .Site.Params.options.kaTex -}}
<link rel="preload" as="font" href="{{ "fonts/KaTeX_Main-Regular.woff2" | absURL }}" type="font/woff2" crossorigin> <link rel="preload" as="font" href="{{ "fonts/KaTeX_Main-Regular.woff2" | relURL }}" type="font/woff2" crossorigin>
<link rel="preload" as="font" href="{{ "fonts/KaTeX_Math-Italic.woff2" | absURL }}" type="font/woff2" crossorigin> <link rel="preload" as="font" href="{{ "fonts/KaTeX_Math-Italic.woff2" | relURL }}" type="font/woff2" crossorigin>
{{ end -}} {{ end -}}

View File

@ -23,15 +23,15 @@
{{ end -}} {{ end -}}
{{ if $.Scratch.Get "paginator" }} {{ if $.Scratch.Get "paginator" }}
<link rel="canonical" href="{{ .Paginator.URL | absURL }}"> <link rel="canonical" href="{{ .Paginator.URL | relURL }}">
{{ if .Paginator.HasPrev -}} {{ if .Paginator.HasPrev -}}
<link rel="prev" href="{{ .Paginator.Prev.URL | absURL }}"> <link rel="prev" href="{{ .Paginator.Prev.URL | relURL }}">
{{ end -}} {{ end -}}
{{ if .Paginator.HasNext -}} {{ if .Paginator.HasNext -}}
<link rel="next" href="{{ .Paginator.Next.URL | absURL }}"> <link rel="next" href="{{ .Paginator.Next.URL | relURL }}">
{{ end -}} {{ end -}}
{{ else -}} {{ else -}}
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .RelPermalink }}">
{{ end -}} {{ end -}}
{{ partial "head/twitter_cards.html" . }} {{ partial "head/twitter_cards.html" . }}
@ -44,7 +44,7 @@
<meta property="og:locale" content="{{ .Site.Params.ogLocale }}"> <meta property="og:locale" content="{{ .Site.Params.ogLocale }}">
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .RelPermalink | safeURL }}">
{{ end -}} {{ end -}}
{{ partial "head/structured-data.html" . }} {{ partial "head/structured-data.html" . }}

View File

@ -4,9 +4,9 @@
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "Organization", "@type": "Organization",
"url": "{{ "/" | absURL }}", "url": "{{ "/" | relURL }}",
"name": "{{ .Site.Params.title }}", "name": "{{ .Site.Params.title }}",
"logo": "{{ "/" | absURL }}{{ .Site.Params.schemaLogo }}", "logo": "{{ "/" | relURL }}{{ .Site.Params.schemaLogo }}",
"sameAs": [ "sameAs": [
"{{ .Site.Params.schemaTwitter | safeURL }}", "{{ .Site.Params.schemaTwitter | safeURL }}",
"{{ .Site.Params.schemaLinkedIn | safeURL }}", "{{ .Site.Params.schemaLinkedIn | safeURL }}",
@ -20,7 +20,7 @@
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "Person", "@type": "Person",
"url": "{{ "/" | absURL }}", "url": "{{ "/" | relURL }}",
"name": "{{ .Site.Params.title }}", "name": "{{ .Site.Params.title }}",
"sameAs": [ "sameAs": [
"{{ .Site.Params.schemaTwitter | safeURL }}", "{{ .Site.Params.schemaTwitter | safeURL }}",
@ -35,10 +35,10 @@
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "WebSite", "@type": "WebSite",
"url": "{{ "/" | absURL }}", "url": "{{ "/" | relURL }}",
"potentialAction": { "potentialAction": {
"@type": "SearchAction", "@type": "SearchAction",
"target": "{{ "/" | absURL }}?q={search_term_string}", "target": "{{ "/" | relURL }}?q={search_term_string}",
"query-input": "required name=search_term_string" "query-input": "required name=search_term_string"
} }
} }
@ -53,10 +53,10 @@
"@type": "Article", "@type": "Article",
"mainEntityOfPage": { "mainEntityOfPage": {
"@type": "WebPage", "@type": "WebPage",
"@id": "{{ .Permalink }}" "@id": "{{ .RelPermalink }}"
}, },
"headline": "{{ .Title }}", "headline": "{{ .Title }}",
"image": [{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}{{ printf "%s%s" $.Permalink $e }}{{ end }}], "image": [{{ range $i, $e := .Params.images }}{{ if $i }}, {{ end }}{{ printf "%s%s" $.RelPermalink $e }}{{ end }}],
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05CET" }}", "datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05CET" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}", "dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
"author": { "author": {
@ -69,7 +69,7 @@
{{ if eq .Site.Params.schemaType "Organization" -}} {{ if eq .Site.Params.schemaType "Organization" -}}
"logo": { "logo": {
"@type": "ImageObject", "@type": "ImageObject",
"url": "{{ "/" | absURL }}{{ .Site.Params.schemaLogo }}" "url": "{{ "/" | relURL }}{{ .Site.Params.schemaLogo }}"
} }
{{ end -}} {{ end -}}
}, },
@ -83,7 +83,7 @@
{{ $dot.Scratch.Set "path" "" -}} {{ $dot.Scratch.Set "path" "" -}}
{{ $dot.Scratch.Set "breadcrumb" slice -}} {{ $dot.Scratch.Set "breadcrumb" slice -}}
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}} {{ $url := replace .RelPermalink ( printf "%s" .Site.BaseURL) "" -}}
{{ $.Scratch.Add "path" .Site.BaseURL -}} {{ $.Scratch.Add "path" .Site.BaseURL -}}
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) -}} {{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) -}}

View File

@ -1,11 +1,11 @@
{{ if eq (hugo.Environment) "development" -}} {{ if eq (hugo.Environment) "development" -}}
{{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}} {{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}}
{{ $css := resources.Get "scss/app.scss" | toCSS $options -}} {{ $css := resources.Get "scss/app.scss" | toCSS $options -}}
<link rel="stylesheet" href="{{ $css.Permalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
{{ else -}} {{ else -}}
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}} {{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}}
{{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}} {{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}}
{{ $secureCSS := $css | resources.Fingerprint "sha512" -}} {{ $secureCSS := $css | resources.Fingerprint "sha512" -}}
<link rel="stylesheet" href="{{ $secureCSS.Permalink }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous"> <link rel="stylesheet" href="{{ $secureCSS.RelPermalink }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
{{ end -}} {{ end -}}
<noscript><style>img.lazyload { display: none; }</style></noscript> <noscript><style>img.lazyload { display: none; }</style></noscript>

View File

@ -1,6 +1,6 @@
{{ with $.Params.images -}} {{ with $.Params.images -}}
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ $.Permalink }}{{ index . 0 }}"> <meta name="twitter:image" content="{{ $.RelPermalink }}{{ index . 0 }}">
{{ else -}} {{ else -}}
{{ $images := $.Resources.ByType "image" -}} {{ $images := $.Resources.ByType "image" -}}
{{ $featured := $images.GetMatch "*feature*" -}} {{ $featured := $images.GetMatch "*feature*" -}}
@ -9,11 +9,11 @@
{{ end -}} {{ end -}}
{{ with $featured -}} {{ with $featured -}}
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ $featured.Permalink }}"> <meta name="twitter:image" content="{{ $featured.RelPermalink }}">
{{ else -}} {{ else -}}
{{ with $.Site.Params.images -}} {{ with $.Site.Params.images -}}
<meta name="twitter:card" content="summary_large_image"> <meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ index . 0 | absURL }}"> <meta name="twitter:image" content="{{ index . 0 | relURL }}">
{{ else -}} {{ else -}}
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
{{ end -}} {{ end -}}

View File

@ -3,7 +3,7 @@
<div class="container"> <div class="container">
<input class="menu-btn order-0" type="checkbox" id="menu-btn"> <input class="menu-btn order-0" type="checkbox" id="menu-btn">
<label class="menu-icon d-md-none" for="menu-btn"><span class="navicon"></span></label> <label class="menu-icon d-md-none" for="menu-btn"><span class="navicon"></span></label>
<a class="navbar-brand order-1 order-md-0 me-auto" href="{{ .Site.BaseURL | absURL }}">{{ .Site.Params.Title }}</a> <a class="navbar-brand order-1 order-md-0 me-auto" href="{{ "/" | relURL }}">{{ .Site.Params.Title }}</a>
{{ if .Site.Params.options.darkMode -}} {{ if .Site.Params.options.darkMode -}}
<button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode"> <button id="mode" class="btn btn-link order-2 order-md-4" type="button" aria-label="Toggle mode">
<span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span> <span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span>
@ -13,7 +13,7 @@
<ul class="navbar-nav social-nav order-3 order-md-5"> <ul class="navbar-nav social-nav order-3 order-md-5">
{{ range .Site.Menus.social -}} {{ range .Site.Menus.social -}}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ .URL | absURL }}">{{ .Pre | safeHTML }}<span class="ms-2 visually-hidden">{{ .Name | safeHTML }}</span></a> <a class="nav-link" href="{{ .URL | relURL }}">{{ .Pre | safeHTML }}<span class="ms-2 visually-hidden">{{ .Name | safeHTML }}</span></a>
</li> </li>
{{ end -}} {{ end -}}
</ul> </ul>
@ -27,7 +27,7 @@
{{- $active = or $active (and (eq .Name "Guides") (eq $current.Section "guides")) -}} {{- $active = or $active (and (eq .Name "Guides") (eq $current.Section "guides")) -}}
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "authors")) -}} {{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "authors")) -}}
<li class="nav-item{{ if $active }} active{{ end }}"> <li class="nav-item{{ if $active }} active{{ end }}">
<a class="nav-link" href="{{ .URL | absURL }}">{{ .Name }}</a> <a class="nav-link" href="{{ .URL | relURL }}">{{ .Name }}</a>
</li> </li>
{{ end -}} {{ end -}}
</ul> </ul>

View File

@ -1 +1 @@
<p><small>Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }} and {{ end }}<a class="stretched-link position-relative" href="{{ "/contributors/" | absURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}}&nbsp;&hyphen;&nbsp;<strong>{{ .ReadingTime -}}&nbsp;min read</strong></small><p> <p><small>Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }} and {{ end }}<a class="stretched-link position-relative" href="{{ "/contributors/" | relURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}}&nbsp;&hyphen;&nbsp;<strong>{{ .ReadingTime -}}&nbsp;min read</strong></small><p>

View File

@ -1,4 +1,4 @@
{{ with .Parent -}} {{ with .Parent -}}
{{ partial "main/breadcrumb.html" . -}} {{ partial "main/breadcrumb.html" . -}}
<li class="breadcrumb-item"><a href="{{ .Permalink }}">{{ if .IsHome }}Home{{ else }}{{ .Title }}{{ end }}</a></li> <li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ if .IsHome }}Home{{ else }}{{ .Title }}{{ end }}</a></li>
{{ end -}} {{ end -}}

View File

@ -3,7 +3,7 @@
<!-- https://www.feliciano.tech/blog/custom-sort-hugo-single-pages/ --> <!-- https://www.feliciano.tech/blog/custom-sort-hugo-single-pages/ -->
{{ $pages := where site.RegularPages "Section" .Section -}} {{ $pages := where site.RegularPages "Section" .Section -}}
{{ with $pages.Next . -}} {{ with $pages.Next . -}}
<a href="{{ .Permalink }}"> <a href="{{ .RelPermalink }}">
<div class="card my-1"> <div class="card my-1">
<div class="card-body py-2"> <div class="card-body py-2">
&larr; {{ .Title }} &larr; {{ .Title }}
@ -12,7 +12,7 @@
</a> </a>
{{ end -}} {{ end -}}
{{ with $pages.Prev . -}} {{ with $pages.Prev . -}}
<a class="ms-auto" href="{{ .Permalink }}"> <a class="ms-auto" href="{{ .RelPermalink }}">
<div class="card my-1"> <div class="card my-1">
<div class="card-body py-2"> <div class="card-body py-2">
{{ .Title }} &rarr; {{ .Title }} &rarr;

View File

@ -6,7 +6,7 @@
{{ range .Children -}} {{ range .Children -}}
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}} {{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
{{- $active = or $active (eq $currentPage.Section .Identifier) -}} {{- $active = or $active (eq $currentPage.Section .Identifier) -}}
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | absURL }}">{{ .Name }}</a></li> <li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end -}} {{ end -}}
</ul> </ul>
{{ end -}} {{ end -}}

View File

@ -2,7 +2,7 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .RelPermalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
@ -11,15 +11,15 @@
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }} {{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .RelPermalink .MediaType | safeHTML }}
{{ end }} {{ end }}
{{ range .Pages }}{{ if ne .Params.feed_exclude true }} {{ range .Pages }}{{ if ne .Params.feed_exclude true }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .RelPermalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .RelPermalink }}</guid>
<description>{{ .Summary | html }}</description> <description>{{ .Summary | html }}</description>
</item> </item>
{{ end }}{{ end }} {{ end }}{{ end }}

View File

@ -1,3 +1,3 @@
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}} {{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}}
{{ $lqip := $image.Resize $.Site.Params.lqipWidth -}} {{ $lqip := $image.Resize $.Site.Params.lqipWidth -}}
<img class="img-simple img-fluid lazyload blur-up{{ with .Get "class" }} {{.}}{{ end }}" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> <img class="img-simple img-fluid lazyload blur-up{{ with .Get "class" }} {{.}}{{ end }}" src="{{ $lqip.RelPermalink }}" data-src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>

View File

@ -10,14 +10,14 @@
{{ end -}} {{ end -}}
{{ range $widths -}} {{ range $widths -}}
{{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}} {{ $srcUrl := (printf "%dx" . | $image.Resize).RelPermalink -}}
{{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}} {{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}}
{{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}} {{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}}
{{ end -}} {{ end -}}
{{ $imgSrcSet = (delimit $imgSrcSet ",") -}} {{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
<figure{{ with .Get "class" }} class="{{.}}"{{ end }}> <figure{{ with .Get "class" }} class="{{.}}"{{ end }}>
<img class="img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}> <img class="img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.RelPermalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>
<noscript><img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript> <noscript><img class="img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript>
{{ with .Get "caption" }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end }} {{ with .Get "caption" }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end }}
</figure> </figure>

View File

@ -3,19 +3,19 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml"> xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}{{ if ne .Params.sitemap_exclude true }} {{ range .Data.Pages }}{{ if ne .Params.sitemap_exclude true }}
<url> <url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }} <loc>{{ .RelPermalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }} <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }} <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }} <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Lang }}" hreflang="{{ .Lang }}"
href="{{ .Permalink }}" href="{{ .RelPermalink }}"
/>{{ end }} />{{ end }}
<xhtml:link <xhtml:link
rel="alternate" rel="alternate"
hreflang="{{ .Lang }}" hreflang="{{ .Lang }}"
href="{{ .Permalink }}" href="{{ .RelPermalink }}"
/>{{ end }} />{{ end }}
</url> </url>
{{ end }}{{ end }} {{ end }}{{ end }}

View File

@ -2,23 +2,29 @@
publish = "public" publish = "public"
functions = "functions" functions = "functions"
[dev]
framework = "#custom"
command = "npx hugo server --disableFastRender"
targetPort = 1313
port = 8888
publish = "public"
autoLaunch = false
[build.environment] [build.environment]
NODE_VERSION = "15.5.1" NODE_VERSION = "15.5.1"
NPM_VERSION = "7.3.0" NPM_VERSION = "7.3.0"
[context.production] [context.production]
command = "npx hugo --gc --minify -b $URL && npm run build:functions" command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda"
[context.deploy-preview] [context.deploy-preview]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy] [context.branch-deploy]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.next]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda"
[context.next.environment]
HUGO_ENV = "next"
[dev]
framework = "#custom"
command = "npx rimraf public resources functions && npx hugo server --bind=0.0.0.0 --disableFastRender"
targetPort = 1313
port = 8888
publish = "public"
autoLaunch = false

View File

@ -17,7 +17,7 @@
"init": "rimraf .git && git init -b main", "init": "rimraf .git && git init -b main",
"create": "hugo new", "create": "hugo new",
"prestart": "npm run clean", "prestart": "npm run clean",
"start": "hugo server --disableFastRender", "start": "hugo server --bind=0.0.0.0 --disableFastRender",
"prebuild": "npm run clean", "prebuild": "npm run clean",
"build": "hugo --gc --minify && npm run build:functions", "build": "hugo --gc --minify && npm run build:functions",
"build:functions": "netlify-lambda build assets/lambda", "build:functions": "netlify-lambda build assets/lambda",