Merge commit 'c239c643fee10bfa217cb108755b798f8f5f3b10'

This commit is contained in:
Bjørn Erik Pedersen 2021-05-01 11:45:45 +02:00
commit d7b22aee46
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
7 changed files with 20 additions and 19 deletions

View file

@ -1,6 +1,6 @@
<form id="site-search-form" action="" role="search">
<fieldset class="bn ma0 pa0">
<label class="clip" for="search-input">Search</label>
<input type="search" id="search-input" class="needs-js bg-left bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" name="search-input" value="" style="background: transparent url('/images/icon-search.png') no-repeat 0 8px /16px 16px;">
<input type="search" id="search-input" class="needs-js bg-left bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" name="search-input" value="" style="background: url('/images/icon-search.png') 5px 11px/16px 16px no-repeat; background-color: rgba(255,255,255,0);">
</fieldset>
</form>
</form>

View file

@ -36,7 +36,7 @@ This has many benefits. The most noticeable is performance. HTTP servers are *ve
["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators
["Static Site Generators", O'Reilly]: https://www.oreilly.com/web-platform/free/files/static-site-generators.pdf
["Static Site Generators", O'Reilly]: https://github.com/gohugoio/hugoDocs/files/1242701/static-site-generators.pdf
["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/
[hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/
[StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/

View file

@ -84,7 +84,7 @@ related:
weight: 10
{{< /code-toggle >}}
Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration abve with the weight of `80`.
Note that if you have configured `tags` as a taxonomy, `tags` will also be added to the default configuration above with the weight of `80`.
Custom configuration should be set using the same syntax.

View file

@ -43,7 +43,7 @@ typographer
attribute
: Enable custom attribute support for titles and blocks by adding attribute lists inside single curly brackets (`{.myclass class="class1 class2" }`) and placing it _after the Markdown element it decorates_, on the same line for titles and on a new line directly below for blocks.
{{< new-in "0.81" >}} In Hugo 0.81.0 we added support for adding attributes (e.g. CSS classes) to Markdown blocks, e.g. tables, lists, paragraphs etc.
{{< new-in "0.81.0" >}} In Hugo 0.81.0 we added support for adding attributes (e.g. CSS classes) to Markdown blocks, e.g. tables, lists, paragraphs etc.
A blockquote with a CSS class:

View file

@ -65,17 +65,17 @@ You can [set Hugo version](https://www.netlify.com/blog/2017/04/11/netlify-plus-
For production:
{{< code-toggle file="netlify" >}}
{{< code file="netlify.toml" codeLang="toml" >}}
[context.production.environment]
HUGO_VERSION = "0.53"
{{< /code-toggle >}}
HUGO_VERSION = "0.82.1"
{{< /code >}}
For testing:
```
{{< code file="netlify.toml" codeLang="toml" >}}
[context.deploy-preview.environment]
HUGO_VERSION = "0.53"
```
HUGO_VERSION = "0.82.1"
{{< /code >}}
The Netlify configuration file can be a little hard to understand and get right for the different environment, and you may get some inspiration and tips from this site's `netlify.toml`:

View file

@ -245,7 +245,7 @@ If the _map_, _array_, or _slice_ passed into the range is zero-length then the
### Conditionals
`if`, `else`, `with`, `or`, and `and` provide the framework for handling conditional logic in Go Templates. Like `range`, each statement is closed with an `{{ end }}`.
`if`, `else`, `with`, `or`, `and` and `not` provide the framework for handling conditional logic in Go Templates. Like `range`, `if` and `with` statements are closed with an `{{ end }}`.
Go Templates treat the following values as **false**:

View file

@ -1,25 +1,26 @@
{{ $file := .Get "file" }}
{{ $codeLang := "" }}
{{ $suffix := findRE "(\\.[^.]+)$" $file 1 }}
{{ with $suffix }}
{{ with $suffix }}
{{ $codeLang = (index . 0 | strings.TrimPrefix ".") }}
{{ end }}
{{ with .Get "codeLang" }}{{ $codeLang = . }}{{ end }}
{{ if eq $codeLang "html"}}
{{ if eq $codeLang "html" }}
{{ $codeLang = "go-html-template" }}
{{ end }}
<div class="code relative" id="{{ $file | urlize}}">
<div class="code relative" id="{{ $file | urlize }}">
{{- with $file -}}
<div class="filename san-serif f6 dib lh-solid pl2 pv2">{{.}}</div>
<div class="filename san-serif f6 dib lh-solid pl2 pv2">{{ . }}</div>
{{- end -}}
{{ if ne (.Get "copy") "false" }}
<button class="needs-js copy bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button">
</button>
{{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
{{end}}
<div class="code-copy-content nt3" {{with .Get "download"}}id="{{.}}"{{end}}>
{{ if .Get "nocode" }}{{ $.Inner }}{{ else }}{{ with $codeLang }}{{- highlight $.Inner . "" | -}}{{ else }}<pre><code>{{- .Inner | string -}}</code></pre>{{ end }}{{ end }}
{{ end }}
<div class="code-copy-content nt3" {{ with .Get "download" }}id="{{ . }}"{{ end }}>
{{ $inner := trim .Inner "\n" | safeHTML }}
{{ if .Get "nocode" }}{{ $inner }}{{ else }}{{ with $codeLang }}{{ highlight $inner . "" }}{{ else }}<pre><code>{{ $inner }}</code></pre>{{ end }}{{ end }}
</div>
</div>