Commit graph

2052 commits

Author SHA1 Message Date
Bjørn Erik Pedersen
4a0b55330c
docs: Regenerate docshelper 2022-01-04 17:11:17 +01:00
Bjørn Erik Pedersen
623dda7174 Revert "config/security: Add HOME to default exec env var whitelist"
There have been one report in the wild suggesting that this needs to be tested better before doing:

https://discourse.gohugo.io/t/hugo-mod-failing-in-v0-91-1-but-works-in-v0-91-0/36180/5

This reverts commit fca266ebbb.
2021-12-23 16:23:15 +01:00
Bjørn Erik Pedersen
fca266ebbb config/security: Add HOME to default exec env var whitelist
See #9309
2021-12-22 11:33:59 +01:00
Bjørn Erik Pedersen
6df2f080c9
docs: Regen docs helper 2021-12-17 10:31:08 +01:00
Bjørn Erik Pedersen
f4389e48ce
Add some basic security policies with sensible defaults
This ommmit contains some security hardening measures for the Hugo build runtime.

There are some rarely used features in Hugo that would be good to have disabled by default. One example would be the "external helpers".

For `asciidoctor` and some others we use Go's `os/exec` package to start a new process.

These are a predefined set of binary names, all loaded from `PATH` and with a predefined set of arguments. Still, if you don't use `asciidoctor` in your project, you might as well have it turned off.

You can configure your own in the new `security` configuration section, but the defaults are configured to create a minimal amount of site breakage. And if that do happen, you will get clear instructions in the loa about what to do.

The default configuration is listed below. Note that almost all of these options are regular expression _whitelists_ (a string or a slice); the value `none` will block all.

```toml
[security]
  enableInlineShortcodes = false
  [security.exec]
    allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
    osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']

  [security.funcs]
    getenv = ['^HUGO_']

  [security.http]
    methods = ['(?i)GET|POST']
    urls = ['.*']
```
2021-12-16 09:40:22 +01:00
Bjørn Erik Pedersen
6183184b96
Merge commit '45e6fdb315d113ba13e20a633ed0c67e3f25170d' 2021-12-13 21:05:10 +01:00
Bjørn Erik Pedersen
e86b331138
docs: Regenerate docs helper 2021-12-08 08:56:16 +01:00
Bjørn Erik Pedersen
6c841a691e
Merge commit '8d9511a08f14260cbfb73119e4afae50e5a9966d' 2021-12-08 08:54:25 +01:00
Bjørn Erik Pedersen
e71d715b9b Add custom font support to images.Text
Fixes #9253
2021-12-07 16:53:02 +01:00
Paul van Brouwershaven
283394a4fd
images: Text filter that draws text with the given options (#9239)
Fixes #9238
2021-12-07 11:29:55 +01:00
Joe Mooring
5538507e90 tpl/transform: Optional options for highlight func
Closes #9249
Fixes gohugoio/hugoDocs#63
2021-12-07 11:26:56 +01:00
Paul van Brouwershaven
0eaaa8fee3
Implement XML data support
Example:

```
{{ with resources.Get "https://example.com/rss.xml" | transform.Unmarshal }}
    {{ range .channel.item }}
        <strong>{{ .title | plainify | htmlUnescape }}</strong><br />
        <p>{{ .description | plainify | htmlUnescape }}</p>
        {{ $link := .link | plainify | htmlUnescape }}
        <a href="{{ $link }}">{{ $link }}</a><br />
        <hr>
    {{ end }}
{{ end }}
```

Closes #4470
2021-12-02 17:30:36 +01:00
Paul van Brouwershaven
66753416b5
Make resources.Get use a file cache for remote resources
Closes #9228
2021-12-02 12:56:25 +01:00
Paul van Brouwershaven
8aa7257f65
Add remote support to resources.Get
Closes #5255
Supports #9044
2021-11-30 11:49:51 +01:00
hugoreleaser
ab01ba6e7e releaser: Add release notes to /docs for release of 0.89.4
[ci skip]
2021-11-17 08:24:08 +00:00
hugoreleaser
c88cdb5610 releaser: Add release notes to /docs for release of 0.89.3
[ci skip]
2021-11-15 12:17:45 +00:00
hugoreleaser
63e3a5ebb2 releaser: Add release notes to /docs for release of 0.89.2
[ci skip]
2021-11-08 15:22:23 +00:00
hugoreleaser
b6a4ae4ad5 releaser: Add release notes to /docs for release of 0.89.1
[ci skip]
2021-11-05 15:44:32 +00:00
hugoreleaser
ade966b84b releaser: Add release notes to /docs for release of 0.89.0
[ci skip]
2021-11-02 10:00:17 +00:00
Bjørn Erik Pedersen
f503b63957
docs: Regen CLI docs 2021-11-02 09:01:26 +01:00
Joe Mooring
04a3b45db4 Fix description of lang.FormatNumberCustom
It currently refers to itself as a simple alternative, when it should
refer to lang.FormatNumber.
2021-11-01 18:54:43 +01:00
Joe Mooring
0cc39af682 Update Twitter shortcode oEmbed endpoint
The existing endpoint will be retired and removed on November 23, 2021.
References:

- https://twittercommunity.com/t/consolidating-the-oembed-functionality/154690
- https://developer.twitter.com/en/docs/twitter-for-websites/oembed-api#Embedded

This is a backward compatible change.

The existing endpoint requires a single parameter: the id of the tweet.

The new endpoint requires two parameters: the id of the tweet, and the
user with whom it is associated. For the moment, if you supply the wrong
user, the request will be redirected (with a small delay) to the correct
user/id pair. This behavior is undocumented, but we will take advantage
of it as Hugo site authors transition to the new syntax.

{{< tweet 1453110110599868418 >}} --> works, throws warning, deprecate at some point

{{< tweet user="SanDiegoZoo" id="1453110110599868418" >}} --> new syntax

Fixes #8130
2021-11-01 15:51:00 +01:00
Bjørn Erik Pedersen
4b36498a85
Merge commit 'aa5ac36a3eb68b86c803caec703869efefc8447e' 2021-10-31 13:53:55 +01:00
Bjørn Erik Pedersen
471ed91c60 hugofs: Add includeFiles and excludeFiles to mount configuration
Fixes #9042
2021-10-20 05:00:17 +02:00
Joe Mooring
64abc83fc4 Allow multiple plugins in the PostCSS options map
Usage:
{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
{{ $style := resources.Get "main.css" | resources.PostCSS $options }}

Fixes #9015
2021-10-10 11:11:43 +02:00
Joe Mooring
f8d132d731
docs: Create path.Clean documentation
Related to #9005
2021-10-09 20:36:57 +02:00
hugoreleaser
5bc547389a releaser: Add release notes to /docs for release of 0.88.1
[ci skip]
2021-09-04 09:39:19 +00:00
hugoreleaser
acc5eb5b51 releaser: Add release notes to /docs for release of 0.88.0
[ci skip]
2021-09-02 09:27:27 +00:00
Helder Pereira
d966f5d08d highlight: Remove some pygments references 2021-08-21 15:50:49 +02:00
hugoreleaser
b0c541e496 releaser: Add release notes to /docs for release of 0.87.0
[ci skip]
2021-08-03 10:57:26 +00:00
Bjørn Erik Pedersen
494f284be3
docs: Adjust config docs 2021-08-03 12:22:02 +02:00
Bjørn Erik Pedersen
bf738d2f43
docs: Regen CLI docs 2021-08-03 11:55:02 +02:00
Bjørn Erik Pedersen
8d19850e2d
docs: Regen docs helper 2021-08-03 11:53:34 +02:00
Bjørn Erik Pedersen
0934983529
Merge commit 'bd77f6e1c99e04a476f0b1bb4e44569134e02399' into release-0.87.0 2021-08-03 11:52:57 +02:00
Bjørn Erik Pedersen
1c5b025dd0
docs: Adjust time zone docs 2021-08-03 11:51:28 +02:00
Bjørn Erik Pedersen
268065cb2d
Merge branch 'release-0.86.1' 2021-07-30 12:58:26 +02:00
hugoreleaser
f6821b88ab releaser: Add release notes to /docs for release of 0.86.1
[ci skip]
2021-07-30 10:13:32 +00:00
Bjørn Erik Pedersen
7907d24ba1
tpl/lang: Add new localized versions of lang.FormatNumber etc.
Fixes #8820
2021-07-29 16:40:06 +02:00
Bjørn Erik Pedersen
efa5760db5 Add timezone support for front matter dates without one
Fixes #8810
2021-07-27 19:02:48 +02:00
Bjørn Erik Pedersen
a57dda854b Localize time.Format
Fixes #8797
2021-07-27 19:02:48 +02:00
hugoreleaser
41c6c52ead releaser: Add release notes to /docs for release of 0.86.0
[ci skip]
2021-07-21 09:53:11 +00:00
Bjørn Erik Pedersen
0294a4a4f8
Merge commit '53a352795a69a9d4a373f50ec62138595948c6ea' 2021-07-21 10:45:53 +02:00
Bjørn Erik Pedersen
d831d2fce8 Simplify "active menu" logic for section menus
Fixes #8776
2021-07-20 17:50:59 +02:00
hugoreleaser
724d5db580 releaser: Add release notes to /docs for release of 0.85.0
[ci skip]
2021-07-05 10:46:25 +00:00
Bjørn Erik Pedersen
e31b1d1946
commands: Make the --poll flag a duration
So you can do:

```
hugo server --poll 700ms
```

See #8720
2021-07-05 10:23:29 +02:00
Bjørn Erik Pedersen
43a23239b2
docs: Regen CLI docs 2021-07-04 16:35:21 +02:00
Bjørn Erik Pedersen
4479f09c9c
Merge commit '7eb0e10a80708c638554b8221a3120dc1168566c' 2021-07-04 16:34:53 +02:00
hugoreleaser
020e4acee4 releaser: Add release notes to /docs for release of 0.84.4
[ci skip]
2021-07-01 11:51:53 +00:00
hugoreleaser
a1b0353ccb releaser: Add release notes to /docs for release of 0.84.3
[ci skip]
2021-06-29 11:40:19 +00:00
hugoreleaser
e0c67958f1 releaser: Add release notes to /docs for release of 0.84.2
[ci skip]
2021-06-28 10:59:18 +00:00
Bjørn Erik Pedersen
40dfdd0952
modules: Add module.import.noMounts config
Fixes #8708
2021-06-28 10:39:52 +02:00
hugoreleaser
4bd65e224f releaser: Add release notes to /docs for release of 0.84.1
[ci skip]
2021-06-24 11:44:21 +00:00
Bjørn Erik Pedersen
b70a12ec45
Merge commit '4dd90050f154c91373329a5d7e348289c40be12f' 2021-06-18 17:50:27 +02:00
hugoreleaser
2c4689f7b8 releaser: Add release notes to /docs for release of 0.84.0
[ci skip]
2021-06-18 14:55:51 +00:00
Bjørn Erik Pedersen
be6b901cf7
docs: Regenerate docs helper 2021-06-18 13:21:10 +02:00
Bjørn Erik Pedersen
402da3f8f3
docs: Regenerate docshelper 2021-06-18 12:58:07 +02:00
Bjørn Erik Pedersen
a074f758b0
Merge commit '92405e5b0adc5d8c3dfde88d6a8b67eb09169190' 2021-06-18 12:57:19 +02:00
Bjørn Erik Pedersen
d392893cd7
Misc config loading fixes
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster:

```
BenchmarkDefaultConfigProvider/Viper-16         	  252418	      4546 ns/op	    2720 B/op	      30 allocs/op
BenchmarkDefaultConfigProvider/Custom-16        	  450756	      2651 ns/op	    1008 B/op	       6 allocs/op
```

Fixes #8633
Fixes #8618
Fixes #8630
Updates #8591
Closes #6680
Closes #5192
2021-06-14 17:00:32 +02:00
Bjørn Erik Pedersen
a91cd7652f
docs: Regenerate docs helper 2021-06-08 18:52:38 +02:00
Bjørn Erik Pedersen
162f41d0ef
Merge commit '32ba623541d74ee0b7ae4efb1b8326dc49af28b8' 2021-06-08 18:47:53 +02:00
Bjørn Erik Pedersen
f55d2f4376
tpl/fmt: Add erroridf template func
Fixes #8613
2021-06-07 19:11:03 +02:00
Bjørn Erik Pedersen
fcd63de3a5 tpl/data: Misc header improvements, tests, allow multiple headers of same key
Closes #5617
2021-06-06 13:32:12 +02:00
Joe Mooring
01758f99b9 Add math.Max and math.Min
Closes #8583
2021-05-28 20:38:45 +02:00
meehawk
abbc99d4c6
common/maps: Add Scratch.DeleteInMap
Add Scratch.DeleteInMap method. This method works similar to Scratch.SetInMap. It takes in two string parameters, key and mapKey and deletes the value mapped to mapKey in key

Closes #8504
2021-05-17 15:45:33 +02:00
Joe Mooring
2c7f5b62f6
docs: Update querify function description and examples
The querify function now accepts a slice per #8305.
2021-05-10 17:18:37 +02:00
hugoreleaser
5afe0a57d0 releaser: Add release notes to /docs for release of 0.83.1
[ci skip]
2021-05-02 14:38:02 +00:00
hugoreleaser
4c65ceccc7 releaser: Add release notes to /docs for release of 0.83.0
[ci skip]
2021-05-01 12:10:05 +00:00
Bjørn Erik Pedersen
23fc65832c
docs: Fix shortcode 2021-05-01 13:01:23 +02:00
Bjørn Erik Pedersen
a9b52b4175
docs: Regenerate docs helper 2021-05-01 12:06:24 +02:00
Bjørn Erik Pedersen
b073a1c972
docs: Regenerate CLI docs 2021-05-01 12:05:31 +02:00
Bjørn Erik Pedersen
d7b22aee46
Merge commit 'c239c643fee10bfa217cb108755b798f8f5f3b10' 2021-05-01 11:45:45 +02:00
Bjørn Erik Pedersen
fd96f65a3d
docs: Regen docs helper 2021-04-20 20:23:36 +02:00
Bjørn Erik Pedersen
8f7891e70c
Merge commit '07b8d9466dfb59c429c1b470a0443337bc0aeefe' 2021-04-20 20:22:53 +02:00
Bjørn Erik Pedersen
2bb9496ce2
Merge branch 'release-0.82.1' 2021-04-20 13:48:04 +02:00
hugoreleaser
60618210b8 releaser: Add release notes to /docs for release of 0.82.1
[ci skip]
2021-04-20 11:02:48 +00:00
Bjørn Erik Pedersen
33d5f80592
Add webp image encoding support
Fixes #5924
2021-04-15 17:22:55 +02:00
Bjørn Erik Pedersen
7fdd2b95e2
Add hugo.IsExtended
Fixes #8399
2021-04-09 07:28:27 +02:00
Bjørn Erik Pedersen
2dc222cec4
Add slice syntax to sections permalinks config
Fixes #8363
2021-03-30 07:55:24 +02:00
hugoreleaser
9d96078439 releaser: Add release notes to /docs for release of 0.82.0
[ci skip]
2021-03-21 17:28:02 +00:00
Bjørn Erik Pedersen
86b4fd35e7
docs: Regenerate docs helper 2021-03-21 13:33:26 +01:00
Bjørn Erik Pedersen
195d108da7
docs: Regen CLI docs 2021-03-21 13:32:12 +01:00
Bjørn Erik Pedersen
c94aa5cf46
Merge commit '81689af79901f0cdaff765cda6322dd4a9a7ccb3' 2021-03-21 13:31:17 +01:00
Bjørn Erik Pedersen
b725253f9e Attributes for code fences should be placed after the lang indicator only
Fixes #8313
2021-03-20 19:15:11 +01:00
Bjørn Erik Pedersen
1b1dcf586e deps: Update to esbuild v0.9.0 2021-03-14 11:51:25 +01:00
Daniel Atwood
ba16a14c6e
Add support for Google Analytics v4 2021-03-03 13:30:06 +01:00
Bjørn Erik Pedersen
cd0c5d7ef3 Allow markdown attribute lists to be used in title render hooks
Fixes #8270
2021-02-23 18:08:39 +01:00
Bjørn Erik Pedersen
e7e194435b
Merge commit '9d31f650da964a52f05fc27b7fb99cf3e09778cf' 2021-02-23 17:41:05 +01:00
gzagatti
01dd7c16af Fixes #7698.
markup: Allow installed arbitrary Asciidoc extension via path validation.
2021-02-22 13:52:04 +01:00
hugoreleaser
59d15c97d8 releaser: Add release notes to /docs for release of 0.81.0
[ci skip]
2021-02-19 17:07:09 +00:00
Bjørn Erik Pedersen
9e99950c6e
docs: Regen CLI docs 2021-02-18 17:55:38 +01:00
Bjørn Erik Pedersen
1b364b003f
docs: Regen docs helper 2021-02-18 17:54:25 +01:00
Bjørn Erik Pedersen
7d0a261981
Merge commit 'acb9109df778fa4a51c0d8b29b3212b12988908f' 2021-02-18 17:52:49 +01:00
Bjørn Erik Pedersen
bdfbcf6f4b modules: Add config option modules.vendorClosest
Fixes #8235
Fixes #8242
2021-02-16 16:30:01 +01:00
Bjørn Erik Pedersen
2681633db8 markup/goldmark: Add attributes support for blocks (tables etc.)
E.g.:

```
> foo
> bar
{.myclass}
```

There are some current limitations: For tables you can currently only apply it to the full table, and for lists the ul/ol-nodes only, e.g.:

```
* Fruit
  * Apple
  * Orange
  * Banana
  {.fruits}
* Dairy
  * Milk
  * Cheese
  {.dairies}
{.list}
```

Fixes #7548
2021-02-08 19:52:55 +01:00
Bjørn Erik Pedersen
441b11beec Update to Dart Sass Protocol beta6
Note that this version is not backwards compatible, so you have to update the protocol binary.
2021-02-06 18:34:19 +01:00
Ben Mezger
d36fd5b3ee Refactor: Write to stdout by default 2021-02-04 15:32:51 -07:00
Ben Mezger
a7c515e1b5 Refactor: Remove powershell support 2021-02-04 15:32:51 -07:00
Ben Mezger
216b00f358 Feat: Add zsh, fish and powershell completion support
See issue #4296
2021-02-04 15:32:51 -07:00
Aleksandr Demakin
ed3071b753
docs: Remove mention of a file size limit for readFile
The limit itself was removed in this PR: https://github.com/gohugoio/hugo/pull/8172.
2021-01-23 14:14:51 +01:00
Bjørn Erik Pedersen
32b86076ee js: Add Inject config option
Fixes #8164
2021-01-22 23:43:44 +01:00
Bjørn Erik Pedersen
e19a046c4b js: Add Shims option
This commit adds a new `shims` option to `js.Build` that allows swapping out a component with another.

Fixes #8165
2021-01-22 09:03:24 +01:00
Bjørn Erik Pedersen
a1a9f088b1
Merge commit 'e48ffb763572814a3788780bb9653dfa2daeae22' 2021-01-20 12:48:39 +01:00
hugoreleaser
792ef0f41a releaser: Add release notes to /docs for release of 0.80.0
[ci skip]
2020-12-31 13:36:35 +00:00
Bjørn Erik Pedersen
48994ea766
dartsass: Dart Sass only supports expanded and compressed 2020-12-31 11:18:54 +01:00
Bjørn Erik Pedersen
cea1574023
Add Dart Sass support
But note that the Dart Sass Embedded Protocol is still in beta (beta 5), a main release scheduled for Q1 2021.

Fixes #7380
Fixes #8102
2020-12-30 17:32:25 +01:00
hugoreleaser
6c29418278
releaser: Add release notes to /docs for release of 0.79.1
[ci skip]
2020-12-19 17:09:29 +01:00
Bjørn Erik Pedersen
81975f847d Fix Resource.ResourceType so it always returns MIME's main type
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`.

Fixes #8052
2020-12-17 22:20:12 +01:00
Bjørn Erik Pedersen
3ba147e702 images: Add images.Overlay filter
This allows for constructs ala:

```
{{ $overlay := $img.Filter (images.Overlay $logo 50 50 )}}
```
Or:

```
{{ $logoFilter := (images.Overlay $logo 50 50 ) }}
{{ $overlay := $img | images.Filter $logoFilter }}
```

Which will overlay the logo in the top left corner (x=50, y=50) of `$img`.

Fixes #8057
Fixes #4595
Updates #6731
2020-12-17 09:14:18 +01:00
Andrew Zenk
4fc918e02c
tpl: Add title parameter to YouTube shortcode 2020-12-02 12:53:53 +01:00
hugoreleaser
1415efdcd8 releaser: Add release notes to /docs for release of 0.79.0
[ci skip]
2020-11-27 09:06:36 +00:00
Bjørn Erik Pedersen
4f1e4bb3fe
Merge commit '9f1265fde4b9ef186148337c99f08601633b6056' 2020-11-27 09:30:05 +01:00
Bjørn Erik Pedersen
7e223b3baa Allow setting the delimiter used for setting config via OS env, e.g. HUGO_
Fixes #7829
2020-11-25 20:34:34 +01:00
Bjørn Erik Pedersen
8a6e706053
deps: Update to github.com/evanw/esbuild 0.8.11 to 0.8.14
Closes #7986
2020-11-25 17:39:51 +01:00
Bjørn Erik Pedersen
fd70bdafe7
docs: Regen docshelper 2020-11-24 13:49:01 +01:00
David Jones
8f5c9a747f
Add menu params
Fixes #7951
2020-11-22 22:09:59 +01:00
Bjørn Erik Pedersen
20a35374a3
Revert "docs: Regenerate docshelper"
This reverts commit caf16c2085.

Closes #7972
2020-11-21 12:48:48 +01:00
Bjørn Erik Pedersen
caf16c2085
docs: Regenerate docshelper 2020-11-20 09:32:16 +01:00
hugoreleaser
959724f0e0 releaser: Add release notes to /docs for release of 0.78.2
[ci skip]
2020-11-13 10:07:00 +00:00
Mackenzie Morgan
943f3c932f Update GH docs to say "main" as default branch 2020-11-06 20:57:52 +01:00
hugoreleaser
347f2de67d releaser: Add release notes to /docs for release of 0.78.1
[ci skip]
2020-11-05 09:38:59 +00:00
hugoreleaser
fd62817bba releaser: Add release notes to /docs for release of 0.78.0
[ci skip]
2020-11-03 13:13:12 +00:00
Bjørn Erik Pedersen
c64e9504d8
Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0' 2020-11-03 13:05:34 +01:00
Bjørn Erik Pedersen
3b2fe3cd33 js: Add avoidTDZ option
Fixes #7865
2020-11-03 13:04:37 +01:00
Bjørn Erik Pedersen
85e4dd7370 Make js.Build fully support modules
Fixes #7816
Fixes #7777
Fixes #7916
2020-11-03 13:04:37 +01:00
hugoreleaser
ef290125c9 releaser: Add release notes to /docs for release of 0.77.0
[ci skip]
2020-10-30 10:12:16 +00:00
Bjørn Erik Pedersen
332b65e4cc
docs: Regen docs helper 2020-10-30 09:52:32 +01:00
Bjørn Erik Pedersen
3553fc533a
Merge commit '9cabb46f68bae01aeb1859727dcb21e8a10f5ec7' 2020-10-30 09:50:15 +01:00
Cameron Moore
807db97af8 tpl: Refactor time.AsTime location implementation 2020-10-21 09:49:25 +02:00
Mark Johnson
26eeb29147 tpl: Update Hugo time to support optional [LOCATION] parameter 2020-10-21 09:49:25 +02:00
hugoreleaser
60f0725b3e releaser: Add release notes to /docs for release of 0.76.5
[ci skip]
2020-10-14 15:15:22 +00:00
hugoreleaser
50dfe40b91 releaser: Add release notes to /docs for release of 0.76.4
[ci skip]
2020-10-12 08:32:44 +00:00
hugoreleaser
e96234590d releaser: Add release notes to /docs for release of 0.76.3
[ci skip]
2020-10-08 17:07:29 +00:00
hugoreleaser
207913f349 releaser: Add release notes to /docs for release of 0.76.2
[ci skip]
2020-10-07 08:59:11 +00:00
hugoreleaser
58ac83a98c releaser: Add release notes to /docs for release of 0.76.1
[ci skip]
2020-10-07 07:33:10 +00:00
digitalcraftsman
ee56efffcb
Fix typo in 0.76.0 release note 2020-10-06 19:03:36 +02:00
hugoreleaser
9c7d6e475c releaser: Add release notes to /docs for release of 0.76.0
[ci skip]
2020-10-06 15:29:25 +00:00
Bjørn Erik Pedersen
b9318e4315
docs: Regen docshelper 2020-10-06 16:25:23 +02:00
Bjørn Erik Pedersen
5e39eb20a6
Merge commit 'e5568488051a571df48401e03f1304b95dbc9028' 2020-10-06 16:24:00 +02:00
Bjørn Erik Pedersen
634938908e pagemeta: Make BuildConfig.Render an enum
Allowing links on pages without rendering them.

Fixes #7783
2020-10-06 14:06:10 +02:00
Bjørn Erik Pedersen
c63db7f1f6 Allow cascade to be a slice with a _target discriminator
Fixes #7782
2020-10-06 14:06:10 +02:00
Bjørn Erik Pedersen
5e2a547cb5 Add force flag to server redirects config
Fixes #7778
2020-10-05 22:20:00 +02:00
Josh Gerdes
edc5c4741c tpl: Add Do Not Track (dnt) option to Vimeo shortcode
Added a Vimeo EnableDNT privacy option to the Hugo config. This will enable the Vimeo 'Do Not Track' flag when either Vimeo shortcode tempalte options are used. When enabled, it will force the Vimeo player to be blocked from tracking any session data, including all cookies and stats.

Fixes #7700
2020-10-02 23:02:38 +02:00
Andrey Sitnik
0c3d2b67e0 Fix CLI example for PostCSS 8 2020-09-22 19:31:02 +02:00
Helder Pereira
8e553dcdef markup/asciidocext: Add preserveTOC option 2020-09-17 10:50:25 +02:00
hugoreleaser
a4a7bab734 releaser: Add release notes to /docs for release of 0.75.1
[ci skip]
2020-09-15 06:45:52 +00:00
hugoreleaser
fef924baf1 releaser: Add release notes to /docs for release of 0.75.0
[ci skip]
2020-09-14 09:19:06 +00:00
Daniel Holbach
292b0e26ec typo: already -> already 2020-09-14 10:15:59 +02:00
Bjørn Erik Pedersen
df56682a10
Merge commit '534ae9c57a902aea9ed6e62390dec11fa74b7122' 2020-09-13 21:58:53 +02:00
Bjørn Erik Pedersen
be2404c8b1
docs: Regen docs helper 2020-09-13 21:58:38 +02:00
Bjørn Erik Pedersen
c8da8eb1f5
docs: Regenerate CLI docs 2020-09-13 21:58:10 +02:00
Bjørn Erik Pedersen
85ba9bfffb Add "hugo mod npm pack"
This commit also introduces a convention where these common JS config files, including `package.hugo.json`, gets mounted into:

```
assets/_jsconfig
´``

These files mapped to their real filename will be added to the environment when running PostCSS, Babel etc., so you can do `process.env.HUGO_FILE_TAILWIND_CONFIG_JS` to resolve the real filename.

But do note that `assets` is a composite/union filesystem, so if your config file is not meant to be overridden, name them something specific.

This commit also adds adds `workDir/node_modules` to `NODE_PATH` and `HUGO_WORKDIR` to the env when running the JS tools above.

Fixes #7644
Fixes #7656
Fixes #7675
2020-09-13 20:55:29 +02:00
Fernando Jorge Mota
fb0f2cc718
markup/highlight: Add support to linkable line anchors on Chroma
Fixes #7622
2020-09-13 11:00:16 +02:00
Helder Pereira
6a848cbc3a markup/asciidocext: Fix AsciiDoc TOC with code
Fixes #7649
2020-09-10 21:53:13 +02:00
Bjørn Erik Pedersen
d4611c4322 modules: Add noVendor to module config
Fixes #7647
2020-09-10 08:47:05 +02:00
Bjørn Erik Pedersen
9a1e6d15a3 modules: Make ignoreVendor a glob pattern
Fixes #7642
2020-09-10 08:47:05 +02:00
Cameron Moore
f7c1b5fe1c docs: Update replaceRE func
Updates for #7604
2020-09-07 22:45:14 +02:00
Cameron Moore
183e862607 docs: Update replace func
Updates for #7602
2020-09-07 22:45:14 +02:00
Cameron Moore
f50ee6bbe5 docs: Update merge function
Updates for #7601
2020-09-07 22:45:14 +02:00
Bjørn Erik Pedersen
8c490a73b3
docs: Regen CLI docs 2020-09-07 21:46:30 +02:00
Bjørn Erik Pedersen
e6cd9da42d
docs: Regen docs helper 2020-09-07 21:45:16 +02:00
Bjørn Erik Pedersen
b9e4f5898b
Merge commit '7d7771b673e5949f554515a2c236b23192c765c8' 2020-09-07 21:37:51 +02:00
Nicolas Piganeau
3ba7c92530 markup/asciidoc: Add support for .TableOfContents
Fill the .TableOfContents template variable when writing Asciidoc content.
This is done by letting Asciidoc render its TOC as HTML, then extract this
HTML rendered TOC, parse it into a tableofcontents.Root and finally remove
it from the HTML content.
This aims to stay in the logic that the Asciidoc parsing is entirely done
by the external helper.

See #1687
2020-09-06 11:34:32 +02:00
Bjørn Erik Pedersen
f8b8b091fc
Merge commit 'cb39847dee488c373dd5bc2a3706385342a59355' 2020-08-14 18:31:40 +02:00
hugoreleaser
da0437b481 releaser: Add release notes to /docs for release of 0.74.3
[ci skip]
2020-07-23 16:21:21 +00:00
Helder Pereira
45c665d396
Fix Asciidoctor args
* Fix Asciidoctor args

* Fix Asciidoctor args documentation

* Update AsciiDoc documentation

Co-authored-by: Derk Muenchhausen <derk@muenchhausen.de>

Fixes #7493
2020-07-23 15:59:48 +02:00
Bjørn Erik Pedersen
0256959a35 resources/js: Add option for setting bundle format
Fixes #7503
2020-07-22 10:13:30 +02:00
Bjørn Erik Pedersen
e81aef0a95
resources/js: Add es5 build target 2020-07-20 22:26:38 +02:00
Bjørn Erik Pedersen
673e622fa9
Merge commit '28bd06265e88454b061810578919d891909a83ad' 2020-07-20 22:20:33 +02:00
hugoreleaser
48565de62f releaser: Add release notes to /docs for release of 0.74.2
[ci skip]
2020-07-17 17:22:42 +00:00
hugoreleaser
15163266c1 releaser: Add release notes to /docs for release of 0.74.1
[ci skip]
2020-07-13 18:52:36 +00:00
hugoreleaser
d2b1162680 releaser: Add release notes to /docs for release of 0.74.0
[ci skip]
2020-07-13 10:30:11 +00:00
Bjørn Erik Pedersen
5f7a65a080
Merge commit '823ce055ed3356da37e9ec4ac70446bdbbaa8de8' 2020-07-13 11:01:55 +02:00
Bjørn Erik Pedersen
25e3da3343
docs: Regenerate docs helper 2020-07-13 11:01:38 +02:00
Bjørn Erik Pedersen
f1916f114b
Merge commit '6aa5c9117fd34644459ea9bcfb1b3f5010658d5d' 2020-07-07 07:00:01 +02:00
Bryan Klein
e9f87c4e3f Update formats.md doc for new allowed extensions.
This PR documents the changes made in https://github.com/gohugoio/hugo/pull/7447/files adding two other extensions to the Allowed list.
2020-07-03 01:27:51 +02:00
Bjørn Erik Pedersen
4a3efea7ef Add support for inline partials
Fixes #7444
2020-07-01 23:10:21 +02:00
Derk Muenchhausen
f0266e2ef3
Rework external asciidoctor integration
This commit solves the relative path problem with asciidoctor tooling. An include will resolve relatively, so you can refer easily to files in the same folder.

Also `asciidoctor-diagram` and PlantUML rendering works now, because the created temporary files will be placed in the correct folder.

This patch covers just the Ruby version of asciidoctor. The old AsciiDoc CLI EOLs in Jan 2020, so this variant is removed from code.

The configuration is completely rewritten and now available in `config.toml` under the key `[markup.asciidocext]`:

```toml
[markup.asciidocext]
    extensions = ["asciidoctor-html5s", "asciidoctor-diagram"]
    workingFolderCurrent = true
    trace = true
    [markup.asciidocext.attributes]
        my-base-url = "https://example.com/"
        my-attribute-name = "my value"
```

- backends, safe-modes, and extensions are now whitelisted to the popular (ruby) extensions and valid values.
- the default for extensions is to not enable any, because they're all external dependencies so the build would break if the user didn't install them beforehand.
- the default backend is html5 because html5s is an external gem dependency.
- the default safe-mode is safe, explanations of the modes: https://asciidoctor.org/man/asciidoctor/
- the config is namespaced under asciidocext_config and the parser looks at asciidocext to allow a future native Go asciidoc.
- `uglyUrls=true` option and `--source` flag are supported
- `--destination` flag is required

Follow the updated documentation under `docs/content/en/content-management/formats.md`. 
  
This patch would be a breaking change, because you need to correct all your absolute include pathes to relative paths, so using relative paths must be configured explicitly by setting `workingFolderCurrent = true`.
2020-06-25 09:51:33 +02:00
hugoreleaser
428907cc34 releaser: Add release notes to /docs for release of 0.73.0
[ci skip]
2020-06-23 16:29:21 +00:00
Bjørn Erik Pedersen
82abca32fa Add GroupByLastmod
Fixes #7408
2020-06-19 11:58:58 +02:00
Bjørn Erik Pedersen
fc045e12a9 Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy
And we have taken great measures to limit potential site breakage:

* For `disableKinds` and `outputs` we try to map from old to new values if possible, if not we print an ERROR that can be toggled off if not relevant.
* The layout lookup is mostly compatible with more options for the new `term` kind.

That leaves:

* Where queries in site.Pages using taxonomy/taxonomyTerm Kind values as filter.
* Other places where these kind value are used in the templates (classes etc.)

Fixes #6911
Fixes #7395
2020-06-18 09:09:56 +02:00
Bjørn Erik Pedersen
0a9172672a
Merge commit 'efa74c5c6e6ff1daddeb5834ea7c69bed2acf171' 2020-06-16 14:19:31 +02:00
Edouard
7eeebe1e5a
tpl/crypto: Add hmac 2020-06-05 20:04:11 +02:00
Bjørn Erik Pedersen
f8c67f93e1 Allow hook template per section/type
Fixes #7349
2020-06-02 19:02:10 +02:00
hugoreleaser
8a7ef3cf4e releaser: Add release notes to /docs for release of 0.72.0
[ci skip]
2020-05-31 12:05:36 +00:00
Bjørn Erik Pedersen
626b16e024
Merge commit '9e1dcefc5f559944b70d2fa520f6acd5c56a69f2' 2020-05-31 12:43:33 +02:00
Bjørn Erik Pedersen
2919a6a503 common/maps: Add Scratch.Values
Fixes #7335
2020-05-29 19:51:49 +02:00
Bjørn Erik Pedersen
6a3e89743c Add redirect support to the server
Fixes #7323
2020-05-28 16:25:34 +02:00
Yash Murty
9613e3e8a8 Fix typo in install instructions 2020-05-27 13:54:11 +02:00
hugoreleaser
a301f6b2ae releaser: Add release notes to /docs for release of 0.71.1
[ci skip]
2020-05-25 09:08:55 +00:00
hugoreleaser
06150c87be releaser: Add release notes to /docs for release of 0.71.0
[ci skip]
2020-05-18 16:05:47 +00:00
Bjørn Erik Pedersen
e0e81b280f
Merge commit 'c9403cbceaaeff53ff4833561f4eefe1dc1a405e' 2020-05-18 15:25:26 +02:00
Joe Mooring
991934497e Add math.Pow
Closes #7266
2020-05-14 10:00:31 +02:00
hugoreleaser
7f47b99ea9 releaser: Add release notes to /docs for release of 0.70.0
[ci skip]
2020-05-06 11:16:40 +00:00
Bjørn Erik Pedersen
57ebab7c23
Release 0.70.0 2020-05-06 13:06:10 +02:00
Bjørn Erik Pedersen
e4621446ce
Merge commit '89044b8f8795f17c36396c67823183a20fc88139' 2020-05-06 12:12:57 +02:00
Bjørn Erik Pedersen
6add6d77b4 Rename transpileJS to babel
And add a test.

Updates #5764
2020-04-29 10:51:33 +02:00
Niek de Wit
2a171ff1c5 resources: Add JavaScript transpiling solution
Add a new pipe called TranspileJS which uses the Babel cli. This makes it possible for users to write ES6 JavaScript code and transpile it to ES5 during website generation so that the code still works with older browser versions.

Fixes #5764
2020-04-29 10:51:33 +02:00
hugoreleaser
ec9dcf3048 releaser: Add release notes to /docs for release of 0.69.2
[ci skip]
2020-04-24 07:48:07 +00:00
hugoreleaser
17661debb6 releaser: Add release notes to /docs for release of 0.69.1
[ci skip]
2020-04-22 07:55:01 +00:00
Onur Yaman
cd4d820201 docs: Fix typo in Hugo's Security Model 2020-04-18 14:16:42 +02:00
hugoreleaser
4205844bce releaser: Add release notes to /docs for release of 0.69.0
[ci skip]
2020-04-10 09:08:37 +00:00
Bjørn Erik Pedersen
b7ff4dc23e
docs: Regen docs helper 2020-04-10 09:07:41 +02:00
Bjørn Erik Pedersen
30748decf1
Merge commit 'da3c3e5fbd0de65f956618cd2e35401460a3cd02' 2020-04-10 09:06:04 +02:00
Helicer
c774b230e9 Update hosting-on-aws-amplify.md
AWS Amplify now supports a GUI method for using the latest `hugo` version. Please feel free to modify my wording here, etc.
2020-04-07 22:48:55 +02:00
Bjørn Erik Pedersen
3d84ef9720
Merge commit 'c494c37a4523fbf2db6274dc87e0877fd5bec24b' 2020-03-31 22:11:54 +02:00
Stéphane Wirtel
b6e097cfe6 fix typo in getting started 2020-03-24 17:31:37 +01:00
hugoreleaser
157669a0e6 releaser: Add release notes to /docs for release of 0.68.3
[ci skip]
2020-03-24 12:04:27 +00:00
hugoreleaser
63bbb40dfb releaser: Add release notes to /docs for release of 0.68.2
[ci skip]
2020-03-24 08:21:09 +00:00
hugoreleaser
98dc46e1a9 releaser: Add release notes to /docs for release of 0.68.1
[ci skip]
2020-03-22 10:36:42 +00:00
hugoreleaser
1e67854b1a releaser: Add release notes to /docs for release of 0.68.0
[ci skip]
2020-03-21 11:47:37 +00:00
Bjørn Erik Pedersen
7204b354a9 Some minify configuration adjustments 2020-03-20 20:35:57 +01:00
SatowTakeshi
574c2959b8 Add minify config
Fixes #6750
Updates #6892
2020-03-20 20:35:57 +01:00
Bjørn Erik Pedersen
99958f90fe Allow headless bundles to list pages via $page.Pages and $page.RegularPages
Fixes #7075
2020-03-20 18:28:55 +01:00
Bjørn Erik Pedersen
c947351d7c
Merge commit 'aa54803a84208816e9c678359bd3f86760484ce0' 2020-03-20 09:19:29 +01:00
hugoreleaser
4f44227bd8 releaser: Add release notes to /docs for release of 0.67.1
[ci skip]
2020-03-15 19:30:34 +00:00
Tan Yuanhong
5914f91b6c
Add languageDirection to language configuration
Fixes #6550
2020-03-10 10:10:58 +01:00
hugoreleaser
7f1da3efcd releaser: Add release notes to /docs for release of 0.67.0
[ci skip]
2020-03-09 20:35:43 +00:00
Bjørn Erik Pedersen
63393230c9
docs: Doument the server config 2020-03-09 20:36:00 +01:00
Bjørn Erik Pedersen
6b61f2a5bb
Merge commit '14e369b961943a0b977776899e24e8bea63834df' 2020-03-09 20:21:17 +01:00
David Jones
51e178a6a2
deploy: Add include and exclude support for remote 2020-03-08 17:35:32 +01:00
hugoreleaser
78c3c78fca releaser: Add release notes to /docs for release of 0.66.0
[ci skip]
2020-03-03 15:19:36 +00:00
Bjørn Erik Pedersen
ee31e61fb0
docs: Regen CLI docs 2020-03-03 13:36:35 +01:00
Bjørn Erik Pedersen
3d3fa5c3fe Add build.UseResourceCacheWhen
Fixes #6993
2020-03-03 13:29:58 +01:00
Bjørn Erik Pedersen
b66d38c419 resources: Add basic @import support to resources.PostCSS
This commit also makes the HUGO_ENVIRONMENT environment variable available to Node.

Fixes #6957
Fixes #6961
2020-02-27 11:47:24 +01:00
Robert van Gent
05a74eaec0
deploy: Implement include/exclude filters for deploy
Fixes #6922
2020-02-27 07:26:05 +01:00
Joshua Wong
1352bc880d
Add hugo.IsProduction function
Fixes #6873
2020-02-25 17:58:07 +01:00
Chris Dennis
d184e5059c
tpl: Add math.Sqrt
Fixes #6941
2020-02-24 23:45:04 +01:00
hugoreleaser
211ba42a95 releaser: Add release notes to /docs for release of 0.65.3
[ci skip]
2020-02-23 09:58:31 +00:00
Bjørn Erik Pedersen
a524124beb Fix crashes for 404 in IsAncestor etc.
Fixes #6931
2020-02-22 13:36:04 +01:00
hugoreleaser
c1eb625124 releaser: Add release notes to /docs for release of 0.65.2
[ci skip]
2020-02-21 10:10:11 +00:00
hugoreleaser
6be6684cc5 releaser: Add release notes to /docs for release of 0.65.1
[ci skip]
2020-02-20 13:42:26 +00:00
hugoreleaser
24afe2b822 releaser: Add release notes to /docs for release of 0.65.0
[ci skip]
2020-02-20 08:11:06 +00:00
Bjørn Erik Pedersen
a5ebdf7d17
docs: Regenerate CLI docs 2020-02-19 22:28:06 +01:00
Bjørn Erik Pedersen
fa520a2d98 Add Page.GetTerms
Fixes #6905
2020-02-19 14:52:23 +01:00
Bjørn Erik Pedersen
82029c1ec9
Merge commit '4b670bc8cc38103c2c60e5090c2f56bf30832b8d' 2020-02-19 09:16:56 +01:00
Bjørn Erik Pedersen
775c7c2474
commands: Support "hugo mod get -u ./..."
Fixes #6828
2020-02-18 12:17:16 +01:00
hugoreleaser
c327e75d05 releaser: Add release notes to /docs for release of 0.64.1
[ci skip]
2020-02-09 20:44:34 +00:00
Bjørn Erik Pedersen
1e5eb8679e
Merge commit '3c0036805d64fdd8290f1c4a31371780ff3ea365' 2020-02-06 13:03:30 +01:00
hugoreleaser
241db8f78a releaser: Add release notes to /docs for release of 0.64.0
[ci skip]
2020-02-04 09:07:21 +00:00
hugoreleaser
934ee21fac releaser: Add release notes to /docs for release of 0.63.2
[ci skip]
2020-01-27 12:13:04 +00:00
hugoreleaser
ce9aceb749 releaser: Add release notes to /docs for release of 0.63.1
[ci skip]
2020-01-23 20:08:10 +00:00
hugoreleaser
745ddcbbab releaser: Add release notes to /docs for release of 0.63.0
[ci skip]
2020-01-23 12:39:31 +00:00
Bjørn Erik Pedersen
cafb1d53c0
docs, output: Add base template lookup variant to docs.json 2020-01-23 11:59:52 +01:00
Bjørn Erik Pedersen
4f466db666
docs: Regen docs helper 2020-01-23 11:55:08 +01:00
hugoreleaser
83e501849e releaser: Add release notes to /docs for release of 0.62.2
[ci skip]
2020-01-05 18:50:35 +00:00
Bjørn Erik Pedersen
d62ede8e9e
docs: Document the new autoHeadingIDType setting
See #6707
See #6616
2020-01-05 12:10:12 +01:00
Bjørn Erik Pedersen
81b7e48a55
docs: Regenerate docshelper
See #6707
See #6616
2020-01-05 11:57:49 +01:00
Bjørn Erik Pedersen
469351d5b6
Merge commit '26f1458a2df6b55eee3a5de46f5fec23a43a7c7d' 2020-01-05 11:14:51 +01:00
hugoreleaser
a1518704a7 releaser: Add release notes to /docs for release of 0.62.1
[ci skip]
2020-01-01 17:38:22 +00:00
hugoreleaser
6608f15570 releaser: Add release notes to /docs for release of 0.62.0
[ci skip]
2019-12-23 10:23:27 +00:00