--- /dev/null
- To get all images in a [Page Bundle]({{< relref "/content-management/organization#page-bundles" >}}):
+---
+title: "Image Processing"
+description: "Image Page resources can be resized and cropped."
+date: 2018-01-24T13:10:00-05:00
+linktitle: "Image Processing"
+categories: ["content management"]
+keywords: [resources, images]
+weight: 4004
+draft: false
+toc: true
+menu:
+ docs:
+ parent: "content-management"
+ weight: 32
+---
+
+## The Image Page Resource
+
+The `image` is a [Page Resource]({{< relref "/content-management/page-resources" >}}), and the processing methods listed below do not work on images inside your `/static` folder.
+
++To print all images paths in a [Page Bundle]({{< relref "/content-management/organization#page-bundles" >}}):
+
+```go-html-template
+{{ with .Resources.ByType "image" }}
++{{ range . }}
++{{ .RelPermalink }}
++{{ end }}
+{{ end }}
+
+```
+
++## The Image Resource
++
++The `image` resource can also be retrieved from a [global resource]({{< relref "/hugo-pipes/introduction#from-file-to-resource" >}})
++
++{{- $image := resources.Get "images/logo.jpg" -}}
++
+## Image Processing Methods
+
+The `image` resource implements the methods `Resize`, `Fit` and `Fill`, each returning the transformed image using the specified dimensions and processing options. The `image` resource also, since Hugo 0.58, implements the method `Exif` and `Filter`.
+
+### Resize
+
+Resizes the image to the specified width and height.
+
+```go
+// Resize to a width of 600px and preserve ratio
+{{ $image := $resource.Resize "600x" }}
+
+// Resize to a height of 400px and preserve ratio
+{{ $image := $resource.Resize "x400" }}
+
+// Resize to a width 600px and a height of 400px
+{{ $image := $resource.Resize "600x400" }}
+```
+
+### Fit
+
+Scale down the image to fit the given dimensions while maintaining aspect ratio. Both height and width are required.
+
+```go
+{{ $image := $resource.Fit "600x400" }}
+```
+
+### Fill
+
+Resize and crop the image to match the given dimensions. Both height and width are required.
+
+```go
+{{ $image := $resource.Fill "600x400" }}
+```
+
+### Filter
+
+Apply one or more filters to your image. See [Image Filters](/functions/images/#image-filters) for a full list.
+
+```go-html-template
+{{ $img = $img.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+The above can also be written in a more functional style using pipes:
+
+```go-html-template
+{{ $img = $img | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+The filters will be applied in the given order.
+
+Sometimes it can be useful to create the filter chain once and then reuse it:
+
+```go-html-template
+{{ $filters := slice (images.GaussianBlur 6) (images.Pixelate 8) }}
+{{ $img1 = $img1.Filter $filters }}
+{{ $img2 = $img2.Filter $filters }}
+```
+
+### Exif
+
+Provides an [Exif](https://en.wikipedia.org/wiki/Exif) object with metadata about the image.
+
+Note that this is only suported for JPEG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.:
+
+```go-html-template
+{{ with $img.Exif }}
+Date: {{ .Date }}
+Lat/Long: {{ .Lat}}/{{ .Long }}
+Tags:
+{{ range $k, $v := .Tags }}
+TAG: {{ $k }}: {{ $v }}
+{{ end }}
+{{ end }}
+```
+
+Or individually access EXIF data with dot access, e.g.:
+
+```go-html-template
+{{ with $src.Exif }}
+ <ul>
+ {{ with .Date }}<li>Date: {{ .Format "January 02, 2006" }}</li>{{ end }}
+ {{ with .Tags.ApertureValue }}<li>Aperture: {{ lang.NumFmt 2 . }}</li>{{ end }}
+ {{ with .Tags.BrightnessValue }}<li>Brightness: {{ lang.NumFmt 2 . }}</li>{{ end }}
+ {{ with .Tags.ExposureTime }}<li>Exposure Time: {{ . }}</li>{{ end }}
+ {{ with .Tags.FNumber }}<li>F Number: {{ . }}</li>{{ end }}
+ {{ with .Tags.FocalLength }}<li>Focal Length: {{ . }}</li>{{ end }}
+ {{ with .Tags.ISOSpeedRatings }}<li>ISO Speed Ratings: {{ . }}</li>{{ end }}
+ {{ with .Tags.LensModel }}<li>Lens Model: {{ . }}</li>{{ end }}
+ </ul>
+{{ end }}
+```
+
+Some fields may need to be formatted with [`lang.NumFmt`]({{< relref "functions/numfmt" >}}) function to prevent display like `Aperture: 2.278934289` instead of `Aperture: 2.28`.
+
+#### Exif fields
+
+Date
+: "photo taken" date/time
+
+Lat
+: "photo taken where", GPS latitude
+
+Long
+: "photo taken where", GPS longitude
+
+See [Image Processing Config](#image-processing-config) for how to configure what gets included in Exif.
+
+## Image Processing Options
+
+In addition to the dimensions (e.g. `600x400`), Hugo supports a set of additional image options.
+
+### Background Color
+
+The background color to fill into the transparency layer. This is mostly useful when converting to a format that does not support transparency, e.g. `JPEG`.
+
+You can set the background color to use with a 3 or 6 digit hex code starting with `#`.
+
+```go
+{{ $image.Resize "600x jpg #b31280" }}
+```
+
+For color codes, see https://www.google.com/search?q=color+picker
+
+**Note** that you also set a default background color to use, see [Image Processing Config](#image-processing-config).
+
+### JPEG Quality
+
+Only relevant for JPEG images, values 1 to 100 inclusive, higher is better. Default is 75.
+
+```go
+{{ $image.Resize "600x q50" }}
+```
+
+### Rotate
+
+Rotates an image by the given angle counter-clockwise. The rotation will be performed first to get the dimensions correct. The main use of this is to be able to manually correct for [EXIF orientation](https://github.com/golang/go/issues/4341) of JPEG images.
+
+```go
+{{ $image.Resize "600x r90" }}
+```
+
+### Anchor
+
+Only relevant for the `Fill` method. This is useful for thumbnail generation where the main motive is located in, say, the left corner.
+Valid are `Center`, `TopLeft`, `Top`, `TopRight`, `Left`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`.
+
+```go
+{{ $image.Fill "300x200 BottomLeft" }}
+```
+
+### Resample Filter
+
+Filter used in resizing. Default is `Box`, a simple and fast resampling filter appropriate for downscaling.
+
+Examples are: `Box`, `NearestNeighbor`, `Linear`, `Gaussian`.
+
+See https://github.com/disintegration/imaging for more. If you want to trade quality for faster processing, this may be a option to test.
+
+```go
+{{ $image.Resize "600x400 Gaussian" }}
+```
+
+### Target Format
+
+By default the images is encoded in the source format, but you can set the target format as an option.
+
+Valid values are `jpg`, `png`, `tif`, `bmp`, and `gif`.
+
+```go
+{{ $image.Resize "600x jpg" }}
+```
+
+## Image Processing Examples
+
+_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
+
+{{< imgproc sunset Resize "300x" />}}
+
+{{< imgproc sunset Fill "90x120 left" />}}
+
+{{< imgproc sunset Fill "90x120 right" />}}
+
+{{< imgproc sunset Fit "90x90" />}}
+
+{{< imgproc sunset Resize "300x q10" />}}
+
+This is the shortcode used in the examples above:
+
+{{< code file="layouts/shortcodes/imgproc.html" >}}
+{{< readfile file="layouts/shortcodes/imgproc.html" >}}
+{{< /code >}}
+
+And it is used like this:
+
+```go-html-template
+{{</* imgproc sunset Resize "300x" /*/>}}
+```
+
+{{% note %}}
+**Tip:** Note the self-closing shortcode syntax above. The `imgproc` shortcode can be called both with and without **inner content**.
+{{% /note %}}
+
+## Image Processing Config
+
+You can configure an `imaging` section in `config.toml` with default image processing options:
+
+```toml
+[imaging]
+# Default resample filter used for resizing. Default is Box,
+# a simple and fast averaging filter appropriate for downscaling.
+# See https://github.com/disintegration/imaging
+resampleFilter = "box"
+
+# Default JPEG quality setting. Default is 75.
+quality = 75
+
+# Anchor used when cropping pictures.
+# Default is "smart" which does Smart Cropping, using https://github.com/muesli/smartcrop
+# Smart Cropping is content aware and tries to find the best crop for each image.
+# Valid values are Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
+anchor = "smart"
+
+# Default background color.
+# Hugo will preserve transparency for target formats that supports it,
+# but will fall back to this color for JPEG.
+# Expects a standard HEX color string with 3 or 6 digits.
+# See https://www.google.com/search?q=color+picker
+bgColor = "#ffffff"
+
+[imaging.exif]
+ # Regexp matching the fields you want to Exclude from the (massive) set of Exif info
+# available. As we cache this info to disk, this is for performance and
+# disk space reasons more than anything.
+# If you want it all, put ".*" in this config setting.
+# Note that if neither this or ExcludeFields is set, Hugo will return a small
+# default set.
+includeFields = ""
+
+# Regexp matching the Exif fields you want to exclude. This may be easier to use
+# than IncludeFields above, depending on what you want.
+excludeFields = ""
+
+# Hugo extracts the "photo taken" date/time into .Date by default.
+# Set this to true to turn it off.
+disableDate = false
+
+# Hugo extracts the "photo taken where" (GPS latitude and longitude) into
+# .Long and .Lat. Set this to true to turn it off.
+disableLatLong = false
+
+
+```
+
+## Smart Cropping of Images
+
+By default, Hugo will use the [Smartcrop](https://github.com/muesli/smartcrop), a library created by [muesli](https://github.com/muesli), when cropping images with `.Fill`. You can set the anchor point manually, but in most cases the smart option will make a good choice. And we will work with the library author to improve this in the future.
+
+An example using the sunset image from above:
+
+{{< imgproc sunset Fill "200x200 smart" />}}
+
+## Image Processing Performance Consideration
+
+Processed images are stored below `<project-dir>/resources` (can be set with `resourceDir` config setting). This folder is deliberately placed in the project, as it is recommended to check these into source control as part of the project. These images are not "Hugo fast" to generate, but once generated they can be reused.
+
+If you change your image settings (e.g. size), remove or rename images etc., you will end up with unused images taking up space and cluttering your project.
+
+To clean up, run:
+
+```bash
+hugo --gc
+```
+
+{{% note %}}
+**GC** is short for **Garbage Collection**.
+{{% /note %}}
--- /dev/null
+---
+title : "Page Bundles"
+description : "Content organization using Page Bundles"
+date : 2018-01-24T13:09:00-05:00
+lastmod : 2018-01-28T22:26:40-05:00
+linktitle : "Page Bundles"
+keywords : ["page", "bundle", "leaf", "branch"]
+categories : ["content management"]
+toc : true
+menu :
+ docs:
+ identifier : "page-bundles"
+ parent : "content-management"
+ weight : 11
+---
+
+Page Bundles are a way to group [Page Resources](/content-management/page-resources/).
+
+A Page Bundle can be one of:
+
+- Leaf Bundle (leaf means it has no children)
+- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
+
+| | Leaf Bundle | Branch Bundle |
+|-------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) |
+| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] |
+| Allowed Resources | Page and non-page (like images, pdf, etc.) types | Only non-page (like images, pdf, etc.) types |
+| Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). |
+| Layout type | `single` | `list` |
+| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it |
+| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` |
+| Content from non-index page files... | Accessed only as page resources | Accessed only as regular pages |
+
+
+## Leaf Bundles {#leaf-bundles}
+
+A _Leaf Bundle_ is a directory at any hierarchy within the `content/`
+directory, that contains an **`index.md`** file.
+
+### Examples of Leaf Bundle organization {#examples-of-leaf-bundle-organization}
+
+```text
+content/
+├── about
+│ ├── index.md
+├── posts
+│ ├── my-post
+│ │ ├── content1.md
+│ │ ├── content2.md
+│ │ ├── image1.jpg
+│ │ ├── image2.png
+│ │ └── index.md
+│ └── my-other-post
+│ └── index.md
+│
+└── another-section
+ ├── ..
+ └── not-a-leaf-bundle
+ ├── ..
+ └── another-leaf-bundle
+ └── index.md
+```
+
+In the above example `content/` directory, there are four leaf
+bundles:
+
+about
+: This leaf bundle is at the root level (directly under
+ `content` directory) and has only the `index.md`.
+
+my-post
+: This leaf bundle has the `index.md`, two other content
+ Markdown files and two image files.
+
++image1
++: This image is a page resource of `my-post`
++ and only available in `my-post/index.md` resources.
++
++image2
++: This image is a page resource of `my-post`
++ and only available in `my-post/index.md` resources.
++
+my-other-post
+: This leaf bundle has only the `index.md`.
+
+another-leaf-bundle
+: This leaf bundle is nested under couple of
+ directories. This bundle also has only the `index.md`.
+
+{{% note %}}
+The hierarchy depth at which a leaf bundle is created does not matter,
+as long as it is not inside another **leaf** bundle.
+{{% /note %}}
+
+
+### Headless Bundle {#headless-bundle}
+
+A headless bundle is a bundle that is configured to not get published
+anywhere:
+
+- It will have no `Permalink` and no rendered HTML in `public/`.
+- It will not be part of `.Site.RegularPages`, etc.
+
+But you can get it by `.Site.GetPage`. Here is an example:
+
+```go-html-template
+{{ $headless := .Site.GetPage "/some-headless-bundle" }}
+{{ $reusablePages := $headless.Resources.Match "author*" }}
+<h2>Authors</h2>
+{{ range $reusablePages }}
+ <h3>{{ .Title }}</h3>
+ {{ .Content }}
+{{ end }}
+```
+
+_In this example, we are assuming the `some-headless-bundle` to be a headless
+ bundle containing one or more **page** resources whose `.Name` matches
+ `"author*"`._
+
+Explanation of the above example:
+
+1. Get the `some-headless-bundle` Page "object".
+2. Collect a *slice* of resources in this *Page Bundle* that matches
+ `"author*"` using `.Resources.Match`.
+3. Loop through that *slice* of nested pages, and output their `.Title` and
+ `.Content`.
+
+---
+
+A leaf bundle can be made headless by adding below in the Front Matter
+(in the `index.md`):
+
+```toml
+headless = true
+```
+
+{{% note %}}
+Only leaf bundles can be made headless.
+{{% /note %}}
+
+There are many use cases of such headless page bundles:
+
+- Shared media galleries
+- Reusable page content "snippets"
+
+
+## Branch Bundles {#branch-bundles}
+
+A _Branch Bundle_ is any directory at any hierarchy within the
+`content/` directory, that contains at least an **`_index.md`** file.
+
+This `_index.md` can also be directly under the `content/` directory.
+
+{{% note %}}
+Here `md` (markdown) is used just as an example. You can use any file
+type as a content resource as long as it is a content type recognized by Hugo.
+{{% /note %}}
+
+
+### Examples of Branch Bundle organization {#examples-of-branch-bundle-organization}
+
+```text
+content/
+├── branch-bundle-1
+│ ├── branch-content1.md
+│ ├── branch-content2.md
+│ ├── image1.jpg
+│ ├── image2.png
+│ └── _index.md
+└── branch-bundle-2
+ ├── _index.md
+ └── a-leaf-bundle
+ └── index.md
+```
+
+In the above example `content/` directory, there are two branch
+bundles (and a leaf bundle):
+
+`branch-bundle-1`
+: This branch bundle has the `_index.md`, two
+ other content Markdown files and two image files.
+
+`branch-bundle-2`
+: This branch bundle has the `_index.md` and a
+ nested leaf bundle.
+
+{{% note %}}
+The hierarchy depth at which a branch bundle is created does not
+matter.
+{{% /note %}}
+
+[^fn:1]: The `.md` extension is just an example. The extension can be `.html`, `.json` or any of any valid MIME type.
--- /dev/null
+---
+title : "Page Resources"
+description : "Page Resources -- images, other pages, documents etc. -- have page-relative URLs and their own metadata."
+date: 2018-01-24
+categories: ["content management"]
+keywords: [bundle,content,resources]
+weight: 4003
+draft: false
+toc: true
+linktitle: "Page Resources"
+menu:
+ docs:
+ parent: "content-management"
+ weight: 31
+---
+
++Page resources are available for [page bundles]({{< relref "/content-management/page-bundles" >}}) only,
++i.e. a directory with either a `index.md`, or `_index.md` file at its root. Resources are only attached to
++the lowest page they are bundled with, and simple which names does not contain `index.md` are not attached any resource.
++
+## Properties
+
+ResourceType
+: The main type of the resource. For example, a file of MIME type `image/jpeg` has the ResourceType `image`.
+
+Name
+: Default value is the filename (relative to the owning page). Can be set in front matter.
+
+Title
+: Default value is the same as `.Name`. Can be set in front matter.
+
+Permalink
+: The absolute URL to the resource. Resources of type `page` will have no value.
+
+RelPermalink
+: The relative URL to the resource. Resources of type `page` will have no value.
+
+Content
+: The content of the resource itself. For most resources, this returns a string with the contents of the file. This can be used to inline some resources, such as `<script>{{ (.Resources.GetMatch "myscript.js").Content | safeJS }}</script>` or `<img src="{{ (.Resources.GetMatch "mylogo.png").Content | base64Encode }}">`.
+
+MediaType
+: The MIME type of the resource, such as `image/jpeg`.
+
+MediaType.MainType
+: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`.
+
+MediaType.SubType
+: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`.
+
+MediaType.Suffixes
+: A slice of possible suffixes for the resource's MIME type.
+
+## Methods
+ByType
+: Returns the page resources of the given type.
+
+```go
+{{ .Resources.ByType "image" }}
+```
+Match
+: Returns all the page resources (as a slice) whose `Name` matches the given Glob pattern ([examples](https://github.com/gobwas/glob/blob/master/readme.md)). The matching is case-insensitive.
+
+```go
+{{ .Resources.Match "images/*" }}
+```
+
+GetMatch
+: Same as `Match` but will return the first match.
+
+### Pattern Matching
+```go
+// Using Match/GetMatch to find this images/sunset.jpg ?
+.Resources.Match "images/sun*" ✅
+.Resources.Match "**/sunset.jpg" ✅
+.Resources.Match "images/*.jpg" ✅
+.Resources.Match "**.jpg" ✅
+.Resources.Match "*" 🚫
+.Resources.Match "sunset.jpg" 🚫
+.Resources.Match "*sunset.jpg" 🚫
+
+```
+
+## Page Resources Metadata
+
+The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
+
+{{% note %}}
+Resources of type `page` get `Title` etc. from their own front matter.
+{{% /note %}}
+
+name
+: Sets the value returned in `Name`.
+
+{{% warning %}}
+The methods `Match` and `GetMatch` use `Name` to match the resources.
+{{%/ warning %}}
+
+title
+: Sets the value returned in `Title`
+
+params
+: A map of custom key/values.
+
+
+### Resources metadata example
+
+{{< code-toggle copy="false">}}
+title: Application
+date : 2018-01-25
+resources :
+- src : "images/sunset.jpg"
+ name : "header"
+- src : "documents/photo_specs.pdf"
+ title : "Photo Specifications"
+ params:
+ icon : "photo"
+- src : "documents/guide.pdf"
+ title : "Instruction Guide"
+- src : "documents/checklist.pdf"
+ title : "Document Checklist"
+- src : "documents/payment.docx"
+ title : "Proof of Payment"
+- src : "**.pdf"
+ name : "pdf-file-:counter"
+ params :
+ icon : "pdf"
+- src : "**.docx"
+ params :
+ icon : "word"
+{{</ code-toggle >}}
+
+From the example above:
+
+- `sunset.jpg` will receive a new `Name` and can now be found with `.GetMatch "header"`.
+- `documents/photo_specs.pdf` will get the `photo` icon.
+- `documents/checklist.pdf`, `documents/guide.pdf` and `documents/payment.docx` will get `Title` as set by `title`.
+- Every `PDF` in the bundle except `documents/photo_specs.pdf` will get the `pdf` icon.
+- All `PDF` files will get a new `Name`. The `name` parameter contains a special placeholder [`:counter`](#the-counter-placeholder-in-name-and-title), so the `Name` will be `pdf-file-1`, `pdf-file-2`, `pdf-file-3`.
+- Every docx in the bundle will receive the `word` icon.
+
+{{% warning %}}
+The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
+{{%/ warning %}}
+
+### The `:counter` placeholder in `name` and `title`
+
+The `:counter` is a special placeholder recognized in `name` and `title` parameters `resources`.
+
+The counter starts at 1 the first time they are used in either `name` or `title`.
+
+For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as:
+
+{{< code-toggle copy="false">}}
+[[resources]]
+ src = "*specs.pdf"
+ title = "Specification #:counter"
+[[resources]]
+ src = "**.pdf"
+ name = "pdf-file-:counter"
+{{</ code-toggle >}}
+
+the `Name` and `Title` will be assigned to the resource files as follows:
+
+| Resource file | `Name` | `Title` |
+|-------------------|-------------------|-----------------------|
+| checklist.pdf | `"pdf-file-1.pdf` | `"checklist.pdf"` |
+| guide.pdf | `"pdf-file-2.pdf` | `"guide.pdf"` |
+| other\_specs.pdf | `"pdf-file-3.pdf` | `"Specification #1"` |
+| photo\_specs.pdf | `"pdf-file-4.pdf` | `"Specification #2"` |
--- /dev/null
+---
+title: len
+linktitle: len
+description: Returns the length of a variable according to its type.
+godocref: https://golang.org/pkg/builtin/#len
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-04-18
+categories: [functions]
++menu:
++ docs:
++ parent: "functions"
+keywords: []
+signature: ["len INPUT"]
+workson: [lists,taxonomies,terms]
+hugoversion:
+relatedfuncs: []
+deprecated: false
+toc: false
+aliases: []
+---
+
+`len` is a built-in function in Go that returns the length of a variable according to its type. From the Go documentation:
+
+> Array: the number of elements in v.
+>
+> Pointer to array: the number of elements in *v (even if v is nil).
+>
+> Slice, or map: the number of elements in v; if v is nil, len(v) is zero.
+>
+> String: the number of bytes in v.
+>
+> Channel: the number of elements queued (unread) in the channel buffer; if v is nil, len(v) is zero.
+
+`len` is also considered a [fundamental function for Hugo templating][].
+
+## `len` Example 1: Longer Headings
+
+You may want to append a class to a heading according to the length of the string therein. The following templating checks to see if the title's length is greater than 80 characters and, if so, adds a `long-title` class to the `<h1>`:
+
+{{< code file="check-title-length.html" >}}
+<header>
+ <h1{{if gt (len .Title) 80}} class="long-title"{{end}}>{{.Title}}</h1>
+</header>
+{{< /code >}}
+
+## `len` Example 2: Counting Pages with `where`
+
+The following templating uses [`where`][] in conjunction with `len` to
+figure out the total number of content pages in a `posts` [section][]:
+
+{{< code file="how-many-posts.html" >}}
+{{ $posts := (where .Site.RegularPages "Section" "==" "posts") }}
+{{ $postCount := len $posts }}
+{{< /code >}}
+
+Note the use of `.RegularPages`, a [site variable][] that counts all regular content pages but not the `_index.md` pages used to add front matter and content to [list templates][].
+
+
+[fundamental function for Hugo templating]: /templates/introduction/
+[list templates]: /templates/lists/
+[section]: /content-management/sections/
+[site variable]: /variables/site/
+[`where`]: /functions/where/
--- /dev/null
- This can be useful to filter a small amount of pages from a large pool. Instead of set field on all pages, you can set field on required pages only.
+---
+title: where
+# linktitle: where
+description: Filters an array to only the elements containing a matching value for a given field.
+godocref:
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [filtering]
+signature: ["where COLLECTION KEY [OPERATOR] MATCH"]
+workson: [lists,taxonomies,terms,groups]
+hugoversion:
+relatedfuncs: [intersect,first,after,last]
+deprecated: false
+toc: true
+needsexample: true
+---
+
+`where` filters an array to only the elements containing a matching
+value for a given field.
+
+It works in a similar manner to the [`where` keyword in
+SQL][wherekeyword].
+
+```go-html-template
+{{ range where .Pages "Section" "foo" }}
+ {{ .Content }}
+{{ end }}
+```
+
+It can be used by dot-chaining the second argument to refer to a nested element of a value.
+
+```
++++
+series: golang
++++
+```
+
+```go-html-template
+{{ range where .Site.Pages "Params.series" "golang" }}
+ {{ .Content }}
+{{ end }}
+```
+
+It can also be used with the logical operators `!=`, `>=`, `in`, etc. Without an operator, `where` compares a given field with a matching value equivalent to `=`.
+
+```go-html-template
+{{ range where .Pages "Section" "!=" "foo" }}
+ {{ .Content }}
+{{ end }}
+```
+
+The following logical operators are available with `where`:
+
+`=`, `==`, `eq`
+: `true` if a given field value equals a matching value
+
+`!=`, `<>`, `ne`
+: `true` if a given field value doesn't equal a matching value
+
+`>=`, `ge`
+: `true` if a given field value is greater than or equal to a matching value
+
+`>`, `gt`
+: `true` if a given field value is greater than a matching value
+
+`<=`, `le`
+: `true` if a given field value is lesser than or equal to a matching value
+
+`<`, `lt`
+: `true` if a given field value is lesser than a matching value
+
+`in`
+: `true` if a given field value is included in a matching value; a matching value must be an array or a slice
+
+`not in`
+: `true` if a given field value isn't included in a matching value; a matching value must be an array or a slice
+
+`intersect`
+: `true` if a given field value that is a slice/array of strings or integers contains elements in common with the matching value; it follows the same rules as the [`intersect` function][intersect].
+
+## Use `where` with `Booleans`
+When using booleans you should not put quotation marks.
+```go-html-template
+{{range where .Pages ".Draft" true}}
+ <p>{{.Title}}</p>
+{{end}}
+```
+
+
+## Use `where` with `intersect`
+
+```go-html-template
+{{ range where .Site.Pages ".Params.tags" "intersect" .Params.tags }}
+ {{ if ne .Permalink $.Permalink }}
+ {{ .Render "summary" }}
+ {{ end }}
+{{ end }}
+```
+
+You can also put the returned value of the `where` clauses into a variable:
+
+{{< code file="where-intersect-variables.html" >}}
+{{ $v1 := where .Site.Pages "Params.a" "v1" }}
+{{ $v2 := where .Site.Pages "Params.b" "v2" }}
+{{ $filtered := $v1 | intersect $v2 }}
+{{ range $filtered }}
+{{ end }}
+{{< /code >}}
+
+## Use `where` with `first`
+
+Using `first` and `where` together can be very
+powerful. Below snippet gets a list of posts only from [**main
+sections**](#mainsections), sorts it using the [default
+ordering](/templates/lists/) for lists (i.e., `weight => date`), and
+then ranges through only the first 5 posts in that list:
+
+{{< code file="first-and-where-together.html" >}}
+{{ range first 5 (where site.RegularPages "Type" "in" site.Params.mainSections) }}
+ {{ .Content }}
+{{ end }}
+{{< /code >}}
+
+## Nest `where` Clauses
+
+You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured:
+
+```go-html-template
+{{ range where (where .Pages "Section" "blog" ) ".Params.featured" "!=" true }}
+```
+
+## Unset Fields
+
+Filtering only works for set fields. To check whether a field is set or exists, you can use the operand `nil`.
+
++This can be useful to filter a small amount of pages from a large pool. Instead of setting a field on all pages, you can set that field on required pages only.
+
+Only the following operators are available for `nil`
+
+* `=`, `==`, `eq`: True if the given field is not set.
+* `!=`, `<>`, `ne`: True if the given field is set.
+
+```go-html-template
+{{ range where .Pages ".Params.specialpost" "!=" nil }}
+ {{ .Content }}
+{{ end }}
+```
+
+## Portable `where` filters -- `site.Params.mainSections` {#mainsections}
+
+**This is especially important for themes.**
+
+To list the most relevant pages on the front page or similar, you
+should use the `site.Params.mainSections` list instead of comparing
+section names to hard-coded values like `"posts"` or `"post"`.
+
+```go-html-template
+{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+```
+
+If the user has not set this config parameter in their site config, it
+will default to the _section with the most pages_.
+
+The user can override the default in `config.toml`:
+
+```toml
+[params]
+ mainSections = ["blog", "docs"]
+```
+
+[intersect]: /functions/intersect/
+[wherekeyword]: https://www.techonthenet.com/sql/where.php
--- /dev/null
- <a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a>
+---
+title: Configure Markup
+description: How to handle Markdown and other markup related configuration.
+date: 2019-11-15
+categories: [getting started,fundamentals]
+keywords: [configuration,highlighting]
+weight: 65
+sections_weight: 65
+slug: configuration-markup
+toc: true
+---
+
+## Configure Markup
+
+{{< new-in "0.60.0" >}}
+
+See [Goldmark](#goldmark) for settings related to the default Markdown handler in Hugo.
+
+Below are all markup related configuration in Hugo with their default settings:
+
+{{< code-toggle config="markup" />}}
+
+**See each section below for details.**
+
+### Goldmark
+
+[Goldmark](https://github.com/yuin/goldmark/) is from Hugo 0.60 the default library used for Markdown. It's fast, it's [CommonMark](https://spec.commonmark.org/0.29/) compliant and it's very flexible. Note that the feature set of Goldmark vs Blackfriday isn't the same; you gain a lot but also lose some, but we will work to bridge any gap in the upcoming Hugo versions.
+
+This is the default configuration:
+
+{{< code-toggle config="markup.goldmark" />}}
+
+Some settings explained:
+
+unsafe
+: By default, Goldmark does not render raw HTMLs and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
+
+typographer
+: This extension substitutes punctuations with typographic entities like [smartypants](https://daringfireball.net/projects/smartypants/).
+
+autoHeadingIDType ("github") {{< new-in "0.62.2" >}}
+: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs work as with [Blackfriday](#blackfriday), the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func.
+
+### Blackfriday
+
+
+[Blackfriday](https://github.com/russross/blackfriday) was Hugo's default Markdown rendering engine, now replaced with Goldmark. But you can still use it: Just set `defaultMarkdownHandler` to `blackfriday` in your top level `markup` config.
+
+This is the default config:
+
+{{< code-toggle config="markup.blackFriday" />}}
+
+### Highlight
+
+This is the default `highlight` configuration. Note that some of these settings can be set per code block, see [Syntax Highlighting](/content-management/syntax-highlighting/).
+
+{{< code-toggle config="markup.highlight" />}}
+
+For `style`, see these galleries:
+
+* [Short snippets](https://xyproto.github.io/splash/docs/all.html)
+* [Long snippets](https://xyproto.github.io/splash/docs/longer/all.html)
+
+For CSS, see [Generate Syntax Highlighter CSS](/content-management/syntax-highlighting/#generate-syntax-highlighter-css).
+
+### Table Of Contents
+
+{{< code-toggle config="markup.tableOfContents" />}}
+
+These settings only works for the Goldmark renderer:
+
+startLevel
+: The heading level, values starting at 1 (`h1`), to start render the table of contents.
+
+endLevel
+: The heading level, inclusive, to stop render the table of contents.
+
+ordered
+: Whether or not to generate an ordered list instead of an unordered list.
+
+
+## Markdown Render Hooks
+
+{{< new-in "0.62.0" >}}
+
+Note that this is only supported with the [Goldmark](#goldmark) renderer.
+
+These Render Hooks allow custom templates to render links and images from markdown.
+
+You can do this by creating templates with base names `render-link` and/or `render-image` inside `layouts/_default/_markup`.
+
+You can define [Output-Format-](/templates/output-formats) and [language-](/content-management/multilingual/)specific templates if needed.[^hooktemplate] Your `layouts` folder may look like this:
+
+```bash
+layouts
+└── _default
+ └── _markup
+ ├── render-image.html
+ ├── render-image.rss.xml
+ └── render-link.html
+```
+
+Some use cases for the above:
+
+* Resolve link references using `.GetPage`. This would make links portable as you could translate `./my-post.md` (and similar constructs that would work on GitHub) into `/blog/2019/01/01/my-post/` etc.
+* Add `target=_blank` to external links.
+* Resolve and [process](/content-management/image-processing/) images.
+
+### Render Hook Templates
+
+Both `render-link` and `render-image` templates will receive this context:
+
+Page
+: The [Page](/variables/page/) being rendered.
+
+Destination
+: The URL.
+
+Title
+: The title attribute.
+
+Text
+: The rendered (HTML) link text.
+
+PlainText
+: The plain variant of the above.
+
+#### Link with title Markdown example :
+
+```md
+[Text](https://www.gohugo.io "Title")
+```
+
+Here is a code example for how the render-link.html template could look:
+
+{{< code file="layouts/_default/_markup/render-link.html" >}}
++<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
+{{< /code >}}
+
+#### Image Markdown example:
+
+```md
+
+```
+
+Here is a code example for how the render-image.html template could look:
+
+{{< code file="layouts/_default/_markup/render-image.html" >}}
+<p class="md__image">
+ <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
+</p>
+{{< /code >}}
+
+[^hooktemplate]: It's currently only possible to have one set of render hook templates, e.g. not per `Type` or `Section`. We may consider that in a future version.
+
--- /dev/null
- title: "0.70.0"
- description: "0.70.0"
+
+---
+date: 2020-05-06
- This is a small release, and the main new feature is that you can now use [Babel](https://gohugo.io/hugo-pipes/babel/) to transpile JavaScript.
++title: "JavaScript Transpiler"
++description: "Hugo 0.70.0 adds a new pipe function that uses Babel to transpile JavaScript."
+categories: ["Releases"]
+---
+
++This is a small release, and the main new feature is that you can now use [Babel](https://gohugo.io/hugo-pipes/babel/) to transpile JavaScript.
+
+This release represents **22 contributions by 12 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 [@BurtonQin](https://github.com/BurtonQin), [@tekezo](https://github.com/tekezo), and [@sensimevanidus](https://github.com/sensimevanidus) for their ongoing contributions.
+And a big thanks to [@digitalcraftsman](https://github.com/digitalcraftsman) and [@onedrawingperday](https://github.com/onedrawingperday) for their relentless work on keeping the themes site in pristine condition and to [@davidsneighbour](https://github.com/davidsneighbour) and [@kaushalmodi](https://github.com/kaushalmodi) for all the great work on the documentation site.
+
+Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
+which has received **6 contributions by 4 contributors**. A special thanks to [@bep](https://github.com/bep), [@MJ2097](https://github.com/MJ2097), [@jeremyzilar](https://github.com/jeremyzilar), and [@larryclaman](https://github.com/larryclaman) for their work on the documentation site.
+
+
+Hugo now has:
+
+* 43734+ [stars](https://github.com/gohugoio/hugo/stargazers)
+* 437+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
+* 316+ [themes](http://themes.gohugo.io/)
+
+## Enhancements
+
+### Templates
+
+* Change defer RLock to RUnlock [5146dc61](https://github.com/gohugoio/hugo/commit/5146dc614fc45df698ebf890af06421dea988c96) [@BurtonQin](https://github.com/BurtonQin)
+
+### Output
+
+* Modify gen chromastyles to output all CSS classes [102ec2da](https://github.com/gohugoio/hugo/commit/102ec2da7adcc4afb7050b17989f0486f8379679) [@acahir](https://github.com/acahir) [#7167](https://github.com/gohugoio/hugo/issues/7167)
+
+### Core
+
+* Add Unlock before panic [736f84b2](https://github.com/gohugoio/hugo/commit/736f84b2d539857f7fdd0e42353af80b4dccfe8d) [@BurtonQin](https://github.com/BurtonQin)
+
+### Other
+
+* Update minify to v2.6.2 [01befcce](https://github.com/gohugoio/hugo/commit/01befcce35ec992d195ce1b9a6a1eeda693cb5a8) [@pperzyna](https://github.com/pperzyna) [#6699](https://github.com/gohugoio/hugo/issues/6699)
+* Add support for sort by boolean [04b1a6d9](https://github.com/gohugoio/hugo/commit/04b1a6d997e72d9abada28db22650d38ccbcbb39) [@Mipsters](https://github.com/Mipsters)
+* Update to Libsass 3.6.4 [dd31e800](https://github.com/gohugoio/hugo/commit/dd31e800075eebd78f921df8b4865c238006e7a7) [@bep](https://github.com/bep) [#7231](https://github.com/gohugoio/hugo/issues/7231)
+* Rename transpileJS to babel [6add6d77](https://github.com/gohugoio/hugo/commit/6add6d77b48cf0aab8b39d7a2bddedb1aa2a52b8) [@bep](https://github.com/bep) [#5764](https://github.com/gohugoio/hugo/issues/5764)
+* Add JavaScript transpiling solution [2a171ff1](https://github.com/gohugoio/hugo/commit/2a171ff1c5d9b1603fe78c67d2d894bb2efccc8b) [@hmmmmniek](https://github.com/hmmmmniek) [#5764](https://github.com/gohugoio/hugo/issues/5764)
+* Disable a test locally [67f92041](https://github.com/gohugoio/hugo/commit/67f920419a53c7ff11e01c4286dca23e92110a12) [@bep](https://github.com/bep)
+* Add diagnostic hints to init timeout message [fe60b7d9](https://github.com/gohugoio/hugo/commit/fe60b7d9e4c12dbc428f992c05969bc14c7fe7a2) [@mtlynch](https://github.com/mtlynch)
+* Update goldmark-highlighting [5c41f41a](https://github.com/gohugoio/hugo/commit/5c41f41ad4b14e48aea64687a7600f5ad231e879) [@satotake](https://github.com/satotake) [#7027](https://github.com/gohugoio/hugo/issues/7027)[#6596](https://github.com/gohugoio/hugo/issues/6596)
+* Update go-org to v1.1.0 [2b28e5a9](https://github.com/gohugoio/hugo/commit/2b28e5a9cb79af2a8d70c80036f52bcf5399b9df) [@niklasfasching](https://github.com/niklasfasching)
+* Update to goldmark v1.1.28 [feaa582c](https://github.com/gohugoio/hugo/commit/feaa582cbe950e82969da5e99e3fb9a3947025df) [@bep](https://github.com/bep) [#7113](https://github.com/gohugoio/hugo/issues/7113)
+
+## Fixes
+
+### Other
+
+* Fix some missing JS class collector cases [c03ea2b6](https://github.com/gohugoio/hugo/commit/c03ea2b66010d2996d652903cb8fa41e983e787f) [@bep](https://github.com/bep) [#7216](https://github.com/gohugoio/hugo/issues/7216)
+* Fix IsAncestor and IsDescendant when the same page is passed [8d5766d4](https://github.com/gohugoio/hugo/commit/8d5766d417d6564a1aa1cbe8f9a29ab9bba22371) [@tekezo](https://github.com/tekezo)
+* Fix IsAncestor and IsDescendant under subsection [27a4c441](https://github.com/gohugoio/hugo/commit/27a4c4410cd9592249925fb14b32605fb961c597) [@tekezo](https://github.com/tekezo)
+* Fix typo in test suite [49e6c8cb](https://github.com/gohugoio/hugo/commit/49e6c8cb4ed83e20f1e0ac164e91c38854177b99) [@panakour](https://github.com/panakour)
+* Fix class collector when running with --minify [f37e77f2](https://github.com/gohugoio/hugo/commit/f37e77f2d338cf876cfa637a662acd76f0f2009b) [@bep](https://github.com/bep) [#7161](https://github.com/gohugoio/hugo/issues/7161)
+* Fix toLower [27af5a33](https://github.com/gohugoio/hugo/commit/27af5a339a4d3c5712b5ed946a636a8c21916039) [@bep](https://github.com/bep) [#7198](https://github.com/gohugoio/hugo/issues/7198)
+* Fix broken test [b3c82575](https://github.com/gohugoio/hugo/commit/b3c825756f3251f8b26e53262f9d6f484aecf750) [@bep](https://github.com/bep)
+* Fix typo in Hugo's Security Model [cd4d8202](https://github.com/gohugoio/hugo/commit/cd4d8202016bd3eb5ed9144c8945edaba73c8cf4) [@sensimevanidus](https://github.com/sensimevanidus)
+* Fix query parameter handling in server fast render mode [ee67dbef](https://github.com/gohugoio/hugo/commit/ee67dbeff5bae6941facaaa39cb995a1ee6def03) [@bep](https://github.com/bep) [#7163](https://github.com/gohugoio/hugo/issues/7163)
+
+
+
+
+
--- /dev/null
- {{< new-in "0.63.0" >}} Since Hugo v0.63, the base template lookup order closely follows that of the template is applies to (e.g. `_default/list.html`).
+---
+title: Base Templates and Blocks
+linktitle:
+description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
+godocref: https://golang.org/pkg/text/template/#example_Template_block
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [templates,fundamentals]
+keywords: [blocks,base]
+menu:
+ docs:
+ parent: "templates"
+ weight: 20
+weight: 20
+sections_weight: 20
+draft: false
+aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
+toc: true
+---
+
+The `block` keyword allows you to define the outer shell of your pages' one or more master template(s) and then fill in or override portions as necessary.
+
+{{< youtube QVOMCYitLEc >}}
+
+## Base Template Lookup Order
+
++{{< new-in "0.63.0" >}} Since Hugo v0.63, the base template lookup order closely follows that of the template it applies to (e.g. `_default/list.html`).
+
+See [Template Lookup Order](/templates/lookup-order/) for details and examples.
+
+## Define the Base Template
+
+The following defines a simple base template at `_default/baseof.html`. As a default template, it is the shell from which all your pages will be rendered unless you specify another `*baseof.html` closer to the beginning of the lookup order.
+
+{{< code file="layouts/_default/baseof.html" download="baseof.html" >}}
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>{{ block "title" . }}
+ <!-- Blocks may include default content. -->
+ {{ .Site.Title }}
+ {{ end }}</title>
+ </head>
+ <body>
+ <!-- Code that all your templates share, like a header -->
+ {{ block "main" . }}
+ <!-- The part of the page that begins to differ between templates -->
+ {{ end }}
+ {{ block "footer" . }}
+ <!-- More shared code, perhaps a footer but that can be overridden if need be in -->
+ {{ end }}
+ </body>
+</html>
+{{< /code >}}
+
+## Override the Base Template
+
+From the above base template, you can define a [default list template][hugolists]. The default list template will inherit all of the code defined above and can then implement its own `"main"` block from:
+
+{{< code file="layouts/_default/list.html" download="list.html" >}}
+{{ define "main" }}
+ <h1>Posts</h1>
+ {{ range .Pages }}
+ <article>
+ <h2>{{ .Title }}</h2>
+ {{ .Content }}
+ </article>
+ {{ end }}
+{{ end }}
+{{< /code >}}
+
+This replaces the contents of our (basically empty) "main" block with something useful for the list template. In this case, we didn't define a `"title"` block, so the contents from our base template remain unchanged in lists.
+
+{{% warning %}}
+Code that you put outside the block definitions *can* break your layout. This even includes HTML comments. For example:
+
+```
+<!-- Seemingly harmless HTML comment..that will break your layout at build -->
+{{ define "main" }}
+...your code here
+{{ end }}
+```
+[See this thread from the Hugo discussion forums.](https://discourse.gohugo.io/t/baseof-html-block-templates-and-list-types-results-in-empty-pages/5612/6)
+{{% /warning %}}
+
+The following shows how you can override both the `"main"` and `"title"` block areas from the base template with code unique to your [default single page template][singletemplate]:
+
+{{< code file="layouts/_default/single.html" download="single.html" >}}
+{{ define "title" }}
+ <!-- This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example-->
+ {{ .Title }} – {{ .Site.Title }}
+{{ end }}
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+{{ end }}
+{{< /code >}}
+
+[hugolists]: /templates/lists
+[lookup]: /templates/lookup-order/
+[rendering the section]: /templates/section-templates/
+[singletemplate]: /templates/single-page-templates/
--- /dev/null
- HUGO_VERSION = "0.69.2"
+[build]
+publish = "public"
+command = "hugo --gc --minify"
+
+[context.production.environment]
- HUGO_VERSION = "0.69.2"
++HUGO_VERSION = "0.70.0"
+HUGO_ENV = "production"
+HUGO_ENABLEGITINFO = "true"
+
+[context.split1]
+command = "hugo --gc --minify --enableGitInfo"
+
+[context.split1.environment]
- HUGO_VERSION = "0.69.2"
++HUGO_VERSION = "0.70.0"
+HUGO_ENV = "production"
+
+[context.deploy-preview]
+command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
+
+[context.deploy-preview.environment]
- HUGO_VERSION = "0.69.2"
++HUGO_VERSION = "0.70.0"
+
+[context.branch-deploy]
+command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
+
+[context.branch-deploy.environment]
++HUGO_VERSION = "0.70.0"
+
+[context.next.environment]
+HUGO_ENABLEGITINFO = "true"
+