summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-07-20 22:20:33 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-07-20 22:20:33 +0200
commit673e622fa9000c535397fba2b210273cc7d60705 (patch)
tree174462b27a97fe40923aa02aa91fd377379944c4 /docs
parent9f9191471ec501f1f957020726f939c9ef48e193 (diff)
parent28bd06265e88454b061810578919d891909a83ad (diff)
Diffstat (limited to 'docs')
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html44
-rwxr-xr-xdocs/content/en/hugo-pipes/babel.md6
-rw-r--r--docs/content/en/hugo-pipes/js.md63
-rw-r--r--docs/content/en/news/0.74.0-relnotes/featured.pngbin0 -> 56047 bytes
-rw-r--r--docs/content/en/news/0.74.0-relnotes/index.md22
-rw-r--r--docs/content/en/news/0.74.1-relnotes/index.md2
-rw-r--r--docs/content/en/news/0.74.2-relnotes/index.md9
-rw-r--r--docs/netlify.toml8
-rw-r--r--docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_480x0_resize_catmullrom_2.pngbin0 -> 27565 bytes
-rw-r--r--docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_640x0_resize_catmullrom_2.pngbin0 -> 43373 bytes
10 files changed, 113 insertions, 41 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html
index 8cd289624..48c015c51 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html
@@ -1,31 +1,31 @@
{{ define "main" }}
- <article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns">
- <div class="flex-l">
+<article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns">
+ <div class="flex-l">
- <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
+ <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
{{- partial "toc.html" . -}}
- </div>
+ </div>
- <div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;">
- <div class="documentation-copy center measure-wide-l">
- <div id="readout" class="fixed right-0 bottom-0">
- </div>
- {{ .Render "page" }}
- {{ partial "related.html" . }}
+ <div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;">
+ <div class="documentation-copy center measure-wide-l">
+ <div id="readout" class="fixed right-0 bottom-0">
</div>
+ {{ .Render "page" }}
+ {{ partial "related.html" . }}
</div>
- <div class="order-0 w-20 dn db-l">
- {{ partial "nav-links-docs.html" . }}
- </div>
-
</div>
- </article>
-
- <div class="w-100 bg-light-gray">
- <div class="mw7 pa4 center nested-lh-copy lh-copy">
- {{ partial "docs/page-meta-data.html" . }}
- {{ partial "page-edit.html" . }}
- {{ partial "tags.html" . }}
+ <div class="order-0 w-20 dn db-l">
+ {{ partial "nav-links-docs.html" . }}
</div>
+
+ </div>
+</article>
+
+<div class="w-100 bg-light-gray">
+ <div class="mw7 pa4 center nested-lh-copy lh-copy">
+ {{ partial "docs/page-meta-data.html" . }}
+ {{ partial "page-edit.html" . }}
+ {{ partial "tags.html" . }}
</div>
-{{ end }}
+</div>
+{{ end }} \ No newline at end of file
diff --git a/docs/content/en/hugo-pipes/babel.md b/docs/content/en/hugo-pipes/babel.md
index e34faec43..5fb5e11e1 100755
--- a/docs/content/en/hugo-pipes/babel.md
+++ b/docs/content/en/hugo-pipes/babel.md
@@ -9,9 +9,9 @@ keywords: []
menu:
docs:
parent: "pipes"
- weight: 49
-weight: 49
-sections_weight: 49
+ weight: 48
+weight: 48
+sections_weight: 48
draft: false
---
diff --git a/docs/content/en/hugo-pipes/js.md b/docs/content/en/hugo-pipes/js.md
new file mode 100644
index 000000000..b66778eb4
--- /dev/null
+++ b/docs/content/en/hugo-pipes/js.md
@@ -0,0 +1,63 @@
+---
+title: JavaScript Building
+description: Hugo Pipes can process JavaScript files with [ESBuild](https://github.com/evanw/esbuild).
+date: 2020-07-20
+publishdate: 2020-07-20
+lastmod: 2020-07-20
+categories: [asset management]
+keywords: []
+menu:
+ docs:
+ parent: "pipes"
+ weight: 45
+weight: 45
+sections_weight: 45
+draft: false
+---
+
+Any JavaScript resource file can be transpiled and "tree shaken" using `js.Build` which takes for argument either a string for the filepath or a dict of options listed below.
+
+### Options
+
+targetPath [string]
+: If not set, the source path will be used as the base target path.
+Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.
+
+minify [bool]
+: Let `js.Build` handle the minification.
+
+target [string]
+: The language target.
+ One of: `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`.
+ Default is `esnext`.
+
+externals [slice]
+: External dependencies. If a dependency should not be included in the bundle (Ex. library loaded from a CDN.), it should be listed here.
+
+```go-html-template
+{{ $externals := slice "react" "react-dom" }}
+```
+
+defines [map]
+: Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.
+
+```go-html-template
+{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
+```
+
+### Examples
+
+```go-html-template
+{{ $built := resources.Get "js/index.js" | js.Build "main.js" }}
+```
+
+Or with options:
+
+```go-html-template
+{{ $externals := slice "react" "react-dom" }}
+{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
+
+{{ $opts := dict "targetPath" "main.js" "externals" $externals "defines" $defines }}
+{{ $built := resources.Get "scripts/main.js" | js.Build $opts }}
+<script type="text/javascript" src="{{ $built.RelPermalink }}" defer></script>
+```
diff --git a/docs/content/en/news/0.74.0-relnotes/featured.png b/docs/content/en/news/0.74.0-relnotes/featured.png
new file mode 100644
index 000000000..34f288495
--- /dev/null
+++ b/docs/content/en/news/0.74.0-relnotes/featured.png
Binary files differ
diff --git a/docs/content/en/news/0.74.0-relnotes/index.md b/docs/content/en/news/0.74.0-relnotes/index.md
index f36421ac6..d793f4888 100644
--- a/docs/content/en/news/0.74.0-relnotes/index.md
+++ b/docs/content/en/news/0.74.0-relnotes/index.md
@@ -1,25 +1,32 @@
---
date: 2020-07-13
-title: "0.74.0"
-description: "0.74.0"
+title: "Native JS Bundler, Open API Support, Inline Partials"
+description: "Hugo 0.74.0 brings blazingly fast native JavaScript bundling, with minification, tree shaking, scope hoisting for ES6 modules, and transpilation of JSX and newer JS syntax down to ES6. And more."
categories: ["Releases"]
---
- **Note:** The documentation site isn't updated with all of the main new things below. We will get to it soon.
+**Note:** The documentation site isn't updated with all of the main new things below. We will get to it soon. See https://github.com/gohugoio/hugoDocs/issues/1171
-This release comes with native JavaScript bundling (and minifier), with [import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) support (from `node_modules` etc.), tree shaking, scope hoisting for ES6 modules, transpilation of JSX and newer JS syntax down to ES6, JavaScript/JSX and TypeScript/TSX support. And it's _very fast_. [Benchmarks](https://github.com/evanw/esbuild#benchmarks) rates it at least 100x faster than the other JavaScript bundlers included. This new feature is backed by the very impressive [ESBuild](https://github.com/evanw/esbuild) project by [@evanw](https://github.com/evanw). Many thanks to [@remko](https://github.com/remko) for the integration work.
+This release comes with native JavaScript bundling (and minifier), with [import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) support (from `node_modules` etc.), tree shaking, scope hoisting for ES6 modules, transpilation of JSX and newer JS syntax down to ES6, JavaScript/JSX and TypeScript/TSX support. And it's _very fast_. [Benchmarks](https://github.com/evanw/esbuild#benchmarks) rates it **at least 100x faster** than the other JavaScript bundlers included. This new feature is backed by the very impressive [ESBuild](https://github.com/evanw/esbuild) project by [@evanw](https://github.com/evanw). Many thanks to [@remko](https://github.com/remko) for the integration work.
+A very simple example building a TypeScript file:
+
+```go-html-template
+{{ $js := resources.Get "js/main.ts" | js.Build }}
+```
This release also comes with Open API 3-support. This makes it much easier to create "Swagger styled" API-documentation. The below will unmarshal your YAML file into [this object graph](https://godoc.org/github.com/getkin/kin-openapi/openapi3#Swagger):
-````go-html-template
+```go-html-template
{{ $api := resources.Get "api/openapi.yaml" | openapi3.Unmarshal }}
```
Hugo's Asciidoc integration has also gotten a face lift. A big shoutout to [@muenchhausen](https://github.com/muenchhausen) and [@bwklein](https://github.com/bwklein) for their work on this.
+And finally, [partials](https://gohugo.io/templates/partials/#inline-partials) can now be defined inline -- and that is way more useful than it sounds.
+
-This release represents **23 contributions by 9 contributors** to the main Hugo code base.[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@niklasfasching](https://github.com/niklasfasching), [@bwklein](https://github.com/bwklein, and [@muenchhausen](https://github.com/muenchhausen) for their ongoing contributions.
+This release represents **23 contributions by 9 contributors** to the main Hugo code base. [@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@niklasfasching](https://github.com/niklasfasching), [@bwklein](https://github.com/bwklein), and [@muenchhausen](https://github.com/muenchhausen) for their ongoing contributions.
And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) for his relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour), [@coliff](https://github.com/coliff) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
@@ -76,6 +83,3 @@ Hugo now has:
* Fix server reload when non-HTML shortcode changes [42e150fb](https://github.com/gohugoio/hugo/commit/42e150fbfac736bd49bc7e50cb8cdf9f81386f59) [@bep](https://github.com/bep) [#7448](https://github.com/gohugoio/hugo/issues/7448)
-
-
-
diff --git a/docs/content/en/news/0.74.1-relnotes/index.md b/docs/content/en/news/0.74.1-relnotes/index.md
index 8ab97f107..7419296af 100644
--- a/docs/content/en/news/0.74.1-relnotes/index.md
+++ b/docs/content/en/news/0.74.1-relnotes/index.md
@@ -2,7 +2,7 @@
---
date: 2020-07-13
title: "Hugo 0.74.1: A couple of Bug Fixes"
-description: "This version fixes a couple of bugs introduced in 0.74.0."
+description: "This version fixes one issue introduced in 0.74.0."
categories: ["Releases"]
images:
- images/blog/hugo-bug-poster.png
diff --git a/docs/content/en/news/0.74.2-relnotes/index.md b/docs/content/en/news/0.74.2-relnotes/index.md
index 0f77133eb..e78d8564c 100644
--- a/docs/content/en/news/0.74.2-relnotes/index.md
+++ b/docs/content/en/news/0.74.2-relnotes/index.md
@@ -11,9 +11,14 @@ images:
-This is a bug-fix release with one important fix.
+Add .Defines to js.Build options [35011bcb](https://github.com/gohugoio/hugo/commit/35011bcb26b6fcfcbd77dc05aa8246ca45b2c2ba) [@bep](https://github.com/bep) [#7489](https://github.com/gohugoio/hugo/issues/7489)
-* Add .Defines to js.Build options [35011bcb](https://github.com/gohugoio/hugo/commit/35011bcb26b6fcfcbd77dc05aa8246ca45b2c2ba) [@bep](https://github.com/bep) [#7489](https://github.com/gohugoio/hugo/issues/7489)
+This is needed to import `react` as a library, e.g.:
+```
+{{ $jsx := resources.Get "index.jsx" }}
+{{ $options := dict "defines" (dict "process.env.NODE_ENV" "\"development\"") }}
+{{ $js := $jsx | js.Build $options }}
+```
diff --git a/docs/netlify.toml b/docs/netlify.toml
index f02fdbf77..3ca9763fe 100644
--- a/docs/netlify.toml
+++ b/docs/netlify.toml
@@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify"
[context.production.environment]
-HUGO_VERSION = "0.73.0"
+HUGO_VERSION = "0.74.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment]
-HUGO_VERSION = "0.73.0"
+HUGO_VERSION = "0.74.2"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
-HUGO_VERSION = "0.73.0"
+HUGO_VERSION = "0.74.2"
[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
-HUGO_VERSION = "0.73.0"
+HUGO_VERSION = "0.74.2"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
diff --git a/docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_480x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_480x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..5b616efae
--- /dev/null
+++ b/docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_480x0_resize_catmullrom_2.png
Binary files differ
diff --git a/docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_640x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_640x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..449b7b302
--- /dev/null
+++ b/docs/resources/_gen/images/news/0.74.0-relnotes/featured_hu7ff75a56a54dd46c9d2c16ab503af3cf_56047_640x0_resize_catmullrom_2.png
Binary files differ