From 90ca0af6b8306a3d246f95c14b7e65d030ddcabd Mon Sep 17 00:00:00 2001 From: Yash Murty Date: Wed, 27 May 2020 19:39:56 +0900 Subject: [PATCH 1/9] Fix typo in install instructions --- content/en/getting-started/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/getting-started/installing.md b/content/en/getting-started/installing.md index 4583cff94..1b763619c 100644 --- a/content/en/getting-started/installing.md +++ b/content/en/getting-started/installing.md @@ -444,7 +444,7 @@ Directory of C:\hugo\sites\example.com ### Snap Package -In any of the [Linux distributions that support snaps][snaps], you may install install the "extended" Sass/SCSS version with this command: +In any of the [Linux distributions that support snaps][snaps], you may install the "extended" Sass/SCSS version with this command: snap install hugo --channel=extended From 78072df81c255f1b993ecd781660d4733c71b685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 27 May 2020 13:50:13 +0200 Subject: [PATCH 2/9] Add redirect support to the server Fixes #7323 --- content/en/getting-started/configuration.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/en/getting-started/configuration.md b/content/en/getting-started/configuration.md index abce0286d..be46870d6 100644 --- a/content/en/getting-started/configuration.md +++ b/content/en/getting-started/configuration.md @@ -349,6 +349,20 @@ Content-Security-Policy = "script-src localhost:1313" {{< /code-toggle >}} +{{< new-in "0.72.0" >}} + +You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's. + +Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g: + +{{< code-toggle file="config/development/server">}} +[[redirects]] +from = "/myspa/**" +to = "/myspa/" +status = 200 +{{< /code-toggle >}} + + ## Configure Title Case From c49195c69be48759ae41a035df52687aa58e2a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 29 May 2020 18:50:12 +0200 Subject: [PATCH 3/9] common/maps: Add Scratch.Values Fixes #7335 --- content/en/functions/scratch.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/en/functions/scratch.md b/content/en/functions/scratch.md index 1a64bb2e3..10623b2cb 100644 --- a/content/en/functions/scratch.md +++ b/content/en/functions/scratch.md @@ -113,6 +113,11 @@ Removes the given key {{ .Scratch.Delete "greetings" }} ``` +#### .Values + +`Values` returns the raw backing map. Note that you should just use this method on the locally scoped `Scratch` instances you obtain via `newScratch`, not + `.Page.Scratch` etc., as that will lead to concurrency issues. + ## Scope The scope of the backing data is global for the given `Page` or `Shortcode`, and spans partial and shortcode includes. From 1f70519d8e5215b034a95d208d33406ba2ca89ed Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Sun, 31 May 2020 12:05:36 +0000 Subject: [PATCH 4/9] releaser: Add release notes to /docs for release of 0.72.0 [ci skip] --- content/en/news/0.72.0-relnotes/index.md | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 content/en/news/0.72.0-relnotes/index.md diff --git a/content/en/news/0.72.0-relnotes/index.md b/content/en/news/0.72.0-relnotes/index.md new file mode 100644 index 000000000..d8dffa1da --- /dev/null +++ b/content/en/news/0.72.0-relnotes/index.md @@ -0,0 +1,41 @@ + +--- +date: 2020-05-31 +title: "0.72.0" +description: "0.72.0" +categories: ["Releases"] +--- + + This is a rather small release, its probably main motivation being the fixes in Goldmark's [Typographer extension](https://github.com/gohugoio/hugo/commit/432885c499849efb29d3e50196f377fe0e908333). + +This release also adds [redirect and URL rewrite support](https://gohugo.io/getting-started/configuration/#configure-server) to the development server, with mostly Netlify-compatible configuration syntax. This is especially useful if you're building a [SPA](https://en.wikipedia.org/wiki/Single-page_application) with client-side routing. + + +This release represents **13 contributions by 3 contributors** to the main Hugo code base. + +Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), +which has received **9 contributions by 6 contributors**. A special thanks to [@faraixyz](https://github.com/faraixyz), [@bep](https://github.com/bep), [@coliff](https://github.com/coliff), and [@Leon0824](https://github.com/Leon0824) for their work on the documentation site. + + +Hugo now has: + +* 44383+ [stars](https://github.com/gohugoio/hugo/stargazers) +* 437+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) +* 327+ [themes](http://themes.gohugo.io/) + +## Enhancements + +### Other + +* Add Scratch.Values [2919a6a5](https://github.com/gohugoio/hugo/commit/2919a6a503f7b369154d6eb787023a1fe58a9ad4) [@bep](https://github.com/bep) [#7335](https://github.com/gohugoio/hugo/issues/7335) +* Update Goldmark to improve Typographer [432885c4](https://github.com/gohugoio/hugo/commit/432885c499849efb29d3e50196f377fe0e908333) [@bep](https://github.com/bep) [#7289](https://github.com/gohugoio/hugo/issues/7289) +* Add redirect support to the server [6a3e8974](https://github.com/gohugoio/hugo/commit/6a3e89743ccad58097a6dd203a63448946a2304d) [@bep](https://github.com/bep) [#7323](https://github.com/gohugoio/hugo/issues/7323) + +## Fixes + +### Other + +* Fix tag collector for nested table elements [c950c86b](https://github.com/gohugoio/hugo/commit/c950c86b4e5fb93f787ec78ca823bded9ef9fa3a) [@bep](https://github.com/bep) [#7318](https://github.com/gohugoio/hugo/issues/7318) +* Fix build error: my previous commits did not fix it [91520249](https://github.com/gohugoio/hugo/commit/915202494b140882d594e0542153531f6afada02) [@anthonyfok](https://github.com/anthonyfok) + + From 260130cc025966768003961a4dcedff6089fc564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 2 Jun 2020 18:08:17 +0200 Subject: [PATCH 5/9] Allow hook template per section/type Fixes #7349 --- content/en/getting-started/configuration-markup.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/getting-started/configuration-markup.md b/content/en/getting-started/configuration-markup.md index df4449bbf..99d1e989d 100644 --- a/content/en/getting-started/configuration-markup.md +++ b/content/en/getting-started/configuration-markup.md @@ -87,6 +87,8 @@ Note that this is only supported with the [Goldmark](#goldmark) renderer. Render Hooks allow custom templates to override markdown rendering functionality. You can do this by creating templates with base names `render-{feature}` in `layouts/_default/_markup`. +You can also create type/section specific hooks in `layouts/[type/section]/_markup`, e.g.: `layouts/blog/_markup`.{{< new-in "0.71.0" >}} + The features currently supported are: * `image` From c7cdebed38f0271e5575f4240abeb0ccfdf8e04b Mon Sep 17 00:00:00 2001 From: Edouard Date: Fri, 5 Jun 2020 20:04:11 +0200 Subject: [PATCH 6/9] tpl/crypto: Add hmac --- content/en/functions/hmac.md | 34 ++++++++++++++++++++++++++++++++++ data/docs.json | 17 +++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 content/en/functions/hmac.md diff --git a/content/en/functions/hmac.md b/content/en/functions/hmac.md new file mode 100644 index 000000000..02343196b --- /dev/null +++ b/content/en/functions/hmac.md @@ -0,0 +1,34 @@ +--- +title: hmac +linktitle: hmac +description: Compute the cryptographic checksum of a message. +godocref: +date: 2020-05-29 +publishdate: 2020-05-29 +lastmod: 2020-05-29 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [hmac,checksum] +signature: ["hmac HASH_TYPE KEY MESSAGE"] +workson: [] +hugoversion: +relatedfuncs: [hmac] +deprecated: false +aliases: [hmac] +--- + +`hmac` returns a cryptographic hash that uses a key to sign a message. + +``` +{{ hmac "sha256" "Secret key" "Hello world, gophers!"}}, + + {{ range .Pages.GroupByPublishDate "2006-01" }}

{{ .Key }}

    @@ -438,6 +438,41 @@ In the above example, you may want `{{.Title}}` to point the `title` field you h {{ end }} {{< /code >}} + +### By Lastmod + +{{< code file="layouts/partials/by-page-lastmod.html" >}} + +{{ range .Pages.GroupByLastmod "2006-01" }} +

    {{ .Key }}

    +
      + {{ range .Pages }} +
    • + {{ .Title }} +
      {{ .Lastmod.Format "Mon, Jan 2, 2006" }}
      +
    • + {{ end }} +
    +{{ end }} +{{< /code >}} + +### By Expiry Date + +{{< code file="layouts/partials/by-page-expiry-date.html" >}} + +{{ range .Pages.GroupByExpiryDate "2006-01" }} +

    {{ .Key }}

    +
      + {{ range .Pages }} +
    • + {{ .Title }} +
      {{ .ExpiryDate.Format "Mon, Jan 2, 2006" }}
      +
    • + {{ end }} +
    +{{ end }} +{{< /code >}} + ### By Page Parameter {{< code file="layouts/partials/by-page-param.html" >}} From 074a270cdc3b74282d6cbea741219927510a64d5 Mon Sep 17 00:00:00 2001 From: hugoreleaser Date: Tue, 23 Jun 2020 16:29:21 +0000 Subject: [PATCH 9/9] releaser: Add release notes to /docs for release of 0.73.0 [ci skip] --- content/en/news/0.73.0-relnotes/index.md | 69 ++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 content/en/news/0.73.0-relnotes/index.md diff --git a/content/en/news/0.73.0-relnotes/index.md b/content/en/news/0.73.0-relnotes/index.md new file mode 100644 index 000000000..20df1b40b --- /dev/null +++ b/content/en/news/0.73.0-relnotes/index.md @@ -0,0 +1,69 @@ + +--- +date: 2020-06-23 +title: "0.73.0" +description: "0.73.0" +categories: ["Releases"] +--- + + Again, a release on the small side. Some new features -- one example is that we now support hook templates per section/type, see [#7349](https://github.com/gohugoio/hugo/issues/7349) -- and some important bug fixes. + +But the most important part of this release is that we have now finally cleaned up the terms used for the taxonomy page kinds. This has made the taxonomy feature in Hugo harder to understand than it needed to be. The old/new values for these are `taxonomy` => `term` and `taxonomyTerm` => `taxonomy`. We have taken great care to avoid site breakage. See [#6911](https://github.com/gohugoio/hugo/issues/6911) for more information. + +This release represents **21 contributions by 9 contributors** to the main Hugo code base.bjorn.erik.pedersen leads the Hugo development with a significant amount of contributions, but also a big shoutout to helfper, moorereason, and onedrawingperday 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. + +Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), +which has received **30 contributions by 14 contributors**. A special thanks to christianoliff, bjorn.erik.pedersen, patrick, and hello for their work on the documentation site. + + +Hugo now has: + + +* 326+ [themes](http://themes.gohugo.io/) + +## Notes + +* Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy [#6911](https://github.com/gohugoio/hugo/issues/6911) + +## Enhancements + +### Templates + +* tpl/crypto: Add hmac + +### Other + +* Remove some old release notes +* Create robots.txt in the domain root directory [#5160](https://github.com/gohugoio/hugo/issues/5160)[#4193](https://github.com/gohugoio/hugo/issues/4193) +* Make GroupByParamDate work with string params [#3983](https://github.com/gohugoio/hugo/issues/3983) +* Add GroupByLastmod [#7408](https://github.com/gohugoio/hugo/issues/7408) +* Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy [#6911](https://github.com/gohugoio/hugo/issues/6911)[#7395](https://github.com/gohugoio/hugo/issues/7395) +* Add genDocsHelper mage target +* Regenerate templates +* Beautify HTML generated by pagination template [#7199](https://github.com/gohugoio/hugo/issues/7199) +* Add a nested data dir test +* Use os.PathError in RootMappingFs.doLstat +* Remove credit (#7347) +* Allow hook template per section/type [#7349](https://github.com/gohugoio/hugo/issues/7349) + +## Fixes + +### Templates + +* Fix bad rounding in NumFmt [#7116](https://github.com/gohugoio/hugo/issues/7116) + +### Other + +* Fix aliases with path in baseURL +* Fix server data race/nil pointer in withMaps [#7392](https://github.com/gohugoio/hugo/issues/7392) +* Fix order of GetTerms [#7213](https://github.com/gohugoio/hugo/issues/7213) +* Fix aliases with uglyURLs +* Fix crash for closing shortcode with no .Inner set [#6857](https://github.com/gohugoio/hugo/issues/6857)[#7330](https://github.com/gohugoio/hugo/issues/7330) +* Fix aliases with relativeURLs +* Fix URL rewrites vs fast render server mode [#7357](https://github.com/gohugoio/hugo/issues/7357) + + + + +