diff --git a/deps/deps.go b/deps/deps.go index ecbba2e5619..557f036f1fa 100644 --- a/deps/deps.go +++ b/deps/deps.go @@ -286,6 +286,10 @@ func (d Deps) ForLanguage(cfg DepsCfg, onCreated func(d *Deps) error) (*Deps, er return nil, err } + if err != nil { + return nil, err + } + d.Site = cfg.Site // The resource cache is global so reuse. diff --git a/docs/README.md b/docs/README.md index 7ca9d734c07..a2c767b7b21 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,16 +13,16 @@ Note that this repository contains solely the documentation for Hugo. For contri *Pull requests shall **only** contain changes to the actual documentation. However, changes on the code base of Hugo **and** the documentation shall be a single, atomic pull request in the [hugo](https://github.com/gohugoio/hugo) repository.* -Spelling fixes are most welcomed, and if you want to contribute longer sections to the documentation, it would be great if you had these in mind when writing: +Spelling fixes are most welcomed, and if you want to contribute longer sections to the documentation, it would be great if you had the following criteria in mind when writing: * Short is good. People go to the library to read novels. If there is more than one way to _do a thing_ in Hugo, describe the current _best practice_ (avoid "… but you can also do …" and "… in older versions of Hugo you had to …". -* For examples, try to find short snippets that teaches people about the concept. If the example is also useful as-is (copy and paste), then great, but don't list long and similar examples just so people can use them on their sites. -* Hugo has users from all over the world, so an easy to understand and [simple English](https://simple.wikipedia.org/wiki/Basic_English) is good. +* For example, try to find short snippets that teaches people about the concept. If the example is also useful as-is (copy and paste), then great. Don't list long and similar examples just so people can use them on their sites. +* Hugo has users from all over the world, so easy to understand and [simple English](https://simple.wikipedia.org/wiki/Basic_English) is good. ## Branches * The `master` branch is where the site is automatically built from, and is the place to put changes relevant to the current Hugo version. -* The `next` branch is where we store changes that is related to the next Hugo release. This can be previewed here: https://next--gohugoio.netlify.com/ +* The `next` branch is where we store changes that are related to the next Hugo release. This can be previewed here: https://next--gohugoio.netlify.com/ ## Build diff --git a/docs/content/en/_index.md b/docs/content/en/_index.md index bfebd8b2fc7..b4e602438c6 100644 --- a/docs/content/en/_index.md +++ b/docs/content/en/_index.md @@ -43,7 +43,7 @@ sections: link: templates/ color_classes: bg-primary-color-light black image: /images/home-page-templating-example.png - copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex. If you prefer Jade/Pug-like syntax, you can also use Amber, Ace, or any combination of the three." + copy: "Hugo's Go-based templating provides just the right amount of logic to build anything from the simple to complex." --- Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. diff --git a/docs/content/en/content-management/image-processing/index.md b/docs/content/en/content-management/image-processing/index.md index 9ec0734cc9f..53e72bee1ee 100644 --- a/docs/content/en/content-management/image-processing/index.md +++ b/docs/content/en/content-management/image-processing/index.md @@ -98,11 +98,12 @@ Tags: {{ range $k, $v := .Tags }} TAG: {{ $k }}: {{ $v }} {{ end }} +{{ end }} ``` #### Exif fields -Data +Date : "photo taken" date/time Lat diff --git a/docs/content/en/content-management/syntax-highlighting.md b/docs/content/en/content-management/syntax-highlighting.md index a4359e05dda..1220a06c83c 100644 --- a/docs/content/en/content-management/syntax-highlighting.md +++ b/docs/content/en/content-management/syntax-highlighting.md @@ -74,11 +74,9 @@ func GetTitleFunc(style string) func(s string) string { case "go": return strings.Title case "chicago": - tc := transform.NewTitleConverter(transform.ChicagoStyle) - return tc.Title + return transform.NewTitleConverter(transform.ChicagoStyle) default: - tc := transform.NewTitleConverter(transform.APStyle) - return tc.Title + return transform.NewTitleConverter(transform.APStyle) } } {{< / highlight >}} @@ -93,14 +91,10 @@ See [Highlight](/functions/highlight/). Highlighting in code fences is enabled by default.{{< new-in "0.60.0" >}} -```` -```go-html-template{hl_lines=[3,"5-6"],linenos=true} -``` -```` - ```` ```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199} // ... code +``` ```` @@ -122,11 +116,9 @@ func GetTitleFunc(style string) func(s string) string { case "go": return strings.Title case "chicago": - tc := transform.NewTitleConverter(transform.ChicagoStyle) - return tc.Title + return transform.NewTitleConverter(transform.ChicagoStyle) default: - tc := transform.NewTitleConverter(transform.APStyle) - return tc.Title + return transform.NewTitleConverter(transform.APStyle) } } ``` diff --git a/docs/content/en/content-management/toc.md b/docs/content/en/content-management/toc.md index 31326746c08..fbb2df06596 100644 --- a/docs/content/en/content-management/toc.md +++ b/docs/content/en/content-management/toc.md @@ -18,7 +18,11 @@ toc: true --- {{% note "TOC Heading Levels are Fixed" %}} -Currently, the `{{.TableOfContents}}` [page variable](/variables/page/) does not allow you to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `` is going to start at `

` when pulling from `{{.Content}}`. + +Previously, there was no out-of-the-box way to specify which heading levels you want the TOC to render. [See the related GitHub discussion (#1778)](https://github.com/gohugoio/hugo/issues/1778). As such, the resulting `` was going to start at `

` when pulling from `{{.Content}}`. + +Hugo [v0.60.0](https://github.com/gohugoio/hugo/releases/tag/v0.60.0) made a switch to [Goldmark](https://github.com/yuin/goldmark/) as the default library for Markdown which has improved and configurable implementation of TOC. Take a look at [how to configure TOC](/getting-started/configuration-markup/#table-of-contents) for Goldmark renderer. + {{% /note %}} ## Usage @@ -43,7 +47,7 @@ A collection of textile samples lay spread out on the table - Samsa was a travel Hugo will take this Markdown and create a table of contents from `## Introduction`, `## My Heading`, and `### My Subheading` and then store it in the [page variable][pagevars]`.TableOfContents`. -The built-in `.TableOfContents` variables outputs a `