Compare commits

...

5547 commits

Author SHA1 Message Date
David Jones
dd6e2c8724
deploy: walkLocal worker pool for performance
Some checks failed
Test / test (1.23.x, windows-latest) (push) Has been cancelled
Test / test (1.23.x, ubuntu-latest) (push) Has been cancelled
Test / test (1.24.x, ubuntu-latest) (push) Has been cancelled
Test / test (1.24.x, windows-latest) (push) Has been cancelled
2025-06-29 16:41:56 +02:00
hugoreleaser
762417617c releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-06-23 08:38:21 +00:00
hugoreleaser
29bdbde19c releaser: Bump versions for release of 0.147.9
[ci skip]
2025-06-23 08:22:20 +00:00
Bjørn Erik Pedersen
6a4a3ab8f8 Remove WARN with false negatives
Fixes #13806
2025-06-22 16:55:43 +02:00
Bjørn Erik Pedersen
36f6f987a9 resources/page: Make sure a map is always initialized
Fixes #13810
2025-06-21 14:38:06 +02:00
Joe Mooring
18a9ca7d7a tpl/tplimpl: Copy embedded HTML table render hook to each output format
Closes #13351
2025-06-21 14:37:47 +02:00
Joe Mooring
b6c8dfa9dc
tpl/tplimpl: Change resources.GetRemote errors to suppressible warnings
Closes #13803
2025-06-17 07:35:14 -07:00
dependabot[bot]
621ea42f3c build(deps): bump google.golang.org/api from 0.221.0 to 0.237.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.221.0 to 0.237.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.221.0...v0.237.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.237.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-13 13:53:25 +02:00
Bjørn Erik Pedersen
4ef5720141
hugolib: Remove test for deprecated future 2025-06-13 12:17:06 +02:00
dependabot[bot]
34e83789f7 build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.36.1 to 1.36.4
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.36.1 to 1.36.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.36.1...v1.36.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-version: 1.36.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-13 11:25:11 +02:00
dependabot[bot]
4d3ebe4d21 build(deps): bump golang.org/x/image from 0.27.0 to 0.28.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.27.0 to 0.28.0.
- [Commits](https://github.com/golang/image/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-12 14:17:16 +02:00
Joe Mooring
b5c0383bda deps: Upgrade github.com/spf13/cast v1.8.0 => v1.9.2 2025-06-12 10:07:09 +02:00
Joe Mooring
4217fee4b0 common/terminal: Enable color output on windows
Closes #8209
2025-06-09 11:44:13 +02:00
hugoreleaser
fad57964aa releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-06-07 13:13:56 +00:00
hugoreleaser
10da2bd765 releaser: Bump versions for release of 0.147.8
[ci skip]
2025-06-07 12:59:52 +00:00
Joe Mooring
01241d5dc9 hugolib: Emit ignorable warning when home page is a leaf bundle
Closes #13538
2025-06-07 13:02:28 +02:00
Bjørn Erik Pedersen
8e61f1fe12
dockerfile: Update Alpine
Closes #13783
2025-06-06 08:16:30 +02:00
Bjørn Erik Pedersen
f37412a575
dockerfile: Update Go version
FIxes #13780
2025-06-04 16:52:17 +02:00
dependabot[bot]
21a4a9acd7 build(deps): bump github.com/evanw/esbuild from 0.25.3 to 0.25.5
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.25.3 to 0.25.5.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.3...v0.25.5)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-version: 0.25.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 11:27:57 +02:00
dependabot[bot]
7a4a4790e5 build(deps): bump github.com/niklasfasching/go-org from 1.7.0 to 1.8.0
Bumps [github.com/niklasfasching/go-org](https://github.com/niklasfasching/go-org) from 1.7.0 to 1.8.0.
- [Commits](https://github.com/niklasfasching/go-org/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/niklasfasching/go-org
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 11:26:51 +02:00
dependabot[bot]
54065b7ef8 build(deps): bump golang.org/x/net from 0.39.0 to 0.40.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.39.0 to 0.40.0.
- [Commits](https://github.com/golang/net/compare/v0.39.0...v0.40.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.40.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-03 09:01:37 +02:00
dependabot[bot]
e333836f49 build(deps): bump github.com/yuin/goldmark from 1.7.11 to 1.7.12
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.11 to 1.7.12.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.7.11...v1.7.12)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-version: 1.7.12
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 18:18:44 +02:00
dependabot[bot]
cc7bfeea32 build(deps): bump github.com/tdewolff/minify/v2 from 2.23.5 to 2.23.8
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.23.5 to 2.23.8.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.23.5...v2.23.8)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-version: 2.23.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 18:18:24 +02:00
Bjørn Erik Pedersen
32eb1a8ad4 all: Replace _build with build in tests
_build is deprecated and now shows up as warning.
2025-06-02 16:35:37 +02:00
hugoreleaser
32af02cd3e releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-31 12:55:24 +00:00
hugoreleaser
189453612e releaser: Bump versions for release of 0.147.7
[ci skip]
2025-05-31 12:41:12 +00:00
Bjørn Erik Pedersen
5273a884d4 Fix language handling in shortcode templates
Fixes #13767
2025-05-31 13:57:00 +02:00
Bjørn Erik Pedersen
6334948515
Handle KaTeX warnings (#13760)
Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>

Fixes #13735
2025-05-30 20:57:54 +02:00
dependabot[bot]
75259636c8 build(deps): bump golang.org/x/image from 0.26.0 to 0.27.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/image/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 15:13:21 +02:00
dependabot[bot]
0df9f3510f build(deps): bump golang.org/x/text from 0.24.0 to 0.25.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-version: 0.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 12:50:09 +02:00
dependabot[bot]
302e6a726b build(deps): bump github.com/spf13/cast from 1.7.1 to 1.8.0
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 08:34:09 +02:00
dependabot[bot]
202fe0d45c build(deps): bump github.com/alecthomas/chroma/v2 from 2.17.2 to 2.18.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.17.2 to 2.18.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.17.2...v2.18.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-29 22:12:58 +02:00
Joe Mooring
843ffeb48d resources/page: Respect disablePathToLower for permalink tokens
Fixes #13755
2025-05-29 22:10:03 +02:00
Ruslan Semagin
bff5d19121 common/collections: Increase test coverage 2025-05-29 09:17:13 +02:00
Ruslan Semagin
da370d30de parser/pageparser: Add coverage for all IsX methods of Item
Added tests for all boolean methods on Item, increasing overall code coverage.
2025-05-28 21:53:17 +02:00
Bjørn Erik Pedersen
6bd328c584 resources: Remove unused interface 2025-05-28 19:32:28 +02:00
Bjørn Erik Pedersen
766a2e7868 Make sure that unreferenced but changed bundle resources gets republished
Fixes #13748
2025-05-28 19:32:28 +02:00
Bjørn Erik Pedersen
13e1617557 deps: Upgrade github.com/olekukonko/tablewriter v0.0.5 => v1.0.7 2025-05-28 18:07:14 +02:00
hugoreleaser
463e440c7a releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-27 11:31:53 +00:00
hugoreleaser
0a5fd8ebb8 releaser: Bump versions for release of 0.147.6
[ci skip]
2025-05-27 11:17:16 +00:00
Andreas Deininger
e57dcd3795 Improve warning message on superfluous prefix when using function 'partials.Include' 2025-05-27 12:16:26 +02:00
Bjørn Erik Pedersen
eaf5ace30d Fix recent regression with cascading of params to content adapters
Fixes #13743
2025-05-26 21:26:19 +02:00
Bjørn Erik Pedersen
9ad26b69ad Fix it so e.g. de in layouts/_shortcodes/de.html is not interpreted as a language code
Fixes #13740
2025-05-26 20:26:56 +02:00
Bjørn Erik Pedersen
f47193669d commands: Make sure the browser gets refreshed on changes when --disableFastRender is set
Fixes #13727
2025-05-23 19:46:16 +02:00
Joe Mooring
013c8cfb25 tpl/transform: Expose the KaTeX strict option
Closes #13729
2025-05-23 19:21:38 +02:00
hugoreleaser
e25db38467 releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-22 11:51:47 +00:00
hugoreleaser
7766fc6241 releaser: Bump versions for release of 0.147.5
[ci skip]
2025-05-22 11:37:19 +00:00
Bjørn Erik Pedersen
4a48facef4
Merge branch 'release-0.147.4' 2025-05-22 13:19:34 +02:00
Bjørn Erik Pedersen
0c7b1a3f26 Fix live reload when editing inline partials
Fixes #13723
2025-05-22 13:15:41 +02:00
dependabot[bot]
970b887ba1 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.37 to 2.23.5
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.37 to 2.23.5.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.37...v2.23.5)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-version: 2.23.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-20 14:49:06 +02:00
hugoreleaser
b9b95e5aec releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-20 10:55:43 +00:00
hugoreleaser
84c8426f32 releaser: Bump versions for release of 0.147.4
[ci skip]
2025-05-20 10:41:19 +00:00
Bjørn Erik Pedersen
a03a245f0c Fix it so css.TailwindCSS inlineImports options isn't always enabled
To avoid breaking existing setup and to make a better default option, the option is now `disableInlineImports` (default false).
Fixes #13719
2025-05-19 19:36:48 +02:00
Bjørn Erik Pedersen
5a81a3a4cf tpl: Add a test case
I'm not able to reproduce this, but leaving it in.

Closes #13699
2025-05-18 12:48:24 +02:00
Bjørn Erik Pedersen
61317821e4 tpl: Narrow down the usage of plain text shortcodes when rendering HTML
After this commit, if you want to resolve `layouts/_shortcodes/myshortcode.txt` when rendering HTML content, you need to use the `{{%` shortcode delimiter:

```
{{% myshortcode %}}
```

This should be what people would do anyway, but we have also as part of this improved the error message to inform about what needs to be done.

Note that this is not relevant for partials.

Fixes #13698
2025-05-18 12:48:24 +02:00
Bjørn Erik Pedersen
6142bc701c tpl: Fix theme overrides when theme has old layout setup (e.g. _default)
Fixes #13715
2025-05-18 12:48:24 +02:00
hugoreleaser
e6574cf7a7 releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-12 12:40:04 +00:00
hugoreleaser
05417512bd releaser: Bump versions for release of 0.147.3
[ci skip]
2025-05-12 12:25:03 +00:00
Joe Mooring
81426998b8 tpl/tplimpl: Change calls to simple versions of embedded shortcodes
Closes #13700
2025-05-12 14:19:11 +02:00
Bjørn Erik Pedersen
6def5a1ba9
Update README.md 2025-05-12 12:10:27 +02:00
Bjørn Erik Pedersen
bc98e7a80d config: Fix env override of slices
Fixes #13707
2025-05-11 19:24:24 +02:00
Bjørn Erik Pedersen
c745a3e108 Fix/implement cascade for content adapters
Fixes #13692
2025-05-10 15:12:24 +02:00
Joe Mooring
9d1d8c8899 commands: Fix description of new theme commands
Fixes #13701
2025-05-09 20:03:21 +02:00
Joe Mooring
84d7a108e8
tpl/tplimpl: Fix vimeo shortcode test to accommodate API changes
Fixes #13687
2025-05-09 10:02:00 -07:00
Joe Mooring
325a0dba63 tpl/math: Add MaxInt64 function
Closes #13693
2025-05-07 19:40:29 +02:00
hugoreleaser
d70f828e2b releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-06 11:33:36 +00:00
hugoreleaser
c7feb15d10 releaser: Bump versions for release of 0.147.2
[ci skip]
2025-05-06 11:18:55 +00:00
Bjørn Erik Pedersen
363ab48a24 Fix handling of "outputs" from content adapter pages
Fixes #13689
2025-05-06 11:40:46 +02:00
Bjørn Erik Pedersen
80f0595311 tpl: Fix case issue in templates.Exists
Fixes #13684
2025-05-05 11:23:52 +02:00
Bjørn Erik Pedersen
b39b249623 config: Add some more merge tests
See #13681
2025-05-02 11:15:38 +02:00
hugoreleaser
d799c045fd releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-05-01 14:04:58 +00:00
hugoreleaser
95666fc5a4 releaser: Bump versions for release of 0.147.1
[ci skip]
2025-05-01 13:50:04 +00:00
dependabot[bot]
620fc87b56 build(deps): bump github.com/alecthomas/chroma/v2 from 2.17.0 to 2.17.2
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.17.0 to 2.17.2.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.17.0...v2.17.2)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.17.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 15:44:26 +02:00
dependabot[bot]
8b2124e7c3 build(deps): bump github.com/getkin/kin-openapi from 0.131.0 to 0.132.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.131.0 to 0.132.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.131.0...v0.132.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-version: 0.132.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 13:19:22 +02:00
Bjørn Erik Pedersen
5fec7829b1 tpl: Add some more test cases
See #13672
See #13668
2025-05-01 12:55:11 +02:00
dependabot[bot]
927d1ec6c1 build(deps): bump github.com/yuin/goldmark from 1.7.10 to 1.7.11
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.10 to 1.7.11.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.7.10...v1.7.11)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-version: 1.7.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-30 22:09:10 +02:00
Bjørn Erik Pedersen
be93d5218b tpl: Fix overlapping layout sections
Fixes #13672
2025-04-30 21:04:03 +02:00
Bjørn Erik Pedersen
a1cb15e1cf Fix it so the owning taxonomy gets rerendered in server when new tags are added
Updates #13648
2025-04-28 21:42:16 +02:00
Joe Mooring
673a4d00eb commands/server: Display correct multihost language in console
Fixes #12564
2025-04-28 20:00:15 +02:00
Joe Mooring
31db7edf6d hugolib: Use new build key in content placeholder
Fixes #13655
2025-04-27 13:18:43 +02:00
hugoreleaser
5857b60cbc releaser: Prepare repository for 0.148.0-DEV
[ci skip]
2025-04-25 15:41:01 +00:00
hugoreleaser
7d0039b86d releaser: Bump versions for release of 0.147.0
[ci skip]
2025-04-25 15:26:28 +00:00
Bjørn Erik Pedersen
07983e04e2 tpl: Fix it so we always prefer internal codeblock rendering over render-codeblock-foo.html and similar
Fixes #13651
2025-04-25 10:51:33 +02:00
Joe Mooring
5c491409d3
tpl/tplimpl: Fix allowFullScreen option in Vimeo and YouTube shortcodes
Closes #13650
2025-04-24 14:14:46 -07:00
Joe Mooring
75b219db89 create/skeletons: Adjust template names in theme skeleton 2025-04-24 19:02:11 +02:00
Bjørn Erik Pedersen
ad4f63c92f tpl: Remove some unreached code branches 2025-04-24 14:27:59 +02:00
Bjørn Erik Pedersen
53202314ab images: Add some test cases for aligny on images.Text
See #13414
2025-04-24 14:09:13 +02:00
Pranshu Gaba
2fce0bac03 images: Add option for vertical alignment to images.Text
Add option ``aligny`` to specify the vertical alignment of the text
with respect to the ``y`` offset from the top of the image. Possible
values of ``aligny`` are ``top`` (default), ``center``, and ``bottom``.

The height of the block of text is measured from the top of the first
line to the baseline of the last line.

- ``top``: (Current behaviour) The top of the first line of the block of
  text is at an offset of ``y`` from the top of the image.

- ``center``: The vertical center of the block of text is at an offset of
  ``y`` from the top of the image.

- ``bottom``: The baseline of the last line of the text is at an offset
  of ``y`` from the top of the image.

Resolves #13414
2025-04-24 14:09:13 +02:00
Bjørn Erik Pedersen
179aea11ac config: Fix _merge issue when key doesn't exist on the left side
Fixes #13643
Fixes #13646
2025-04-24 13:56:27 +02:00
Bjørn Erik Pedersen
61a286595e
Merge commit 'b3d87dd0fd' 2025-04-24 10:23:16 +02:00
Bjørn Erik Pedersen
b3d87dd0fd Squashed 'docs/' changes from dc7a9ae12..b654fcba0
b654fcba0 content: Fix links
d44357418 content: Update GitLab Pages workflow example
33968c7e2 content: Update Netlify configuration file
a6d0c8c50 content: Update GitHub Pages workflow example
d1aabfa36 content: Fix broken link
7b50139a6 content: Miscellaneous edits
a30e2c189 Menus: add forgotten link target
5c2aa88b4 content: Updates for v0.146.7
114413c18 netlify: Hugo 0.146.7
67e9261b1 netlify: Hugo 0.146.6
efa040229 content: Update templates/embedded.md
b8f888c76 theme: Rename internal templates from partials/ to _partials/
727178cbb content: Fix broken anchor links
0f12708f1 Fix typo
380b1c163 Update Current.md
8b500f3e5 netlify: Hugo 0.146.5
e3d6b6fad netlify: Hugo 0.146.4
ac1b92713 content: Fix text formatting in templates/partial.md
719329530 content: Clarify usage of template function
a95eca524 theme: Misc adjustments for the themes site
8e6c26067 Add package.hugo.json
9691007fb netlify: Hugo 0.146.3
ec08acc59 netlify: Hugo 0.146.2
8f320a0b6 netlify: Hugo 0.146.1
d5e6cb618 content: Remove expired new-in badges
b5779d7fc content: Update templates.Current function
5df1229d5 theme: Move templates to new structure
a7a6a614d theme: Remove accidentally added template
195b368e8 content: Miscellaneous updates related to v0.146.0
0a906ad49 netlify: Hugo 0.146.0

git-subtree-dir: docs
git-subtree-split: b654fcba0d4385da1e47179ef3763f277f044242
2025-04-24 10:23:16 +02:00
Christian Oliff
6a0e04241a
all: Fix typos 2025-04-24 10:19:17 +02:00
dependabot[bot]
1bd7ac7ed9 build(deps): bump github.com/evanw/esbuild from 0.25.2 to 0.25.3
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.25.2 to 0.25.3.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.2...v0.25.3)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-version: 0.25.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-24 10:15:48 +02:00
dependabot[bot]
41cb880f9a build(deps): bump github.com/alecthomas/chroma/v2 from 2.16.0 to 2.17.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.16.0...v2.17.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-24 10:11:50 +02:00
hugoreleaser
df44ee1353 releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-22 17:42:19 +00:00
hugoreleaser
1ad3d39dc4 releaser: Bump versions for release of 0.146.7
[ci skip]
2025-04-22 17:26:42 +00:00
Bjørn Erik Pedersen
496730840e Revert the breaking change from 0.146.0 with dots in content filenames
Closes #13632
2025-04-22 19:23:19 +02:00
Bjørn Erik Pedersen
6d69dc88a4 tpl: Fix indeterminate template lookup with templates with and without lang
Close #13636
2025-04-22 17:29:39 +02:00
Joe Mooring
db72a1f075
parser/metadecoders: Add CSV targetType (map or slice) option to transform.Unmarshal
Closes #8859
2025-04-21 19:33:20 +02:00
dependabot[bot]
ad787614e8 build(deps): bump github.com/yuin/goldmark-emoji from 1.0.5 to 1.0.6
Bumps [github.com/yuin/goldmark-emoji](https://github.com/yuin/goldmark-emoji) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/yuin/goldmark-emoji/releases)
- [Commits](https://github.com/yuin/goldmark-emoji/compare/v1.0.5...v1.0.6)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark-emoji
  dependency-version: 1.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 15:18:02 +02:00
dependabot[bot]
9c65b9e88d build(deps): bump github.com/bep/imagemeta from 0.11.0 to 0.12.0
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-version: 0.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 15:17:49 +02:00
Bjørn Erik Pedersen
4eb0e4286a tpl/collections: Fix where ... not in with empty slice
Fixes #13621
2025-04-21 15:17:20 +02:00
Bjørn Erik Pedersen
5e62cc6fce tpl: Fix layout fall back logic when layout is set in front matter but not found
Fixes #13630
2025-04-21 15:17:20 +02:00
Bjørn Erik Pedersen
1408c156d8 tpl: Detect and fail on infinite template recursion
Fixes #13627
2025-04-21 15:17:20 +02:00
dependabot[bot]
be3b147860 build(deps): bump github.com/yuin/goldmark from 1.7.9 to 1.7.10
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.9 to 1.7.10.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.7.9...v1.7.10)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-version: 1.7.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 11:56:44 +02:00
hugoreleaser
99fff2997d releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-20 11:13:56 +00:00
hugoreleaser
1e0b058efe releaser: Bump versions for release of 0.146.6
[ci skip]
2025-04-20 10:58:40 +00:00
Bjørn Erik Pedersen
088cd2f996 tpl: Fix when layout specified in front matter and no match is found
Fixes #13628
2025-04-20 12:55:18 +02:00
broughtupsy
a88b488181 Update watchtestscripts.sh 2025-04-16 08:28:19 +02:00
hugoreleaser
d5a8c330cb releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-15 18:09:42 +00:00
hugoreleaser
61328976e1 releaser: Bump versions for release of 0.146.5
[ci skip]
2025-04-15 17:54:38 +00:00
dependabot[bot]
64cf008880 build(deps): bump github.com/yuin/goldmark from 1.7.8 to 1.7.9
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.8 to 1.7.9.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.7.8...v1.7.9)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-version: 1.7.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-15 14:33:56 +02:00
Bjørn Erik Pedersen
d61b9fc605 tpl: Fix language handling in partials
We now use the same code path for all templates re this.

Fixes #13612
2025-04-15 11:25:54 +02:00
hugoreleaser
01667275d4 releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-14 13:25:05 +00:00
hugoreleaser
985af1c097 releaser: Bump versions for release of 0.146.4
[ci skip]
2025-04-14 13:10:30 +00:00
Bjørn Erik Pedersen
65c94c7b23 tpl: Fix issue with partials without suffix
Fixes #13601
2025-04-14 14:38:22 +02:00
Bjørn Erik Pedersen
e8e8ce10d2 tpl: Avoid panic on nonsensical return construct
Fixes #13600
2025-04-14 14:38:22 +02:00
Bjørn Erik Pedersen
cf9e6904cc tpl: Fix the case for a shortcode in a nested folder only
Fixes #13605
2025-04-14 14:38:22 +02:00
Bjørn Erik Pedersen
8a2830f2dc tpl: Add proper file context to template parse errors
Fixes #13604
2025-04-14 14:38:22 +02:00
Bjørn Erik Pedersen
1e0287f472 tpl: Make {{ template "partials/foo.html" . }} work in older setups
Fixes #13599
2025-04-14 14:38:22 +02:00
hugoreleaser
915ba3f7f0 releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-12 17:36:11 +00:00
hugoreleaser
05ef8b713a releaser: Bump versions for release of 0.146.3
[ci skip]
2025-04-12 17:21:50 +00:00
Bjørn Erik Pedersen
30b9c19c76
tpl: Make any layout set in front matter higher priority
Fixes #13541
2025-04-12 18:12:06 +02:00
Bjørn Erik Pedersen
c8710625b7
tpl: Fix it so embedded render-codeblock-goat is used even if custom render-codeblock exists
Fixes #13595
2025-04-12 13:03:45 +02:00
hugoreleaser
53221f88ca releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-11 17:39:58 +00:00
hugoreleaser
ff3ab192c2 releaser: Bump versions for release of 0.146.2
[ci skip]
2025-04-11 17:25:13 +00:00
Bjørn Erik Pedersen
d1c394442b
tpl: Fix codeblock hook resolve issue
Fixes #13593
2025-04-11 18:59:42 +02:00
Bjørn Erik Pedersen
1074e01152 tpl: Fix legacy section mappings
Fixes #13584
2025-04-11 18:23:51 +02:00
Bjørn Erik Pedersen
c19f1f2363 tpl: Resolve layouts/all.html for all html output formats
Fixes #13587
2025-04-11 18:23:51 +02:00
Bjørn Erik Pedersen
9221cbca49 tpl: Fix some baseof lookup issues
We were mistakingly using the templates (e.g. list.html) descriptor to resolve the base template and not the page,
which worked fine in most cases, but not all.

Fixes #13583
2025-04-11 18:23:51 +02:00
hugoreleaser
e3e3f9ae17 releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-10 16:59:48 +00:00
hugoreleaser
acc4fe24be releaser: Bump versions for release of 0.146.1
[ci skip]
2025-04-10 16:44:46 +00:00
Bjørn Erik Pedersen
3b9f2a7ded tpl: Skip dot and temp files inside /layouts
Fixes #13579
2025-04-10 18:41:01 +02:00
hugoreleaser
648204b3f1 releaser: Prepare repository for 0.147.0-DEV
[ci skip]
2025-04-10 15:13:26 +00:00
hugoreleaser
5d1b9d3985 releaser: Bump versions for release of 0.146.0
[ci skip]
2025-04-10 14:57:56 +00:00
Bjørn Erik Pedersen
383dd82f95 tpl: Warn and skip non-hook templates inside /layouts/_markup
Fixes #13577
2025-04-10 16:54:05 +02:00
Bjørn Erik Pedersen
653f1c1d46
Merge commit '5be51ac3db' 2025-04-10 13:04:51 +02:00
Bjørn Erik Pedersen
5be51ac3db Squashed 'docs/' changes from d1a251933..dc7a9ae12
dc7a9ae12 content: Update JS options
07d3d8803 npm: Use tilde ranges for versions
e06362a13 Minor grammar fixes
c42db0838 content: Algolia DocSearch clarification
d67412b82 deps: Upgrade to TailwindCSS 4.1.0
da1fb12d3 theme: Update Lato font path for images.Text example
140fa3bb9 Update introduction.md
7b1fcca27 content: Fix links to embedded template source
908a55532 theme: Improve dark mode syntax highlighting background
d830e5962 Update XxHash.md
807be5dbf Update Defer.md
4b56693f6 content: Update GitHub Pages sample workflow
57b766fba Update TailwindCSS.md
64982ab6a Update TailwindCSS.md
1b6e879c6 Update TailwindCSS.md
e67cbcdd2 content: Add caching to the GitHub Pages workflow example
b7ca3b07c Update index.md
14e1a3977 Update XxHash.md
980f344ae Update XxHash.md
6b815f03e theme: Remove aria-label attribute from links
1c00bbc45 theme: Update npm dependencies
533149bf9 theme: Include section pages in related content
2b6bda6bd content: Fix typos
92ce95cbb content: Miscellaneous edits
f12936681 theme: Add a simple LRU cache for search
339ca3388 Fix the previous broken commit
8537e59e0 Make it into a non-link
e13f17d29 Add Algolia logo/link to the search listing dialog
d3e09e886 content: Fix typo
7217f64b6 content: Miscellaneous edits
51aa1ae73 content: Improve some examples
8ebaa53f9 theme: Adjust shortcodes
898870438 theme: Hide anchor until mouse-over
c933ea237 content: More front matter cleanup
f26ca047a content: Miscellaneous edits
e272b2039 theme: Fix inline partial refs
c540e6d29 content: Replace note shortcode calls with blockquote alerts
aef899bc5 theme: Add title and QR code when printing
bd46ef626 theme: Implement blockquote render hook
ddefbefaa content: Improve contributing page
f41d28ee1 content: Adjust usage of whitespace removal with action delimiters
03315336d theme: Use full title in related content sidebar
4f4076364 misc: Document the front matter fields used on this site
2f78d7632 misc: Fix gitignore file
7de6dbab3 content: Fix front matter for several function pages
5d3542ea6 config: Disable tags taxonomy
68bc28d67 content: Add linkTitle to shortcode pages
5f32c92ed theme: Restore deduplication logic for related items
a943a4bb8 theme: Implement related content tooling
fd628be6e content: Replace calls to the code shortcode with fenced code blocks
b23c9a583 content: Fix position of new-in badges
ec056f251 content: Fix typo
245351c84 theme: Adjust spacing in highlighting theme examples
2fcd21ee5 content: Remove "related" array from function and method pages
71d8426ee theme: Create code block render hook
4cdde6649 theme: Adjust number of news items to display
34ab45261 content: Miscellaneous edits
b6cae5cbc content: Consolidate configuration documentation
727ef6f66 theme: Fix overflow issue for wide tables
c4f759e01 Add es2024
93cce62c8 Update support list of more recent targets with js.Build / esbuild
974d0655f Update hosting-on-codeberg.md
b3f0ed9ce content: Add hosting instructions for Codeberg Pages
8217c0900 content: Correct the SourceHut repository URL
a8cf3d28f content: Add hosting instructions for SourceHut Pages
8c059cbe1 theme: Use content adapter for news section
03938c600 Remove some old new-in
5c50a75e8 content: Fix typo
5cf89f2f6 theme: Re-enable banner gtag outbound link tracking
3c555d5f8 One more copy button
94bce999a Add some copy buttons
9e1cc0c2b Update PortableText.md
dd26ac49f Document transform.PortableText
5f632ab32 netlify: Hugo 0.145.0
59e057bb4 Update index.md
d07e07d6c Remove some unused home page front matter
d482657b7 Add footnote about alias to the build front matter key
f0629b77c content: Fix typo
d91c4cccf theme: Fix news items URLs
ca931cd1f theme: Restore RSS feed for news section
e6b870bc9 theme: Adjust copy-to-clipboard button
071851431 Update netlify.toml
e68431034 theme: Format layouts
aa3cd839a theme: Format assets
22ad3eee3 theme: Add some more space on the right for copy buttons
f4a19083a netlify: Hugo 0.144.1
974cb8795 theme: Remove Internet Explorer configs (#2929)
4a23a1f41 content: Fix typos
d49f15d03 theme: Get the scrollspy back working
720c7ff67 config: Evict getresource cache hourly
1f62ca97e theme: Hide the Turbo progress bar
f6449ace3 Move the dark class up to the html element
074cd1a07 content: Miscellaneous edits
e098a7716 content: Miscellaneous edits
8e1e104aa content: Updates for v0.144.0
18e1aa916 theme: Add anchor links via JS
ac3b5505c Close new-in
bfa4db6b8 netlify: Hugo 0.144.0
fd6e7feee Regen CLI docs
da9d1218a Regen docs helper
5de494ded Merge branch 'tempv0.144.0'
f683e6469 theme: Minor improvements to base template
ef8bf89d8 resources/page: Revise the new contentbasename permalinks tokens
901adb07b resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens
0fca8ef25 all: Change shortcode usage and design to prevent invalid HTML
c41d76613 Update RegularPagesRecursive.md
e93574748 content: Correct return type for strings.Split
3d504abba Revert "content: Add ids to the Netlify steps"
c08c8e15e content: Add ids to the Netlify steps
5a3b470a2 theme: "move" the id from content to article
b878613aa theme: Add page kind as a CSS class to body
269657e8f content: Fix formatting error
664f6c92f config: Change image cache location
fa6b719b1 theme: Reduce ToC to level 2-4
bc16341ca theme: Render mathematical markup with transform.ToMath
14bf9dc70 theme: Add aria-label attribute to search fields
ed42af5b3 theme: Adjust search field and search activation
f042e4970 dev: Add prettier-plugin-void-html
f6ec83533 content: Fix inline shortcode example
0a74210e2 theme: Remove readfile shortcode
334ca06ac theme: Fix some dark mode accessibility as reported by Axe core
02626ff92 theme: aria-lbabel => aria-label
227b76ab7 Add Prettier and config
43ab22428 content: Bump minimum required Go version to 1.23.0
03e54683f modules: Add GOAUTH to module config
9f06a3b9c js/esbuild: Add drop option
ddcd99369 Merge commit 'a024bc7d76'
733731253 helpers: Add Chroma styles to docs.yaml

git-subtree-dir: docs
git-subtree-split: dc7a9ae127717cde17840496cb0287f481c5f0ee
2025-04-10 13:02:49 +02:00
Bjørn Erik Pedersen
208a0de6c3 tpl: Add a partial lookup cache
````
                 │ stash.bench  │          perf-v146.bench           │
                 │    sec/op    │   sec/op     vs base               │
LookupPartial-10   248.00n ± 0%   14.75n ± 2%  -94.05% (p=0.002 n=6)

                 │ stash.bench │          perf-v146.bench          │
                 │    B/op     │   B/op     vs base                │
LookupPartial-10    48.00 ± 0%   0.00 ± 0%  -100.00% (p=0.002 n=6)

                 │ stash.bench │          perf-v146.bench           │
                 │  allocs/op  │ allocs/op   vs base                │
LookupPartial-10    3.000 ± 0%   0.000 ± 0%  -100.00% (p=0.002 n=6)
```

THe speedup above assumes reuse of the same partials over and over again, which I think is not uncommon.

This commits also adds some more lookup benchmarks. The current output of these on my MacBook looks decent:

```
BenchmarkLookupPagesLayout/Single_root-10                3031562               395.5 ns/op             0 B/op          0 allocs/op
BenchmarkLookupPagesLayout/Single_sub_folder-10          2515915               480.9 ns/op             0 B/op          0 allocs/op
BenchmarkLookupPartial-10                               84808112                14.13 ns/op            0 B/op          0 allocs/op
BenchmarkLookupShortcode/toplevelpage-10                 8111779               148.2 ns/op             0 B/op          0 allocs/op
BenchmarkLookupShortcode/nestedpage-10                   8088183               148.6 ns/op             0 B/op          0 allocs/op
```

Note that in the above the partial lookups are cahced, the others not (they are harder to cache because of the page path).

Closes #13571
2025-04-10 11:07:19 +02:00
dependabot[bot]
18d2d2f985 build(deps): bump github.com/fsnotify/fsnotify from 1.8.0 to 1.9.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.8.0...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-version: 1.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 10:51:46 +02:00
dependabot[bot]
cd3e3499bd build(deps): bump golang.org/x/tools from 0.31.0 to 0.32.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 10:51:20 +02:00
dependabot[bot]
8cd799aac9 build(deps): bump github.com/evanw/esbuild from 0.25.1 to 0.25.2
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.25.1 to 0.25.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.25.1...v0.25.2)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-version: 0.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 10:51:07 +02:00
Bjørn Erik Pedersen
d4c6dd16b1 tpl: Add templates.Current
This commit also

* Unexport all internal state in TemplateInfo.
* Make the dispatcher keys used for passing context.Context into uint8 from string to save memory allocations.

Co-authored-by: Joe Mooring <joe@mooring.com>

Updates #13571
2025-04-09 20:15:40 +02:00
dependabot[bot]
af0602c343 build(deps): bump golang.org/x/image from 0.25.0 to 0.26.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.25.0 to 0.26.0.
- [Commits](https://github.com/golang/image/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-version: 0.26.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 13:07:03 +02:00
dependabot[bot]
650fe6cd01 build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.3 to 2.2.4
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.3...v2.2.4)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-version: 2.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 13:06:38 +02:00
dependabot[bot]
d63491beb2 build(deps): bump github.com/alecthomas/chroma/v2 from 2.15.0 to 2.16.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.15.0...v2.16.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-version: 2.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-09 13:05:13 +02:00
Joe Mooring
24ac6a9de9 commands/new: Improve theme creation
- Update the skeleton structure to match the new template system.
- Add a --format flag to the `hugo new theme` command to control the
  format of the site configuration and default archetype files.
- Remove theme.toml. This file's presence can be confusing for new
  users, and the README in the themes repository already has an example.
- Remove the LICENSE and README files from the skeleton. These files
  are not needed for a theme to work, and they can be added later by
  the user if desired.

Closes #13489
Closes #13544
2025-04-08 16:35:46 +02:00
dependabot[bot]
e6e18e9122 build(deps): bump golang.org/x/net from 0.37.0 to 0.39.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.37.0 to 0.39.0.
- [Commits](https://github.com/golang/net/compare/v0.37.0...v0.39.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.39.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 12:14:30 +02:00
dependabot[bot]
43af3bc07d build(deps): bump github.com/bep/imagemeta from 0.10.0 to 0.11.0
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-version: 0.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 12:02:20 +02:00
Joe Mooring
10b55439a8 deps: Upgrade github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.3.0 => v0.3.1 2025-04-07 21:33:06 +02:00
Joe Mooring
1e00842489 tpl/tplimpl: Update embedded pagination template 2025-04-07 21:29:53 +02:00
Bjørn Erik Pedersen
83cfdd78ca
Reimplement and simplify Hugo's template system
See #13541 for details.

Fixes #13545
Fixes #13515
Closes #7964
Closes #13365
Closes #12988
Closes #4891
2025-04-06 20:59:41 +02:00
Bjørn Erik Pedersen
812ea0b325 config: Use the non-global logger for deprecations when possible
To prevent warnings leaking into parallel tests.
2025-04-03 13:43:54 +02:00
Joe Mooring
07cbe5701e tpl/time: Add time.In function
Closes #13548
2025-04-03 09:45:51 +02:00
Joe Mooring
c15ebce2fd resources: Add option to silence dependency deprecation warnings
Closes #13530
2025-03-29 19:04:53 +01:00
Joe Mooring
6f14dbe24c tpl/tplimpl: Fix full screen option in vimeo and youtube shortcodes
Closes #13531

Co-authored-by: Stefan Ritter <60473875+gideonstar-git@users.noreply.github.com>
2025-03-27 12:32:00 +01:00
Bjørn Erik Pedersen
8d2379bcb3 common/hreflect: Replace the map/RWMutex method cache with sync.Map
It's much faster when running in parallel:

```
GetMethodByName-10        125.1n ± 6%   181.7n ± 7%  +45.30% (p=0.002 n=6)
GetMethodByNamePara-10   770.10n ± 1%   24.77n ± 9%  -96.78% (p=0.002 n=6)
```
2025-03-26 14:24:51 +01:00
dependabot[bot]
26d986fc0d build(deps): bump golang.org/x/tools from 0.30.0 to 0.31.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 12:02:15 +01:00
dependabot[bot]
ebc0693659 build(deps): bump github.com/getkin/kin-openapi from 0.129.0 to 0.131.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.129.0 to 0.131.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.129.0...v0.131.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 12:02:03 +01:00
dependabot[bot]
7ca6bb06b6 build(deps): bump github.com/spf13/afero from 1.11.0 to 1.14.0
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.11.0 to 1.14.0.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.11.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-25 12:00:07 +01:00
dependabot[bot]
bddd2f9001 build(deps): bump github.com/bep/imagemeta from 0.9.0 to 0.10.0
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 10:45:08 +01:00
dependabot[bot]
1c691358f7 build(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v5.2.1...v5.2.2)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 10:44:37 +01:00
dependabot[bot]
17db4edb02 build(deps): bump github.com/evanw/esbuild from 0.24.2 to 0.25.1
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.24.2 to 0.25.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.2...v0.25.1)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 10:44:16 +01:00
dependabot[bot]
3968f9158e build(deps): bump github.com/bep/godartsass/v2 from 2.4.0 to 2.4.1
Bumps [github.com/bep/godartsass/v2](https://github.com/bep/godartsass) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/bep/godartsass/releases)
- [Commits](https://github.com/bep/godartsass/compare/v2.4.0...v2.4.1)

---
updated-dependencies:
- dependency-name: github.com/bep/godartsass/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-24 10:43:58 +01:00
dependabot[bot]
e9bd2373a0 build(deps): bump golang.org/x/net from 0.35.0 to 0.37.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.35.0 to 0.37.0.
- [Commits](https://github.com/golang/net/compare/v0.35.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-23 21:01:52 +01:00
Joe Mooring
a6bd67793b common/hexec: Remove github.com/cli/safeexec
We began using the safeexec package in v0.79.1 to address
https://github.com/gohugoio/hugo/security/advisories/GHSA-8j34-9876-pvfq.

The vulnerability was addressed by the Go team in 1.19, so the safeexec
package is no longer needed.

Closes #13516
2025-03-23 13:55:42 +01:00
Ville Vesilehto
f34cdc382a
parser/metadecoder: Improve errors for non-map XML root values
Previously, the XML decoder would panic when encountering a root element with
a non-map value due to an unsafe type assertion.

The fix adds proper type checking before the map conversion and provides
clear error messages to help users identify and fix invalid XML structures.

Example error for invalid XML like:
<root>just text</root>

Will now return:
"XML root element 'root' must be a map/object, got string"
2025-03-22 18:48:23 +01:00
Bjørn Erik Pedersen
52561d561a identity: Use clear to clear the finder seen map
Faster:

```
Finder/Find_one-10    172.8n ± 26%   129.3n ± 2%  -25.18% (p=0.002 n=6)
Finder/Find_none-10   174.0n ±  1%   130.6n ± 0%  -24.94% (p=0.002 n=6)
```
2025-03-15 19:05:45 +01:00
dependabot[bot]
f4f21f5ea3 build(deps): bump github.com/bep/godartsass/v2 from 2.3.2 to 2.4.0
Bumps [github.com/bep/godartsass/v2](https://github.com/bep/godartsass) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/bep/godartsass/releases)
- [Commits](https://github.com/bep/godartsass/compare/v2.3.2...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/bep/godartsass/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-15 18:37:33 +01:00
Joe Mooring
a98ec3bd01 commands/gen: Set url in command pages to /docs/reference/commands/ 2025-03-14 21:11:46 +01:00
khayyam
d28c84a871
cache: Apply httpcache defaults for polling config
Previously, compiling the config with partial or missing poll configs
would introduce a panic. This ensures that the default poll configs
are applied in such scenarios to ensure config is valid.

Fixes #13471
2025-03-14 14:37:26 +01:00
dependabot[bot]
61c39ae63b build(deps): bump golang.org/x/image from 0.24.0 to 0.25.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/image/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-13 16:17:49 +01:00
Bjørn Erik Pedersen
2037137fbf deps: Upgrade golang.org/x/mod v0.23.0 => v0.24.0
Closes #13484
2025-03-12 16:24:48 +01:00
dependabot[bot]
d78d4cf161 build(deps): bump github.com/bep/overlayfs from 0.9.2 to 0.10.0
Bumps [github.com/bep/overlayfs](https://github.com/bep/overlayfs) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/bep/overlayfs/releases)
- [Commits](https://github.com/bep/overlayfs/compare/v0.9.2...v0.10.0)

---
updated-dependencies:
- dependency-name: github.com/bep/overlayfs
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-11 21:03:49 +01:00
dependabot[bot]
f9aae1581b build(deps): bump github.com/bep/lazycache from 0.7.0 to 0.8.0
Bumps [github.com/bep/lazycache](https://github.com/bep/lazycache) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/bep/lazycache/releases)
- [Commits](https://github.com/bep/lazycache/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: github.com/bep/lazycache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-11 21:03:27 +01:00
Joe Mooring
b9add1c702 tpl/tplimpl: Add loading attribute to Vimeo shortcode
Closes #13445
2025-03-11 21:02:12 +01:00
dependabot[bot]
b0686712ba build(deps): bump github.com/bep/imagemeta from 0.8.4 to 0.9.0
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.8.4 to 0.9.0.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.8.4...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-11 16:51:32 +01:00
dependabot[bot]
93d9c0533a build(deps): bump github.com/bep/simplecobra from 0.5.0 to 0.6.0
Bumps [github.com/bep/simplecobra](https://github.com/bep/simplecobra) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/bep/simplecobra/releases)
- [Commits](https://github.com/bep/simplecobra/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/bep/simplecobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-11 16:51:19 +01:00
Joe Mooring
93df17661f commands: Add --omitEmpty flag to gen chromastyles
Closes #13475
2025-03-11 16:50:59 +01:00
Will Faught
eebea9ec41 tpl: Add trailing newline to robots.txt template 2025-03-05 15:02:50 +01:00
Bjørn Erik Pedersen
3f2e1c08e3 commands: Skip flaky test on Windows
Closes #13465
2025-03-03 12:50:33 +01:00
Hannes Braun
3a11d22da3
resources/image: Mark loong64 as FMA-using architecture 2025-02-26 21:17:06 +01:00
hugoreleaser
cb4a097190 releaser: Prepare repository for 0.146.0-DEV
[ci skip]
2025-02-26 15:58:38 +00:00
hugoreleaser
666444f0a5 releaser: Bump versions for release of 0.145.0
[ci skip]
2025-02-26 15:41:25 +00:00
margau
e5eecbd9bc
github: Build docker image with both extended and withdeploy tags 2025-02-26 16:33:22 +01:00
coliff
4094a1e12c all: Typo fixes 2025-02-26 15:10:28 +01:00
Bjørn Erik Pedersen
6927e6f048 deps: Upgrade github.com/rogpeppe/go-internal v1.13.1 => v1.14.1
Closes #13449
2025-02-26 14:43:03 +01:00
Bjørn Erik Pedersen
c498d0fe1e Use the page path and not the backing filename as the last resort in the default sort
This should:

1. Fix some (rare) tiebreaker issues when sorting pages from multiple content adapters.
2. Improve the sorting for pages without a backing file.
2025-02-26 13:06:26 +01:00
Bjørn Erik Pedersen
521911a576 all: Run modernize -fix ./... 2025-02-26 11:44:25 +01:00
dependabot[bot]
b7ae24b9c2 build(deps): bump github.com/yuin/goldmark-emoji from 1.0.4 to 1.0.5
Bumps [github.com/yuin/goldmark-emoji](https://github.com/yuin/goldmark-emoji) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/yuin/goldmark-emoji/releases)
- [Commits](https://github.com/yuin/goldmark-emoji/compare/v1.0.4...v1.0.5)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark-emoji
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-26 10:56:23 +01:00
Christian Oliff
2f4e666d7e
tpl: HTTPS the instagram Shortcode JS
This JavaScript will always load over HTTPS so it's best to specify that. Protocol-less loaded resources are an anti-pattern (REF: https://www.paulirish.com/2010/the-protocol-relative-url/)
2025-02-26 09:27:31 +01:00
dependabot[bot]
1a4851f138 build(deps): bump github.com/google/go-cmp from 0.6.0 to 0.7.0
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 19:41:18 +01:00
dependabot[bot]
d1f23309bf build(deps): bump github.com/tetratelabs/wazero from 1.8.2 to 1.9.0
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-25 19:40:01 +01:00
Bjørn Erik Pedersen
04f21b4d80 Add transform.PortableText
Using this in a content adapter could look like this:

```handlebars
{{ $projectID := "<myproject>" }}
{{ $useCached := true }}
{{ $api := "api" }}
{{ if $useCached }}
  {{/* See https://www.sanity.io/docs/api-cdn */}}
  {{ $api = "apicdn" }}
{{ end }}
{{ $url := printf "https://%s.%s.sanity.io/v2021-06-07/data/query/production"  $projectID $api }}

{{/* prettier-ignore-start */ -}}
{{ $q :=  `*[_type == 'post']{
  title, publishedAt, summary, slug, body[]{
    ...,
    _type == "image" => {
      ...,
      asset->{
        _id,
        path,
        url,
        altText,
        title,
        description,
        metadata {
          dimensions {
            aspectRatio,
            width,
            height
          }
        }
      }
    }
  },
  }`
}}
{{/* prettier-ignore-end */ -}}
{{ $body := dict "query" $q | jsonify }}
{{ $opts := dict "method" "post" "body" $body }}
{{ $t := debug.Timer "sanity.get" }}
{{ $r := resources.GetRemote $url $opts }}
{{ $t.Stop }}
{{ $m := $r | transform.Unmarshal }}
{{ $result := $m.result }}
{{ $t := debug.Timer "sanity.parse" }}
{{ range $result }}
  {{ if not .slug }}
    {{ continue }}
  {{ end }}
  {{ $markdown := transform.PortableText .body }}
  {{ $t.Stop }}
  {{ $content := dict
    "mediaType" "text/markdown"
    "value" $markdown
  }}
  {{ $params := dict
    "portabletext" (.body | jsonify (dict "indent" " "))
  }}
  {{ $page := dict
    "content" $content
    "kind" "page"
    "path" .slug.current
    "title" .title
    "date" (.publishedAt | time )
    "summary" .summary
    "params" $params
  }}
  {{ $.AddPage $page }}
{{ end }}
```
2025-02-25 19:35:47 +01:00
Martey Dodoo
ab9e545760 readme: Fix relative links in Editions section
Make relative gohugo.io links used in Editions section of README
absolute so that they resolve successfully.
2025-02-25 18:26:05 +01:00
Bjørn Erik Pedersen
381c0da85d Fix some related content issues with content adapters
Fixes #13443
2025-02-25 14:14:56 +01:00
Bjørn Erik Pedersen
227e429267 Fix potential nilpointer in httpcache config 2025-02-24 18:42:50 +01:00
Joe Mooring
d0ce942190 hugolib: Deprecate _build front matter key in favor of build
We effectively aliased "_build" to "build" in v0.123.0, and
removed "_build" from the documentation at the same time.
2025-02-24 10:13:53 +01:00
Joe Mooring
4fd7f3233f
snap: Update Node.js to 22.x 2025-02-22 07:49:02 -08:00
Bjørn Erik Pedersen
c3d435acfa Fix --printPathWarnings when site calls templates.Defer
This issue was introduced recently in eb7a5aabaa.

Fixes #13420
2025-02-19 12:59:40 +01:00
hugoreleaser
669216e204 releaser: Prepare repository for 0.145.0-DEV
[ci skip]
2025-02-18 12:29:51 +00:00
hugoreleaser
a79d63a446 releaser: Bump versions for release of 0.144.1
[ci skip]
2025-02-18 12:14:07 +00:00
Bjørn Erik Pedersen
494e88abf6 markup/goldmark: Fix panic on empty Markdown header
Fixes #13416
2025-02-18 11:12:39 +01:00
hugoreleaser
f1e799c2e1 releaser: Prepare repository for 0.145.0-DEV
[ci skip]
2025-02-17 16:36:56 +00:00
hugoreleaser
b289b17c43 releaser: Bump versions for release of 0.144.0
[ci skip]
2025-02-17 16:22:31 +00:00
Bjørn Erik Pedersen
85c1727748
markup/goldmark: Fix panic on stray attribute nodes 2025-02-17 17:19:53 +01:00
Bjørn Erik Pedersen
641403f7de Fix Position for passthrough hooks
Fixes #13406
2025-02-17 12:23:49 +01:00
Bjørn Erik Pedersen
24cc25552f Fix auto generated header ids so they don't contain e.g. hyperlink destinations (note)
This makes the header ids match the newly added dt ids.

Also make sure newlines are preserved in hooks' `.PlainText`.

Fixes #13405
Fixes #13410
2025-02-17 12:23:49 +01:00
dependabot[bot]
a2ca95629a build(deps): bump github.com/spf13/cobra from 1.8.1 to 1.9.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.1 to 1.9.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.1...v1.9.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 12:08:14 +01:00
dependabot[bot]
367fe526e2 build(deps): bump github.com/sanity-io/litter from 1.5.7 to 1.5.8
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.7 to 1.5.8.
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.7...v1.5.8)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 12:06:55 +01:00
Joe Mooring
5de3913ed4 config/allconfig: Deprecate :filename and :slugorfilename tokens 2025-02-17 12:06:32 +01:00
Bjørn Erik Pedersen
7b7a0f3624 resources/page: Revise the new contentbasename permalinks tokens
* Make it work for all pages, including those created from content adapters and not backed by a file.
* Allow the `slug` to win, so the new tokens are:

`:contentbasename`:

1. ContentBaseName

`:slugorcontentbasename`:

1. Slug
2. ContentBaseName

Note that a page will always have a `ContentBaseName`, so no need to fall back to e.g. the title.

Closes #11722
2025-02-17 09:41:49 +01:00
Henrique Dias
cb7a4339b7 resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens
See #11722
2025-02-17 09:41:49 +01:00
Bjørn Erik Pedersen
157d3703c3 Add autoID for definition terms
Fixes #13403
See #11566

Co-authored-by: Joe Mooring <joe@mooring.com>
2025-02-16 20:55:27 +01:00
dependabot[bot]
9c2f8ec61b build(deps): bump github.com/sanity-io/litter from 1.5.5 to 1.5.7
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.5 to 1.5.7.
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.5...v1.5.7)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 14:25:11 +01:00
dependabot[bot]
bd77944ba2 build(deps): bump github.com/gohugoio/hugo-goldmark-extensions/extras
Bumps [github.com/gohugoio/hugo-goldmark-extensions/extras](https://github.com/gohugoio/hugo-goldmark-extensions) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/gohugoio/hugo-goldmark-extensions/releases)
- [Commits](https://github.com/gohugoio/hugo-goldmark-extensions/compare/extras/v0.2.0...extras/v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/gohugoio/hugo-goldmark-extensions/extras
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-14 14:24:04 +01:00
Peter Weston
c1f4228d61
config: Fix server.redirects.fromRe being ignored unless server.redirects.from is also set 2025-02-14 10:21:19 +01:00
Joe Mooring
503dcf6252 internal/warpc: Enable KaTeX mhchem extension 2025-02-14 10:04:15 +01:00
Joe Mooring
5dd0ba00f7 Update README.md
- Include section about editions
- Bump minimum required Go version for building from source
- Include instructions for building the extended/deploy edition
- Update dependency list
2025-02-13 17:17:59 +01:00
dependabot[bot]
2e835d0841 build(deps): bump golang.org/x/tools from 0.29.0 to 0.30.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.29.0...v0.30.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 15:01:51 +01:00
Bjørn Erik Pedersen
2c77719cd6 modules: Add GOAUTH to module config
Closes #13385
2025-02-13 15:01:28 +01:00
dependabot[bot]
d89b9d891c build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront
Bumps [github.com/aws/aws-sdk-go-v2/service/cloudfront](https://github.com/aws/aws-sdk-go-v2) from 1.44.9 to 1.44.10.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/macie2/v1.44.9...service/s3control/v1.44.10)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudfront
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 13:48:54 +01:00
dependabot[bot]
8721a35202 build(deps): bump google.golang.org/api from 0.206.0 to 0.221.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.206.0 to 0.221.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.206.0...v0.221.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 13:47:55 +01:00
Bjørn Erik Pedersen
fd38aee694 Support menus as maps in content adapters
Fixes #13384
2025-02-13 13:29:24 +01:00
Bjørn Erik Pedersen
d25f7ec172 js/esbuild: Add drop option
Fixes #13362
2025-02-13 13:26:46 +01:00
Bjørn Erik Pedersen
a024bc7d76 Squashed 'docs/' changes from 73a01565c..d1a251933
d1a251933 theme: Optimize for printing
d906488d5 theme: Add border to highlighted code blocks within list items
9630c38cb theme: Display short command on commands list
7f81dd997 content: Regen commands markup
a84008e99 content: Cleanup primary list page
0874b03e9 content: Publish QR code examples to the images/qr directory
ef1ce3498 Restore static/img
489a68458 content: Restore KeyCDN screen captures
7d6e6184b theme: Move search button in navbar to the right on smaller screens
b03b96082 theme: Misc style adjustments
ecad97821 theme: Misc fixes
cf5e07b0f content: Restore example data and images
c7265041f content: Reformat css.TailwindCSS setup steps
3226e668f theme: Make the search button more compact on mobile
1f6614ee8 content: Update css.TailwindCSS example
49a2e7d71 theme: Improve search output
7e6b81ffa misc: Create issue template
826740223 theme: Misc search improvements
75f32b2f6 theme:  Remove the search alert
fd3de4ac2 config: Enable link render hook warnings
769e387cd Adjust logic to mark current section for Algolia
ba73ce646 Adjust markup to make it easier to match in Algolia
5accec5f1 Misc adjustments
eb5842566 Some content adjustments
bdf97b7b4 Add new theme
b19d68ee5 Remove old theme
a04e96e55 Rewrite the css.TailwindCSS page
1c46f1864 Update deprecation notes
aedcb444c Fix typo
c3290b876 Changes related to release of v0.144.0
a0012fcce netlify: Hugo 0.143.1
9e4d73e87 Include sections in quick-reference page collection
4591058f5 Miscellaneous edits
612b8528f glossary: More edits
1f0c54e60 Fit typo
6f14084c1 Move glossary to quick reference section
2d94905be Improve branch bundle admonition
2ea56bef3 Fix typos found with codespell
71c5fe951 Close shortcode
e95d06592 Document the responseHeaders option for resources.GetRemote
da7c12aaa Deprecate gist shortcode
c2d3e2c25 netlify: Bump to 0.143.0
367d3a7ab Improve new-in shortcode
1a7413a16 Clean up shortcode documentation
d847892aa Improve glossary
6a7fd42ff Update pages describing Store methods and functions
fa7643d1b Revert "Improve link render hook performance"
fe4c86ec4 Reformat MathJax example
cea44922a Update MathJax example to use safe mode
0b6d0292c Update KaTeX example to use latest version
fd4508645 Improve link render hook performance
23aeb5bd0 Update purgecss example
f7ef83e56 Refer each Hugo Pipe page to the corresponding function
81b91ef4e Remove related pages from pages for deprecated functions and methods
53c7627d5 Remove body from deprecated functions and methods
d9cf034c8 Consolidate css.ToCSS information
b7ed108f9 Improve js.Build example and presentation of options
86a4a5088 Improve babel example and description of options
d1874c5f5 Consistently use "edition" when referring to standard, extended, etc.
92f03a350 Revise description of privacy settings
152a92d80 Update Last.md
82a2365bd Add print-only QR code example
d22cadc25 Update mathematics.md
b8160af03 Delete page self-reference in page/type.md
ce24fe4e0 Update param.md
51cb92180 Improve description of output format template selection
78bcf358e Update Tailwind CSS npm package version to 4.0
2ca9da4af Include winget command to uninstall

git-subtree-dir: docs
git-subtree-split: d1a2519330f3647447053c89c49d6098af29519f
2025-02-13 10:40:34 +01:00
Bjørn Erik Pedersen
304a7e5e74
Merge commit 'a024bc7d76' 2025-02-13 10:40:34 +01:00
dependabot[bot]
c054e18827 build(deps): bump github.com/bep/imagemeta from 0.8.3 to 0.8.4
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.8.3 to 0.8.4.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.8.3...v0.8.4)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-13 09:02:59 +01:00
Joe Mooring
34dcac53bf config: Remove unused code 2025-02-13 08:40:49 +01:00
Joe Mooring
ee438606dd commands: Use punctuation consistently in short description 2025-02-13 08:40:26 +01:00
Bjørn Erik Pedersen
fd8b0fbf8a Upgrade to Go 1.24
Fixes #13381
2025-02-12 22:01:25 +01:00
Bjørn Erik Pedersen
9b5f786df8 Deprecate kind, lang, and path from front matter
These were added to the page meta object when we implemented "pages from data", but were not meant to be used in front matter.

That is not supported, so we might as well add validation.

Fixes #12484
2025-02-10 21:22:43 +01:00
Bjørn Erik Pedersen
e6feb9e0be commands: Move the CHMOD event filter up
To prevent ghost rebuilds (from VSCode and possibly others).

Fixes #13373
2025-02-10 17:02:06 +01:00
dependabot[bot]
5e4ffa0e89 build(deps): bump golang.org/x/image from 0.22.0 to 0.24.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.22.0 to 0.24.0.
- [Commits](https://github.com/golang/image/compare/v0.22.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 12:46:06 +01:00
dependabot[bot]
0cdcc2b584 build(deps): bump golang.org/x/mod from 0.22.0 to 0.23.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/mod/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 11:43:49 +01:00
dependabot[bot]
a591c4406a build(deps): bump github.com/gohugoio/hashstructure from 0.3.0 to 0.5.0
Bumps [github.com/gohugoio/hashstructure](https://github.com/gohugoio/hashstructure) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/gohugoio/hashstructure/releases)
- [Commits](https://github.com/gohugoio/hashstructure/compare/v0.3.0...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/gohugoio/hashstructure
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 11:43:11 +01:00
dependabot[bot]
2d86a0512c build(deps): bump github.com/bep/simplecobra from 0.4.0 to 0.5.0
Bumps [github.com/bep/simplecobra](https://github.com/bep/simplecobra) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/bep/simplecobra/releases)
- [Commits](https://github.com/bep/simplecobra/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/bep/simplecobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-09 23:31:45 +01:00
Dominik Süß
f02da7fbce
parser: Handle org-mode filetags as slice
This adds support for filetags by slicing them according to [the org mode tag
specification](https://orgmode.org/guide/Tags.html).

Can be used to create taxonomies based on org-mode tags
2025-02-09 22:40:28 +01:00
dependabot[bot]
22ee0918f3 build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront
Bumps [github.com/aws/aws-sdk-go-v2/service/cloudfront](https://github.com/aws/aws-sdk-go-v2) from 1.41.0 to 1.44.9.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.41.0...service/macie2/v1.44.9)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudfront
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 15:46:45 +01:00
dependabot[bot]
b50ab04031 build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.32.4 to 1.36.1
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.32.4 to 1.36.1.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.32.4...v1.36.1)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 10:33:03 +01:00
dependabot[bot]
b772f0e3d2 build(deps): bump github.com/getkin/kin-openapi from 0.123.0 to 0.129.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.123.0 to 0.129.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.123.0...v0.129.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 10:32:42 +01:00
dependabot[bot]
d58c0198d3 build(deps): bump github.com/spf13/pflag from 1.0.5 to 1.0.6
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.5...v1.0.6)

---
updated-dependencies:
- dependency-name: github.com/spf13/pflag
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-08 10:31:42 +01:00
Bjørn Erik Pedersen
c2fb221209 Add ContentTypes to config
This is an empty struct for now, but we will most likely expand on that.

```
[contentTypes]
  [contentTypes.'text/markdown']
```

The above means that only Markdown will be considered a content type. E.g. HTML will be treated as plain text.

Fixes #12274
2025-02-08 10:31:15 +01:00
Oleksandr Redko
4245a4514d
all: Remove deprecated build tags 2025-02-08 10:29:42 +01:00
Joe Mooring
f0c1852978 helpers: Add Chroma styles to docs.yaml
Closes #13360
2025-02-08 00:30:05 +01:00
Joe Mooring
a352e69b02 commands: Validate style argument passed to gen chromastyles
Closes #13357
2025-02-07 22:44:22 +01:00
Bjørn Erik Pedersen
1dd27be81a
Update CONTRIBUTING.md 2025-02-07 22:25:19 +01:00
Bjørn Erik Pedersen
eb7a5aabaa Move "print unused templates" after renderDeferred
Fixes #13355
2025-02-07 18:04:12 +01:00
Bjørn Erik Pedersen
029d1e0ced Add some more server options/improvements
New options:

* `FromHeaders`: Server header matching for redirects
* `FromRe`: Regexp with group support, i.e. it replaces $1, $2 in To with the group matches.

Note that if both `From` and `FromRe` is set, both must match.

Also

* Allow redirects to non HTML URLs as long as the Sec-Fetch-Mode is set to navigate on the request.
* Detect and stop redirect loops.

This was all done while testing out InertiaJS with Hugo. So, after this commit, this setup will support the main parts of the protocol that Inertia uses:

```toml
[server]
    [[server.headers]]
        for = '/**/inertia.json'
        [server.headers.values]
            Content-Type = 'text/html'
            X-Inertia    = 'true'
            Vary         = 'Accept'

    [[server.redirects]]
        force       = true
        from        = '/**/'
        fromRe      = "^/(.*)/$"
        fromHeaders = { "X-Inertia" = "true" }
        status      = 301
        to          = '/$1/inertia.json'
```

Unfortunately, a provider like Netlify does not support redirects matching by request headers. It should be possible with some edge function, but then again, I'm not sure that InertiaJS is a very good fit with the common Hugo use cases.

But this commit should be generally useful.
2025-02-05 18:14:15 +01:00
Bjørn Erik Pedersen
e865d59844 Fix shortcode name in error message on self-closing shortcodes with no .Inner
Fixes #13344
2025-02-05 16:35:02 +01:00
hugoreleaser
377287a614 releaser: Prepare repository for 0.144.0-DEV
[ci skip]
2025-02-04 09:14:03 +00:00
hugoreleaser
0270364a34 releaser: Bump versions for release of 0.143.1
[ci skip]
2025-02-04 08:57:38 +00:00
Bjørn Erik Pedersen
760c13a7ac Fix RSS with baseURL with sub dir when render hooks is enabled
Fixes #13332
2025-02-03 19:00:12 +01:00
Oleksandr Redko
3bd73d262d
mage: Simplify magefile 2025-02-03 18:34:16 +01:00
Joe Mooring
7104de83ce common/hugo: Adjust deprecation timing and message
Closes #13333
2025-02-03 18:32:30 +01:00
Bjørn Erik Pedersen
835579b338 Re-introduce the LRU-evicted identities in change set calculation
This is a follow up to db28695ff5 -- that commit dropped the cache items evicted in the LRU process. This was done as performance optimization for large Hugo sites.

That made much sense, but now there's a slight chance that we miss out on a change when rebuilding.

This commit fixes this by applying the same logic to the evicted items as if they were still in the cache. This should preserve the performance gains in db28695ff5 and close the hole for the possible false negatives.
2025-02-02 15:55:11 +01:00
hugoreleaser
05e067ced8 releaser: Prepare repository for 0.144.0-DEV
[ci skip]
2025-02-01 16:09:38 +00:00
hugoreleaser
ee48d9692a releaser: Bump versions for release of 0.143.0
[ci skip]
2025-02-01 15:56:04 +00:00
Bjørn Erik Pedersen
db28695ff5 Fix some server/watch rebuild issues
Two issues:

1. Fixe potential edit-loop in server/watch mode (see below)
2. Drain the cache eviction stack before we start calculating the change set. This should allow more fine grained rebuilds for bigger sites and/or in low memory situations.

The fix in 6c68142cc1 wasn't really fixing the complete problem.

In Hugo we have some steps that takes more time than others, one example being CSS building with TailwindCSS.

The symptom here is that sometimes when you:

1. Edit content or templates that does not trigger a CSS rebuild => Snappy rebuild.
2. Edit stylesheet or add a CSS class to template that triggers a CSS rebuild => relatively slow rebuild (expected)
3. Then back to content editing or template edits that should not trigger a CSS rebuild => relatively slow rebuild (not expected)

This commit fixes this by pulling the dynacache GC step up and merge it with the cache buster step.

Fixes #13316
2025-02-01 16:29:14 +01:00
Bjørn Erik Pedersen
778f0d9002 Don't re-render aliases on server rebuilds
This can lead to stale aliases when rebuilding, but that's a trade-off we need to take for snappier rebuilds on bigger sites.

Note that it should be possible to detect alias changes, but I'm not sure it's worth it.
2025-02-01 15:23:36 +01:00
Alex Shpak
13b208e2f7 tpl/tplimpl: Remove leading whitespaces produced by Youtube shortcode 2025-01-31 09:29:10 +01:00
Bjørn Erik Pedersen
329b2342f0 Fix "concurrent map iteration and map write" in pages from data
Fixes #13254
2025-01-30 19:57:09 +01:00
Joe Mooring
33b46d8a41 resources: Remove debug statement
Closes #13320
2025-01-30 11:32:57 +01:00
Bjørn Erik Pedersen
6c68142cc1 Fix TailwindCSS related server rebuild issue
Fixes #13316
2025-01-29 18:46:12 +01:00
Joe Mooring
e08d9af21e markup/goldmark: Trim space from blockquote render hook text
Closes #13302
2025-01-24 19:58:45 +01:00
Bjørn Erik Pedersen
cd7dc7a372 Fix some server rebuild issues for non-HTML custom output formats
The failing test case here is

* A custom search output format defined on the home page, marked as `noAlternative` and not `permalinkable`
* In fast render mode, when making a change to a data source for that search output format, the JSON file was not refreshed.

There are variants of the above, but the gist of it is:

* The change set was correctly determined, but since the search JSON file was not in the recently visited browser stack, we skipped rendering it.

Running with `hugo server --disableFastRender` would be a workaround for the above.

This commit fixes this by:

* Adding a check for the HTTP request header `Sec-Fetch-Mode = navigation` to the condition for if we should track server request as a user navigation (and not e.g. a HTTP request for a linked CSS stylesheet).
* Making sure that we compare against the real relative URL for non-permalinkable output formats.

Fixes #13014
2025-01-24 17:27:02 +01:00
Guilherme Soares
c939c33fd3 parser/pageparser: Don't allow parameters after closing tag in shortcodes
Problem:
Previously, the following self-closing shortcode syntax was incorrectly allowed:
{{% sc / param %}}

Solution:
Only allow parameters before the self-closing tag
2025-01-24 15:31:44 +01:00
Bjørn Erik Pedersen
bb7b3d3cdb Fix cascade with overlapping sections
Fixes #12465
2025-01-24 15:25:54 +01:00
Joe Mooring
873a5cda1a tpl/tplimpl: Improve shortcode test coverage 2025-01-24 09:10:45 +01:00
Joe Mooring
f42a4b6af5 tpl/tplimpl: Deprecate gist shortcode
Closes #13211
2025-01-23 20:12:36 +01:00
Bjørn Erik Pedersen
a5637831cd
resources: Remove conditional used for debugging 2025-01-23 17:53:38 +01:00
Bjørn Erik Pedersen
68586c891c resources: Add responseHeaders option to resources.GetRemote
* These response headers will be included in `.Data.Headers` if found.
* The header name matching is case insensitive.
* `Data.Headers` is of type `map[string][]string`
* In most cases there will be only one value per header key, but e.g. `Set-Cookie` commonly has multiple values.

Fixes #12521
2025-01-23 15:20:03 +01:00
Bjørn Erik Pedersen
51bb2fedab
tpl/tplimpl: Skip TestTemplateFuncsExamples on s390x
Closes #13204
2025-01-23 10:18:43 +01:00
Bjørn Erik Pedersen
43307b07f8
Merge commit '346b60358d' 2025-01-23 09:47:46 +01:00
Bjørn Erik Pedersen
346b60358d Squashed 'docs/' changes from 4429eeeea..73a01565c
73a01565c Remove comment shortcode documentation
0ca7ccd30 Replace usage of comment shortcode with HTML comments
fe10d9899 Remove expired new-in labels
11e89dfcb [editorial] Link to proper render-hook page in relref.md
11a581c2f netlify: Hugo 0.142.0
1a4fcf7f7 Miscellaneous edits
2c7a3165f Markdown linting and cleanup
69d7a781b Replace links to glossary terms with custom render hook syntax
441752d2d Refactor glossary lookup portion of link render hook
80109a14f Fix glossary term linking for plural form
cd95f0f34 Update link render hook to support glossary links
53eadb430 Remove the glossary template
1d40a7f3b Improve transform.ToMath examples
586970df2 Misc edits
6a06a8de7 Add glossary link shortcode
4171c0eb7 Improve description of masking with non-transparent images
41c8feb64 Fix example of image.Mask filter
704a81656 Add alignx option to images.Text usage example
7c03eb0cc Clarify context in example of using the try statement
56d9c9b71 Refactor glossary of terms
042a6846b Add expiry dates to deprecated methods pages
365ab345f Remove services key from instagram shortcode page
b7fe31e07 Reorder options list for images.Text filter
8051ff818 Format directory names, file names, and file paths as code
d09a14623 Update version refs for Hugo and Dart Sass
3bb006974 Add NODE_VERSION to Netlify config examples
3a0f2531e Fix typo
7e3198eaf Fix typo
cf56452a3 Fix typo
a9f51d13e Fix typo
82bfdd8c3 Fix typo
a5c41a053 Fix typo
abcfed7a5 Fix typo
8c1debf3a Remove outdated new-in badges
809ddf9ef Update theme
63867d56f Use warnf instead of errorf in try-catch example
dee3e5f09 Update theme
9791f7057 Remove TODO from comment shortcode examples
a346ca1fd Elevate embedded shortcode documentation to its own section
8fa19b50f hugoreleaser.toml =>  hugoreleaser.yaml
575d60345 Update docs for v0.141.0
a0a442d62 netlify: Hugo 0.141.0
6667cbcd8 Merge commit '81a7b63900'
f36fc013e docs: Regen CLI docs
365a47ded tpl/images: Change signature of images.QR to images.QR TEXT OPTIONS
ae8f8af0a images.Text: Add "alignx" option for horizontal alignment
8f45ccca6 docs: Regen CLI docs
f0e6304f4 Merge commit 'e9fbadacc3'
cb9bec2b2 tpl/images: Add images.QR function

git-subtree-dir: docs
git-subtree-split: 73a01565c5ba0774d65aa6f2384c44804fefa37d
2025-01-23 09:46:02 +01:00
Bjørn Erik Pedersen
7f0f50b133 Make cascade front matter order deterministic
Fixes #12594
2025-01-23 09:45:47 +01:00
Joe Mooring
77a8e347bc tpl/tplimpl: Deprecate comment shortcode 2025-01-22 19:38:02 +01:00
Patrice Chalin
f704d75699
markup/goldmark: Fix typo in func comment 2025-01-22 14:57:24 +01:00
hugoreleaser
9d765e1b99 releaser: Prepare repository for 0.143.0-DEV
[ci skip]
2025-01-22 12:35:08 +00:00
hugoreleaser
1f746a8724 releaser: Bump versions for release of 0.142.0
[ci skip]
2025-01-22 12:20:52 +00:00
Bjørn Erik Pedersen
6aa72acaf9 Fix render hook's PlainText with typographer extension enabled
Fixes #13286
Fixes #13292
2025-01-22 12:49:25 +01:00
Bjørn Erik Pedersen
9885e7020d Improve assert 2025-01-22 09:44:26 +01:00
Bjørn Erik Pedersen
91101d24f2 Improve assertions 2025-01-22 09:44:26 +01:00
Bjørn Erik Pedersen
637995ba8f Also handle inline HTML comments 2025-01-22 09:44:26 +01:00
Bjørn Erik Pedersen
f1de5d2a04 Do not warn on potentially unsafe HTML comments when unsafe=false
We will still not render these comments, so from a safety perspective this is the same, but HTML comments are very common also inside Markdown and too useful to throw away.

Updates #13278
2025-01-22 09:44:26 +01:00
W. Michael Petullo
4b0c194fb3 Fix build with Go 1.24
Go 1.24 provides stricter checking that forbids passing a variable as
a format string to Printf-family functions with no other arguments. Remove
instances of this. See also:

https://tip.golang.org/doc/go1.24#vet

Signed-off-by: W. Michael Petullo <mike@flyn.org>
2025-01-21 11:10:03 +01:00
Joe Mooring
8de4ffb294 tpl/tplimpl: Fix context in shortcode error messages
Fixes #13279
2025-01-20 16:17:55 +01:00
Bjørn Erik Pedersen
1f5a15aba0 resources: Fix 2 image file cache key issues
* Always include the content hash in the cache key for unprocessed images.
* Always include the image config hash in the cache key.

This is also a major cleanup/simplification of the implementation in this area.

Note that this, unfortunately, forces new hashes/filenames for generated images.

Fixes #13273
Fixes #13272
2025-01-18 12:23:18 +01:00
Nicolas Friedli
8897113666
tpl: Add loading attribute to qr shortcode 2025-01-17 19:06:54 +01:00
hugoreleaser
e91d3cff98 releaser: Prepare repository for 0.142.0-DEV
[ci skip]
2025-01-16 13:26:52 +00:00
hugoreleaser
e7bd51698e releaser: Bump versions for release of 0.141.0
[ci skip]
2025-01-16 13:11:18 +00:00
Bjørn Erik Pedersen
1fad3832a9 tpl/tplimpl: Simplify some test assertions 2025-01-16 11:29:24 +01:00
Jack Baldry
8b52626915
common/paths: Fix docstring 2025-01-16 10:58:18 +01:00
Bjørn Erik Pedersen
81a7b63900 Squashed 'docs/' changes from f0f4bcb24..4429eeeea
4429eeeea Update image render hooks examples to conform with Commonmark
5391dddea Add class attribute to heading render hook examples

git-subtree-dir: docs
git-subtree-split: 4429eeeea84bfa4b9e636deaab5c9620ccf776a6
2025-01-16 10:35:07 +01:00
Bjørn Erik Pedersen
5c5508817f
Merge commit '81a7b63900' 2025-01-16 10:35:07 +01:00
Bjørn Erik Pedersen
88ecc3b753
docs: Regen CLI docs 2025-01-16 10:34:52 +01:00
Joe Mooring
1191467c05 tpl/tplimpl: Deprecate twitter shortcode in favor of x shortcode
Closes #13214
2025-01-16 10:33:34 +01:00
Bjørn Erik Pedersen
60c24fc5ee
commands: Fix spelling in comment 2025-01-15 22:31:52 +01:00
Bjørn Erik Pedersen
41137077bc
commands: Set up the glboal logger early
Fixes #13265
2025-01-15 22:31:08 +01:00
Bjørn Erik Pedersen
5bb1564575 commands: Add --printZero to the config command
Will include zero config values (e.g. "", 0, false) in the output and will be more verbose, but useful if you cant to discover all available config options.
2025-01-15 22:48:14 +02:00
Bjørn Erik Pedersen
76993369a0 For render hooks, only fallback to HTML (or the defaultOutputFormat) template
Closes #13242
2025-01-15 19:59:58 +02:00
Bjørn Erik Pedersen
de7137cc35 tpl/collections: Use MapRange/SetIterKey/SetIterValue for Where, Sort and Merge
Some relevant benchmarks:

Where with maps:

```
cpu: Apple M1 Pro
            │ master.bench │         fix-mapkeys.bench          │
            │    sec/op    │   sec/op     vs base               │
WhereMap-10    79.26µ ± 1%   26.58µ ± 1%  -66.46% (p=0.002 n=6)

            │ master.bench │         fix-mapkeys.bench         │
            │     B/op     │    B/op     vs base               │
WhereMap-10   56685.0 ± 0%   111.0 ± 1%  -99.80% (p=0.002 n=6)

            │ master.bench  │         fix-mapkeys.bench         │
            │   allocs/op   │ allocs/op   vs base               │
WhereMap-10   2003.000 ± 0%   4.000 ± 0%  -99.80% (p=0.002 n=6)
```

Merge:

```
         │ master.bench │         fix-mapkeys.bench          │
         │    sec/op    │   sec/op     vs base               │
Merge-10    3.285µ ± 0%   2.268µ ± 1%  -30.96% (p=0.002 n=6)

         │ master.bench │          fix-mapkeys.bench          │
         │     B/op     │     B/op      vs base               │
Merge-10   3.079Ki ± 0%   1.891Ki ± 0%  -38.58% (p=0.002 n=6)

         │ master.bench │         fix-mapkeys.bench         │
         │  allocs/op   │ allocs/op   vs base               │
Merge-10     64.00 ± 0%   26.00 ± 0%  -59.38% (p=0.002 n=6)
```
Sort:

```
cpu: Apple M1 Pro
           │ master.bench │         fix-mapkeys.bench         │
           │    sec/op    │   sec/op     vs base              │
SortMap-10   1008.0n ± 1%   915.5n ± 0%  -9.18% (p=0.002 n=6)

           │ master.bench │         fix-mapkeys.bench         │
           │     B/op     │    B/op     vs base               │
SortMap-10     640.0 ± 0%   512.0 ± 0%  -20.00% (p=0.002 n=6)

           │ master.bench │        fix-mapkeys.bench         │
           │  allocs/op   │ allocs/op   vs base              │
SortMap-10     16.00 ± 0%   15.00 ± 0%  -6.25% (p=0.002 n=6)
```
2025-01-13 16:24:48 +02:00
Bjørn Erik Pedersen
a2edf04c27 deps: Upgrade github.com/gohugoio/hashstructure from 0.1.0 to 0.3.0
Faster hashing of maps:

```
           │ stash.bench  │      deps-hashstructv030.bench      │
           │    sec/op    │    sec/op     vs base               │
HashMap-10   198.9µ ± ∞ ¹   142.6µ ± ∞ ¹  -28.31% (p=0.029 n=4)
¹ need >= 6 samples for confidence interval at level 0.95

           │  stash.bench  │      deps-hashstructv030.bench       │
           │     B/op      │     B/op       vs base               │
HashMap-10   92.38Ki ± ∞ ¹   37.14Ki ± ∞ ¹  -59.80% (p=0.029 n=4)
¹ need >= 6 samples for confidence interval at level 0.95

           │ stash.bench  │      deps-hashstructv030.bench      │
           │  allocs/op   │  allocs/op    vs base               │
HashMap-10   6.747k ± ∞ ¹   4.748k ± ∞ ¹  -29.63% (p=0.029 n=4)
```
2025-01-13 16:22:24 +02:00
Bjørn Erik Pedersen
956f915f77
tpl/collections: Add BenchmarkWhereMap 2025-01-13 12:57:48 +02:00
Bjørn Erik Pedersen
a2a4166f6d
tpl/collections: Add BenchmarkSortMap 2025-01-13 10:38:12 +02:00
Bjørn Erik Pedersen
39f582f9f4
tpl/collections: Add Merge benchmark 2025-01-13 10:32:41 +02:00
Bjørn Erik Pedersen
2501de7aab resources/images: Refactor golden image tests to locate them closer to the implementation 2025-01-11 18:27:53 +02:00
Bjørn Erik Pedersen
06cc8673fa resources/images: Add some mask tests
Closes #13244
2025-01-11 12:20:11 +02:00
Markus Kienast
71fae99189 resources/images: Add images.Mask
See #13244
2025-01-11 12:20:11 +02:00
Joe Mooring
8af04745fb tpl/tplimpl: Use plain text for image render hook alt attribute
Co-authored-by: Heracles <email@heracl.es>
2025-01-10 19:44:39 +02:00
Bjørn Erik Pedersen
dde9d9d544 Adjust error handling in ToMath vs try (note)
Closes #13239
2025-01-09 11:47:19 +01:00
Bjørn Erik Pedersen
892b49110e resources/images: Add some golden tests for images.QR 2025-01-09 08:02:43 +01:00
Bjørn Erik Pedersen
c5a63a3b4f Fix branch resource overlapping bundle path
Fixes #13228
2025-01-09 08:00:30 +01:00
Bjørn Erik Pedersen
61d3d20129 templates: Fix handling of multiple defers in the same template
Fixes #13236
2025-01-09 07:59:25 +01:00
Joe Mooring
b13d0a68e6 tpl/images: Change signature of images.QR to images.QR TEXT OPTIONS
Closes #13230
2025-01-08 19:59:39 +01:00
Bjørn Erik Pedersen
d9594a96fc resources/images: Add some golden tests for images.Text 2025-01-08 18:56:26 +01:00
Julius Künzel
4a5cc2dd26 images.Text: Add "alignx" option for horizontal alignment
Add an "alignx" option to the images.Text to control whether the value of the "x" option is the left border of the text (current behaviour), the center of each line or the right border.

Fixes #10849
2025-01-08 17:23:46 +01:00
Bjørn Erik Pedersen
9cad8d38ca images: Rework the golden tests 2025-01-08 17:11:27 +01:00
Bjørn Erik Pedersen
cfa0801815 Fix NPX issue with TailwindCSS v4
This allows the `tailwindcss` CLI binary to live in the `PATH` for NPM-less projects.

Fixes #13221
2025-01-07 13:12:08 +01:00
dependabot[bot]
f024a5050e build(deps): bump golang.org/x/tools from 0.28.0 to 0.29.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 10:46:27 +01:00
dependabot[bot]
80704bc9a1 build(deps): bump golang.org/x/net from 0.33.0 to 0.34.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.34.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-07 10:46:04 +01:00
Joe Mooring
3682027a51
snap: Always package latest stable version of Go 2025-01-06 12:50:40 -08:00
Bjørn Erik Pedersen
44628616af
docs: Regen CLI docs 2025-01-06 18:12:20 +01:00
Bjørn Erik Pedersen
0fc86783ee
Merge commit 'e9fbadacc3' 2025-01-06 18:11:07 +01:00
Bjørn Erik Pedersen
e9fbadacc3 Squashed 'docs/' changes from 8390a4a3a..f0f4bcb24
f0f4bcb24 Update Batch.md
15a8b1de6 Update Batch.md
eb841ce66 Update theme
751097f24 Use CI_PAGES_URL in GitLab Pages workflow
8584a0581 Fix typos
b030a7149 Update configuration.md
f7ec2ee9c Revert "Update shortcode.md"
f8188f1c8 Update shortcode.md
083fc39c6 Update shortcode.md
d4bdfb96b Update Filter.md
ef00649db Document wrapperClass highlighting option
e227dc422 Hugo 0.140.2
b95d28444 Fix description of the the hugo server command
41ca381b0 Fix documentation of Fragments
73a6cd966 Update theme
2573fd120 netlify: Hugo 0.140.1
90b19ec0d Merge branch 'tempv0.140.1'
ad2e9aeec Update gocloud and docs for S3-Compatible Endpoints
34b30bad2 Remove indentation from include shortcode examples
97b4ef544 Update related.md
7234e0189 Update related.md
32cc191f6 Clarify Name and Title menu entry methods
bce733c63 Update theme
2f1843d10 Use .Page.GetPage in examples of an include shortcode
9e1c85bbd Revert "Document PAGE.String"
bb30e7c08 Document PAGE.String
2d151d77f Fix link
fbe2d442f Miscellaneous updates for v0.140.0
4d3195223 Update JS docs vs Hugo v0.140
8c190aabc netlify: Hugo 0.140.0
826005ffe Merge branch 'tempv0.140.0'
107289a2c Update theme (again)
9884425f9 Update theme
ff0a358d3 Update Go tool version in hugo.work
c9b23cf6d tpl/tplimpl: Update details shortcode
f29f19aff tpl/tplimpl: Add details shortcode

git-subtree-dir: docs
git-subtree-split: f0f4bcb243776d0552396d12758bd38cda779b62
2025-01-06 18:09:20 +01:00
Bjørn Erik Pedersen
2a7bb1c7c9 create: Respect --noBuildLock in hugo new 2025-01-06 17:59:24 +01:00
dependabot[bot]
b7b49fb0f8 build(deps): bump github.com/evanw/esbuild from 0.24.0 to 0.24.2
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.24.0 to 0.24.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.24.0...v0.24.2)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 15:07:05 +01:00
Bjørn Erik Pedersen
5f2adad2c7 tpl/images: Format the QR hashes as hex
Slightly shorter, and it looks more like a ... hash.
2025-01-06 15:05:03 +01:00
dependabot[bot]
a837976731 build(deps): bump github.com/alecthomas/chroma/v2 from 2.14.0 to 2.15.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.14.0 to 2.15.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.14.0...v2.15.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 13:38:55 +01:00
Bjørn Erik Pedersen
0918e087ec resources: Replace error handling in GetRemote with try (note)
Closes #13216
2025-01-06 12:22:17 +01:00
Joe Mooring
4ea94c451d tpl/images: Add images.QR function
Closes #13205
2025-01-06 12:05:59 +01:00
Bjørn Erik Pedersen
5d2cbee989 Add try
Updates #9737
2025-01-05 15:32:21 +01:00
Bjørn Erik Pedersen
723e3f4342 resources: Add FromOpts for more effective resource creation
E.g. when the targetPath already contains a hash or if the resource content is expensive to create.
2025-01-05 12:43:37 +01:00
Bjørn Erik Pedersen
d913f46a8b Fix server refresh on 404 template changes
Fixes #13209
2025-01-02 11:21:25 +01:00
Joe Mooring
2db43f841c markup/highlight: Remove noHl option
Closes #9885
2024-12-31 15:46:46 +01:00
hugoreleaser
46ce1f191b releaser: Prepare repository for 0.141.0-DEV
[ci skip]
2024-12-30 15:16:00 +00:00
hugoreleaser
aae02ca612 releaser: Bump versions for release of 0.140.2
[ci skip]
2024-12-30 15:01:53 +00:00
Diwas Rimal
83cec785cf Print cli usage of hugo gen chromastyles alongside css 2024-12-30 15:06:35 +01:00
dependabot[bot]
4e52be8b90 build(deps): bump golang.org/x/net from 0.32.0 to 0.33.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.32.0 to 0.33.0.
- [Commits](https://github.com/golang/net/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-30 10:57:04 +01:00
Joe Mooring
7888ac585c config/allconfig: Fix slice of language configs
Fixes #13201
2024-12-30 10:54:56 +01:00
Joe Mooring
eb1dbe0709 config/allconfig: Throw error when output format is not defined
Fixes #13199
2024-12-29 21:38:46 +01:00
Bjørn Erik Pedersen
77824d704c Fix same resource file published more than once
This may still happen, though, in low memory situations or very big sites, but I'm not sure it's worth spending time on fixing that. Writing the same file more than once isn't harmful, the negative effect is the false path warning.
 We may find a way to detect that situation if this becomes a real problem.

Fixes #13164
2024-12-27 18:55:24 +01:00
Bjørn Erik Pedersen
ec0caaec7c markup/highlight: Add wrapperClass option
The need comes from Tailwind's typography plugin. There's currently no way to turn that off outside of the markup, see https://github.com/tailwindlabs/tailwindcss-typography/pull/363
2024-12-25 19:31:47 +01:00
Bjørn Erik Pedersen
845b8885de
Update README.md 2024-12-23 18:57:19 +01:00
hugoreleaser
43385d6aeb releaser: Prepare repository for 0.141.0-DEV
[ci skip]
2024-12-23 16:40:37 +00:00
hugoreleaser
a9b0b95ef4 releaser: Bump versions for release of 0.140.1
[ci skip]
2024-12-23 16:26:35 +00:00
Chris Moultrie
e229f4b387 Update gocloud and docs for S3-Compatible Endpoints 2024-12-22 22:58:36 +01:00
Bjørn Erik Pedersen
020253904f js/esbuild: Don't try to resolve packages in /assets marked as external
Fixes #13183
2024-12-22 21:29:18 +01:00
Bjørn Erik Pedersen
4a5e94087b Fix union, complement, symdiff, and intersect for transient resources
Fixes #13181
2024-12-22 19:25:03 +01:00
Bjørn Erik Pedersen
48a7aee961
release: Add withdeploy deb extended archives
Also refactor and get the config up to date for new version of Hugoreleaser.

Closes #13166
2024-12-22 16:55:52 +01:00
Joe Mooring
6c583e3227 common/loggers: Write PrintTimerIfDelayed output to stdErr
Closes #13171
2024-12-19 19:52:13 +01:00
dependabot[bot]
5d64b492f4 build(deps): bump github.com/spf13/cast from 1.7.0 to 1.7.1
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-19 12:08:10 +01:00
Joe Mooring
b3f32949cb hugolib: Fix fallbacks for menu entry Name and Title
Closes #13161
2024-12-19 08:47:53 +01:00
hugoreleaser
55ecd3a90e releaser: Prepare repository for 0.141.0-DEV
[ci skip]
2024-12-17 14:37:51 +00:00
hugoreleaser
3f35721fb2 releaser: Bump versions for release of 0.140.0
[ci skip]
2024-12-17 14:20:55 +00:00
Bjørn Erik Pedersen
5c80cb0d20
js/esbuild: Add missing es2024 target 2024-12-17 14:35:13 +01:00
Bjørn Erik Pedersen
a5e5be234c Fix panic on server rebuilds when using both base templates and template.Defer
Fixes #12963
2024-12-16 18:03:04 +01:00
Bjørn Erik Pedersen
565c30eac9 js: Fix js.Batch for multihost setups
Note that this is an unreleased feature.

Fixes #13151
2024-12-16 11:52:18 +01:00
Joe Mooring
48dd6a918a parser/pageparser: Fix Org Mode summary delimiter assignment
Closes #13152
2024-12-16 10:30:27 +01:00
Bjørn Erik Pedersen
744b8566ec Fix a rebuild on resource rename case 2024-12-16 08:33:10 +01:00
Bjørn Erik Pedersen
7de5317aef js/esbuild: Add runners after scripts 2024-12-16 08:33:10 +01:00
Bjørn Erik Pedersen
4cbd4ef991 js/esbuild: Batch: Avoid nil Instances slice
Ranging over a nil slice in Go works great, but is a hassle onced passed to JS.
2024-12-16 08:33:10 +01:00
Joe Mooring
a32c889a7b
tpl/tplimpl: Fix title attribute in details shortcode 2024-12-13 10:50:17 -08:00
Joe Mooring
852d868549 tpl/tplimpl: Update youtube shortcode
Pass a map instead of a slice to the collections.Querify function.
2024-12-13 15:16:55 +01:00
Joe Mooring
1e34e5b26d tpl/tplimpl: Update details shortcode
- Remove localization of default summary value
- Add title attribute
- Reformat to be consistent with other embedded templates
- Simplify and improve integration test
- Update documentation
2024-12-13 14:21:13 +01:00
Joe Mooring
641d2616c7 tpl/collections: Allow querify to accept a map argument
Closes #13131
2024-12-13 13:30:55 +01:00
Bjørn Erik Pedersen
a834bb9f7e js/esbuild: Build groups in order of their ID
We already do this for scripts e.g. inside a group.

This makes sure that group A's entry points gets added before B's, which can be an important property, see https://github.com/evanw/esbuild/issues/399#issuecomment-1458680887
2024-12-13 13:29:35 +01:00
racehd
4f130f6e4f tpl/tplimpl: Add details shortcode
- Add new shortcode to render details HTML element.
- Implement integration tests to check: default state, custom summary, open state,  attribute sanitization, allowed attributes, and localization of default summary text.
- Update docs to include details shortcode.

Closes # 13090
2024-12-13 09:24:20 +01:00
Bjørn Erik Pedersen
9dfa112617
Write all logging (INFO, WARN, ERROR) to stderr
The old setup tried to log >= warning to stderr, the rest to stdout.

However, that logic was flawed, so warnings ended up in stdout, which makes `hugo list all` etc. hard to reason about from scripts.

This commit fixes this by making all logging (info, warn, error) log to stderr and let stdout be reserved for program output.

Fixes #13074
2024-12-13 09:23:09 +01:00
Bjørn Erik Pedersen
ec1933f79d js/esbuild: Add platform option
Closes #13136
2024-12-12 22:53:15 +01:00
Bjørn Erik Pedersen
75ad9cdaab Add config option disableDefaultLanguageRedirect
Fixes #13133
2024-12-12 21:47:03 +01:00
Bjørn Erik Pedersen
e293e7ca6d Add js.Batch
Fixes #12626
Closes #7499
Closes #9978
Closes #12879
Closes #13113
Fixes #13116
2024-12-12 21:43:17 +01:00
dependabot[bot]
157d86414d build(deps): bump golang.org/x/crypto from 0.30.0 to 0.31.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.30.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 12:19:49 +01:00
Bjørn Erik Pedersen
6be253000f
Upgrade to Go 1.23.4
Closes #13130
2024-12-12 10:39:59 +01:00
dependabot[bot]
947e4e66b5 build(deps): bump golang.org/x/tools from 0.27.0 to 0.28.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.27.0 to 0.28.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 09:25:40 +01:00
Bjørn Erik Pedersen
989b299b55
Remove some old and unused shell scripts 2024-12-11 13:15:09 +01:00
dependabot[bot]
5f897868c0 build(deps): bump github.com/hairyhenderson/go-codeowners
Bumps [github.com/hairyhenderson/go-codeowners](https://github.com/hairyhenderson/go-codeowners) from 0.6.1 to 0.7.0.
- [Release notes](https://github.com/hairyhenderson/go-codeowners/releases)
- [Changelog](https://github.com/hairyhenderson/go-codeowners/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hairyhenderson/go-codeowners/compare/v0.6.1...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/hairyhenderson/go-codeowners
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-11 10:10:14 +01:00
Bjørn Erik Pedersen
e477373487 Squashed 'docs/' changes from 227aab619..8390a4a3a
8390a4a3a Add Void Linux installation instructions
d6099aae8 Update link to PostCSS plugins
25dad4693 netlify: Hugo 0.139.4
2b1fa118c Fix typo
3ef1eb505 Update hosting-on-aws-amplify
c0f6d35d6 Fix typo
aa54d4301 Correct directory name
98aa26bdb Improve instructions for hosting with AWS Amplify
a07638a80 Add new-in badges
6ad018055 netlify: Hugo 0.139.3
1050835d6 Update title of hugo.Store page
ebbd2e851 Clarify the shortcode Ordinal method
b7716ed95 Revise code block render hook for Mermaid diagrams
f1da9b6ea netlify: Hugo 0.139.2
d8ac9f428 Downgrade the Go toolchain in go.mod to a slightly older Go version
254b3c4f2 netlify: Hugo 0.139.1
03e666038 Add hugo.Store, site.Store and Shortcode.Store
157e8983b Update Anchorize.md
59fa9f214 Document the PageRef menu entry method
bda544cce docs(transform.Unmarshal): match lang attribute to title language in examples
1985886bd Adjust front matter of shared Markdown snippets
da5bd70d1 Fix typo
431b65d6b Update theme
b63ef69f5 Update style guidance
d50ed3422 Remove old new-in badges
12bfb9933 Update docs.yaml
0b936cacd netlify: Hugo 0.139.0
ab7668b4d dartsass: Add silenceDeprecations option
154df9bfc Merge commit '838bd312b1'
efa80477c docs: Regen CLI docs
ad99e4a7a docs: Regenerate CLI docs

git-subtree-dir: docs
git-subtree-split: 8390a4a3ac36094f4cf47170af23b636608c420e
2024-12-11 09:53:33 +01:00
Bjørn Erik Pedersen
b47376586a
Merge commit 'e477373487' 2024-12-11 09:53:33 +01:00
Bjørn Erik Pedersen
5ab38de363
Fix Sass imports on the form index.{scss,sass}
Fixes #13123
2024-12-10 13:33:27 +01:00
dependabot[bot]
7b69218489 build(deps): bump golang.org/x/net from 0.31.0 to 0.32.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/net/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-10 09:49:56 +01:00
Joe Mooring
34373407b7 markup/goldmark: Fix blockquote render hook text parsing
Fixes #12913
Fixes #13119
2024-12-10 09:43:33 +01:00
hugoreleaser
3afe91d4b1 releaser: Bump versions for release of 0.139.4
[ci skip]
2024-12-09 17:45:23 +00:00
Joe Mooring
54398f8d57
tpl/tplimpl: Escape Markdown attributes in render hooks and shortcodes 2024-12-09 17:58:57 +01:00
Bjørn Erik Pedersen
b8c15f245b deps: Upgrade github.com/bep/godartsass/v2 v2.3.1 => v2.3.2
See https://github.com/bep/godartsass/issues/31 for some context.
2024-12-06 14:37:51 +01:00
Oleksandr Redko
d0dc518844 common/maps: Simplify TestScratchSetInMap/DeleteInMap 2024-12-05 12:40:59 +01:00
Joe Mooring
b529859008 markup/tableofcontents: Cast Fragments.ToHTML args to int
Closes #13107
2024-12-04 21:37:06 +01:00
hugoreleaser
487bb96474 releaser: Prepare repository for 0.140.0-DEV
[ci skip]
2024-11-29 15:51:07 +00:00
hugoreleaser
2f6864387c releaser: Bump versions for release of 0.139.3
[ci skip]
2024-11-29 15:36:56 +00:00
Bjørn Erik Pedersen
c1dc35dd71 Fix server edits of resources included in shortcode/hooks
Fixes #13093
2024-11-29 14:22:39 +01:00
huajin tong
fc3d1cbadb
Fix some typos 2024-11-28 11:20:02 +01:00
dependabot[bot]
7e130e34f2 build(deps): bump github.com/bep/godartsass/v2 from 2.3.0 to 2.3.1
Bumps [github.com/bep/godartsass/v2](https://github.com/bep/godartsass) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/bep/godartsass/releases)
- [Commits](https://github.com/bep/godartsass/compare/v2.3.0...v2.3.1)

---
updated-dependencies:
- dependency-name: github.com/bep/godartsass/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-28 11:06:11 +01:00
dependabot[bot]
88b7868fbd build(deps): bump github.com/tetratelabs/wazero from 1.8.1 to 1.8.2
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 23:50:07 +01:00
Bjørn Erik Pedersen
dea158c885
commands: Fix flaw in the livereload logic
I guess most commonly an issue with TailwindCSS editing in templates:

* Build changes both CSS and index.html => reload OK.
* Build changes both CSS and index.html and some other files => only CSS reloaded.

The above would fix itself with one more edit, but that's annoying.
2024-11-25 10:39:17 +01:00
hugoreleaser
467444ef64 releaser: Prepare repository for 0.140.0-DEV
[ci skip]
2024-11-23 15:46:37 +00:00
hugoreleaser
770f548b47 releaser: Bump versions for release of 0.139.2
[ci skip]
2024-11-23 15:33:51 +00:00
Bjørn Erik Pedersen
0ab81896d9
modules: Skip empty lines in modules.txt
Closes #13084
2024-11-23 16:29:32 +01:00
hugoreleaser
e00fdae456 releaser: Prepare repository for 0.140.0-DEV
[ci skip]
2024-11-23 14:26:42 +00:00
hugoreleaser
21299a7a67 releaser: Bump versions for release of 0.139.1
[ci skip]
2024-11-23 14:13:46 +00:00
Bjørn Erik Pedersen
aa3dd197f7 Revert "build(deps): bump github.com/tdewolff/minify/v2 from 2.20.37 to 2.21.1"
This reverts commit 7a2f04ee8c.

Closes #13082
2024-11-23 15:11:09 +01:00
Bjørn Erik Pedersen
5a50eee9da minifiers: Add failing test for upstream bug
See #13082
2024-11-23 15:11:09 +01:00
Bjørn Erik Pedersen
8d017a60fb dartsass: Fix nilpointer on Close when Dart Sass isn't installed
Fixes #13076
2024-11-21 20:00:36 +01:00
wangjingcun
8fcd3c1487
common: Fix some GoDoc typos 2024-11-19 11:29:19 +01:00
Bjørn Erik Pedersen
2d4c0c6c8d
readme: Update dependency list 2024-11-19 10:05:42 +01:00
hugoreleaser
59a55a1f9e releaser: Prepare repository for 0.140.0-DEV
[ci skip]
2024-11-18 16:32:01 +00:00
hugoreleaser
dacef0df92 releaser: Bump versions for release of 0.139.0
[ci skip]
2024-11-18 16:17:45 +00:00
Bjørn Erik Pedersen
8d92042ab9
dartsass: Fix error message
Closes #13065
2024-11-18 17:14:56 +01:00
Bjørn Erik Pedersen
e917401c71 Make sure term is always set
Fixes #13063
2024-11-18 16:20:25 +01:00
dependabot[bot]
eb298144b6 build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront
Bumps [github.com/aws/aws-sdk-go-v2/service/cloudfront](https://github.com/aws/aws-sdk-go-v2) from 1.38.4 to 1.41.0.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/s3/v1.38.4...service/s3/v1.41.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudfront
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 13:41:31 +01:00
Bjørn Erik Pedersen
3b6eaf9b1f dartsass: Add silenceDeprecations option
Fixes #13045
2024-11-18 13:41:12 +01:00
Bjørn Erik Pedersen
1fd845eee4 dartsass: Remove support for v1 of the protocol/binary (note)
People who stil use a very old binary named `dart-sass-embedded` need to upgrade.

See https://gohugo.io/functions/css/sass/#dart-sass
2024-11-18 12:32:39 +01:00
dependabot[bot]
61e2ce2a49 build(deps): bump google.golang.org/api from 0.191.0 to 0.206.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.191.0 to 0.206.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.191.0...v0.206.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:51:33 +01:00
dependabot[bot]
2d503f82ac build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.30.3 to 1.32.4
Bumps [github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2) from 1.30.3 to 1.32.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/v1.30.3...v1.32.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:51:04 +01:00
dependabot[bot]
3a6b2e6b14 build(deps): bump github.com/fsnotify/fsnotify from 1.7.0 to 1.8.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:50:22 +01:00
Bjørn Erik Pedersen
bbbfeb340a
Merge commit '838bd312b1' 2024-11-18 10:11:18 +01:00
Bjørn Erik Pedersen
838bd312b1 Squashed 'docs/' changes from 159c843fd..227aab619
227aab619 Update configuration-markup.md
019ff776c Fix grammatical error
c889827bf Remove old new-in
39807c5bc Remove duplicate yaml key

git-subtree-dir: docs
git-subtree-split: 227aab61905c0f778d173ed9e38621df4d7c429a
2024-11-18 10:11:17 +01:00
Bjørn Erik Pedersen
6bde8abaad deps: Upgrade github.com/bep/imagemeta v0.8.1 => v0.8.3 2024-11-17 12:05:37 +01:00
Bjørn Erik Pedersen
66dd6ecab2
docs: Regen CLI docs 2024-11-16 20:34:00 +01:00
Bjørn Erik Pedersen
ad43d137d5 Remove deprecations <= v0.122.0 (note)
These have, once we release this, been logging ERROR for 6 minor versions.
2024-11-16 20:32:43 +01:00
Bjørn Erik Pedersen
f7fc6ccd59
release: Add missing withdeploy archive for arm64 Linux
Closes #13029
2024-11-16 18:29:13 +01:00
Bjørn Erik Pedersen
d4de780edc Fix extra newline/paragraphs issue with .RenderShortcodes
Fixes #13051
2024-11-16 17:51:11 +01:00
dependabot[bot]
2c54c32986 build(deps): bump golang.org/x/tools from 0.26.0 to 0.27.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.26.0 to 0.27.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 11:46:07 +01:00
dependabot[bot]
7a2f04ee8c build(deps): bump github.com/tdewolff/minify/v2 from 2.20.37 to 2.21.1
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.37 to 2.21.1.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.37...v2.21.1)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 10:04:07 +01:00
dependabot[bot]
7921777da1 build(deps): bump github.com/fatih/color from 1.17.0 to 1.18.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 10:02:13 +01:00
dependabot[bot]
33e964d40b build(deps): bump golang.org/x/image from 0.21.0 to 0.22.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/image/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-15 10:01:30 +01:00
Bjørn Erik Pedersen
5e3133a7d8
Run go mod tidy 2024-11-14 16:45:21 +01:00
Bjørn Erik Pedersen
58a3c91a7f
docs: Regenerate CLI docs 2024-11-14 16:10:38 +01:00
Bjørn Erik Pedersen
ac6962d284 commands: Add -O flag to server to open browser
Fixes #13040
2024-11-14 15:59:23 +01:00
KN4CK3R
23d21b0d16 Preserve input type. 2024-11-14 15:05:37 +01:00
Bjørn Erik Pedersen
588c9019cf deps: Upgrade github.com/yuin/goldmark v1.7.4 => v1.7.8
Closes #12958
2024-11-14 14:31:04 +01:00
Bjørn Erik Pedersen
ce9cf882a5 server: Strip ANSI escape codes from browser error log
Fixes #13037
2024-11-14 14:25:07 +01:00
dependabot[bot]
46e17053c8 build(deps): bump golang.org/x/sync from 0.8.0 to 0.9.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/sync/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-14 14:02:35 +01:00
dependabot[bot]
cb6580d008 build(deps): bump github.com/hairyhenderson/go-codeowners
Bumps [github.com/hairyhenderson/go-codeowners](https://github.com/hairyhenderson/go-codeowners) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/hairyhenderson/go-codeowners/releases)
- [Changelog](https://github.com/hairyhenderson/go-codeowners/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hairyhenderson/go-codeowners/compare/v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/hairyhenderson/go-codeowners
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-14 14:01:41 +01:00
Bjørn Erik Pedersen
8aba6dc661
parser/metadecoders: Add benchmark 2024-11-13 14:57:18 +01:00
Bjørn Erik Pedersen
a7df536a52 Add site.Store and hugo.Store and Shortcode.Store
Closes #13021
2024-11-13 12:41:16 +01:00
Bjørn Erik Pedersen
de0df119b5 Squashed 'docs/' changes from ccb1b97cb..159c843fd
159c843fd Fix front matter menu entry example
c3a476a19 Document soft deprecation of PAGE.Scratch
cdead9785 netlify: Hugo 0.138.0
9169b4da4 Update version references
3bc6bf431 Update embedded.md
5c7743b2e Update creation instructions for the emoji quick reference
109efe3eb Document the comment shortcode
83d7d3005 Update theme
d3c205054 netlify: Hugo 0.137.1
545290351 Handle inline HTML content
0204be97d Update theme
18d09235e Remove JS and CSS that prevents FOUC with client side math rendering
63d9dd876 Update RenderShortcodes.md
064b95539 Update output-format-definition.md
3744f3be2 Describe and refer to the extended/deploy edition
3d3302308 netlify: Hugo 0.137.0
b53aedcea Update RenderShortcodes.md
b5f289165 Replace HTML comments in markdown with the new comment shortcode
c673880b6 Remove superfluous right bracket
f80b0c61e Update faq.md
2ede707eb Document installation on NixOS
09b114914 Update theme
76a9f90b2 Update passthrough.md
9f3355630 Update Scratch.md
bc080ecaa Update Store.md
1507ede32 Update Scratch.md
54a90f569 Update Store.md
7c9145c43 Fix broken link
dd15f183b Update ToMath.md
2b021c34b Move the [build] documentation to its own page
cbb6677ec Fix typo
ac0969063 Update ToMath.md
7fbdfd7c8 netlify: Hugo 0.136.5
17f54223c Update ToMath.md
4c9c3bb06 Update multilingual.md
1432da7bd Make site and page language methods linkable
fd5b746cb Update urls.md
a746f1b3a Update urls.md
abf8738e2 netlify: Hugo 0.136.4
bd8759996 Update TrimSpace.md
6103c1e84 Documents strings.TrimSpace
533dd3a7b netlify: Hugo 0.136.3
30f3f97cf Update quick-start.md
b0d7b41a0 Update configuration-markup.md
760e5e4f0 Update quick-start.md
17daeb866 Update quick-start.md
1e158e723 netlify: Hugo 0.136.2
d32530839 Update theme
edb9bee02 Update description of url front matter field
e1c576e18 netlify: Hugo 0.136.1
1ad28e1e0 Describe how to configure uglyURLs per section
cbbd4c4fe netlify: Hugo 0.136.0
bb7f35e99 Merge branch 'tempv0.136.0'
706110736 docs: Regen CLI docs
bf0c7821f Update urls.md
8c544e6c0 Update quick-start.md
8d02733d0 Update Paginator.md
a45327aac Update Paginate.md
1377ed4de Clarify date parsing
e19fb8043 Document front matter date field aliases
a39951847 Update Tailwind CSS installation instructions
3be164c35 Remove duplicate token
05fc815f7 commands: Add "hugo build" as an alias for "hugo"
cb3cb504c Update table render hook example
efbee0bff Clarify resources.GetRemote 404 handling
4312d49c9 Update compare.Conditional documentation
4a46d53b6 Update theme
93e542d4f netlify: Hugo 0.135.0
b4da1c104 Remvoe some old new-in shortcodes
4c316f051 Update TailwindCSS.md
c2fe91509 Update introduction.md
906b7c66b Update configuration.md
5ab6b3cdd Update documentation.md
26fb4bb4c Update documentation.md
e9e917f37 Update version refs
83ce07f24 netlify: Hugo 0.134.3
8cb32f802 Update front-matter.md
94d7f576a Update faq.md
fafc1d8d9 netlify: Hugo 0.134.2
bfe9cdc3d Update content-adapters.md
9e49ae3e1 Document ignoreLogs configuration setting
6b47a1d57 Update configuration.md
fd98a0372 Document CLI options that can be set in configuration
07c2400d8 Document alternative to Summary method
d053fa163 Update to reflect changes in v0.134.1
137dc3241 Update ContentWithoutSummary.md
e8f6427d9 netlify: Hugo 0.134.1

git-subtree-dir: docs
git-subtree-split: 159c843fd79e94a0f49bee74c272cd0cc4a848a2
2024-11-13 11:07:57 +01:00
Bjørn Erik Pedersen
3477d9fcec
Merge commit 'de0df119b5' 2024-11-13 11:07:57 +01:00
Andreas Deininger
e79ee0d516
markup/goldmark: Fix typo in error message 2024-11-13 10:12:26 +01:00
Joe Mooring
2b97a2a8bf markup/goldmark: Improve the raw HTML omitted warning
Closes #13023
2024-11-07 23:00:09 +02:00
hugoreleaser
35afe6fe2a releaser: Prepare repository for 0.139.0-DEV
[ci skip]
2024-11-06 11:36:12 +00:00
hugoreleaser
ad82998d54 releaser: Bump versions for release of 0.138.0
[ci skip]
2024-11-06 11:22:34 +00:00
Bjørn Erik Pedersen
95e2d5beb8 Fix concurrent map read and map write in short page lookups
Regression introduced in Hugo `v0.137.0`.

Fixes #13019
2024-11-06 12:17:30 +01:00
Bjørn Erik Pedersen
2c3efc8106 Alias Page.Scratch to Page.Store (note)
Fixes #13016
2024-11-06 09:49:23 +01:00
hugoreleaser
df8bd4af4f releaser: Prepare repository for 0.138.0-DEV
[ci skip]
2024-11-05 12:04:27 +00:00
hugoreleaser
17e15b2148 releaser: Bump versions for release of 0.137.1
[ci skip]
2024-11-05 11:49:09 +00:00
Bjørn Erik Pedersen
ca4fc587c3 common/hugo: Add withdeploy to the version string printed in hugo version 2024-11-05 11:40:42 +01:00
Bjørn Erik Pedersen
4faaaf9c2f markup: Goldmark log "Raw HTML omitted" warning also for inline HTML
Fixes #13013
2024-11-05 11:40:42 +01:00
Bjørn Erik Pedersen
94b46c36b4 build: Add missing withdeploy archive for Windows
Fixes #13009
2024-11-05 11:40:42 +01:00
Bjørn Erik Pedersen
2b0b3b8584 commands: Print the "deploy not available" error message even if flags provided
Fixes #13012
2024-11-05 11:40:42 +01:00
Joe Mooring
801035bb7a tpl/tplimpl: Create an embedded comment shortcode
Closes #13010
2024-11-04 21:05:07 +01:00
hugoreleaser
b7861e586e releaser: Prepare repository for 0.138.0-DEV
[ci skip]
2024-11-04 16:19:39 +00:00
hugoreleaser
59c1158135 releaser: Bump versions for release of 0.137.0
[ci skip]
2024-11-04 16:04:06 +00:00
Bjørn Erik Pedersen
fcdc454cc5 Do not watch directories with no mounted files in it
Fixes #12912
Fixes #13007
2024-11-04 12:44:07 +01:00
Bjørn Erik Pedersen
6cf23bf882 markup/goldmark: Only log Raw HTML omitted WARN on block entering
Updates #12997
2024-11-04 10:13:53 +01:00
Bjørn Erik Pedersen
62a96cef7f markup/goldmark: Add warning (using Warnidf) on Goldmark <!-- raw HTML omitted -->
Fixes #12997
2024-11-03 14:17:10 +01:00
Bjørn Erik Pedersen
30d9aea860 Fix stale pages on rebuilds in GetPage with short refs
Fixes #13004
2024-11-03 13:33:31 +01:00
Bjørn Erik Pedersen
1f23b4949c Fix some RenderShortcodes error cases
This issue fixes two cases where `{{__hugo_ctx` artifacts were left in the rendered output:

1. Inclusion when `.RenderShortcodes` is wrapped in HTML.
2. Inclusion of Markdown file without a trailing newline in some cases.

Closes #12854
Updates #12998
2024-11-03 13:33:31 +01:00
Joe Mooring
5fc1639035
Update README.md 2024-11-01 21:10:52 -07:00
Joe Mooring
889308dd85 resources: Address Dart Sass deprecation of global built-in functions
See https://github.com/sass/dart-sass/releases/tag/1.80.0

Fixes #12961
2024-11-01 14:05:27 +01:00
Joe Mooring
72352f205a github: Adjust test workflow to install Dart Sass v1.80.3 2024-11-01 13:37:45 +01:00
Bjørn Erik Pedersen
e3304db617 deps: Upgrade github.com/bep/godartsass/v2 v2.1.0 => v2.2.0 2024-11-01 12:37:55 +01:00
Bjørn Erik Pedersen
1ec6fa36c0
Update README.md 2024-11-01 10:16:05 +01:00
Bjørn Erik Pedersen
89bd025ebf Build without the deploy feature by default
Build tags setup changed to:

* !nodeploy => withdeploy
* nodeploy => !withdeploy

Also move the deploy feature out into its own release archives.

See #12994 for the primary motivation for this change. But this also greatly reduces the number of dependencies in Hugo when you don't need this feature and cuts the binary size greatly.

Fixes #12994
2024-10-30 11:46:40 +01:00
Bjørn Erik Pedersen
62567d3820 deps: Upgrade github.com/bep/lazycache v0.6.0 => v0.7.0 2024-10-27 12:43:36 +01:00
Bjørn Erik Pedersen
e10915f80a dynacache: Fix potential deadlocks on panics in GetOrCreate 2024-10-26 18:27:10 +02:00
hugoreleaser
ec3890affe releaser: Prepare repository for 0.137.0-DEV
[ci skip]
2024-10-24 12:41:02 +00:00
hugoreleaser
46cccb021b releaser: Bump versions for release of 0.136.5
[ci skip]
2024-10-24 12:26:27 +00:00
Bjørn Erik Pedersen
cb6e27b32a hugolib/commands: Fix stuck server error issues
Fixes #11378
2024-10-24 13:34:11 +02:00
Joe Mooring
5bbe95f9c5 tpl/transform: Revert unmarshal whitespace removal
Fixes #12977
2024-10-22 09:42:40 +02:00
hugoreleaser
31d19b505d releaser: Prepare repository for 0.137.0-DEV
[ci skip]
2024-10-21 13:46:41 +00:00
hugoreleaser
bfa2fd683e releaser: Bump versions for release of 0.136.3
[ci skip]
2024-10-21 13:31:54 +00:00
David Karlsson
88d598a049
docker: Fix permission issues in Dockerfile
Closes #12971
Closes #12970
2024-10-21 15:28:36 +02:00
Bjørn Erik Pedersen
352be5ba87 Make sure that HugoSites is always closed when done
Including all the integration tests.
2024-10-20 13:04:58 +02:00
Joe Mooring
d37606d2c2 tpl/strings: Add TrimSpace function
Closes #12962
2024-10-19 21:10:00 +02:00
Bjørn Erik Pedersen
f5e54d9c7d
common/herrors: Fix the deferred error message cleaner regexp
Make it less gready.
2024-10-19 10:00:01 +02:00
Bjørn Erik Pedersen
42f37b4e98
tpl/transform: Don't fail on "no data to transform"
Fixes #12964
2024-10-18 10:30:36 +02:00
hugoreleaser
e971b7d866 releaser: Prepare repository for 0.137.0-DEV
[ci skip]
2024-10-17 14:44:10 +00:00
hugoreleaser
ad985550a4 releaser: Bump versions for release of 0.136.2
[ci skip]
2024-10-17 14:30:05 +00:00
David Karlsson
b5852d0e68
docker: Fix Dart Sass ARM64 arch mismatch, /cache permissions
Also improve the final build step.

Closes #12956
Closes #12957
Closes #12960
2024-10-17 15:42:41 +02:00
hugoreleaser
b5801d8b6a releaser: Prepare repository for 0.137.0-DEV
[ci skip]
2024-10-16 16:18:44 +00:00
hugoreleaser
64d1865c1e releaser: Bump versions for release of 0.136.1
[ci skip]
2024-10-16 16:05:18 +00:00
Bjørn Erik Pedersen
e4ad0c5271 Never sanitize when url set in front matter
Fixes #12954
2024-10-16 18:01:11 +02:00
Bjørn Erik Pedersen
a2f666b586 Remove erroneously permalink validation
Fixes #12948
2024-10-16 10:14:48 +02:00
Joe Mooring
b1b3bbcdbd create/skeletons: Add delimiters to archetype front matter
Fixes #12945
2024-10-15 21:37:26 +02:00
hugoreleaser
1cfe9741b9 releaser: Prepare repository for 0.137.0-DEV
[ci skip]
2024-10-15 13:31:16 +00:00
hugoreleaser
2939270a3b releaser: Bump versions for release of 0.136.0
[ci skip]
2024-10-15 13:17:24 +00:00
Bjørn Erik Pedersen
5db27b19c1
circleci: Use default docker image 2024-10-15 15:15:12 +02:00
Bjørn Erik Pedersen
b7d62d76c5
docs: Regen CLI docs 2024-10-15 10:30:35 +02:00
Bjørn Erik Pedersen
6e1c5b61b3 resources/page: Adjust the permalinks colon implementation a little
Mostly to get back to an attribute regexp that's reasonably simle to read/understand.

Updates #12918
2024-10-15 10:28:00 +02:00
n1xx1
e7d0757f95 resources/page: Allow colons in permalinks to be escaped
Updates #12918
2024-10-15 10:28:00 +02:00
Rohan Hasabe
6b5e117a12 commands: Use consistent style when describing subcommands
Closes #12897

Change-Id: Ib27a4a7b540d45243e6252db769d4b9fb7447718
Signed-off-by: Rohan Hasabe <rohanhasabe8@gmail.com>
2024-10-15 08:51:53 +02:00
dependabot[bot]
4985be1a4a build(deps): bump github.com/tetratelabs/wazero from 1.8.0 to 1.8.1
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 15:54:41 +02:00
dependabot[bot]
db653a8485 build(deps): bump golang.org/x/image from 0.20.0 to 0.21.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/image/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 14:53:06 +02:00
dependabot[bot]
05bbd2c515 build(deps): bump github.com/yuin/goldmark-emoji from 1.0.3 to 1.0.4
Bumps [github.com/yuin/goldmark-emoji](https://github.com/yuin/goldmark-emoji) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/yuin/goldmark-emoji/releases)
- [Commits](https://github.com/yuin/goldmark-emoji/compare/v1.0.3...v1.0.4)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark-emoji
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 14:52:12 +02:00
Bjørn Erik Pedersen
21366e0411 config: Imrove uglyurls section test
Updates #12926
2024-10-14 10:03:44 +02:00
Akkuman
ea633dd809 config: Fix uglyurls map parse
Fixes #12926
2024-10-14 10:03:44 +02:00
Joe Mooring
57151a5e91 create/skeletons: Honor --format flag when creating default archetype
Closes #12666
2024-10-14 09:54:29 +02:00
Julia Evans
5bb22b6b4e hugolib: Make .Site.Author deprecation warning clearer
Fixes #12269
2024-10-14 09:16:11 +02:00
Bjørn Erik Pedersen
41f69a7255 Upgrade to latest Go version + Some Docker image improvements (note)
* Rename /site to /project
* Add ldflags
* Add go and node to the default image
* Add Dart Sass to the default image
* Build the extended version by default
* Add "npm i" install support with custom entry script override
* Adjust cache logic to speed up CGO rebuilds

Closes #12920
See #12885
2024-10-13 20:01:37 +02:00
David Karlsson
4a79956276 ci: Build multi-platform image with cross-compilation
The previous build workflow used emulation to build the Docker image,
which results in a somewhat complicated push-by-digest and merge
workflow to create a multi-platform image.

This commit changes the Docker build to use cross-compilation instead,
resulting in a faster and more straightforward build.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-13 20:01:37 +02:00
Patrice Chalin
039845804f
tpl/tplimpl: Trim descriptions rather than just chomp 2024-10-12 22:41:42 +02:00
dependabot[bot]
9b635522e2 build(deps): bump golang.org/x/tools from 0.23.0 to 0.26.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.23.0 to 0.26.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.23.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 15:41:03 +02:00
dependabot[bot]
3223a65c9b build(deps): bump github.com/rogpeppe/go-internal from 1.12.0 to 1.13.1
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.12.0 to 1.13.1.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.12.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 15:39:22 +02:00
dependabot[bot]
bc6fc47727 build(deps): bump github.com/evanw/esbuild from 0.23.1 to 0.24.0
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.23.1 to 0.24.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.23.1...v0.24.0)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-11 15:36:02 +02:00
dependabot[bot]
ffb41d1111 build(deps): bump github.com/hairyhenderson/go-codeowners
Bumps [github.com/hairyhenderson/go-codeowners](https://github.com/hairyhenderson/go-codeowners) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/hairyhenderson/go-codeowners/releases)
- [Changelog](https://github.com/hairyhenderson/go-codeowners/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hairyhenderson/go-codeowners/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/hairyhenderson/go-codeowners
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-09 10:34:59 +02:00
Joe Mooring
5b0b663ec3 tailwind: Pin Tailwind 4 test to alpha 26 or later 2024-10-06 22:15:17 +02:00
Joe Mooring
3f68309148 resources/page: Treat null dates as zero dates
Closes #12906
2024-10-06 20:35:25 +02:00
Joe Mooring
ab03588db9 resources/page: Improve front matter date validation
Improve the error message and treat empty strings as zero dates.

Closes #12898
2024-10-05 15:29:57 +02:00
Bjørn Erik Pedersen
0450d69fc6 commands: Add "hugo build" as an alias for "hugo"
Closes #11391
2024-09-30 10:36:29 +02:00
Joe Mooring
1158e63072 markup/goldmark: Change default cell alignment in table render hook
Change the default table cell alignment from "left" to an empty string.

Closes #12886
2024-09-30 08:44:14 +02:00
Joe Mooring
d1ba52f3c3 tests: Address deprecation warnings and errors 2024-09-29 10:49:26 +02:00
hugoreleaser
d0dca65625 releaser: Prepare repository for 0.136.0-DEV
[ci skip]
2024-09-27 13:32:22 +00:00
hugoreleaser
f30603c47f releaser: Bump versions for release of 0.135.0
[ci skip]
2024-09-27 13:17:08 +00:00
dependabot[bot]
12c9ce34bb build(deps): bump golang.org/x/mod from 0.19.0 to 0.21.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.19.0 to 0.21.0.
- [Commits](https://github.com/golang/mod/compare/v0.19.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 14:03:14 +02:00
dependabot[bot]
47b055589c build(deps): bump github.com/bep/helpers from 0.4.0 to 0.5.0
Bumps [github.com/bep/helpers](https://github.com/bep/helpers) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/bep/helpers/releases)
- [Commits](https://github.com/bep/helpers/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/bep/helpers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 12:24:02 +02:00
dependabot[bot]
e56ea40666 build(deps): bump golang.org/x/net from 0.28.0 to 0.29.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.28.0 to 0.29.0.
- [Commits](https://github.com/golang/net/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 12:22:52 +02:00
Joe Mooring
4c02a52f7c resources/page: Validate predefined front matter dates
Closes #10717
2024-09-27 11:19:27 +02:00
dependabot[bot]
578442f892 build(deps): bump golang.org/x/image from 0.19.0 to 0.20.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.19.0 to 0.20.0.
- [Commits](https://github.com/golang/image/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 11:07:23 +02:00
Bjørn Erik Pedersen
0d390d7eb8
github: Trigger image workflow on release.published
Updates #12753
2024-09-27 10:59:45 +02:00
Bjørn Erik Pedersen
da72ac2db9
tailwind: Pin Tailwind 4 test to alpha 24
See #12880
2024-09-27 10:36:25 +02:00
Joe Mooring
0ea796dad1 tpl/compare: Use any data type for compare.Conditional condition
Improves #5792
2024-09-22 16:53:11 +02:00
Khayyam Saleem
1e690c0f23 deps: Upgrade github.com/gobuffalo/flect v1.0.2 => v1.0.3
Closes #12827
2024-09-21 19:10:34 +02:00
hugoreleaser
a619deec18 releaser: Prepare repository for 0.135.0-DEV
[ci skip]
2024-09-19 14:42:46 +00:00
hugoreleaser
5fb333b9f5 releaser: Bump versions for release of 0.134.3
[ci skip]
2024-09-19 14:28:20 +00:00
Bjørn Erik Pedersen
e07028cb90 tpl: Remove RSS deprecation site.Author check
The check itself creates a warning which I guess was not intended.

We could possibly make that work, but it has been deprecated since Hugo 0.98, so just remove the usage.
2024-09-19 13:39:40 +02:00
Bjørn Erik Pedersen
22a9f3fc98 modules: Improve console output on hugo mod init
Replace some of the stderr output from the Go command to match the Hugo commands needed:

```
go: creating new go.mod: module github.com/bep/foo
hugo: to add module requirements and sums:
hugo mod tidy
```

See #11458
2024-09-19 12:26:04 +02:00
Bjørn Erik Pedersen
e363964f2f commands: Ignore "module does not exist" errors in hugo mod init
Closes #11458
2024-09-19 12:26:04 +02:00
David Else
c260cb28a9
Add exclusion for helix .bck files
Updates #12677
2024-09-18 10:53:18 +02:00
Bjørn Erik Pedersen
e079145373
hugolib: Move hugolib/site_new.go into hugolib/site.go 2024-09-17 10:15:14 +02:00
Joe Mooring
5b442b3cce libsass: Resolve directory paths to directory index files
Closes #12851
2024-09-16 09:34:14 +02:00
Joe Mooring
2bc27657d8 dartsass: Resolve directory paths to directory index files
Closes #12849
2024-09-15 20:32:11 +02:00
Bjørn Erik Pedersen
28f621d4a7 internal/warpc: Improve the JS plugin API
* Move the error handling into commons and make sure the error returned also returns message errors
* Make the protocol version an int so it can be more easily compared
2024-09-12 13:51:37 +02:00
hugoreleaser
fe7e137e28 releaser: Prepare repository for 0.135.0-DEV
[ci skip]
2024-09-10 11:00:15 +00:00
hugoreleaser
1c74abd260 releaser: Bump versions for release of 0.134.2
[ci skip]
2024-09-10 10:46:33 +00:00
Bjørn Erik Pedersen
3d6baedaec Don't count HTML markup in auto summaries
This commit also fixes a bug where a `</picture>` end tag was wrongly used to detect a end paragraph. This should be very rare, though.

Closes #12837
2024-09-10 11:03:47 +02:00
hugoreleaser
84ee00bbc2 releaser: Prepare repository for 0.135.0-DEV
[ci skip]
2024-09-05 10:32:40 +00:00
hugoreleaser
2f89169baa releaser: Bump versions for release of 0.134.1
[ci skip]
2024-09-05 10:17:50 +00:00
Bjørn Erik Pedersen
66a3a11001 Fix stray end p tag in Obsidian callout titles
Also remove test references to deprecated funcs now in ERROR.

Closes #12828
2024-09-05 12:12:24 +02:00
Bjørn Erik Pedersen
8f2eac0195 Make ContentWithoutSummary return Content when summary is fetched from front matter
Fixes #12822
2024-09-05 12:12:24 +02:00
Bjørn Erik Pedersen
b570a5f118
Merge commit '39fd3b5570' 2024-09-04 18:57:34 +02:00
Bjørn Erik Pedersen
39fd3b5570 Squashed 'docs/' changes from a49697e53..ccb1b97cb
ccb1b97cb Update blockquotes.md
a5f51431c Add new-in label
39dac5838 Document ContentWithoutSummary
de3c75694 Clarify blockquote render hook Markdown syntax
d32f7856d Document change to data type returned by render hook Text methods
83fe7ccc3 Document table render hooks
601234147 netlify: Hugo 0.134.0
a583640a0 Add support for Obsidian type blockquote alerts
3e0080861 Merge commit 'dec8cd4ada'
2dde06576 output: Fix docshelper template lookup order for AMP pages

git-subtree-dir: docs
git-subtree-split: ccb1b97cbb11e60aab0108b33a270cccdd2218f6
2024-09-04 18:52:05 +02:00
hugoreleaser
aacff7aff4 releaser: Prepare repository for 0.135.0-DEV
[ci skip]
2024-09-03 10:14:44 +00:00
hugoreleaser
77df7bbbff releaser: Bump versions for release of 0.134.0
[ci skip]
2024-09-03 09:54:22 +00:00
Aymen Rachdi
ae3815898f Update Dockerfile 2024-09-02 21:56:33 +02:00
Bjørn Erik Pedersen
504a23184f
markup/goldmark/blockquotes: Improve some tests 2024-09-01 18:25:10 +02:00
Bjørn Erik Pedersen
e651d29801 Add support for Obsidian type blockquote alerts
* Make the alert type parsing more flexible to support more types
* Add `AlertTitle` and `AlertSign` (for folding)

Note that GitHub will not render callouts with alert title/sign.

See https://help.obsidian.md/Editing+and+formatting/Callouts

Closes #12805
Closes #12801
2024-09-01 18:12:26 +02:00
Bjørn Erik Pedersen
dec8cd4ada Squashed 'docs/' changes from fcc3ed651..a49697e53
a49697e53 Add private use subtag requirements to multilingual page
a5c6bb4da Add INFINI Pizza search engine
45b732efa Fix template lookup order for AMP pages
30c672d0b netlify: Hugo 0.133.1
7c766e724 Update page resources documentation
ca802fbec Document how to enable AsciiDoc syntax highlighting
c3350f4cf Update definition of falsy to include zero time.Time values
b0e5ab051 Fir typo
60f6cb63b Update migrations.md
ec52c7ba1 Improve formatting of example code
e5681ad01 Improve formatting of example code
bdf3ffc73 Clarify the various next/prev methods
b5505d22a Clarify template lookup order for shortcodes
cf8dd7034 Improve embedded.md
e5dee2651 Update transform.ToMath
4d419a128 Update pagination configuration to use new struct
05d4fd597 Update PrevInSection.md
fd33370ed Add new-in 0.133.0
f9062042f Add the new page config section
205645e97 Remove out-dated  new-in
3ed3673f7 Fix typo
41df91659 Document the 'else with' construct introduced with Go 1.23
9c4697ab3 netlify: Hugo 0.133.0
62506b052 Merge branch 'temp133'
877e1bfcd Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrder
eb159fe62 Update menu.md
efa7795a0 Update theme
dbe8911ad netlify: Hugo 0.132.2
2f793d328 Document passthrough render hooks
a7ce9a5e8 netlify: Hugo 0.132.1
2c137cb48 Update blockquotes.md
e0fa2f0d1 Add new-in badge to blockquote render hook page
bf42bbe6b Update references to render hooks
85a3d9958 Update theme
2dae72128 Document blockquote render hooks
8f5afb55d Update plainify return type
160f22d0e netlify: Hugo 0.132.0
82b5586fb Document transform.ToMath
1efcbcddb tpl/transform: Make Plainify and ToMath return template.HTML
31727be2e docs: Regen docshelper
88a421426 Merge commit 'a6e635ca7d'

git-subtree-dir: docs
git-subtree-split: a49697e536ee0d477ab4e552cfa8dc74debeff27
2024-09-01 14:51:15 +02:00
Bjørn Erik Pedersen
0c453420e6
Merge commit 'dec8cd4ada' 2024-09-01 14:51:15 +02:00
Bjørn Erik Pedersen
469124823c
Rename hstring.RenderedHTML => hstring.HTML
And add a comment about why it exists.
2024-09-01 10:04:20 +02:00
Bjørn Erik Pedersen
96afea4acc github: Try to fix "no space left on device" on MacOS 2024-08-31 21:05:58 +02:00
Bjørn Erik Pedersen
6d97ee711e Make all renderhook Text methods return template.HTML 2024-08-31 21:05:58 +02:00
Bjørn Erik Pedersen
f738669a4d Add Markdown render hooks for tables
Fixes #9316
Fixes #12811
2024-08-31 17:21:31 +02:00
Joe Mooring
b63f24adc7 create/skeletons: Clean up lang attribute in base template 2024-08-31 17:02:47 +02:00
Andreas Deininger
8fb933550f Fix deprecation warning for resources.ToCSS 2024-08-30 22:26:29 +02:00
Joe Mooring
a3684c8361 tpl/resources: Improve resources.Concat error message
Closes #7428
2024-08-30 08:39:29 +02:00
Patrice Chalin
53a8de21b8
tpl: Trim whitespace from google_analytics.html 2024-08-29 21:32:46 +02:00
Bjørn Erik Pedersen
37609262dc Add Page.Contents with scope support
Note that this also adds a new `.ContentWithoutSummary` method, and to do that we had to unify the different summary types:

Both `auto` and `manual` now returns HTML. Before this commit, `auto` would return plain text. This could be considered to be a slightly breaking change, but for the better: Now you can treat the `.Summary` the same without thinking about where it comes from, and if you want plain text, pipe it into `{{ .Summary | plainify }}`.

Fixes #8680
Fixes #12761
Fixes #12778
Fixes #716
2024-08-29 16:45:21 +02:00
Bjørn Erik Pedersen
2b5c335e93 deps: Upgrade github.com/bep/golibsass v1.1.1 => v1.2.0
Fixes #12649
2024-08-28 17:02:19 +02:00
dependabot[bot]
12a28ef773 build(deps): bump github.com/evanw/esbuild from 0.23.0 to 0.23.1
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.23.0 to 0.23.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.23.0...v0.23.1)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 13:05:57 +02:00
dependabot[bot]
4ded32d077 build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.3
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.2...v2.2.3)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-28 13:05:42 +02:00
Joe Mooring
1ecd0596a3 output: Fix docshelper template lookup order for AMP pages
Fixes #12797
2024-08-28 13:05:28 +02:00
Bjørn Erik Pedersen
371246de25
hugolib: Add a test for overriding _internal templates 2024-08-28 08:17:16 +02:00
hugoreleaser
aa0f66b290 releaser: Prepare repository for 0.134.0-DEV
[ci skip]
2024-08-26 14:13:52 +00:00
hugoreleaser
47d00202e7 releaser: Bump versions for release of 0.133.1
[ci skip]
2024-08-26 13:58:46 +00:00
Bjørn Erik Pedersen
261d7a03ae
Revert "Adjust Circleci workflow to make the Docker images build"
This reverts commit 445283a593.
2024-08-26 15:56:39 +02:00
Bjørn Erik Pedersen
445283a593 Adjust Circleci workflow to make the Docker images build
Closes #12753
2024-08-26 14:19:22 +02:00
Bjørn Erik Pedersen
5f667f8796 Fix missing method NameNormalized panic
Closes #12795
2024-08-25 23:17:26 +02:00
Bjørn Erik Pedersen
e1becf1dfe
deps: Upgraded github.com/bep/imagemeta v0.8.0 => v0.8.1
Closes #12793
2024-08-24 18:52:03 +02:00
Joe Mooring
7792392a6f config: Fix pagination deprecation messages 2024-08-21 22:01:59 +02:00
Bjørn Erik Pedersen
46484bff84
Revert "releaser: Rework the run conditions"
This reverts commit 702b1e8b81.
2024-08-18 19:12:03 +02:00
Bjørn Erik Pedersen
0e5a26057c
Revert "circleci: Upgrade to version 2.1 of the schema"
This reverts commit c8f850ae17.
2024-08-18 19:12:02 +02:00
Bjørn Erik Pedersen
c8f850ae17
circleci: Upgrade to version 2.1 of the schema
Updates #12753
2024-08-18 18:49:42 +02:00
Bjørn Erik Pedersen
702b1e8b81 releaser: Rework the run conditions
Now after actually reading the CircleCI docs...

Closes #12753
2024-08-18 18:46:56 +02:00
Bjørn Erik Pedersen
73d32e7737
Revert "releaser: Rework the run conditions"
This reverts commit 777534b2a4.

Circle ci throws validation errors:

```
Config does not conform to schema: {:workflows {:release {:jobs [{:prepare_release (not (map? nil)), :when {:and disallowed-key}} nil nil nil]}}}
```
2024-08-18 12:00:47 +02:00
Bjørn Erik Pedersen
777534b2a4
releaser: Rework the run conditions
Closes #12753
2024-08-18 11:47:51 +02:00
hugoreleaser
c054cba042 releaser: Prepare repository for 0.134.0-DEV
[ci skip]
2024-08-17 20:11:05 +00:00
hugoreleaser
c9777473d1 releaser: Bump versions for release of 0.133.0
[ci skip]
2024-08-17 19:57:41 +00:00
Bjørn Erik Pedersen
01008ba512 Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrder
See #12776
2024-08-17 16:47:50 +02:00
dependabot[bot]
53c0ddfcb4 build(deps): bump gocloud.dev from 0.38.0 to 0.39.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.38.0 to 0.39.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-15 12:14:59 +02:00
Bjørn Erik Pedersen
133eeafeb4 deps: Upgrade github.com/tetratelabs/wazero v1.7.4-0.20240805170331-2b12e189eeec => v1.8.0 2024-08-15 12:14:49 +02:00
Bjørn Erik Pedersen
2168c5b125 Upgrade to Go 1.23
Fixes #12763
2024-08-15 10:18:19 +02:00
hugoreleaser
b3ad58fa04 releaser: Prepare repository for 0.133.0-DEV
[ci skip]
2024-08-14 16:31:14 +00:00
hugoreleaser
3fd26c70df releaser: Bump versions for release of 0.132.2
[ci skip]
2024-08-14 16:17:21 +00:00
Bjørn Erik Pedersen
d72607adb9 markup/goldmark/blockquotes: Fix handling of lower/mixed case GitHub alerts
Fixes #12767
2024-08-14 18:09:04 +02:00
Bjørn Erik Pedersen
83235262d0 tpl/transform: Don't run ToMath tests in parallel
Closes #12765
2024-08-14 16:58:49 +02:00
b10c
5220d371ea
resources: Add URI GetRemote error
Previouly, only "ERROR failed to fetch remote resource: Forbidden"
would be shown when a resource failed to load. In my case, a tweet's
author I was embedding using the twitter shortcode switched his profile
to private which resulted in my blog failing to build. To figure out
where the originates, I added the log to the error message.
2024-08-14 13:24:58 +02:00
Bjørn Erik Pedersen
b2d4f67a88
loggers: Omit map nil check 2024-08-13 20:10:43 +02:00
Bjørn Erik Pedersen
a99716bf04
github: Add workflow_dispatch to the Docker workflow
Closes #12753
2024-08-13 16:28:33 +02:00
Bjørn Erik Pedersen
98aa53648a
github: Simplify Docker workflow / only trigger on new tags
See #12753
2024-08-13 16:17:56 +02:00
Bjørn Erik Pedersen
9231a7f110
github: Simplify Docker workflow
See #12753
2024-08-13 16:16:45 +02:00
hugoreleaser
736e8a4d08 releaser: Prepare repository for 0.133.0-DEV
[ci skip]
2024-08-13 10:24:54 +00:00
hugoreleaser
1bde700dfc releaser: Bump versions for release of 0.132.1
[ci skip]
2024-08-13 10:10:10 +00:00
Bjørn Erik Pedersen
77304a3cd3 github: Adjust image workflow
See #12753
2024-08-13 12:06:26 +02:00
Bjørn Erik Pedersen
bef9214e11 Fix nilpointer regression with empty blockquotes
Fixes #12756
2024-08-13 11:46:25 +02:00
hugoreleaser
caa90e6a12 releaser: Prepare repository for 0.133.0-DEV
[ci skip]
2024-08-12 15:36:03 +00:00
hugoreleaser
005e895a38 releaser: Bump versions for release of 0.132.0
[ci skip]
2024-08-12 15:21:36 +00:00
Bjørn Erik Pedersen
2192cf7ec1
internal/warpc: Add license headers 2024-08-12 15:50:29 +02:00
Bjørn Erik Pedersen
e1e1baa1bd Improve Katex error handling and fix handling of large expressions
* Make throwOnError=true the new default
* Handle JS errors as part of the RPC request/response flow
* Return a new Result type with .Err on it

This enables constructs on the form:

```handlebars
{{ with transform.ToMath "c = \\foo{a^2 + b^2}" }}
	{{ with .Err }}
	 	{{ warnf "error: %s" . }}
	{{ else }}
		{{ . }}
	{{ end }}
{{ end }}
```

Note that the new `Result` type behaves like `template.HTML` (or a string if needed) when printed, but it will panic if in a error state.

Closes #12748
2024-08-12 13:50:18 +02:00
Bjørn Erik Pedersen
e42263529c
Add katex option ThrowOnError
As an internal option for now. Katex misbehaves in error situations without a value set.
2024-08-11 20:57:15 +02:00
Bjørn Erik Pedersen
891aa00fe1 Add some more KaTeX options
And fix the options handling.

Closes #12745
Fixes #12746
2024-08-11 19:03:27 +02:00
Bjørn Erik Pedersen
946e6af0bb tpl/transform: Make Plainify and ToMath return template.HTML
None of these are useful as plain strings in the templates, which forces the users to do `transform.Plainify "foo" | safeHTML`.

If people have trust issues with the output of these functions, they need to just stop using them.

Closes #8732
2024-08-11 15:16:16 +02:00
Bjørn Erik Pedersen
5d84f64759 deps: Upgrade github.com/bep/imagemeta v0.7.6 => v0.8.0
Fixes #12741
2024-08-10 14:00:43 +02:00
Bjørn Erik Pedersen
fbfccb394b Fix compare of uints and ints in eq, gt etc.
Fixes #12733
2024-08-10 14:00:21 +02:00
Bjørn Erik Pedersen
ef2e30eca3
docs: Regen docshelper 2024-08-09 19:34:13 +02:00
Bjørn Erik Pedersen
33c0938cd5 Add build time math rendering
While very useful on its own (and combined with the passthrough render hooks), this also serves as a proof of concept of using WASI (WebAssembly System Interface) modules in Hugo.

This will be marked _experimental_ in the documentation. Not because it will be removed or changed in a dramatic way, but we need to think a little more how to best set up/configure similar services, define where these WASM files gets stored, maybe we can allow user provided WASM files plugins via Hugo Modules mounts etc.

See these issues for more context:

* https://github.com/gohugoio/hugo/issues/12736
* https://github.com/gohugoio/hugo/issues/12737

See #11927
2024-08-09 17:18:37 +02:00
Bjørn Erik Pedersen
0c3a1c7288
github: Turn off the image workflow for pull request
We need to fix it so it does not publish anything to the remote repo before we can enable that.
2024-08-09 16:47:17 +02:00
Bjørn Erik Pedersen
ceed812458 github: Update image actions versions and some adjustments
Co-authored-by: morre <morre@mor.re>
2024-08-09 16:26:22 +02:00
Morre
b08de70cca github: Build and publish Docker image on release
Fixes #10760
2024-08-09 16:26:22 +02:00
Bjørn Erik Pedersen
a6e635ca7d Squashed 'docs/' changes from 9b06f951e..fcc3ed651
fcc3ed651 Remove some expired new-in
a9c5981f5 Fix cascade example
82bb250fa Add some lines about permalinks tokens in front matter
328fe564e Remove some outdated new-in
fb140b153 Hide showcase menu entry
42d9d1c79 Update image formats from which EXIF data can be extracted
09ad56b6e netlify: Hugo 0.130.0
1d503f846 Merge branch 'tempv0.130.0'
e2458074d math: Add trigonometric functions and some angle helper functions
392afc8f9 Disable the showcase section for now
0300750f2 Improve example of image render hook
60a9306af Improve description of the .Site.RegularPages method
8d759175d Fix typos
55daa4554 Update XxHash.md
397c81cb7 Add namespace for hash functions
70fe8d2f0 netlify: Bump Hugo 0.129.0
5a9771aff Merge branch 'tempv0.129.0'
f9146575b Fix typo
e6e1fea49 Fix typo in Hugo docs | functions | partial
732d10ec4 source: Expose GitInfo Body
34c97e639 netlify: Hugo 0.128.2
3270587e9 Fix typo
727c5396e netlify: Hugo 0.128.1
80b6ae99c Update GitHub Pages workflow file example
027134102 Update GitHub Pages workflow file example
2600a8a2e Miscellaneous edits
3fdd5819b Update Build.md
7764005c3 Improve example of render hook directory structure
5e3941d82 Fix typos
748bf065f Restructure templates section
fafbf6566 Update Defer.md
012162e0d Document changes to template functions in v0.128.0
0990ce35b quick-reference: Update emojis
6677a30ef Update Goldmark configuration documentation
4449d530d Document new pagination config
0af8be439 Update Defer.md
56348196d netlify: Hugo 0.128.0
d67b6d82e Update content/en/functions/templates/Defer.md
23d996b3d Update content/en/functions/templates/Defer.md
7f7fb2f27 Document templates.Defer
5ada1e9d5 Fix docs merge (remove shortcode)
d27ee6156 Merge branch 'tempv0.128.0'
5d7317c84 Fix typo
7c18ee546 Update theme
83bfea63b Update theme
b274b3238 Merge commit '8b9803425e'
ff34a035a deploy: Add stripIndexHtml target option
d9e964bdb markup/goldmark: Add the Hugo Goldmark Extras "delete" extension
ac5bd16d2 deps: Upgrade github.com/alecthomas/chroma v2.13.0 => v2.14.0
25377171b config: Remove extraneous BuildConfig setting
0d2044f6d docs: Regen docshelper
a2548dac9 markup/goldmark: Support extras extension
9d0c86ee8 commands: Add gen chromastyles --lineNumbersTableStyle flag

git-subtree-dir: docs
git-subtree-split: fcc3ed651a1b6431303c2f88f20fa38531c52b3d
2024-08-09 15:17:43 +02:00
Bjørn Erik Pedersen
e99eba39e7
Merge commit 'a6e635ca7d' 2024-08-09 15:17:43 +02:00
Bjørn Erik Pedersen
dbff48e6c3 github: Update GitHub actions versions 2024-08-09 11:17:24 +02:00
Bjørn Erik Pedersen
665ac949bd markup: Add blockquote render hooks
Closes #12590
2024-08-07 18:28:23 +02:00
Bjørn Erik Pedersen
4c162deb03 markup/goldmark/codeblocks: Simplify codeblcok hook code 2024-08-07 18:28:23 +02:00
Bjørn Erik Pedersen
c6227f1d85 Add render hooks for inline and block passthrough snippets
Fixes #11927
2024-08-07 18:28:23 +02:00
dependabot[bot]
1781b18427 build(deps): bump golang.org/x/net from 0.27.0 to 0.28.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.27.0 to 0.28.0.
- [Commits](https://github.com/golang/net/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 12:26:01 +02:00
dependabot[bot]
d6d9dddff3 build(deps): bump golang.org/x/image from 0.18.0 to 0.19.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/image/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 11:14:31 +02:00
Bjørn Erik Pedersen
10891f305e tpl/cast: Improve float
Make it support the new upstream rational number type in Exif.

See #12718
2024-08-06 22:26:43 +02:00
Bjørn Erik Pedersen
c07e94fa6d
Skip TestEchoParam
Is deprecated, will be remvoved soon.
2024-08-06 19:13:35 +02:00
dependabot[bot]
8f8d12ab2f
build(deps): bump github.com/bep/imagemeta from 0.7.5 to 0.7.6 (#12720)
Bumps [github.com/bep/imagemeta](https://github.com/bep/imagemeta) from 0.7.5 to 0.7.6.
- [Release notes](https://github.com/bep/imagemeta/releases)
- [Commits](https://github.com/bep/imagemeta/compare/v0.7.5...v0.7.6)

---
updated-dependencies:
- dependency-name: github.com/bep/imagemeta
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Closes #12718
2024-08-06 12:05:52 +02:00
Bjørn Erik Pedersen
69455fa422
Fix deprecation errors 2024-08-05 19:23:53 +02:00
hugoreleaser
2fcc53780f releaser: Prepare repository for 0.132.0-DEV
[ci skip]
2024-08-02 09:18:21 +00:00
hugoreleaser
bfbee17932 releaser: Bump versions for release of 0.131.0
[ci skip]
2024-08-02 09:03:48 +00:00
Bjørn Erik Pedersen
944fcc216f Fix images.AutoOrient regression
Broken in v0.130.0. Added a integration test to avoid future breakage.

Fixes #12712
2024-08-02 10:36:06 +02:00
n1xx1
914fa13efd revamp pagegroup tests with quicktest 2024-08-02 10:03:20 +02:00
n1xx1
51f09b17fd allow nested params when using Pages.GroupByParam and Pages.GroupByParamDate 2024-08-02 10:03:20 +02:00
dependabot[bot]
be643580dd build(deps): bump github.com/bep/godartsass/v2 from 2.0.0 to 2.1.0
Bumps [github.com/bep/godartsass/v2](https://github.com/bep/godartsass) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/bep/godartsass/releases)
- [Commits](https://github.com/bep/godartsass/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: github.com/bep/godartsass/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-02 00:36:13 +02:00
dependabot[bot]
20e4dd2ee3 build(deps): bump google.golang.org/api from 0.152.0 to 0.189.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.152.0 to 0.189.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.152.0...v0.189.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 19:57:38 +02:00
dependabot[bot]
f41149979a build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:34:22 +02:00
dependabot[bot]
47fee839f6 build(deps): bump gocloud.dev from 0.36.0 to 0.38.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.36.0 to 0.38.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.36.0...v0.38.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:33:35 +02:00
dependabot[bot]
99665ef227 build(deps): bump github.com/gorilla/websocket from 1.5.1 to 1.5.3
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.5.1...v1.5.3)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:32:47 +02:00
dependabot[bot]
eb2eeee687 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.12 to 2.2.13
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.12 to 2.2.13.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.12...v2.2.13)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 16:31:38 +02:00
Bjørn Erik Pedersen
bea5a46de4 deps: Upgrade github.com/hairyhenderson/go-codeowners v0.4.0 => v0.5.0 2024-08-01 14:46:54 +02:00
dependabot[bot]
f1a7f3d01a build(deps): bump github.com/fatih/color from 1.16.0 to 1.17.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 14:46:13 +02:00
dependabot[bot]
08243be1d2 build(deps): bump github.com/evanw/esbuild from 0.21.4 to 0.23.0
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.21.4 to 0.23.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.4...v0.23.0)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:43:28 +02:00
dependabot[bot]
0490a8a162 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.36 to 2.20.37
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.36 to 2.20.37.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.36...v2.20.37)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:14:38 +02:00
Bjørn Erik Pedersen
d795cacd71
Revert "deps: Set toolchain go1.21.0 in go.mod"
This reverts commit 78c9a18b0c.
2024-08-01 13:04:29 +02:00
Bjørn Erik Pedersen
a5db76fe62
Run go mod tidy 2024-08-01 12:22:27 +02:00
n1xx1
566fe7ba12
resources/page: Expand parmalinks tokens in url
This change allows to use permalink tokens in url front matter fields. This should be useful to target more specific pages instead of using a global permalink configuration. It's expected to be used with cascade.

Fixes #9714
2024-08-01 12:14:29 +02:00
Bjørn Erik Pedersen
92573012e8 Bump to go 1.21 in go.mod 2024-08-01 12:07:27 +02:00
Bjørn Erik Pedersen
071f8b4466 tpl: Sync Go template packages with the Go 1.22.5 source 2024-08-01 12:07:27 +02:00
Bjørn Erik Pedersen
ae9d5e7d83 Upgrade to Go 1.22.5 2024-08-01 12:07:27 +02:00
Bjørn Erik Pedersen
78c9a18b0c deps: Set toolchain go1.21.0 in go.mod
To hopefully resolve dependabot issues.
2024-07-31 19:47:41 +02:00
Bjørn Erik Pedersen
79aa2ab618 deps: Upgrade golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d => v0.23.0
Main motivation is to try to get dependabot running again.
2024-07-31 18:52:13 +02:00
Bjørn Erik Pedersen
216a69a1ef Shorten processed image filenames
Fixes #12688
Fixes #12656
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
e67886c038 Consolidate all hashing to the common/hashing package
And remove now unsued hashing funcs.
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
d5eda13cb2 Replace the MD5 hashing of images with xxHash
Note that we only use this for change detection.

The previous implementation invoked `MD5FromReaderFast` that created a MD5 has from 8 64 bytes chunks in the file, which is obviously very fast. The new implementation creates the hash from the entire file and ... seems to be even more effective:

```
name          old time/op    new time/op    delta
HashImage-10    9.45µs ±21%   10.89µs ± 1%     ~     (p=0.343 n=4+4)

name          old alloc/op   new alloc/op   delta
HashImage-10      144B ± 0%        8B ± 0%  -94.44%  (p=0.029 n=4+4)

name          old allocs/op  new allocs/op  delta
HashImage-10      4.00 ± 0%      1.00 ± 0%  -75.00%  (p=0.029 n=4+4)
```
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
8b5d796989 resources: Add BenchmarkHashImage 2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
c9d7577cb4 deps: Replace github.com/mitchellh/hashstructure/v2 with github.com/gohugoio/hashstructure
The old repo is archived and no longer maintained.

See #11644
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
2babd6404e identity: Use xxHash in hashstructure (note)
```
name                 old time/op    new time/op    delta
HashString/n28-10       133ns ± 9%     107ns ±10%  -19.58%  (p=0.029 n=4+4)
HashString/n112-10      243ns ± 5%     121ns ± 4%  -50.08%  (p=0.029 n=4+4)
HashString/n448-10      698ns ± 3%     174ns ± 5%  -75.02%  (p=0.029 n=4+4)
HashString/n1792-10    2.58µs ± 4%    0.38µs ± 4%  -85.11%  (p=0.029 n=4+4)
HashString/n7168-10    10.0µs ± 3%     1.3µs ± 4%  -86.91%  (p=0.029 n=4+4)

name                 old alloc/op   new alloc/op   delta
HashString/n28-10       80.0B ± 0%     72.0B ± 0%  -10.00%  (p=0.029 n=4+4)
HashString/n112-10       160B ± 0%      152B ± 0%   -5.00%  (p=0.029 n=4+4)
HashString/n448-10       496B ± 0%      488B ± 0%   -1.61%  (p=0.029 n=4+4)
HashString/n1792-10    1.84kB ± 0%    1.83kB ± 0%   -0.43%  (p=0.029 n=4+4)
HashString/n7168-10    8.24kB ± 0%    8.23kB ± 0%   -0.06%  (p=0.029 n=4+4)

name                 old allocs/op  new allocs/op  delta
HashString/n28-10        4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n112-10       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n448-10       4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n1792-10      4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
HashString/n7168-10      4.00 ± 0%      3.00 ± 0%  -25.00%  (p=0.029 n=4+4)
```
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
78db8aebca identity: Upgrade to github.com/mitchellh/hashstructure/v2 v2.0.2
```
name                 old time/op    new time/op    delta
HashString/n28-10       131ns ± 7%     133ns ±19%   ~     (p=0.343 n=4+4)
HashString/n112-10      237ns ± 5%     241ns ± 3%   ~     (p=0.229 n=4+4)
HashString/n448-10      688ns ± 3%     687ns ± 1%   ~     (p=0.886 n=4+4)
HashString/n1792-10    2.51µs ± 3%    2.56µs ± 3%   ~     (p=0.200 n=4+4)
HashString/n7168-10    10.1µs ± 2%    10.0µs ± 4%   ~     (p=0.686 n=4+4)

name                 old alloc/op   new alloc/op   delta
HashString/n28-10       80.0B ± 0%     80.0B ± 0%   ~     (all equal)
HashString/n112-10       160B ± 0%      160B ± 0%   ~     (all equal)
HashString/n448-10       496B ± 0%      496B ± 0%   ~     (all equal)
HashString/n1792-10    1.84kB ± 0%    1.84kB ± 0%   ~     (all equal)
HashString/n7168-10    8.24kB ± 0%    8.24kB ± 0%   ~     (all equal)

name                 old allocs/op  new allocs/op  delta
HashString/n28-10        4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n112-10       4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n448-10       4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n1792-10      4.00 ± 0%      4.00 ± 0%   ~     (all equal)
HashString/n7168-10      4.00 ± 0%      4.00 ± 0%   ~     (all equal)
```

Closes #11644
2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
3140e0b994 identity: Add BenchmarkHashString 2024-07-31 16:44:06 +02:00
Bjørn Erik Pedersen
9989404d97 deps: Upgrade github.com/bep/imagemeta v0.7.4 => v0.7.5 2024-07-31 15:35:18 +02:00
Bjørn Erik Pedersen
b81ba2a0f0 deps: Upgrade github.com/aws/aws-sdk-go-v2 v1.26.1 => v1.30.3 2024-07-31 14:22:20 +02:00
Bjørn Erik Pedersen
afdd87db59 deps: Upgrade to github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 2024-07-31 12:53:27 +02:00
hugoreleaser
e45eae4d67 releaser: Prepare repository for 0.131.0-DEV
[ci skip]
2024-07-29 14:06:20 +00:00
hugoreleaser
9b1b11c8a5 releaser: Bump versions for release of 0.130.0
[ci skip]
2024-07-29 13:51:56 +00:00
raoulb
9d2b5f98d0
math: Add trigonometric functions and some angle helper functions
This commit adds these new template functions in the `math` namespace:

math.Acos
math.Asin
math.Atan
math.Atan2
math.Cos
math.Pi
math.Sin
math.Tan
math.ToDegrees
math.ToRadians

Co-authored-by: Joe Mooring <joe@mooring.com>
2024-07-29 11:05:36 +02:00
Bjørn Erik Pedersen
0e00561620
deps: Upgrade github.com/bep/imagemeta v0.7.3 => v0.7.4 2024-07-23 20:46:05 +02:00
Bjørn Erik Pedersen
71842140d0 deps: Upgrade github.com/bep/imagemeta v0.7.1 => v0.7.3 2024-07-21 21:44:48 +02:00
Bjørn Erik Pedersen
cb95a033c1
readme: Pull the star history down a little 2024-07-20 17:46:48 +02:00
Bjørn Erik Pedersen
3240511153
deps: Upgraded github.com/bep/imagemeta v0.7.0 => v0.7.1
Fixes #12669
2024-07-20 17:28:47 +02:00
Bjørn Erik Pedersen
72ff937e11 Switch EXIF library
Closes #10855
Closes #8586
Closes #8996
2024-07-20 15:56:10 +02:00
Bjørn Erik Pedersen
a28bed0817
readme: Add Star History 2024-07-20 15:37:22 +02:00
hugoreleaser
979423f4d5 releaser: Prepare repository for 0.130.0-DEV
[ci skip]
2024-07-17 13:42:58 +00:00
hugoreleaser
e85be29867 releaser: Bump versions for release of 0.129.0
[ci skip]
2024-07-17 13:29:16 +00:00
Bjørn Erik Pedersen
4d8bfa7f1c
tpl: Use xxHash instead of MD5 to hash the deferred templates
Motivation is performance. These templates are typically very small, so the win is minor, I guess.
2024-07-17 12:51:49 +02:00
Bjørn Erik Pedersen
f0ed91caba Throw error if resources.PostProcess is used in a deferred template
That just doesn't work.

See #12655
2024-07-17 12:47:25 +02:00
Bjørn Erik Pedersen
7be0377505 deps: Upgrade github.com/bep/gitmap v1.4.0 => v1.6.0 (note)
Closes #8627
2024-07-17 10:54:28 +02:00
Bjørn Erik Pedersen
439f07eac4 deps: Go mod tidy 2024-07-08 23:53:23 +02:00
Bjørn Erik Pedersen
ce5a2ce001 deps: Upgraded github.com/tdewolff/minify/v2 v2.20.20 => v2.20.36 2024-07-08 23:53:23 +02:00
Bjørn Erik Pedersen
0f42d975e0 deps: Upgrade to golang.org/x/image v0.18.0 2024-07-08 23:53:23 +02:00
Bjørn Erik Pedersen
cc2d19e19b commands: Fix --navigateToChanged server behavior when editing headless content
Fixes #12648
2024-07-07 14:42:46 +02:00
Bjørn Erik Pedersen
094f746751 commands: Simplify the browser live reload logic
And improve the logging for live reload.

Closes #12643
2024-07-07 14:42:46 +02:00
Bjørn Erik Pedersen
fb8909d5b0
Use xxHash for the change detector
Much faster compared to MD5:

```
name          old time/op    new time/op    delta
HashingFs-10    21.3µs ± 2%     3.2µs ±17%  -84.96%  (p=0.029 n=4+4)

name          old alloc/op   new alloc/op   delta
HashingFs-10    12.9kB ± 0%    12.8kB ± 1%   -1.31%  (p=0.029 n=4+4)

name          old allocs/op  new allocs/op  delta
HashingFs-10      10.0 ± 0%       7.0 ± 0%  -30.00%  (p=0.029 n=4+4)
```

Updates #12643
2024-07-06 16:57:16 +02:00
PeskyPotato
0ee2610d7c source: Expose GitInfo Body
Updated bep/gitmap to v1.4.0, to get commit message's Body.
Added Body to GitInfo struct. Docs upated with commit body example.

Fixes #10905
2024-07-06 16:28:11 +02:00
Bjørn Erik Pedersen
251a23ef76
commands: Fix hugo mod get -u ./...
Fixes #12625
2024-07-06 15:38:21 +02:00
Bjørn Erik Pedersen
644d55475d Add hash.XxHash
Also move the non crypto hash funcs into this new package.

This is much faster than e.g. MD5, especially for larger inputs:

```
BenchmarkXxHash/xxHash_43-10         	 9917955	       112.2 ns/op	      56 B/op	       4 allocs/op
BenchmarkXxHash/mdb5_43-10           	 6017239	       204.1 ns/op	      96 B/op	       3 allocs/op
BenchmarkXxHash/fnv32a_43-10         	14407333	        82.30 ns/op	      16 B/op	       1 allocs/op
BenchmarkXxHash/xxHash_4300-10       	 2916892	       409.7 ns/op	      56 B/op	       4 allocs/op
BenchmarkXxHash/mdb5_4300-10         	  159748	      7491 ns/op	    4912 B/op	       3 allocs/op
BenchmarkXxHash/fnv32a_4300-10       	  218210	      5510 ns/op	      16 B/op	       1 allocs/op
```

Fixes #12635
2024-07-06 14:08:15 +02:00
hugoreleaser
edeed52fc5 releaser: Prepare repository for 0.129.0-DEV
[ci skip]
2024-07-04 08:27:37 +00:00
hugoreleaser
de36c1a95d releaser: Bump versions for release of 0.128.2
[ci skip]
2024-07-04 08:13:25 +00:00
Bjørn Erik Pedersen
8cf96f244a Fix site.GetPage, never do short lookups for paths with leadig slash
Fixes #12638
2024-07-04 10:09:18 +02:00
hugoreleaser
82af94d1f5 releaser: Prepare repository for 0.129.0-DEV
[ci skip]
2024-07-02 07:00:44 +00:00
hugoreleaser
0ff542b4b9 releaser: Bump versions for release of 0.128.1
[ci skip]
2024-07-02 06:46:41 +00:00
Cyrus Yip
a95fe50616 create/skeletons: Fix languageCode region subtag
Region subtag should be in ALLCAPS
2024-07-02 08:43:19 +02:00
Bjørn Erik Pedersen
7b6dafc53a Fix it so publishDate rolls up to section, taxonomy, or term pages
Fixes #12438
2024-07-01 21:48:12 +02:00
Joe Mooring
932ab4c058 Update README.md 2024-06-27 23:35:56 +02:00
hugoreleaser
95479fc2d0 releaser: Prepare repository for 0.129.0-DEV
[ci skip]
2024-06-25 16:30:14 +00:00
hugoreleaser
e6d2712ee0 releaser: Bump versions for release of 0.128.0
[ci skip]
2024-06-25 16:15:48 +00:00
Joe Mooring
79da24a0eb deps: Upgrade github.com/yuin/goldmark v1.7.2 => v1.7.4 2024-06-25 18:04:45 +02:00
Bjørn Erik Pedersen
e1317dd322 Add css.TailwindCSS
Closes #12618
Closes #12620
2024-06-25 15:48:02 +02:00
Bjørn Erik Pedersen
eddcd2bac6 Clean up the css related template funcs package structure
Deprecate and move:

* resources.ToCSS => css.SASS
* resources.PostProcess => css.PostProcess
* resources.Babel => js.Babel

Updates #12618
2024-06-25 15:48:02 +02:00
Bjørn Erik Pedersen
1687a9a585
Delete unused release hook script
Closes #12378
2024-06-25 15:09:35 +02:00
Bjørn Erik Pedersen
16e4662b7d
modules: Remove newly introduced "mount source" does not exist warning 2024-06-25 15:04:07 +02:00
Joe Mooring
b187c0658e deps: Upgrade github.com/yuin/goldmark-emoji v1.0.2 => v1.0.3 2024-06-24 15:51:02 +02:00
Bjørn Erik Pedersen
c880faa998
tpl/debug: Fix reset of debug timers when running the server
Fixes #12621
2024-06-24 12:49:35 +02:00
Bjørn Erik Pedersen
6cd0784e44 Implement defer
Closes #8086
Closes #12589
2024-06-23 11:25:47 +02:00
Bjørn Erik Pedersen
8731d88222
Fix Erroridf/Warnidf mixed case issue
Fixes #12617
2024-06-22 19:01:56 +02:00
Bjørn Erik Pedersen
3b724462c2
Update README.md 2024-06-22 16:45:22 +02:00
Bjørn Erik Pedersen
1c85830bc7 common/hexec: Fall back to the binary in PATH if npx fails
Closes #12486
2024-06-22 12:25:02 +02:00
Bjørn Erik Pedersen
af0cb57aaf
Merge commit '8b9803425e' 2024-06-21 09:41:24 +02:00
Bjørn Erik Pedersen
8b9803425e Squashed 'docs/' changes from 8c46b304a..9b06f951e
9b06f951e Update theme
aa24b5319 Improve quick start example
08e4e626d Update index.md
f4c1a8ce1 Update Disqus comments implementation notes (#2631)
aac3c0279 Update data sources
6ac3d7617 Fix typo
017da70a0 Ensure consistent use of method instead of variable
820881dcf Fix typo
dc6fa5ac6 Document LiveReload debugging
18b8c79f3 Improve url function examples
89e6997f1 Improve url function examples
53134e05c Remove static files page
27645a90f Improve data file/source documentation
f86b95bd4 Correct manual summary divider example
f0e95c8d1 Add examples to comparison operators
c5c6aa798 Document Pager methods
015049af9 Fix typos
ea6a9fa3f Remove new-in label
0359c4a1e Fix links
3ab8bb4e3 Update performance.md
b5393c65d Update configuration.md
ca9697630 Update Sections.md
927c90562 Document HTTP cache config
6da219643 netlify: Hugo 0.127.0
de236b58b Deprecate .Sites.First in favor of .Sites.Default
076067b47 netlify: Hugo 0.126.3
c37dd680e Change GetPage examples to single argument
24282c554 Clarify cardinalityThreshold
a4ce1a2d2 Revert "Update summaries.md"
466bc7e0f Update summaries.md
168800d5a Fix typo
65f6ca106 content adapters: Use --printPathWarnings to detect page collisions
9c7a700ea Update CLI docs
993aa40d3 netlify: Hugo 0.126.2
0242ec396 Replace file tree image with text
7670da499 rel and relref: Add note about which language version is picked
5dbd7ee26 Add cautionary note to virus scanner exclusion instructions
3c52fab72 Fix typo
868620bcd Improve content summary page
6bca7bc77 Rework safe functions
e30d17947 Rework index function
b76e81697 Miscellaneous edits
35849e55a Update formats.md
8f939ed5d Update menus.md
ea2fd0384 Update docs.yaml (#2592)
2f5d1712b Add security.http.mediaTypes to security page
d218b9c44 Change twitter.com to x.com
cb2255821 content adapters: Note to exclude file extension when specifying page path
2d5a1690f Indicate that .Page.Sites.First returns the site corresponding to the default content language
60071d923 Indicate that .Site.Sites.First returns the site corresponding to the default content language
0a115cfda Add content adapters section to features summary
011742c24 timer: Adjust output example
977101061 Describe possibility of page collisions with content adapters
d57b8a8cf Document virus scanning performance impact and remedy
dd5c3af04 netlify: Hugo 0.126.1
0b16c842d Update description of Markdown content format
e42ff7609 Fix typo
a120ccd0d Update Scratch and Store descriptions
cbb2294e3 Update content-adapters.md
c39aa4e25 netlify: Upgrade to Hugo 0.126.0
58b9554b7 Update version references
6140802d8 Update docs.yaml
5ee96971a Document content adapters
653069a0d Document the Goldmark extras extension
b8ca2833d Update sample data
efad994ee Describe .Language.LanguageCode fallback value
3336532fe Update Colors.md
40b49a1f4 Update embedded.md
f31741b47 Remove references to symlinks
1d5f40c90 Update sample data
fb76580f8 Update function signatures
463adcf26 Use key-value consistently throughout documentation
d03ed1887 Update sample data
fc59e1f6f Remove examples of LanguageCode fallback
b608f3165 Clarify purpose of multilingual site `title`
b677f9424 use-modules: clarify the example of initializing a new module
774d64a4d Update theme
417e869f0 Update site configuration docs
1dbe9ee20 Update sample data file
fa494af4b Move sample data file
300b4a319 Add sample data file
b4fc35c3e Change transform.Unmarshal remote data examples (#2557)
4b79599b9 netlify: Hugo 0.125.6
e8cb250f3 Improve external learning resources
9b0c02e46 Rework content formats
886f952e0 Clarify descriptions of permalink tokens
2f0d8c98c Fix a misused word
3b3b0693d Update Dart Sass version refs
c5d0fbcb0 netlify: Hugo 0.125.5
bf7d4f4fd Add Discourse to the comment system list
86a29bd43 Clarify language key format
6126c901a Update multilingual.md
6ec03c2c7 Update WorkingDir: Add new-in
d48f40ded Document multilingual 404 redirects
b161cc0c5 Update version references
02732fe91 Remove layouts directory
5befe5f28 Vendor theme
21247df4e Update link render hook
7d2fd8647 Update link render hook
af9e6bbe7 Update Colors.md
0442f8264 Document images.Color.Luminance and images.Color.ColorHex
d58b0b2f5 Update views.md
48ef3ad18 netlify: Hugo 0.125.4
b5721dff2 Update cross-references.md
27905febb Fix typo
d16acd658 netlify: Hugo 0.125.3 o
28a1b9dce Update Parse.md
842b20d2c Update YouTube shortcode argument description
a133a4828 Clarify that generated syntax highlighter css overrides markup.highlight.style
6e739fcbf Fix alias in /about/security.md
a9859e4e2 netlify: Hugo 0.125.2
326fcb518 Update CLI docs
1d3afb6b0 Fix netlify.toml examples in hosting-on-netlify
f4628189a Document front matter params expected by embedded templates
8a12d3c48 Fix typo
4b411d3fb Fix typo
a7fa25d7f Update CLI docs
7c9a1b864 Add related funcs/methods to time.Round and time.Truncate
79f22ead4 Update strings.Diff description
8085d85e3 Document time.Truncate and time.Round
76a1263e7 netlify: Hugo 0.125.1
6ea4cb709 Update introduction.md
e59a8805b Fix typo
eace2624a Fix PageInner reference links
ba66d6b90 Fix typo
3dcf32e25 Update debug.Dump
38d6731e2 netlify: Hugo 0.125.0
34362b62f Merge branch 'tempv0.125.0'
2221162fa Update privacy defaults and description
3873cf209 Remove "same path" restriction when using resources.Copy
66237fe12 Update youtube shortcode args
961639dfa Document additional changes in v0.125.0
3aa75ee74 Document taxonomies Page method
7f26f69e8 docs: Regen docshelper
05494b7d2 Fix conflicting text for global site function
264fe788e Add missing example to TOC page
de8d008e4 Update formats.md
8559c70c3 Update comments.md
987f9424e Update comments.md
b77011c93 Improve function descriptions
ae663793b all: Fix duplicate words in comments
585095cf8 Fix home page feed
37c6954ac Improve RSS feeds
6cd1b77af Update front-matter.md
3d95ad715 Fix RSS last build date
2c6153461 Improve RSS feed for news section (#2521)
898d7c261 Fix typo
0241936e1 Add installation instructions for Exherbo
62df9bd73 Add missing links to warnidf function
c9551d433 Fix a typo in templates docs
09ff1f27c Update YearDay.md
4b278d920 Fix literal usage of manual summary divider
8dec28c50 Fix literal usage of manual summary divider
16102faa8 Add introduction video
b276bb17f Fix default data type
61319af7a Fix file extension typo in page-bundles.md
ea74d798a Update shortcodes.md
9d18e239f tpl/tplimpl: Optionally exclude content from sitemap
4fe2efc76 Update page-bundles.md
34f099e1e Revise page bundle descriptions
021eea7b1 Update link to Modules page of Go Wiki
6972a9a83 Fix reference link
5ebfdea40 Fix configuration file tree example
12bebaaea Fixing typos
b179f3b7f Update segments example
ad3e26cec Update segments example
6970a9eeb Fix typo
194139ce7 Update configuration-markup.md
8fb8af286 tpl/tplimpl: Update Google Analytics template and config
4f8fd82ad Add wp2hugo migration tool
39261556a Update directory-structure.md
1e2c0b880 netlify: Hugo 0.124.1
55d5a2787 Update partial function example
e26b4634f Fix typo
bdada4361 Fix typo and capitalization
4a1fcfc29 Miscellaneous edits
6d6092058 Rework the about section
77ec9d696 Fix typo
6efbf5a39 Update configuration.md
dc1fe4405 Update configuration.md
3d1cd3383 Miscellaneous updates
8049e7701 Update IsMultihost method
939281f3a Update version references
5e9567046 Add segments documentation
8e267d780 Update MultiLingual and MultiHost methods/functions
c6aeeb747 netlify: Hugo 0.124.0
9fcd40fb5 Merge branch 'tempv0.124.0'
2f7a4ed68 docs: Regen CLI docs
5162805d7 docs: Regen docshelper
e1fa18bf8 Update versions in GitHub hosting example
70653e4b2 Add PubCrank to list of front ends
5f81464d5 Update opengraph configuration example
cc8a99633 Update hosting-on-gitlab.md
3af715f77 Clarify .Page.File behavior when page is not backed by a file
cab417dee Update cspell rules
29f4dde19 Rename section menu entries from "Overview" to "In this section"
e04291a99 Miscellaneous edits towards the goal of consistent language
f9fc2d5d6 Update page collection quick reference
a4893d9ba Update multilingual.md
ed81ac6b0 Fix typo
1f522e32e Fix typo
c4611eab5 Rework introduction to templating
64154fb8f Fix typo
ad71bdfbf Miscellaneous multilingual edits
016adc81b Sync CLI docs
346a5fb02 netlify: Hugo 0.123.8
ff0bedd97 Document hugo.IsMultihost
0e234715c docs: Fix hyphens and grammar in synopsis of command 'hugo server'
c8ef1da97 Add the Hugo dedicated Quiqr CMS
59dfe253b Fix grammatical error
1c6ca8022 Standardize usage of the term open-source
e6fd6e68c Update Translations.md
f6728e79b Update AllTranslations.md
18812d030 Fix typo
3b2d738c9 Correct isCJKLanguage description
a1188fe28 Bump version references
b51bd5548 Sync and vendor theme
da3ba4902 Replace the github logo png with svg
f75112195 Add diego to developer tools
a4b001470 netlify: Hugo 0.123.7
c37107fda Fix typo
37c1d9c92 Fix typo
48a5ac213 Correct description of MENUENTRY.Title
f434e25e8 Correct RESOURCE.Title example
de03cd28c netlify: Hugo 0.123.5
3c103d0f9 Revise and improve RESOURCE.Name and RESOURCE.Title examples
4aafbb2f4 netlify: Hugo 0.123.4
f2bf6c365 Clarify archetype context
98ddc91a2 List page kinds to which a taxonomy term may be applied
6094e59bb Remove refs to RESOURCE.Key
208d44a04 Update Key.md
46dd28266 Document the capitalizeListTitles site config option
2ed3b7732 netlify: Hugo 0.123.3
73d35c02f Merge branch 'tempv0.123.3'
93eb216ca js: Support JSX and JSXImportSourceOptions
c0cd22cc8 netlify: Hugo 0.123.2
94256ecd0 Add "comma" to list of comments solutions
6a4f38fc3 Update RESOURCE.Name examples
8cf5046f5 netlify: Hugo 0.123.1
c11c8e0da Fix link to embedded code block render hook for GoAT diagrams
08c4af7af Fix typos
1c20eb91a Update all transform.Unmarshal examples
d41da7450 Clarify functionality of sectionPagesMenu
5bb3752f7 Update list of methods that use logical path
fcab32c62 Update version strings
5770d37c0 Add new-in badge to images.Dither
9f9a9315f Remove variables section
313b1d85e Define and describe the concept of a logical path
97a8d2963 Document HUGO_MEMORYLIMIT
c60cd20a8 Capitalize the word Markdown throughout the documentation
f9b5938dd Create links to referenced embedded templates
df31318d1 Improve quick start guide
a76fa0de4 Rework Netlify hosting instructions and examples
a3184764d Provide examples of content rendering before accessing Scratch or Store
0206b9699 Include examples of building from source
ab268c395 Create FAQ reqarding file watcher
c89cf2baa More updates for v0.123.00
b8d5383f7 Replace links to variable pages with links to method pages
ad4a124c0 Updates for v0.123.0
24eda1cb0 netlify: Hugo 0.123.0
f7436b6a3 Merge commit '2658a71e1b'
da2d6ba11 docs: Regen docshelper
411374a58 Add images.Dither filter
36937d58d docs: Regen CLI docs
7c4b77317 docs: Regenerate docshelper
a9f56bf9b Merge commit '6efb279bfa'
b3346da53 docs: Make null booleans falsy in the docs helper
88286d1ea docs: Regen docs helper
a8ad989c6 Merge commit '9b0050e9aa' as 'docs'
fc7de7136 docs: Prepare for new sub tree
1083bf7c0 releaser: Prepare repository for 0.123.0-DEV
b9a03bd59 releaser: Bump versions for release of 0.122.0
e0021f496 build(deps): bump golang.org/x/tools from 0.16.0 to 0.17.0
d25902c0d build(deps): bump github.com/rogpeppe/go-internal from 1.11.0 to 1.12.0
50042ee1f docs: Regen docshelper
3758456b3 Merge commit '7125ad401a'
7125ad401 Squashed 'docs/' changes from 4dd2d6415..3b1a8579d
d0d2c6795 markup/goldmark: Support passthrough extension
2dd608378 build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.0 to 2.1.1
45f52be7f build(deps): bump github.com/evanw/esbuild from 0.19.8 to 0.19.12
87bf2b968 tpl/tplimpl: Fix incorrect lastBuildDate
f281ef8a4 tpl: fix incorrect lastBuildDate
46f618756 parser/metadecoders: Accumulate org keywords into arrays
891534307 deps: Update github.com/tdewolff/minify/v2 v2.20.9 => v2.20.13
a541e3b4d Upgrade to Go 1.21.6
912c6576b parser/metadecoders: Add CSV lazyQuotes option to transform.Unmarshal
911bc60a7 README: Update minimum Go version to 1.20
5ff632332 releaser: Prepare repository for 0.122.0-DEV
6d5b44305 releaser: Bump versions for release of 0.121.2
1ccd3147a build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0
e40b9fbbc tpl/math: Add math.Rand template function
9cd8fbb33 Adjust site benchmark
abcc61002 Simplify baseline benchmark
648d00c7d resources/images: Create AutoOrient image filter
8adba648c all: Remove unused code
6f13430d4 releaser: Prepare repository for 0.122.0-DEV
00b46fed8 releaser: Bump versions for release of 0.121.1
eb9f1eb65 Upgrade to Go 1.21.5
5186e762a releaser: Prepare repository for 0.122.0-DEV
e321c3502 releaser: Bump versions for release of 0.121.0
255e0a971 docs: Regen docshelper
558f3258a build(deps): bump github.com/alecthomas/chroma/v2 from 2.11.1 to 2.12.0
6580cd30a docs: Adjust last merge from docs repository
7617de86c docs: Regen docs helper
d19ed4d4e Merge commit '35dec7c96f'
35dec7c96 Squashed 'docs/' changes from 4d936aee6..4dd2d6415
9f978d387 Pull in the latest code from Go's template packages (#11771)
14d85ec13 tpl: Allow using page resources on the images page parameter for `opengraph`, `schema` and `twitter_cards` templates
171836cdf hugolib: Apply titleCaseStyle to automatic section pages
9ea7103db tpl/urls: Retain query and fragment with absURL and absLangURL
3fc42da3d markup: Add Level to Heading struct
d24da1712 tpl/fmt: Print suppression help with erroridf
4583b4130 tpl/transform: Display Chroma highlighting errors
507f4e356 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.8 to 2.20.9
a7e721e02 build(deps): bump github.com/spf13/cast from 1.5.1 to 1.6.0
2627b91d3 build(deps): bump github.com/getkin/kin-openapi from 0.121.0 to 0.122.0
6d4b01241 github: Fix CI build on Windows
e536d461a build(deps): bump golang.org/x/image from 0.13.0 to 0.14.0
bfc325f56 deps: Update github.com/tdewolff/minify/v2 v2.20.7 => v2.20.8
36a60f65d build(deps): bump github.com/spf13/afero from 1.10.0 to 1.11.0
de2fcc5e1 build(deps): bump github.com/evanw/esbuild from 0.19.7 to 0.19.8
26a8ec207 Fix handling of dropped error in test
9ca889ba4 build(deps): bump google.golang.org/api from 0.151.0 to 0.152.0
e2a624dd6 common/para: Skip flaky test on CI
4fb40ee87 deps: Upgrade to libwebp 1.3.2
bc93a3613 build(deps): bump github.com/aws/aws-sdk-go from 1.48.4 to 1.48.6
3e5bc6f3b build(deps): bump golang.org/x/tools from 0.15.0 to 0.16.0
7c47036f1 build(deps): bump github.com/getkin/kin-openapi from 0.120.0 to 0.121.0
4d07e1fe8 build(deps): bump github.com/bep/logg from 0.3.0 to 0.4.0
1c41232e6 deps: Upgrade to github.com/bep/simplecobra v0.4.0
f11ca0fad build(deps): bump github.com/aws/aws-sdk-go from 1.48.2 to 1.48.4
30a18e882 watcher: Skip flaky test for now
d7a2f3f98 build(deps): bump golang.org/x/tools from 0.14.0 to 0.15.0
b4c5df42f tpl/transform: Add transform.XMLEscape template function
ef12d169c build(deps): bump github.com/gorilla/websocket from 1.5.0 to 1.5.1
a62bbfa9e build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0
8d32ca223 tpl/tplimpl: Remove superfluous type attr on script elements
5887230b7 build(deps): bump golang.org/x/net from 0.17.0 to 0.18.0
a4a66b821 build(deps): bump github.com/evanw/esbuild from 0.19.5 to 0.19.7
813390b5a build(deps): bump github.com/alecthomas/chroma/v2 from 2.10.0 to 2.11.1
d528bbd6d build(deps): bump github.com/tdewolff/minify/v2 from 2.20.5 to 2.20.7
af7f6c8b3 build(deps): bump google.golang.org/api from 0.138.0 to 0.151.0
e70849ea7 build(deps): bump github.com/aws/aws-sdk-go from 1.45.14 to 1.48.2 (#11724)
dd6cd6268 resources/resource: Fix GroupByParamDate with raw TOML dates
27620daa2 common/para: Skip flaky tests on Windows
80d2fdbaa navigation: Unexport menu entry methods
805cc1773 markup/goldmark: Sync image render hook code with Goldmark
0bde6931a helpers: Fix TrimShortHTML used by markdownify and RenderString
ac7cffa7e releaser: Prepare repository for 0.121.0-DEV
f11bca5fe releaser: Bump versions for release of 0.120.4
9315a2d2c Upgrade to go 1.21.4
cee3a56a9 Add a new test helper
da2a8e640 releaser: Prepare repository for 0.121.0-DEV
a4892a07b releaser: Bump versions for release of 0.120.3
cb98e9061 tpl/tplimpl: Fix deprecation logic in embedded templates
5fa97ee96 Remove some old and unused deprecation code
4d38f4725 Add a field prefix to the deprecated log statements
80f793c38 Avoid double printing INFO deprecation messages
a9079d7a6 build(deps): bump github.com/tdewolff/parse/v2 from 2.7.1 to 2.7.3
4914b7f18 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.1 to 2.20.5
9e06fd339 releaser: Prepare repository for 0.121.0-DEV
9c2b2414d releaser: Bump versions for release of 0.120.2
ab2143368 Fix deprecation printing on info level
23fcfb7f7 tpl/tplimpl: Fix deprecation logic in RSS template
47bf2fcbe releaser: Prepare repository for 0.121.0-DEV
16fb2cae8 releaser: Bump versions for release of 0.120.1
2bedcf3d1 deps: Update github.com/tdewolff/minify/v2 v2.20.0 => v2.20.1
935999e2f releaser: Prepare repository for 0.121.0-DEV
20c3bae2c releaser: Bump versions for release of 0.120.0
29b6e133a docs: Regen docshelper
7f8ab7468 Add Solaris build
59bcc098c build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0
e26ba752d build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0
bcf07fa63 build(deps): bump github.com/alecthomas/chroma/v2 from 2.9.1 to 2.10.0
b6a756813 Make site.BaseURL and $pager.URL a string
acf01bfb7 create/skeletons: Fix menu template
27b22cd87 commands/new: Remove format flag from new content cmd
a2488b1c9 hugolib: Display correct markup identifier in error message
8f60c0c1e livereloadinject: Save some allocations
9dc608084 livereloadinject: Use more robust injection method
a349aafb7 tpl/urls: Return strings from URL functions
b8fbd4a57 transform/livereloadinject: Add benchmark
e2b2092ce build(deps): bump golang.org/x/tools from 0.13.0 to 0.14.0
f4df7b88b build(deps): bump github.com/tdewolff/minify/v2 from 2.12.9 to 2.20.0
3d9bd404e build(deps): bump github.com/mattn/go-isatty from 0.0.19 to 0.0.20
5f5e55aa8 build(deps): bump golang.org/x/image from 0.12.0 to 0.13.0
aaaf1c8df Squashed 'docs/' changes from 417593493..4d936aee6
0baa4f983 Merge commit 'aaaf1c8df5'
d3d4ab41a docs: Regenerate docshelper
28d844642 Revert "modules: Throttle the "downloading modules …" log entries"
eb5fd3127 Revert "modules: Adjust the log throttle logic a little"
3ed28e4bf resources/images: Create padding image filter
db14238ba markup/goldmark: Update the CJK extension to allow specifying line break styles
3f64b5a3d modules: Adjust the log throttle logic a little
66904097e modules: Throttle the "downloading modules …" log entries
e54139c85 tpl/collections: Make delimit return a string
3710a5ec7 Squashed 'docs/' changes from cb18a5183..417593493
705e3cd5f Merge commit '3710a5ec7e'
8c61fd254 build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0
d3145e4e5 build(deps): bump github.com/evanw/esbuild from 0.19.3 to 0.19.5
743a1da3e build(deps): bump github.com/spf13/afero from 1.9.5 to 1.10.0
123901b74 build(deps): bump github.com/bep/logg from 0.2.0 to 0.3.0
71fd79a3f Revise the deprecation logging
c4a530f10 Remove rest of the now unused emoji code
272484f8b markdown: Pass emoji codes to yuin/goldmark-emoji
de4e46603 Fix so hugo get -u updates transitively
c23a0c4a0 watcher/filenotify: Remove redundant duplicated comments
a95670b98 docs: Remove outdated note from CONTRIBUTING.md
46bdc0388 tpl/debug: Add average and median to timer output
5160c7efa tpl/debug: Add debug.Timer
e2dd4cd05 Merge commit 'e509cac533'
e509cac53 Squashed 'docs/' changes from 7ef2dbce4..cb18a5183
fd3817181 Add some convenient integration test helpers
2eca1b3cc hugolib: Deprecate .Site.DisqusShortname
625162674 tpl/tplimpl: Fix dropped error
a692278bc hugolib: Deprecate .Site.GoogleAnalytics
d4016dd5c tpl/tplimpl: Deprecate .Site.Author usage in RSS template
4910312ee tpl/tplimpl: Deprecate .Site.Social usage with internal templates
1b5f78b6b markup/tableofcontents: Return template.HTML from .Fragments.ToHTML
d5d0f420d deps: Update github.com/tdewolff/minify/v2 v2.12.7 => v2.12.9
5993afa4c commands: Update message displayed when running CLI from GUI
d1b445853 common/hugo: Add hugo.IsServer and hugo.IsDevelopment
274852bcf all: Format files with gofmt
37a2d5eb4 magefile: Update isGoLatest to check for Go 1.21
4c95389c2 resources/integrity: Return string instead of template.HTMLAttr
3af8bded2 Update README.md
46da0b7aa tpl/lang: Formally deprecate lang.NumFmt
75f56b4ce tpl/collections: Fix and deprecate echoParams
d234a963e releaser: Prepare repository for 0.120.0-DEV
b84644c00 releaser: Bump versions for release of 0.119.0
a9d19dbdd docs: Even more about images.Process
12d713176 docs: More about images.Process
6b65b2fae common: Remove unused constants
1768684d8 docs: Regen docshelper
9aec42c54 Squashed 'docs/' changes from 686c7b6eb..7ef2dbce4
eb0ed33df Merge commit '9aec42c545'
6a246d115 Add images.Process filter
ef0e7149d Add $image.Process
c32094ace google_analytics_async.html: Add deprecation warning
a262fd4dd build(deps): bump golang.org/x/tools from 0.12.0 to 0.13.0
f0d32455d build(deps): bump github.com/alecthomas/chroma/v2 from 2.8.0 to 2.9.1
e8bc8e6d0 build(deps): bump github.com/evanw/esbuild from 0.19.2 to 0.19.3
f9b3c0f48 Add images.Opacity filter
11fcda971 build(deps): bump github.com/aws/aws-sdk-go from 1.44.314 to 1.45.14
f31375d4c build(deps): bump github.com/getkin/kin-openapi from 0.118.0 to 0.120.0
6415b599b build(deps): bump golang.org/x/image from 0.11.0 to 0.12.0
1e9b87f76 Upgrade to Go 1.21.1
275c0acbf commands: Update CLI docs with the important -u flag in hugo mod get
f9163155d create/skeletons: Improve viewport meta tag
79a17d9e5 Fix tests for Go 1.21.1
75c0f8828 commands/gen: Remove default highlight style
18ce85462 Fix recently broken benchmark
69f5bad40 Adjust baseline benchmarks
525bed991 commands: Print language code after web server address info
2ae4786ca releaser: Prepare repository for 0.119.0-DEV
da7983ac4 releaser: Bump versions for release of 0.118.2
df5d76fed release: Revert to building with Go 1.20
7362ba220 releaser: Prepare repository for 0.119.0-DEV
0eb480aa1 releaser: Bump versions for release of 0.118.1
7e9092eee Revert to bullseye as the release build image
0200eaf58 releaser: Prepare repository for 0.119.0-DEV
28b640a22 releaser: Bump versions for release of 0.118.0
db45dbbee Merge commit '77b976dd92'
77b976dd9 Squashed 'docs/' changes from a7e1e9be8..686c7b6eb
e847a98db docs: Regen docs helper
45c9bbc6c Don't use the OS environment when creating config for docs
94fbab2a8 Delay the creation of cache directories until they're used
c3f273b2d deploy: Create AWS session for CloudFront invalidation via Go CDK
d7dcc76d2 markup/goldmark: Add CJK extension
9bf76fd7e build(deps): bump google.golang.org/api from 0.134.0 to 0.138.0
15d3e48ce Fix RegularPagesRecursive for the home page
b2a02c3c5 build(deps): bump golang.org/x/tools from 0.11.1 to 0.12.0
6821d6f15 build(deps): bump gocloud.dev from 0.33.0 to 0.34.0
93c7ad12e build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.9 to 2.1.0
d2ae9e136 testscripts: Move hugo new tests to where they belong
3a8aad6b1 Fix .RawContent for empty content pages (#11407)
a7b93e656 hugolib: Handle dropped error
65871d5cf common/loggers: Fix typo in option name
2e4bf89ec misc: Change dart-sass labels in workflows and snapcraft
ebaa733d4 Make sure resources directory isn't created in hugo new theme
24b1be45c Go 1.21 Upgrade
111f02db2 testscripts: Make mod vendor test stable
8a08f91d5 dockerfile: Update Docker images
dcf425c84 Fix it so disable a module does not disable transitive dependency required by others
9a8c84d60 create/skeletons: Move theme's site config to top level
a19d03b0e build(deps): bump github.com/yuin/goldmark from 1.5.5 to 1.5.6
cdf0b3b7a modules: Make new cache directories read/write
d979831db deploy: Update InvalidateCloudFront to use Go CDK helper
bcf7421ea Avoid escaping HTML chars inside hugo_stats.json
b6538532f commands/new: Embed site and theme skeletons
90944aa26 docshelper: Improve template lookup order descriptions
db7bc4969 build(deps): bump github.com/evanw/esbuild from 0.18.17 to 0.19.2
a2f6400d6 cache: Hide IsResourceDir from the exported config
7d74cd0cc commands: Handle floats without decimals in hugo config
d139f3023 docs: Replace docs.json with docs.yaml
b1b691241 config: Add a type value for the tags related config entry
0de81c643 build(deps): bump golang.org/x/net from 0.13.0 to 0.14.0
851bf3515 Add all config to docshelper.json
d4a6c16c1 build(deps): bump golang.org/x/image from 0.10.0 to 0.11.0
5d5fb22ea Merge commit '7c62d6ef16'
7c62d6ef1 Squashed 'docs/' changes from c43daf45f..a7e1e9be8
641390f8f Try to make test more stable
2e6191b2e deps: Sync go-i18n with upstream
22861cb4d Return original error on resources.GetRemote retry timeouts
16da1ade7 testing: Write test caches to /tmp
a3d42a277 Add retry in resources.GetRemote for temporary HTTP errors
2c20fd557 build(deps): bump gocloud.dev from 0.24.0 to 0.33.0
243736e75 build(deps): bump golang.org/x/net from 0.11.0 to 0.13.0
bf891c225 build(deps): bump github.com/marekm4/color-extractor from 1.2.0 to 1.2.1
da0df0ada build(deps): bump github.com/frankban/quicktest from 1.14.5 to 1.14.6
0885f8ec2 build(deps): bump golang.org/x/image from 0.9.0 to 0.10.0
61be050a9 build(deps): bump github.com/clbanning/mxj/v2 from 2.5.7 to 2.7.0
65af75fb0 build(deps): bump golang.org/x/tools from 0.9.3 to 0.11.1
2d75f74b8 build(deps): bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3
2ac3d6160 build(deps): bump github.com/hairyhenderson/go-codeowners
ade7ec818 Add Page.RenderShortcodes
8fa8ce3e4 Update GitHub issue template
9dce45c25 build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.8 to 2.0.9
239f2e2c9 releaser: Prepare repository for 0.117.0-DEV
3e1ea030a releaser: Bump versions for release of 0.116.1
30885a6c5 Fix module config watch regression
58da8554c deps: Fix Chroma dependency version
92c159437 releaser: Prepare repository for 0.117.0-DEV
5a7e0da84 releaser: Bump versions for release of 0.116.0
d7db096a9 build(deps): bump github.com/evanw/esbuild from 0.18.11 to 0.18.17
c1df5b1b0 config: Do not fail on unknown config keys
be8e2de59 resources: Fix spelling in method name
d297c8e1b docs: Regenerate CLI docs
fbb8eb39e Fix so temporary images do not get published
87d9bffe7 readme: Fix link
d9fdcbe93 commands: Update cacheDir description
295d73388 Update where.md
d5247788e docs: Update where
036e260d8 docs: Update where function operators
a50356b9a docs: Rework the cacheDir documentation
8859be1c0 Merge commit '87de22d746'
87de22d74 Squashed 'docs/' changes from 85befbb4d..c43daf45f
bec9b80d9 Deprecate taxonomyTerm
1c97095ac Warn about unknown kinds in disableKinds
b3cb6788b Move all Kind constants to its own package
5542f02fb build(deps): bump github.com/rogpeppe/go-internal
0bc7ed9a1 build(deps): bump golang.org/x/image from 0.8.0 to 0.9.0
36b512605 Remove unused autogenerated method
2589b1295 commands: Replace deprecated ioutil with os
ef6e813ca tpl/collections: Add BenchmarkWhereOps
f4598a098 tpl/collections: Add like operator to where function
dc2a544fa tpl/collections: Fix description of apply function
916397320 snap: Set cache location to $HOME/.cache/hugo_cache
b3f10556f Use os.UserCacheDir as first fallback if cacheDir is not set
4d7af757c Add a common regexp cache
7f058b8ba Fix multiple languages in HUGO_DISABLELANGUAGES
575d7f806 snap: Allow access to SSH keys and $HOME/.config/hugo
739d10e8b deps: Upgrade github.com/yuin/goldmark v1.5.4 => v1.5.5
0dbe0f1a0 releaser: Prepare repository for 0.116.0-DEV
dc9524521 releaser: Bump versions for release of 0.115.4
d70b6c7d0 Fix broken handling of legacy taxonomyTerm in disableKinds
d947db371 commands: Move testscript into its correct place
d8c94c354 publisher: Improve class collector for dynamic classes
6bbec9001 Fix cache busting setup
5bd22ba85 commands: Delay server builds after the watcher is set up
7ae62f4aa Create hugo_stats.json if it's mounted but does not exists
f1a061e9e Re-instate disableLiveReload as a config option (and not just a flag)
2f11e673c common/htime: Fix localization of abbreviated month names
387c5f60f Improve error messages for PostCSS etc.
c406fd3a0 Fix setting config from env with complex (e.g. YAML) strings
286821e36 Fix for data mounts in sub folders
79f15be5b releaser: Prepare repository for 0.116.0-DEV
5c2e014a5 releaser: Bump versions for release of 0.115.3
cc44583cc Improve behavior of defaultContentLanguageInSubdir when only the default language is enabled
4da672af8 Return error when .Render is invoked without arg
f1886f8c3 js: Pass tsconfig.json to esBuild
5bec50838 tpl/collections: Fix WordCount (etc.) regression in Where, Sort, Delimit
f650e4d75 config/allconfig: Update timeout description
c934a4506 docs: Refresh docs.json
91b02091a releaser: Prepare repository for 0.116.0-DEV
8966424e0 releaser: Bump versions for release of 0.115.2
72510969a snap: Allow access to AWS, Azure, and GCS config/credentials
70c5e485b snap: Update metadata and security.exec.osEnv
a78b17d7f Make imageConfig work with modules
a48194253 Restore language.disabled config
0f921ace6 Fix hugo mod vendor for modules with hugo.toml
601995376 Fix static content files multilingual root regression
92e86702e Fix defaultContentLanguageInSubdir with only 1 language
6c9ea022a config: Expand default security.exec.osEnv policy
12d3469dd Add titleCaseStyle none and firstupper
bf7ee8a91 Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0
d912491f2 releaser: Prepare repository for 0.116.0-DEV
857374e69 releaser: Bump versions for release of 0.115.1
c27639b9a docs: Regen docs helper
ceb486f98 Fix buildStats when tags and classes are disabled
5afc89f2b Rework the build.writeStats struct
c1eac616d snap: Explicitly set security.exec.osenv during build
3c8256a13 snap: Restore security.exec.osenv whitelist
19d76ae96 github: Build for Dragonfly in CI build
11ecea610 Make build.writeStats a struct
da98724bc build(deps): bump github.com/evanw/esbuild from 0.18.10 to 0.18.11
4d470bb73 build(deps): bump github.com/alecthomas/chroma/v2 from 2.7.0 to 2.8.0
0ff8e13c1 commands: Fix index out of range in hugo mod get
ffd37d4f7 Only print the path warnings once
b4b65245b Update README.md
87886f40d releaser: Prepare repository for 0.116.0-DEV
67caf5069 releaser: Bump versions for release of 0.115.0
7917961d5 Misc permalinks adjustments
80ecb9589 commands: Handle hugo mod get --help
58e09cc6c Update README.md
635cc346c commands: Fix panic when running hugo new theme without theme name
12646750a Print help message when triggered with no flags
79639c981 Fix output formats and media type  per language config regression
9b313cec1 build(deps): bump github.com/evanw/esbuild from 0.18.5 to 0.18.10
b74b8d647 common/collections: Fix append regression to allow appending nil
793e38f5c commands: Fix help message for hugo new theme
7f698c893 Don't panic on invalid security whitelist regexp
fa0e16f4c Fix false path warnings with resources.PostProcess
12e4c4d5d docs: Update permalinks documentation
bac03f407 Merge branch 'master' of github.com:gohugoio/hugo
cc14c6a52 resources/page: Allow section and taxonomy pages to have a permalink configuration
e3308a0bb tpl/tplimpl: Fix typo in global variable name
019299b0b commands: Enable format flag with hugo new site
23ed087c4 Update README.md
a018259bc Merge branch 'release-0.114.1'
ad5e04daa releaser: Prepare repository for 0.115.0-DEV
e9b716ad9 releaser: Bump versions for release of 0.114.1
ae31dbdd1 Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.30.0"
5b4bfc2db Fix broken nodeploy setup
92f55f112 build(deps): bump github.com/niklasfasching/go-org from 1.6.6 to 1.7.0
078226dd6 Fix broken nodeploy setup
06d228aad snap: Switch from Embedded Dart Sass to Dart Sass (#11146)
b1016d2e2 commands: Make hugo env respect --logLevel
49336bfc5 commands: Update Jekyll post-import output
941818295 build(deps): bump gocloud.dev from 0.24.0 to 0.30.0
5491e5547 build(deps): bump github.com/evanw/esbuild from 0.18.4 to 0.18.5
bf7af9043 deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.7
5e12bf7dc releaser: Prepare repository for 0.115.0-DEV
9df2ec798 releaser: Bump versions for release of 0.114.0
59300faae Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0"
9f98b3e71 docs: Regen docshelper
3ab84651c Add empty Environ when loading test config
7241b5fd5 docs: Regen CLI docs
6dfbd2479 common/loggers: Drop the bold INFO etc. prefixes
f59c3c021 loggers: Avoid using Logf for the LevelLoggerToWriter
3ca29b156 tocss/dartsas: Avoid using Logf for the internal Dart Sass logging
fdb0b7fb1 helpers: Remove superflous formatting flag in deprecation warnings
49dd53a40 Revert "deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6"
68d9d3ebd all: Fix some typos
9009c8cdc all: Fix typos in function names and comments
12dc9a6e4 deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN)
1b85303ac common/loggers: Re-add trailing newline in logger.Printf
8a04d47ab build(deps): bump github.com/evanw/esbuild from 0.18.3 to 0.18.4
7c9fada77 Replace the old log setup, with structured logging etc.
0e7944658 Revert "snap: Transition base snap from core20 to core22 (#11101)" (#11125)
aaf2e9693 build(deps): bump github.com/evanw/esbuild from 0.18.2 to 0.18.3
ee359df17 Fix upstream Go templates bug with reversed key/value assignment
0f989d5e2 build(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0
f73c56753 common/collections: Always make a copy of the input slice in Append
d178fe94f tpl/collections: Fix append when appending a slice to a slice of slices
732dcb848 build(deps): bump google.golang.org/api from 0.123.0 to 0.127.0
944859f1a build(deps): bump golang.org/x/tools from 0.9.1 to 0.9.3
90b2674dd Re-add site.RSSLink (and deprecate it)
bb9377b5e build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.11 to 2.2.12
e88f1b80b build(deps): bump github.com/getkin/kin-openapi from 0.117.0 to 0.118.0
516f0cb6c build(deps): bump golang.org/x/net from 0.10.0 to 0.11.0
21d17566a Fix .Width and .Height for animated gifs
35e9b3ed1 snap: Transition base snap from core20 to core22 (#11101)
3c1deaf20 Squashed 'docs/' changes from 1d5548d73..85befbb4d
a0009e070 Merge commit '3c1deaf201'
7bed16c30 build(deps): bump gocloud.dev from 0.24.0 to 0.29.0
2ba2271e4 tpl/math: Allow variadic math functions to take slice args, add math.Product, math.Sum
60a2cdf72 Fix config merge regression with root slices (e.g. disableKinds)
e08cfc8ca build(deps): bump golang.org/x/image from 0.7.0 to 0.8.0
ef147f4e8 commands: Remove flags log, verboseLog, add flag logLevel, deprecate flags verbose and debug
489519566 build(deps): bump github.com/magefile/mage from 1.14.0 to 1.15.0
91c0b0f76 build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.6 to 2.0.8
baef235d5 build(deps): bump github.com/evanw/esbuild from 0.17.19 to 0.18.2
0541a1b57 Fix handling of aliases (e.g. hugo serve)
258884f44 cache: Set default cache path based on $USER
254c2b323 build(deps): bump go.uber.org/atomic from 1.10.0 to 1.11.0
84f71ba8f build(deps): bump github.com/hairyhenderson/go-codeowners
69f0e88a4 resources: Remove failing and superflous test assertion
82adc972e build(deps): bump github.com/frankban/quicktest from 1.14.4 to 1.14.5
60533fdc0 build(deps): bump github.com/mattn/go-isatty from 0.0.17 to 0.0.19
261143bbb build(deps): bump github.com/spf13/afero from 1.9.3 to 1.9.5
b8526f32f commands,config: Fix typo in log and error messages
ed7e25006 helpers: Avoid url.Parse in RelURL and AbsURL if we can
6a09e7f28 Adjust benchmarks
29e5cbb69 Adjust benchmark
ded686600 Add BenchmarkAbsURL
e1d43021c helpers: Improve schema detection when creating relative URLs
5db215d4d helpers: Add a basic benchmark for RelURL
b7dc93ca1 config: Remove unexpected _merge keys introduced in author and social maps
f210188da Upgrade to v2 of the Dart Sass Embedded Protocol
c782ebd89 Fix indented SASS imports for Dart Sass
73779707a releaser: Prepare repository for 0.114.0-DEV
085c1b3d6 releaser: Bump versions for release of 0.113.0
6c955cc3d docs: Regenerate CLI docs
5446900de commands: Update CLI docs vs server and production
cf38c73f5 commands: Add TLS/HTTPS support to hugo server
536bf71ab releaser: Prepare repository for 0.113.0-DEV
ea3c95a7b releaser: Bump versions for release of 0.112.7
5e5ce00d4 Fix menuItem.URL when pageRef is not set
a191b38ac Don't inject livereload script on hugo -w
382c726e6 markup: Fix typo in function and struct names
4c46f9400 all: Replace deprecated ioutil with io and os
8c7a4e995 releaser: Prepare repository for 0.113.0-DEV
2ca0fcc44 releaser: Bump versions for release of 0.112.6
a6d774e80 docs: Regenerate CLI docs
dfb1895e4 Squashed 'docs/' changes from 1798dc0d5..1d5548d73
9e4072ac2 Merge commit 'dfb1895e4b'
0ef295284 commands: Add --lang to hugo config
e3ae8f025 Make sure any default mounts show up in "hugo config"
06faee5be github: Fix Windows build
409c6c3fc deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6
ff77a927f tpl/tplimpl: Use .Language.LanguageCode in built-in templates
9cdca1f95 Fail on invalid defaultContentLanguage
6462eecfb Avoid panic in invalid language config
a7d6b1413 Don't panic on empty yaml config params
3f497d496 Prevent double escaping of image alt-text in Goldmar typographer
32585696b Fix potential deadlock in ByParam
d47225ce9 releaser: Bump versions for release of 0.112.5
e3dfc76fa Fix it so languageCode on top level config still works
cd59216de releaser: Prepare repository for 0.113.0-DEV
e285153d7 releaser: Bump versions for release of 0.112.4
20ea2e0c6 docs: Regenerate CLI docs
51d0a0ab0 commands: Add the common build flags to the config commands
fd099331e Fix Processed images count regression for multiple languages
43f1282e7 commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod
e96cdfe96 Don't create the public folder unless needed
ffdbce578 docs: Regen CLI docs
a838a27e4 Merge commit 'd3927310d5'
d3927310d Squashed 'docs/' changes from 39af43ef1..1798dc0d5
273d9f69a commands: Fail the build when no config file or config dir
a6257d8a4 langs: Remove the Language.Params deprecation message for now
6c2db0dfb Add language.LanguageCode
8f293a185 Fix --renderStaticToDisk regression
901cd970d commands: Re-introduce the -f shorthand for hugo new site
f86b5f70a commands: Move the --format flag to only the commands that support it
3297b395d releaser: Prepare repository for 0.113.0-DEV
ba6f74e40 releaser: Bump versions for release of 0.112.3
231374a1f Fix regression when loading config  -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set
5adc83790 releaser: Prepare repository for 0.113.0-DEV
f89108f2b releaser: Bump versions for release of 0.112.2
dd6792201 minifiers: Make sure JS.Version always has a value
9a235d0af Fix regression with site.IsServer when not running a server
99407c39b releaser: Prepare repository for 0.113.0-DEV
7c90c19d2 releaser: Bump versions for release of 0.112.1
ed906a86e Fix regression when config for OutputFormat.BaseName is an empty string
d666edad7 releaser: Prepare repository for 0.113.0-DEV
0a95d6704 releaser: Bump versions for release of 0.112.0
70b2aaf87 circleci: Add github.com to known hosts
f01492115 Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0"
bd38e35f9 Revert "postcss: Improve validation of option 'config'"
85b13c105 Add --format to hugo config
b6e6438f7 docs: Regen docshelper
943ff7f7c commands: Add missing gen docshelper command
288be1976 Fix "unknown command" message when no suggestion
9a0370e8e postcss: Improve validation of option 'config'
10d0fcc01 docs: Regen CLI docs
b95e15694 Merge commit 'f96384a3b5'
f96384a3b Squashed 'docs/' changes from 6e32d0591..39af43ef1
4cac5f5e3 Avoid writing to hugo_stats.json when there are no changes
2c3d4dfb7 Add cache busting config to support Tailwind 3
1292d5a26 build(deps): bump github.com/tdewolff/parse/v2 from 2.6.5 to 2.6.6
baa556904 build(deps): bump gocloud.dev from 0.24.0 to 0.29.0
a5413c1f8 build(deps): bump github.com/gobuffalo/flect from 0.3.0 to 1.0.2
9cea58a8a build(deps): bump golang.org/x/image from 0.5.0 to 0.7.0
1a5dce4cc build(deps): bump github.com/tdewolff/minify/v2 from 2.12.4 to 2.12.5
6ca8a40f2 commands: Make all list commands list what 'all' did before
2db7ec622 tpl/tplimpl: Add img loading attribute to figure shortcode  (#10927)
e6dc8053b commands: Fix build logic when listing expired/future draft content
2637b4ef4 Allow whitelisting mediaTypes used in resources.GetRemote
7c7baa618 Add hugo.WorkingDir
4f085e80d Make language merging of markup etc. config without values in the root
150d190ff tpl/urls: Return empty string when JoinPath has zero args
065ae003a build(deps): bump github.com/dustin/go-humanize from 1.0.0 to 1.0.1
1a7d57c0b build(deps): bump google.golang.org/api from 0.76.0 to 0.123.0
bba54e694 build(deps): bump golang.org/x/tools from 0.4.0 to 0.9.1
737054311 build(deps): bump github.com/cli/safeexec from 1.0.0 to 1.0.1
f6269ee92 build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.117.0
715d48404 deps: Update github.com/evanw/esbuild v0.17.0 => v0.17.19
0a51dfac9 commands: Fix data race
c371171ab deps: Update github.com/alecthomas/chroma/v2 v2.7.0
d6197a41f Re-add --printUnusedTemplates and --printPathWarnings
e4e0313c8 tpl/urls: Fix build broken by a merge
5b3e165ba tpl/urls: Add JoinPath template function
03cb38e6c Allow legacy taxonomyTerm in disableKinds
ad4bc969d Fix warn message about custom params on the language top level
4003c7903 Fix some spelling mistakes
610cedaa6 all: Fix comments for exported functions and packages
24e7d0c17 deps: Update github.com/bep/golibsass v1.1.0 => v1.1.1
008170c8a Make GOMAXPROCS to be CPU limit aware
7c647bcae Allow empty params.mainSections
95818e27d modules: Fix format flag in error
3f00f4753 commands: Load config before creating the filesystem
834b3d7e4 Fix some recently introduced error handling issues
1155bbca9 tpl/lang: document delimiter option for FormatNumberCustom
86b2a2743 Re-add site.LanguagePrefix
35955f50e github: Trim the test flow a little
8a69ccbb0 commands: Improve the common build flag handling
7ce033a89 Support, but warn, about top level language custom params
05542130b Handle transient errors in config loading etc.
5251f015b Re-establish all the server flags
5d857165f Deprecate site.Language.Params and some other fixes
0106cf1a6 Revert "Make GOMAXPROCS CPU limit aware"
59050f97f Make GOMAXPROCS CPU limit aware
faa6998f2 Add Sections to Site interface
3d90871e9 helpers: simplify path tests with T.TempDir
bda082c98 tpl: Add math.Abs
241b21b0f Create a struct with all of Hugo's config options
6aededf6b Improve date parsing performance for the common case
0988b76a7 Add a counter helper
e0e19a934 Expand the baseline benchmark a little
bcd7ac770 Revert "Update syntax-highlighting.md (#10929)" (#10930)
a4fb8dc6b Update syntax-highlighting.md (#10929)
4f341fa1a Update README.md
5c7b79cf7 tpl/strings: Clarify findRESubmatch description
0cb6ca590 langs/i18n: Fallback to defaultContentLanguage instead of English
f1062519a tpl/debug: Add VisualizeSpaces
46a3cf618 Update README.md
9906c1ae5 Prevent the global error collector to panic when sending on closed channel
5596dc24a markup/goldmark: Add config options for the typographer extension
d01731d53 readme: Fix build command
f1e8f010f Update README.md
5748133d5 Add test for ToC vs include
05c095a0e resources.functions: improve validation
891b2918d resources: Fix typos in error message and variables
b0b1b76dc markup/goldmark: Fail on invalid Markdown attributes
0fbab7cbc commands: Fix data race in test
f5eddf89b tpl/math: Return error if less than 2 input numbers
0e8ab20a8 releaser: Prepare repository for 0.112.0-DEV
5d4eb5154 releaser: Bump versions for release of 0.111.3
1c841ec91 deps: Update go-org to v1.6.6
e7148f335 Fix "unknown shortcode token" when calling shortcode within fenced code block
d55af2abf Run gofmt -s on source files
b6f44aaf1 docs: Improve examples of variadic math functions
84201e8d5 tpl/math: Allow multi numbers in add, sub, mul, div, min and max
04b981164 readme: Update dependency list
9818724b5 Improve error message for unclosed shortcode with inner content
34a86e13f Don't fail when calling Paginate with an empty pages.PagesGroup
0f01bd463 server: Replace golang.org/x/net/context with context
d171d1543 tpl: Add hasSuffix alias
02ab77da3 watcher: use time.NewTicker to prevent leaks
873be9f90 ensure we default to 10 correctly
bebb2b8d0 switch transfers to workers
e6f029bde customize parallel transfer count
bdbfacb86 metadecoders: Add support for native org dates in frontmatter PR #7433 added support for Org timestamps for the DATE header. This PR widens the support with additional front matter headers LASTMOD, PUBLISHDATE and EXPIRYDATE.
32ea40aa8 releaser: Prepare repository for 0.112.0-DEV
4164f8fef releaser: Bump versions for release of 0.111.2
b83050cb4 Fix .Fragments when called cross sites on uninitialized output format
df5608f8a Allow page.TableOfContents on self in shortcode
f56ce01ae tpl/partial: Consolidate GoDoc
3bbeb5688 Fix "context canceled" with partial
184a67ac4 cache: Fix --gc failure on Windows
6c798eba6 Page context handling in i18n
ec1c97e7e Work around --gc failure on Windows <= 10
f10009e7f Update to Go 1.20.1
a950950f1 snap: Fix dart-sass-embedded installation
36ce3a4a9 Correct typos in Go comments
17e60b77e releaser: Prepare repository for 0.112.0-DEV
39a4a3cf6 releaser: Bump versions for release of 0.111.1
52f339dad Merge branch 'release-0.111.0'
eef23a7f2 Fix "page" not defined
18cf75805 releaser: Prepare repository for 0.112.0-DEV
3fa8bb831 releaser: Bump versions for release of 0.111.0
db9f74d24 Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)"
60e6fa798 build: Bump build images
7e51ba03c build: Update Linux ARM build image
66f94b494 tpl/tplimpl: Remove the Google News internal template
c0d15a289 strings: fix Truncate behavior for formatted html
2a61910e8 tpl/strings: Adjust benchmark
079d1b654 tpl/strings: Add BenchmarkTruncate
a56b9071d cods: Regen docs helper
5c317c55e Move the Related doc counter to prevent a race
a669467d9 Misc ioutil deprecation adjustments
d453c1274 Replace deprecated ioutil with io and os
336622d5e Squashed 'docs/' changes from 36dd5483f..6e32d0591
97b010f52 Merge commit '336622d5e7'
4d36b99a4 build(deps): bump github.com/tdewolff/parse/v2 from 2.6.4 to 2.6.5
807237bc0 build(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17
79b03b3f7 build(deps): bump golang.org/x/image
e31441031 Remove unused temp directory
39cc3a2a7 exif: Return the proper exposure time value in some special cases
ce524d0b5 Add a page template func
2662faf61 dartsass: Import CSS without extension at compile time
271318ad7 Split parse and render for Goldmark
e442a63bb related: Add config option cardinalityThreshold
d5601e839  docs: Another fix related docs example
cedd04db3 docs: Fix related docs example
4bf91b975 build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0
ae48507d6 Fix shortcode error when closing without .Inner
7d78a498e Throw an error when shortcode is expected to be closed
0dbeac80c Add some shortcode testcases
b99d073ca sass: Remove some unused leftover code
e965cb679 resources/sass: Remove debug statements
cf591b7c0 Squashed 'docs/' changes from 1214f6ffb..36dd5483f
7e539cb39 Merge commit 'cf591b7c0c'
586fea0de page: Move the cache double check right after the lock
fa2d7adf1 page: Add some concurrency to the building of the related page index
4346987fa related: Adjust benchmark
2dad13c0e create: Fix typo in error message
ecf3cd514 tocss: Simplify the hugo:vars type handling
a1a9c08b5 resource_transformers/tocss: Fixed hugo:vars casting
6abd15e78 Adjust tests for GO 1.20
094135ff9 tpl/internal: Sync Go template src to Go 1.20
4801e2e8e build: Update to Go 1.20
90da7664b Add page fragments support to Related
0afec0a9f related: Adjust benchmark
28540ed13 related: Add benchmark
9af78d110 tpl/collections: Improve error message in Index
d33a7ebcc Make the HTML collector parsing more robust
2a364cca6 Revert "build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0"
3fb2417cb deps: Upgrade github.com/yuin/goldmark v1.5.3 => v1.5.4
fce089048 tpl/strings: Add strings.ContainsNonSpace
87c78bd3e build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0
69c369e11 deps: Upgrade github.com/alecthomas/chroma v2.4.0 => v2.5.0
73ece30d8 markup: Fix linenos codeblock hl option case regression
f9fc0e045 Fix slow HTML elements collector for the pre case
4f4a1c00b publisher: Add benchmark
76c6140c5 snap: Install dart-sass-embedded for 32-bit ARM (armhf) too
d4482e8bf snap: Add read access for ~/.gitconfig.local and ~/.config/git/* too
1477d0ba9 commands: Fix server url rewrites (http status 200)
dd37163f5 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.10 to 2.2.11
c3a59a7d5 build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)
4ccc8cfb4 Fix description of collections.Uniq
e2cfc3d5a Update CONTRIBUTING.md
168858331 Fix shortcode detection in RenderString
4ef9baf5b Only invoke a given cached partial once
93ed6e447 Update README.md
0d1161b26 releaser: Prepare repository for 0.111.0-DEV
e32a493b7 releaser: Bump versions for release of 0.110.0
19e960562 dos: Regen CLI docs
80e8bd3b7 docs: Regen docshelper
b661132e0 Merge commit 'ef6f101e75'
ef6f101e7 Squashed 'docs/' changes from 2c0125b52..1214f6ffb
d59541903 related: Handly []any
671f64b2e Fix permalinks issue with repeated sections
2fb40ece5 tpl/strings: Add findRESubmatch
c6b388769 config/security: Add O\w+ (e.g. GOROOT) to the default allowed list
21af5b359 Preserve front matter slice value types (e.g. int)
f38a2fbd2 Make hugo.toml the new config.toml
6a579ebac Add fill HTTP Response info into .Data in resources.GetRemote
f13531e60 Fix HEAD method in resources.GetRemote
b5d485060 Fix order when reading custom headers in resources.GetRemote
6e9fa9e0f deps: Upgrade github.com/evanw/esbuild v0.15.18 => v0.17.0
c4f3a46ce Update README.md
fbc3e08c6 resource: Fix Go Doc vs .Data.Integrity
e402d91ee Misc doc, code refactoring to improve documentation
3c51625c7 Make readFile return nil when file not found (note)
dd6d0a6de Remove reference to Goreleaser in code comment
f95fd57aa tpl/compare: Sort special float values as string
e754d5cb3 tpl/diagrams: Move Goat to its own file
002cd5280 Update CONTRIBUTING.md
a76c405d4 Update CONTRIBUTING.md
c0a03a2a3 Update README.md
e127d3e5c releaser: Prepare repository for 0.110.0-DEV
47b12b83e releaser: Bump versions for release of 0.109.0
180dfeba0 Adjust "you need the extended version" error message
10bb29d7f docs: Regen docs helper JSON
eb0c8f9d0 resource/page: Slight adjustment of Page.Ancestors
3a216186b resource/page: Add Page.Ancestors
7874b9681 build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0
71832328f Annotate test assertions
37ab1cf12 hugolib: Exclude non-linkable pages from translations map
59af05cab Add HUGO_PUBLISHDIR to the Node environment
4989da653 Revert "tpl/tplimpl: Use https in sitemap templates"
cd1ed563a tpl: Improve template funcs GoDoc
aa2c72419 tpl/resources: Fix data race in ToCSS
effa6a422 tocss: Add some more test cases
5d5f0a237 tocss: Fix unquote case with double quotes
d20d2651e Allow "fast render mode" even if --disableLiveReload is set
41a080b26 tocss: Add vars option
41bc6f702 Squashed 'docs/' changes from 2201ac0e5..2c0125b52
9a215d695 Merge commit '41bc6f702a'
eda1e720c modules: Improve "module workspace" not found error
330fa8941 modules: Adjust watch logic vs workspace use definitions
6db527483 Add any configured Go Workspace file to the config watcher
0d4b17d4c modules: Make the module.workspace=off as default (note)
3afaca758 release: Add a note section in release notes
2d217cba5 helpers: Allow at signs in UnicodeSanitize (note)
17055d1fa parser/metadecoders: Remove superflous cast in test
2a81a4949 parser/metadecoders: Simplify nil check in Unmarshal
e30d711c2 parser/metadecoders: Add empty /data JSON file as empty map
ad2059878 Also consider wrapped errors when checking for file IsNotExist errors
87e898a17 tpl/openapi3: Wrap *kopenapi3.T
b54de1bd9 resources/js: Fix some import discrepancies between Hugo and ESBuild
c9354d546 github: Update to Dart Sass 1.56.2
d89426985 github: Use ruby/setup-ruby
3fd0b7849 tpl/tplimpl: Use https in sitemap templates
e0e63f35e parser/metadecoders: Fix spelling
cc574ef12 releaser: Prepare repository for 0.109.0-DEV
a0d64a46e releaser: Bump versions for release of 0.108.0
f97544a83 Make the hugo env non verbose output slightly more verbose
d8efe085c Add dart-sass-embedded version info to hugo env -v
f5b5b71c6 deps: Upgrade github.com/bep/godartsass v0.15.0 => v0.16.0
b82b547ac tpl/embedded: Make Open Graph's series optional
da670c38e Squashed 'docs/' changes from 4c1309cdf..2201ac0e5
c9f2fa266 Merge commit 'da670c38ee'
5067775a6 common/hugio: Fix multiWriteCloser.Close
50549c867 build(deps): bump github.com/getkin/kin-openapi from 0.109.0 to 0.110.0
de9c5542c docs: Add basic doc for wrapStandAloneImageWithinParagraph etc.
e93138dfd dartsass: Add sourceMapIncludeSources option
7d16c3c0c github: Update Dart Sass Embedded to 1.56.1
63126c635 markup/goldmark: Add removeSurroundingParagraph for Markdown images
535ea8cc9 build(deps): bump github.com/evanw/esbuild from 0.15.16 to 0.15.18
8bbec426c build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0
0bfa293dc build(deps): bump github.com/evanw/esbuild from 0.15.15 to 0.15.16
0b976d2b4 tpl/tplimpl: Allow alternate comment syntax
a49e51fd0 resources: Increase timeout for http.Client
d373774cb tpl/collections: Fix some index cases where the indices given is a slice and be more lenient with nil inputs
7d5e3ab8a tpl: Misco GoDoc improvements
dc44bca96 config/security: Add CI env var to whitelist
da1652789 Squashed 'docs/' changes from 32cb8785e..4c1309cdf
ef518485c Merge commit 'da16527896'
83080df61 deps: Upgrade github.com/bep/godartsass v0.14.0 => v0.15.0
b8d5c378b tpl: Use consistent delimiter spacing in examples
75f782a5a docs: Regen docs helper
2221b5b30 releaser: Bump versions for release of 0.107.0
6a004b8d9 build(deps): bump github.com/getkin/kin-openapi from 0.108.0 to 0.109.0
092362242 build(deps): bump github.com/evanw/esbuild from 0.15.14 to 0.15.15
7855b47f0 Add a cache for lexers.Get
34d1150d9 markup/goldmark: Improve benchmark
85e2ac1a4 commands: Create assets directory with new site
74776726d build(deps): bump github.com/frankban/quicktest from 1.14.3 to 1.14.4
63f7f0ff5 build(deps): bump golang.org/x/tools from 0.2.0 to 0.3.0
bcb62d891 deps: Upgrade github.com/alecthomas/chroma/v2 v2.4.0
00fe7e040 hugo/parser: Fix shortcode boolean param parsing
df85cb9ae releaser: Prepare repository for 0.107.0-DEV
e08ce30fe releaser: Bump versions for release of 0.106.0
a99fed485 resources/tpl: Add a test for resources.Get
db945a6ed tlp/resources: resources.Get returns nil when given empty string
bafb389b3 build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.4 to 2.0.6
0a019a1a5 docs: Regen CLI docs
9f7fb0a73 docs: Regenerate docs helper
f04cc581e Merge commit '00c4484c70'
00c4484c7 Squashed 'docs/' changes from 392668f4f..32cb8785e
cdd83bf3c build(deps): bump github.com/evanw/esbuild from 0.15.13 to 0.15.14
e00220a06 deps: Update the libweb version string
a662ddae1 deps: Upgrade github.com/bep/gowebp v0.1.0 => v0.2.0
13adf3e02 readme: Update ToC
fe08d35f2 build(deps): bump github.com/yuin/goldmark from 1.5.2 to 1.5.3
4b675ddd4 build(deps): bump github.com/spf13/afero from 1.9.2 to 1.9.3
24eaa290c build(deps): bump github.com/getkin/kin-openapi from 0.107.0 to 0.108.0
f6ab9553f tpl/internal: Sync go_templates
58a98c775 build(deps): bump github.com/clbanning/mxj/v2 from 2.5.6 to 2.5.7
900904fd1 build(deps): bump golang.org/x/net from 0.1.0 to 0.2.0
24eca0cbe build(deps): bump github.com/evanw/esbuild from 0.15.12 to 0.15.13
60e0e2c1d Add Go 1.16+ install method to README
52ea07d2e Fix taxonomy weight sort regression
77fc74a5b releaser: Prepare repository for 0.106.0-DEV
0e3b42b4a releaser: Bump versions for release of 0.105.0
f50585442 build(deps): bump golang.org/x/tools from 0.1.12 to 0.2.0
2aedccc9a build(deps): bump github.com/getkin/kin-openapi from 0.106.0 to 0.107.0
c10931404 build(deps): bump golang.org/x/text from 0.3.7 to 0.4.0
4732c47d1 build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.1
62780ec8d build(deps): bump github.com/getkin/kin-openapi from 0.103.0 to 0.106.0
351d6b062 build(deps): bump github.com/tdewolff/minify/v2 from 2.12.1 to 2.12.4
631d768be Revise the fix for shortcode vs output format nilpointer
e5d2a8f6a Avoid nilpointer when shortcode page content output nil
00ff161b6 livereload: Use text/javascript here, too
588710a7a media: Rename application/javascript, application/typescript to text/javascript etc.
ed930db2f build(deps): bump github.com/yuin/goldmark from 1.4.15 to 1.5.2
05df96481 build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0
20ef6dcf9 Skip flakey server tests on GitHub Action on Windows
9860e0e18 build(deps): bump github.com/magefile/mage from 1.13.0 to 1.14.0
d1cd1db0e github: Avoid duplicate test runs
09e10110a tpl/encoding: Add noHTMLEscape option to jsonify
2ef60dbd2 build(deps): bump github.com/evanw/esbuild from 0.15.9 to 0.15.12
6275aad9e Update Go and Alpine version in Dockerfile
01ebb6e30 Don't use self-closing generator tag
a066e9885 build: Update to Go 1.19.2
1fd3320dc github: Use SHA versions
0fb2b3d14 Resolve dependency-path not found error in workflow
db05232d5 Use setup-go action to cache dependencies
2734f956c releaser: Prepare repository for 0.105.0-DEV
58b824581 releaser: Bump versions for release of 0.104.3
ec57cf2c3 resources: Update golden image dithering exception list
3a9cb7b0f resources/images: Fix 2 animated GIF resize issues
0addb302a server: Fix flaky TestServerPathEncodingIssues tests
b002d4795 commands: Remove extraneous newline from result of convert toTOML
e3f31352d config/security: Fix filename
ec02c537e releaser: Prepare repository for 0.105.0-DEV
84cbe7249 releaser: Bump versions for release of 0.104.2
4611b6920 Fix htimes /: operation not permitted error on config changes
2171e3c9a Revert "Adjust a test"
cac773aef Adjust a test
51010a69b releaser: Prepare repository for 0.105.0-DEV
8958b8741 releaser: Bump versions for release of 0.104.1
29ccb3606 Fix /static performance regression from Hugo 0.103.0
d8aba18e0 releaser: Prepare repository for 0.105.0-DEV
c744dbd6e releaser: Bump versions for release of 0.104.0
5c4165336 Consolidate the glob case logic
281554ee9 hugofs: Fix glob case-sensitivity bug
f3560aa0e server: Fix 404 redirects on Windows
edf9038a9 build(deps): bump github.com/evanw/esbuild from 0.15.8 to 0.15.9
78f49b4c0 build(deps): bump github.com/yuin/goldmark from 1.4.14 to 1.4.15
fa4b77e7e build(deps): bump github.com/getkin/kin-openapi from 0.100.0 to 0.103.0
8377c3cea docs: Regen docs helper
4d909d476 build(deps): bump github.com/alecthomas/chroma/v2 from 2.2.0 to 2.3.0
4eb6d9740 build(deps): bump github.com/evanw/esbuild from 0.15.7 to 0.15.8
4f9cb4f34 docs: Regenerate CLI docs
0171fb201 Run go mod tidy
a4028112e resources/images: Add $image.Colors
08f0984f9 commands: Skip flaky test on CI
86653fa38 config/security: Allow proxy variables in subcommands
c46d10498 releaser: Prepare repository for 0.104.0-DEV
b665f1e8f releaser: Bump versions for release of 0.103.1
6be6752c8 server: Fix redirects when file path contains bytes > 0x80
8e9dce109 Merge branch 'release-0.103.0'
00b71668b releaser: Prepare repository for 0.104.0-DEV
beebf2afb releaser: Bump versions for release of 0.103.0
3f0b40f67 Use standard GOOS/GOARCH values in release archives
0bd79d30c Use standard GOOS/GOARCH values in release archives
8e77bcc93 Filter out any duplicate files to post process
74daca6b3 Support PostProcess for all file types
1fd4c562a build(deps): bump github.com/gobuffalo/flect from 0.2.5 to 0.3.0
a5cda5ca4 server: Add 404 support
5e2b28d6e build(deps): bump github.com/getkin/kin-openapi from 0.98.0 to 0.100.0
f2019f0a2 build(deps): bump github.com/evanw/esbuild from 0.15.5 to 0.15.7
475638fe0 build(deps): bump github.com/yuin/goldmark from 1.4.13 to 1.4.14
203cc5457 Feat/sponsors in readme (#10273)
90ad80450 Squashed 'docs/' changes from e5aa641a6..392668f4f
af23cdca9 Merge commit '90ad804505'
ab5ce5989 Fix usage description
7d40da876 Add `--force` to `hugo new`
02c89a446 scss: Handle single-file sourcemaps correctly
06c3ac674 release: Bump Hugoreleaser version
5e03de0dd Update stale.yml
bef31b58a releaser: Prepare repository for 0.103.0-DEV
b76146b12 releaser: Bump versions for release of 0.102.3
8e5044d7f Fix shortcode parser regression with quoted param values
5046a6c7c deps: Update github.com/tdewolff/minify/v2 v2.12.0 => v2.12.1
160a067c8 snap: Use "snapcraftctl set-grade"
e0ba1a805 snap: Use "snapcraftctl set-version"
7b49c56a6 snap: Make external dependencies actually work
dffca5788 release: Add the releaser commits to the ignore list
79932e722 release: Fix the Deb archives
9eb9b70a2 releaser: Prepare repository for 0.103.0-DEV
0ff4a9326 releaser: Bump versions for release of 0.102.0
45e1084ff Add linux/arm64 extended to release setup
c98348416 license: Add copyright info
2de393c79 build(deps): bump go.uber.org/atomic from 1.9.0 to 1.10.0
7efb35680 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.9 to 2.2.10
ddbcc6712 build(deps): bump github.com/getkin/kin-openapi from 0.97.0 to 0.98.0
fd75f129b deps: Update github.com/pelletier/go-toml/v2 v2.0.2 => v2.0.4
14878ca0a build(deps): bump github.com/spf13/afero from 1.8.2 to 1.9.2
e88873b80 build(deps): bump github.com/tdewolff/parse/v2 from 2.6.1 to 2.6.2
4219993b0 build(deps): bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16
988e1417a build(deps): bump github.com/rogpeppe/go-internal from 1.8.1 to 1.9.0
42529882c build(deps): bump github.com/yuin/goldmark from 1.4.12 to 1.4.13
45f1b1cfc build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0
369bdf22f build(deps): bump github.com/tdewolff/minify/v2 from 2.11.10 to 2.12.0
d1b03a093 build(deps): bump github.com/evanw/esbuild from 0.14.43 to 0.15.5
941c28ab0 readme: Add Golang URL to Go links
ffbdcc75a Update README.md
95d976451 Update README.md
b66f9f266 Update README.md
f7e00c039 github: Use GitHub's Choco-Install function to retry installs
f5ba6fd45 common/hugio: One more fix for non-OS fs
c4bbc1eee common/hugio: Fix CopyDir when fs is not OS
0e0fb1b64 snap: Delete obsolete custom x-nodejs plugins
b017f7cb0 livereload: Inject script without head or body tag
7fb28085a releaser: Fat MacOS binaries
0cd1929b9 Update to Go 1.19
cbdaff213 markup/goldmark/codeblock: Fix attributes when no language identifier in CodeBlock
3fefea06b commands: Fix embed in livereload.go
5c48ba934 Update README.md
21562e3aa Externalise and embed livereload.js string
9c24b86e4 Cache when not found in LookupLayout
223bf2800 parser/pageparser: Don't store the byte slices
72b0ccdb0 Make the baseline benchmark's test files stable
bdf935d66 Squashed 'docs/' changes from 30f32a624..e5aa641a6
65e52a7f5 Merge commit 'bdf935d66c'
8ebcaa539 Accept vendor-specified build date if .git/ is unavailable
241481931 snap: Replace mage with "go build" and set VendorInfo=snap
5caed8a71 snap: Use interface names etc-gitconfig and gitconfig, Take 2
d1278f696 Extract the baseline benchmark to a test
92f31ae63 Add a baseline benchmark
fd3953c18 snap: Use interface names etc-gitconfig and gitconfig
15463f835 releaser: Prepare repository for 0.102.0-DEV
466fa43c1 releaser: Bump versions for release of 0.101.0
6072ce0bc releaser: Add release notes for 0.101.0 [ci skip]
2c5943ddc build: Update to Go 1.18.3
0cb459a20 docs: Regen docshelper
475f87f68 Squashed 'docs/' changes from 96fdc246c..30f32a624
604cfffc5 Merge commit '475f87f685'
d863dde6c markup/highlight: Add hl_inline option
580b214a4 deps: Update github.com/alecthomas/chroma/v2 v2.1.0 => v2.2.0
ddb954708 build(deps): bump github.com/clbanning/mxj/v2 from 2.5.5 to 2.5.6
288b0fb15 build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.1 to 2.0.2
3e1344632 build(deps): bump golang.org/x/tools from 0.1.10 to 0.1.11
7a9ce0eca build(deps): bump github.com/tdewolff/minify/v2 from 2.11.5 to 2.11.10
f2ba0cc8c build(deps): bump github.com/evanw/esbuild from 0.14.42 to 0.14.43
62ceaabdc build(deps): bump github.com/getkin/kin-openapi from 0.94.0 to 0.97.0
35fa19283 deps: Udpate to github.com/alecthomas/chroma/v2
09ac73338 common: Add hugo.GoVersion
66da1b7b2 resources: Panic on Copy of Resource with .Err
5a9ecb82a resources/page: Add :slugorfilename attribute
cbc35c48d Respect NO_COLOR
44f3c0796 readme: Update dependency list
a5a4422aa Fix relURL with leading slash when baseURL includes a subdirectory
617e09448 js: Resolve index.esm.js
cf12fa616 Add animated GIF support
2e1c81770 resources: Add a Gif source file to golden tests
4276075c7 releaser: Prepare repository for 0.101.0-DEV
d25cb2943 releaser: Bump versions for release of 0.100.2
8b9bdc403 releaser: Add release notes for 0.100.2 [ci skip]
4e94d1db7 Update CONTRIBUTING.md
0566bbf7c Fix raw TOML dates in where/eq
534e7155b deps: Update to github.com/pelletier/go-toml/v2 v2.0.1
953f215f3 tpl/path: Add path.BaseName function
8e2fd5592 livereload: Use `X-Forwarded-Host` for Codespace
311b8008b helpers: Fix panic with invalid defaultMarkdownHandler
c7d5f9f06 resources: Register MediaTypes before build
bfebd8c02 releaser: Prepare repository for 0.101.0-DEV
0afb4866e releaser: Bump versions for release of 0.100.1
b1ec0c226 releaser: Add release notes for 0.100.1 [ci skip]
212d9e301 Fix panic with markdownify/RenderString with shortcode on Page with no content file
4daac654d releaser: Prepare repository for 0.101.0-DEV
27b077544 releaser: Bump versions for release of 0.100.0
0f8343a2c releaser: Add release notes for 0.100.0 [ci skip]
3fcbee261 docs: Regen CLI docs
db9d27427 docs: Regen docs helper
95baafeac Merge commit 'e4bfe59c4e'
e4bfe59c4 Squashed 'docs/' changes from 2d9da3a56..96fdc246c
6f7bf3f2d Fix indentation in highlight shortcode
9e904d756 Make .RenderString render shortcodes
d2cfaede5 Improve shortcode indentation handling
322d19a81 Add Markdown as an output format
7cb484e12 build(deps): bump github.com/evanw/esbuild from 0.14.39 to 0.14.42
0b395f0b4 Run go mod tidy
c1a83076b Add a shortcode benchmark
0f8dc4703 Remove Blackfriday markdown engine
3b478f50b Fix HasMenuCurrent and IsDescendant/IsAncestor when comparing to itself
f343b8eb7 build(deps): bump github.com/sanity-io/litter from 1.5.4 to 1.5.5
60ede146b deps: Update to github.com/tdewolff/minify/v2 v2.11.5
dd9eaf19f Don't use the baseURL /path as part of the resource cache key
46a2ea6d0 postcss: Make the resource cache key more stable
653ab2cc1 commands: Fix case where languages cannot be configured
52edea0fe github: Set HUGO_BUILD_TAGS: extended when running tests
6a5acd753 metrics: Fix divide by zero error
805b21555 Fix error message when PostCSS config file is not found
8ca705252 server: Skip watching dirs in ignoreFiles
bb232a351 resources: Improve error message on .Resize etc. on SVGs
3854a6fa6 Fix Plainify edge cases
cd0112a05 Add resources.Copy
6f7fbe03b basefs: add `noBuildLock` flag
2fc2e9c87 import: Fix importing jekyll site
e164834f0 releaser: Prepare repository for 0.100.0-DEV
d52406738 releaser: Bump versions for release of 0.99.1
31ce89f7f releaser: Add release notes for 0.99.1 [ci skip]
ee55fde5e releaser: Fix version replacement
2f9eac480 server: Fix multihost crash
3a8189ee9 Update stale.yml
7bc3401eb common/hugo: Fix version logic
1de333e7a releaser: Bump versions for release of 0.99.0
35cb6eefb releaser: Add release notes for 0.99.0 [ci skip]
657d1a2d9 server: Refresh the error template
87a22eb6d server: Fix SIGINT handling after loading bad configuration
fc9f315d8 Improve SASS errors
4b189d8fd postcss: Fix import error handling
c2fa0a332 build(deps): bump github.com/fsnotify/fsnotify from 1.5.3 to 1.5.4
48ea24f89 common/herrors: Remove unused struct
9f563856c build(deps): bump github.com/evanw/esbuild from 0.14.38 to 0.14.39
5c96bda70 errors: Misc improvements
4a96df96d server: Always rebuild the files involved in an error
e8537e6dd postcss: Fix line numbers in error messages
2fbdee726 Update CONTRIBUTING.md
91fe1b6c6 js: Bump test dependency
7de629121 deps: Update github.com/spf13/cast v1.4.1 => v1.5.0
9d7f16624 hugolib: Check for nil in shouldRender
51f08b0b6 Revise the use of htime.Since/htime.Now
860c51c31 tpl/collections: Make sort stable
855e5869c docs: Regen CLI docs
327aaed6d Squashed 'docs/' changes from 7030fe3a2..2d9da3a56
1c7759028 Merge commit '327aaed6d8'
35c88a7f9 Use configured timeZone for the clock
e77ca3c10 Add `clock` cli flag
f2946da9e Improve error messages, esp. when the server is running
6eea32bd6 tpl: Improve godoc
a6d545854 github: Add permissions to test action
e5f217316 tpl/crypto: Add example for FNV32a
89c1655ec releaser: Prepare repository for 0.99.0-DEV
165d299cd releaser: Bump versions for release of 0.98.0
e94dc6710 releaser: Add release notes for 0.98.0 [ci skip]
a4fff5753 docs: Regen docs helper
3902f9a47 Squashed 'docs/' changes from 4c5edacfe..7030fe3a2
4852a3765 Merge commit '3902f9a476'
fa80fe3c8 Some godoc adjustments and image struct renames
11047534e tpl/crypto: Add FNV32a
d7b54a4c3 markup/goldmark: Fix attribute nilpointer
13ceef759 deps: Update to gocloud.dev v0.24.0
942d0dd2c build(deps): bump github.com/mitchellh/mapstructure from 1.4.3 to 1.5.0
a022ca271 deps: Update github.com/yuin/goldmark v1.4.11 => v1.4.12
d56b33955 build(deps): bump github.com/evanw/esbuild from 0.14.36 to 0.14.38
55e28c239 deps: Update github.com/tdewolff/minify/v2 v2.11.1 => v2.11.2
9a888c243 Some godoc adjustments
05b45c35c tpl/lang: Handle nil values in lang.Merge
625be77e0 resources/page: Mark some more interface methods as internal
097fd588c Deprecate page.Author and page.Authors
41cc4e4ba releaser: Prepare repository for 0.98.0-DEV
078053a43 releaser: Bump versions for release of 0.97.3
7d9f88808 releaser: Add release notes for 0.97.3 [ci skip]
9b352f04a Fix syncing of /static regression
e66e2e9ce Revert "Revert "Fix PostProcess regression for hugo server""
5de6f8a02 releaser: Prepare repository for 0.98.0-DEV
5099abe60 releaser: Bump versions for release of 0.97.2
99ec88d42 releaser: Add release notes for 0.97.2 [ci skip]
6c35a1a9e Revert "Fix PostProcess regression for hugo server"
363bc907c releaser: Prepare repository for 0.98.0-DEV
04efcb2a6 releaser: Bump versions for release of 0.97.1
456072552 releaser: Add release notes for 0.97.1 [ci skip]
4deb5c606 Fix PostProcess regression for hugo server
397fce560 Fix MediaType when reading images from cache
0093eaa68 deps: Upgrade github.com/bep/overlayfs v0.4.0 => v0.5.0
d0f731c03 releaser: Prepare repository for 0.98.0-DEV
c07f3626e releaser: Bump versions for release of 0.97.0
42b5d1653 releaser: Add release notes for 0.97.0 [ci skip]
d80d5a104 releaser: Reduce parallelism
842262f65 Revert "build(deps): bump gocloud.dev from 0.20.0 to 0.25.0"
2dbdf38a5 resources: Add `key` to reources.GetRemote options map
f8c4e1690 build(deps): bump github.com/evanw/esbuild from 0.14.34 to 0.14.36
627eed1d6 Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language aware
82ba634ed Fix gosum checksum errors
d417a6cf7 build(deps): bump github.com/tdewolff/minify/v2 from 2.11.0 to 2.11.1
13dac7f3c compare: Add a string sort benchmark
30c2e54c2 Replace all usage of  CopyOnWriteFs with OverlayFs
3117e5859 deps: Update github.com/tdewolff/minify/v2 v2.10.0 => v2.11.0
ec920363c Squashed 'docs/' changes from 63386081c..4c5edacfe
5b5dcb8d5 Merge commit 'ec920363cd'
ffe3eb919 docs: Regen CLI docs
d070bdf10 Rework the Destination filesystem to make --renderStaticToDisk work
b08193971 Revert "Revert "Some minor adjustments to the new static filesystem logic""
0a56f2af4 Revert "Revert "Allow rendering static files to disk and dynamic to memory in server mode""
9e360d384 build(deps): bump github.com/evanw/esbuild from 0.14.31 to 0.14.34
a8c221d33 modules/client: Vendor config directory if present
e58a54089 resources: Create a common ResourceFinder interface
20162518c build(deps): bump gocloud.dev from 0.20.0 to 0.25.0
6b469cc8f build(deps): bump golang.org/x/tools from 0.1.9 to 0.1.10
080dcac6b build(deps): bump github.com/magefile/mage from 1.12.1 to 1.13.0
072fc8cc3 build(deps): bump github.com/gobuffalo/flect from 0.2.4 to 0.2.5
658e11eba Localize all the GroupBy*Date methods
e0a882fd3 build(deps): bump github.com/getkin/kin-openapi from 0.93.0 to 0.94.0
d0657a436 deploy: Set an MD5 attribute and use that if eTag not available
a6e2e38bb build(deps): bump github.com/sanity-io/litter from 1.5.2 to 1.5.4
510e17900 build(deps): bump github.com/evanw/esbuild from 0.14.25 to 0.14.31
21484f9e1 build(deps): bump github.com/frankban/quicktest from 1.14.2 to 1.14.3
da00e7714 Add environment as a new filter to _cascade.target
ed9aa374d Merge branch 'release-0.96.0'
2a231b0b5 Snap: Add {system,user}-gitconfig plugs to read gitconfig (#9619)
69c590080 releaser: Prepare repository for 0.97.0-DEV
2fd4a7d3d releaser: Bump versions for release of 0.96.0
5a4ac2dac releaser: Add release notes for 0.96.0 [ci skip]
db1562e13 docs: Regen docshelper
5b18e1084 docs: Regen CLI docs
d276e901b Squashed 'docs/' changes from a393f4cf4..63386081c
d7497b28c Merge commit 'd276e901b3'
94459680b Deprecate .File.Extension
9202117ba resources: Add more details to .Err
a6fa290f6 commands: Change link protocol to https
0bbc2fb52 build(deps): bump github.com/getkin/kin-openapi from 0.91.0 to 0.93.0
94e8a9076 tpl/crypto: Add optional encoding arg to hmac function
a461e9d01 Fix typo
48c98a8d2 Fix some typos
bbd455fe7 Update CONTRIBUTING.md to use "go install" to install mage
8309a2b1c Dockerfile: Make it build with Go 1.18
2b7231097 snap: Make it build with Go 1.18
13ff4ded7 build(deps): bump github.com/yuin/goldmark from 1.4.10 to 1.4.11
c3289eb5b build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0
9539069f5 commands: Improve server startup to make tests less flaky
0e305d695 all: Use strings.Cut
5adb81ce3 Support '-u=patch' in hugo mod get
1c0e7c1ae Make sure file mounts higher up wins
cad2d8cc7 resources/images: Require width and height for Crop, Fill, and Fit
b80853de9 all: gofmt -w -r 'interface{} -> any' .
423594e03 dartsass: Enable deprecation, @warn and @debug logging
64afb7ca5 Use revision etc. from debug.BuildInfo
004bec2e9 releaser: Prepare repository for 0.96.0-DEV
9f2e76af6 releaser: Bump versions for release of 0.95.0
f1d157682 releaser: Add release notes for 0.95.0 [ci skip]
5930173cd readme: Add note about Go 1.18
3476b5334 tpl: Pull in Go 1.18 patch that fixes the "no space in {{ continue }} and {{ break }}" bug
e792d2701 readme: Add a contribution note
9d6495d77 github: Make it build with Go 1.18
42cc5f88b tpl: Adjustments and an integration test for Go 1.18
a6488e7ba Remove Go 1.17 support
65a78cae1 tpl: Sync go_templates for Go 1.18
4d6d1d08d build: Bump to Go 1.18
b60e1bbdf dartsass: Improve error message when no read access
61cf3c9f6 Fix and refactor typos
31fbc081c Improve server startup/shutdown
cebd886ac commands: Improve server tests
38f778cfc releaser: Prepare repository for 0.95.0-DEV
48fb9e4de releaser: Bump versions for release of 0.94.2
0958167b3 releaser: Add release notes for 0.94.2 [ci skip]
b37183e48 deps: Update github.com/yuin/goldmark v1.4.9 => v1.4.10
04ccde3e9 releaser: Prepare repository for 0.95.0-DEV
0fcd9a5d8 releaser: Bump versions for release of 0.94.1
414608436 releaser: Add release notes for 0.94.1 [ci skip]
3bc742bea docs: Regenerate CLI docs
1a796d723 deps: Fix Goldmark regression with HTML comments
64b7b7a89 Revert "Allow rendering static files to disk and dynamic to memory in server mode"
5ef8a9f32 Revert "Some minor adjustments to the new static filesystem logic"
3bc34666c releaser: Prepare repository for 0.95.0-DEV
63b236603 releaser: Bump versions for release of 0.94.0
b107b4b29 releaser: Add release notes for 0.94.0 [ci skip]
a4ac188c1 docs: Regenerate docshelper
b82d95575 Revert "markup/highlight: Add hl_inline option"
4e14cf760 Fail with error when double-rendering text in markdownify/RenderString
5697348e1 markup/goldmark: Default to https for linkify
f98e570b1 Add lang attribute to internal alias template
cdb8b0842 docs: Regenerate docshelper
a360cab75 markup/highlight: Add hl_inline option
c97fed08f minifiers: Make keepWhitespace = false default for HTML (note)
53a6210d8 markup/goldmark/codeblocks: Fix slice bounds out of range
7182809d9 docs: Regenerate CLI docs
1f8cd2614 docs: Regenerate docshelper
9d76b8fa3 Merge commit 'd706529720'
d70652972 Squashed 'docs/' changes from 3f95a2ace..a393f4cf4
4576c82ed Cache reflect.MethodByName
ff02d4172 releaser: Remove the GitHub link syntax around release contributors
63bb2a5b1 Some minor adjustments to the new static filesystem logic
7d8011ed6 Allow rendering static files to disk and dynamic to memory in server mode
b9a1be2f9 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.8 to 2.2.9
097824503 build(deps): bump github.com/evanw/esbuild from 0.14.23 to 0.14.25
ff37df830 build(deps): bump github.com/niklasfasching/go-org from 1.6.0 to 1.6.2
5857d5524 build(deps): bump github.com/getkin/kin-openapi from 0.90.0 to 0.91.0
d86eca5bb releaser: Prepare repository for 0.94.0-DEV
44e3c002a releaser: Bump versions for release of 0.93.3
9177849f9 releaser: Add release notes for 0.93.3 [ci skip]
0e0d672bc Remove the decorator from the fs used in ReadDir
19f816f77 Update stale.yml
970f385c4 build(deps): bump github.com/yuin/goldmark from 1.4.7 to 1.4.8
76c1248f7 Remove the examples/ folder
9e76507da releaser: Prepare repository for 0.94.0-DEV
643b5ae9c releaser: Bump versions for release of 0.93.2
2f7feca9a releaser: Add release notes for 0.93.2 [ci skip]
673cde1eb tpl/os: Revert readDir in theme behaviour
e46e9ceb2 markup/goldmark: Escape image alt attribute
883e71c96 releaser: Prepare repository for 0.94.0-DEV
e9669fed1 releaser: Bump versions for release of 0.93.1
fefb1caac releaser: Add release notes for 0.93.1 [ci skip]
0327da050 tpl/transform: Fix it when template.HTML is passes as option to Hightlight
9b8b6d34e tpl/partials: Fix partialCached deadlock regression
376704d38 tpl/collections: Fix apply when function have Context as first arg
c1398b91a Squashed 'docs/' changes from 93f7baf80..3f95a2ace
41b5bc963 Merge commit 'c1398b91a9'
5a1b394f2 releaser: Prepare repository for 0.94.0-DEV
074690824 releaser: Bump versions for release of 0.93.0
75084bfc7 releaser: Add release notes for 0.93.0 [ci skip]
12d00d288 docs: Regenerate docs helper
260ff1374 markup/highlight: Ignore  HL_lines_parsed in the gen docs
14915a0c3 cod: Regen CLI docs
fd0c1a5e9 tpl/diagrams: Rename the SVG accessor to Wrapped
3ad39001d markup/highlight: Rework the return value from HighlightCodeblock
39261b689 tpl/transform: Add CanHighlight
cff14144a Rename Codeowners() to CodeOwners()
5f6715155 tpl/diagrams: Rename Body to Inner
f7109771a CodeblockContext method renames
e1f696911 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.29 to 2.10.0
5f65c17a1 markup/goldmark: Adjust test for Windows
579ff9b65 markup/goldmark: Improve attributes vs options
928a89696 markup/goldmark: Add Position to CodeblockContext
2e54c0093  markup/goldmark: Unify some code block tests
10928a4f7 Remove the trailing new line in .Code
afd63bf7d markup/goldmark: Rename extension struct
228126b7f build(deps): bump github.com/gobuffalo/flect from 0.2.3 to 0.2.4
0f80be341 markup/goldmark: Use Ordinal to create default lineanchors
78afdb88a build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0
3ed83227b build(deps): bump github.com/sanity-io/litter from 1.5.1 to 1.5.2
1a257bb2b Move the Goat template to the correct place
97514f17d build(deps): bump google.golang.org/api from 0.63.0 to 0.70.0
0df096b86 Update error message about failed menus in config.toml
308ad611b build(deps): bump github.com/getkin/kin-openapi from 0.85.0 to 0.90.0
6bffcdbd2 Add test for line anchor attributes with code fences
7248f4318 build(deps): bump github.com/evanw/esbuild from 0.14.22 to 0.14.23
08fdca9d9 Add Markdown diagrams and render hooks for code blocks
2c20f5bc0 build(deps): bump github.com/aws/aws-sdk-go from 1.41.14 to 1.43.5
723b2c485 build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.7
06bac57ab Add support for CODEOWNERS
ec8b767fa Remove Viper as a dependency
6407b2cd0 helpers: Allow hyphens in UnicodeSanitize
6ff39fd90 Change `disqus_config` to `window.disqus_config`
96c0bdf3a deps: Update github.com/spf13/cobra v1.2.1 => v1.3.0
e97d3c640 Add page.Store
7732da9f9 Allow images to be cropped without being resized
aebde49b8 commands: Fix server panic regression
4ada09415 markup/goldmark: Add BenchmarkCodeblocks
bddcfd911 deps: Update github.com/gohugoio/localescompressed v0.14.0 => v0.15.0
d485f9543 deps: Update github.com/yuin/goldmark v1.4.4 => v1.4.7
a87be597a modules: Add modules.Workspace config for Go 1.18
b0eea0075 Update stale.yml
ef8b781b1 Update stale.yml
3136ff67d github: Configure stale to be run manually
929808190 tpl/partials: Fix recently introduced deadlock in partials cache
667f3a4ba tpl/partials: Add some more partials to BenchmarkIncludeCached
c061b253a deps: Update github.com/evanw/esbuild v0.14.11 => v0.14.22
0927cf739 tpl/partials: Make sure a cached partial is invoked only once
26a5e89fa build(deps): bump github.com/rogpeppe/go-internal from 1.8.0 to 1.8.1
e9fa7e81b build(deps): bump github.com/magefile/mage from 1.11.0 to 1.12.1
ff545f427 markup/goldmark: Exclude event attributes from markdown render hook
b2a827c52 markup/goldmark: Fix mangling of headers/links in render hooks
77c7059ff markup/goldmark: Add a render hook benchmark
f4c90bd6b Fix BenchmarkCascadeTarget
d16228334 metrics: Add cached count tracking
ea6bcd694 tpl: Remove TODO comment
f2e7b49ac Add --printUnusedTemplates
923419d7f deps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29
837fdfdf4 commands: Rename --i18n-warnings to printI18nWarnings
6819feab6 commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage
ea54a99ca deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0
9563c7d13 Finally remove deprecated Page methods
230a49594 Squashed 'docs/' changes from b8b20e9a2..93f7baf80
c707b71cd Merge commit '230a495941'
b0a9cf0a7 tpl: Use go:embed to load internal templates
9433cc256 releaser: Prepare repository for 0.93.0-DEV
cdf6a0d62 releaser: Bump versions for release of 0.92.2
bf1fa7137 releaser: Add release notes for 0.92.2 [ci skip]
4f4cec73b Add HUGO_ENV to the os/exec environment
da4866c2b Simplify some integration tests
d1109f590 Fix validation of Page Kind in cascade target map
a7d182cea Add another cascade benchmark
a2a660ed1 commands: Fix server deadlock on config error
f7bc4cc50 Exclude event attributes when rendering markdown
54f8d8a70 Remove the "check" command
3036d0ac9 Update the application/javascript media type
6a238a727 tpl/templates: Fix templates.Exist issue with base templates
f60714b5a Add a migration test helper
215a715dd babel: Port integration tests to their own package
d128d260b js: Port integration tests to its own package
c4aaf1d51 postcss: Move integration test to its own package
94f10cf4f minifier: Port integration tests to its package
b06c2103b templates: Port integration test to its package
d22f7795c tocss: Port integration tests to their package
39f69ca7f openapi3: Port integration test into correct package
64f75adcf Add a new integration test framework
926271909 Validate comparison operator argument count
333676293 Remove hugo gen autocomplete
5ca40c8f7 deps: Update github.com/pelletier/go-toml/v2 to v2.0.0-beta.6
ef7d14a24 Fix erroneous warning with .Page.RenderString on a page without a backing file
c05c99f0c Fix typo in panicOnWarning message
ff7689ce0 releaser: Prepare repository for 0.93.0-DEV
85e2e8626 releaser: Bump versions for release of 0.92.1
515f8a6d8 releaser: Add release notes for 0.92.1 [ci skip]
f22c4aba0 Make the RenderString content provider fix more general
85d31f7bf Fix .RenderString issue in .Translations
22055176d general: Fix issue causing log threads to hang indefinitely when print() panics
7a080b624 Fix duplicate mount sources
265573994 tpl/collections: Fix apply with namespaced template funcs
348d300a7 common: Remove unused code
6f07bdb15 common/paths: Remove unused code
55a9bc1e7 helpers: Remove unused code
20a7ce7c1 Do not render hl_style as an HTML attribute
8cd449240 build(deps): bump github.com/spf13/viper from 1.8.1 to 1.10.1
9d8f318aa Fixing typos (#9387)
fcbbbef22 Fix typo in warning message
6041adc16 github: Clean up the issue templates a little
408da4365 github: Add lock-threads step
ed04ed574 releaser: Prepare repository for 0.93.0-DEV
b35494036 releaser: Bump versions for release of 0.92.0
bd89aef8b releaser: Add release notes for 0.92.0 [ci skip]
f2bc13dd9 docs: Regenerate docshelper
098254f17 Merge commit 'a8e9fc699a'
a8e9fc699 Squashed 'docs/' changes from 4eb10c1a9..b8b20e9a2
cdcd15b6c Only create LazyContentProvider for the non-rendering Site
25d645f47 Fix missing page data for alternative formats
fbb3c181c docs: Add dependency table to maintainance page
9af4ca386 deps: Upgrade github.com/evanw/esbuild v0.14.8 => v0.14.11
7396aa945 Add hugo.Deps
d82cef5c5 hugolib: Fix livereload problem with files including NFC characters in MacOs
74f0777c5 docs. Regen CLI docs
e334a4066 commands: Fix CLI help text for hugo new
5bd3c8df4 Update to Go 1.17.6
0aca99fe0 create: Correctly pass newContentEditor flags
c8b5ab75b Add --panicOnWarning flag
85c5b8959 github: Increase stale days
965760835 docs: Regenerate CLI docs
4a0b55330 docs: Regenerate docshelper
1651beb2c Remove mmark
2b6063c3e Misc depreation updates
56ab83a59 Make the deprecated Page/File methods (from Hugo 0.55) ERROR
dad0dc8d8 github: Add add stale GitHub action
d3c4fdb8f Fix surprise OutputFormat.Rel overwriting
d632dd7d7 hugolib: Make an RST test optional
0671ef559 deps: Upgrade github.com/niklasfasching/go-org v1.5.0 => v1.6.0
672481f1f Update stale.yml
1dbfc0f93 releaser: Prepare repository for 0.92.0-DEV
1798bd3fd releaser: Bump versions for release of 0.91.2
f0b55a68e releaser: Add release notes for 0.91.2 [ci skip]
623dda717 Revert "config/security: Add HOME to default exec env var whitelist"
aee9e11a4 Make sure we always create the /public folder
bd63c1aa5 Fix "stuck on build" in error situations in content processing
9eb05807c deps: Run "go mod tidy"
654f513a4 deps: Upgrade github.com/evanw/esbuild v0.14.7 => v0.14.8
759cdf3fc releaser: Prepare repository for 0.92.0-DEV
f42350574 releaser: Bump versions for release of 0.91.1
af165d5b6 releaser: Add release notes for 0.91.1 [ci skip]
6779117f7 media: Also consider extension in FromContent
ce0401109 media: Add missing BMP and GIF to the default MediaTypes list
cdc73526a media: Add PDF MIME type
425c7d90f deps: Update github.com/evanw/esbuild v0.14.5 => v0.14.7
fca266ebb config/security: Add HOME to default exec env var whitelist
0016e21cd modules: Set GOCACHE env var
728feaecf releaser: Prepare repository for 0.92.0-DEV
d1dc0e9a5 releaser: Bump versions for release of 0.91.0
072bca69d releaser: Add release notes for 0.91.0 [ci skip]
e26e13fbb releaser: Drop running tests as part of the release
6df2f080c docs: Regen docs helper
b84745d49 tpl/resources: Add empty method mapping for GetRemote
44954497b Always use content to resolve content type in resources.GetRemote
22ef5da20 Add resources.GetRemote
5758c370e Allow for return partials with falsy arguments (#9298)
8ee6de6d9 deps: Upgrade github.com/evanw/esbuild v0.14.2 => v0.14.5
a4b9f1a92 don't use path.Join, because it cleans the final path
f4389e48c Add some basic security policies with sensible defaults
803f572e6 Simplify Babel test assertions
6183184b9 Merge commit '45e6fdb315'
45e6fdb31 Squashed 'docs/' changes from 316cec249..4eb10c1a9
a037be774 Improve handling of remote image/jpeg resources (#9278)
8a005538d Fix Dockerfile
657d0272e Remove debug statement
159120cdd Fix deprecation notice
3f0d49e50 releaser: Prepare repository for 0.91.0-DEV
489078897 releaser: Bump versions for release of 0.90.1
3075eaa3b releaser: Add release notes for 0.90.1 [ci skip]
3bc683041 Remove the retries on error in remote resources.Get
e4d6ec94b Allow user to handle/ignore errors in resources.Get
6260455ba Make resource.Get return nil on 404 not found
c397975af Update to Go 1.17.5
965a6cbff Update to Go 1.17.4 and remove timeout in resources.Get
34a96290f releaser: Prepare repository for 0.91.0-DEV
dd0d3fdbb releaser: Bump versions for release of 0.90.0
b92175233 releaser: Add release notes for 0.90.0 [ci skip]
0fa40ce58 releaser: Simplify the release process
bf537f1c6 releaser: Remove unused code
e86b33113 docs: Regenerate docs helper
6c841a691 Merge commit '8d9511a08f'
8d9511a08 Squashed 'docs/' changes from 39a7fac34..316cec249
e71d715b9 Add custom font support to images.Text
e61cdf335 images: Fix cache busting of image text filter
6c3bc5eba build(deps): bump github.com/getkin/kin-openapi from 0.80.0 to 0.85.0
283394a4f images: Text filter that draws text with the given options (#9239)
5538507e9 tpl/transform: Optional options for highlight func
b4f27ef8e deps: Upgrade github.com/evanw/esbuild v0.13.12 => v0.14.2 (note)
3473e31eb releaser: Add "note" to Note regexp
fa0da004a build(deps): bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.3
24a893cf8 releaser: Rework and simplify to use GitHub only for release notes
bf1564bd2 build(deps): bump google.golang.org/api from 0.51.0 to 0.61.0
cd44d409b media: Add rss suffix for application/rss+xml
9a326d563 parser: Add a test case in format resolution
b10381fbe lazy: Reset error in Reset
0eaaa8fee Implement XML data support
58adbeef8 Validate private use language tags
93572e531 resources: Add timeout to the HTTP request in Get
94f149b21 Add a remote retry for resources.Get
66753416b Make resources.Get use a file cache for remote resources
133e4bfbe Remove empty href element from pagination template
f122771fb Check for empty deployment targets and matchers
08a863e1e resources: Adjust the remote Get cache so it does not get evicted on restarts
8aa7257f6 Add remote support to resources.Get
75a823a36 Add deprecation warning to google_news template
5e0947c5b helpers: Make UniqueStringsReuse allocation free
0b70b46aa releaser: Prepare repository for 0.90.0-DEV
ab01ba6e7 releaser: Add release notes to /docs for release of 0.89.4
cc08c0959 releaser: Bump versions for release of 0.89.4
f97da9eca releaser: Add release notes for 0.89.4 [ci skip]
2e70f61fb Fix content dir resolution when main project is a Hugo Module
1ed8069a3 releaser: Prepare repository for 0.90.0-DEV
c88cdb561 releaser: Add release notes to /docs for release of 0.89.3
e1064d219 releaser: Bump versions for release of 0.89.3
bf489b96d releaser: Add release notes for 0.89.3 [ci skip]
b8155452a Improve error when we cannot determine content directory in "hugo new"
08552a7a4 deps: Upgrade github.com/yuin/goldmark v1.4.3 => v1.4.4
fdad91fd9 commands: Make sure pollInterval is always set
5f3f60898 create: Improve archetype directory discovery and tests
057d02de2 create: Add a log statement when archetype is a directory
43ac59da8 create: Always print "Content ... created"
ab5c6990a commands: Fix missing file locking in server partial render
9369d13e5 modules: Improve error message
805c24c32 releaser: Prepare repository for 0.90.0-DEV
63e3a5ebb releaser: Add release notes to /docs for release of 0.89.2
eaa6c96a7 releaser: Bump versions for release of 0.89.2
cf3eb580b releaser: Add release notes for 0.89.2 [ci skip]
2b01c85d1 Fix path resolution in hugo new
c09f5c5fd deps: Upgrade github.com/yuin/goldmark v1.4.2 => v1.4.3
9232e2844 releaser: Prepare repository for 0.90.0-DEV
b6a4ae4ad releaser: Add release notes to /docs for release of 0.89.1
84de0c325 releaser: Bump versions for release of 0.89.1
a07410226 releaser: Add release notes for 0.89.1 [ci skip]
da4406ea5 Revert "releaser: Fat MacOS binaries"
166862a09 create: Make sure the build lock is released before we open editor
82c33c710 readme: Update dependency list
41e9e9fe1 releaser: Prepare repository for 0.90.0-DEV
ade966b84 releaser: Add release notes to /docs for release of 0.89.0
a93d4ba64 releaser: Bump versions for release of 0.89.0
110512a65 releaser: Add release notes for 0.89.0
f503b6395 docs: Regen CLI docs
30aba7fb0 source: Make ContentBaseName() return the directory for branch bundles
04a3b45db Fix description of lang.FormatNumberCustom
0cc39af68 Update Twitter shortcode oEmbed endpoint
ed6fd26ce common/htime: Fix time.Format with Go layouts
7fa66425a build(deps): bump github.com/evanw/esbuild from 0.13.10 to 0.13.12
69210cfdf build(deps): bump github.com/yuin/goldmark from 1.4.1 to 1.4.2
4b36498a8 Merge commit 'aa5ac36a3e'
aa5ac36a3 Squashed 'docs/' changes from 327003421..39a7fac34
3a977485e releaser: Fat MacOS binaries
0f248606d releaser: Only build amd64 binary for freebsd, netbsd, openbsd, dragonfly
e82cbd746 tpl/time: Use configured location when date passed to Format is string
3339c2bb6 build(deps): bump github.com/aws/aws-sdk-go from 1.40.8 to 1.41.14
03bbdba8b build(deps): bump github.com/getkin/kin-openapi from 0.79.0 to 0.80.0
a772b8fc3 build(deps): bump github.com/evanw/esbuild from 0.13.8 to 0.13.10
dce49d133 resources: Rename excepted filenames for image golden testdata
61c5b7a2e build(deps): bump github.com/frankban/quicktest from 1.13.1 to 1.14.0
1d60bd1ef Fix typo in error message
75c9b893d create: Validate the target path in hugo new
64e1613fb Fix panic when specifying multiple excludeFiles directives
b959ecbc8 htime: Set zone of datetime from from `go-toml`
70e454812 Added nodesource apt repository to snap package
355ff83e7 config: Set HUGO_ENABLEGITINFO=false override in Set_in_string
471ed91c6 hugofs: Add includeFiles and excludeFiles to mount configuration
94a5bac5b build(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2
9830ca9e3 resources: Always preserve the original transform error
b64fd0577 readme: Add hyperlink to the banner
2706437a7 build(deps): bump github.com/getkin/kin-openapi from 0.78.0 to 0.79.0
ec7c993cf deps: github.com/evanw/esbuild v0.13.5 => v0.13.8
32c6f656d create: Return error on no content dirs
e02e0727e Fix file permissions in new archetype implementation
096f5e192 Fix the "page picker" logic in --navigateToChanged
ba35e6985 Add a cross process build lock and use it in the archetype content builder
c7957c90e readme: Fix a typo on OpenBSD
bb0537703 deps: github.com/alecthomas/chroma v0.9.2 => v0.9.4
9185e11ef Reimplement archetypes
168a3aab4 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.21 to 2.9.22
8bcfa3bdf deps: Update github.com/evanw/esbuild v0.13.5
d7331aaa7 releaser: Fix regexp
cd4e67af1 build(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14
e6ad1f0e7 build(deps): bump github.com/getkin/kin-openapi from 0.75.0 to 0.78.0
625d2c257 releaser: Update to Go go1.17.2
e6e44b7c4 Fix value of useResourceCacheWhen in TestResourceChainPostCSS
64abc83fc Allow multiple plugins in the PostCSS options map
f8d132d73 docs: Create path.Clean documentation
26f1919ae Skip a test assertion on CI
e55466ce7 tpl/path: Add path.Clean
ecf025f00 readme: Remove tracking image
fab1e43de Revert "Remove credit from release notes"
e03f82eef Pass minification errors to the user
a864ffe9a Clarify "precision" in currency format functions
b49da3328 build(deps): bump github.com/evanw/esbuild from 0.12.24 to 0.12.29
7c21eca74 resources: Use default math/rand.Source for concurrency safety
13ad8408f commands: Make the error handling for the mod commands more lenient
1cabf61dd modules: Add some help text to the 'unknown revision' error
268e3069f deps: Update github.com/yuin/goldmark v1.4.0 => v1.4.1
3efc2e2af releaser: Prepare repository for 0.89.0-DEV
5bc547389 releaser: Add release notes to /docs for release of 0.88.1
bb3254385 releaser: Bump versions for release of 0.88.1
9b1d6d7e3 releaser: Add release notes for 0.88.1 [ci skip]
e1ead4dbc Bump down again to Go 1.16.7 for the release builds
5b59b9c17 releaser: Prepare repository for 0.89.0-DEV
acc5eb5b5 releaser: Add release notes to /docs for release of 0.88.0
6cacfa329 releaser: Bump versions for release of 0.88.0
4d03cd780 Release 0.88.0
8b14fdbf8 Update 0.88.0-relnotes.md
fc21b63b4 releaser: Add release notes for 0.88.0
6631c9c7e Run go mod tidy
cf73cc2ec js: Fix import order for ./foo when both ./foo.js and ./foo/index.js exists
7d1f806ec commands: Don't fail on template errors on go mod graph etc.
04b595996 build(deps): bump github.com/getkin/kin-openapi from 0.74.0 to 0.75.0
c278b6e45 build(deps): bump github.com/frankban/quicktest from 1.13.0 to 1.13.1
107c86feb build(deps): bump github.com/evanw/esbuild from 0.12.22 to 0.12.24
a0489c2df Avoid failing with "module not found" for hugo mod init and similar
0fc2ce9e4 Update to Go 1.17
32569285c Remove Pygments from snapcraft.yml
5a46eefbc Revert "build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0"
7a15edafe highlight: Add tabindex when code is not highlighted
2f0945baf build(deps): bump github.com/evanw/esbuild from 0.12.17 to 0.12.22
f4ffeea71 Fix it so disableKinds etc. does not get merged in from theme
7ba3f3d20 build(deps): bump golang.org/x/text from 0.3.6 to 0.3.7
f70165242 build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0
bc0743ed8 Prevent minifier from removing quoutes around post-processed attributes
ffa2fe611 Revert "commands: Avoid too many watch file handles causing the server to fail to start"
d966f5d08 highlight: Remove some pygments references
3f38c785b commands: Avoid too many watch file handles causing the server to fail to start
24589c081 build(deps): bump github.com/getkin/kin-openapi from 0.68.0 to 0.74.0
efebd756e deps: Update github.com/spf13/cast v1.4.0 => v1.4.1
58b6742cf Import time/tzdata on Windows
32ead4b1e releaser: Bump to Go 1.16.7
abd969a67 Revert "tpl/time: Handle nil values in time.AsTime"
3e1107289 tpl/time: Handle nil values in time.AsTime
9bba9a3a9 parser: Indent TOML tables
d6c8cd771 Fix `lang.FormatPercent` description
dfe54d321 releaser: Prepare repository for 0.88.0-DEV
b0c541e49 releaser: Add release notes to /docs for release of 0.87.0
2ed7be295 releaser: Bump versions for release of 0.87.0
d9d1ef8b0 Release 0.87
ec1c1c345 Merge branch 'b087' into release-0.87.0
c7fd13462 Update 0.87.0-relnotes.md
a5d2632eb Update 0.87.0-relnotes.md
494f284be docs: Adjust config docs
bf738d2f4 docs: Regen CLI docs
8d19850e2 docs: Regen docs helper
093498352 Merge commit 'bd77f6e1c9' into release-0.87.0
bd77f6e1c Squashed 'docs/' changes from 60a58d123..327003421
1c5b025dd docs: Adjust time zone docs
c13d33dd5 releaser: Add release notes for 0.87.0
d70c48570 Make sure module config loading errors have file positioning info
9ff17c332 tpl/time: Adjust tests to handle matching local time zones
7aaaf7e33 mod: Remove superflous replace statement
3a9665559 Reduce binary size vs locale, update to CLDR v36.1
9a7383caf deps: Update github.com/tdewolff/minify/v2 v2.9.20 => v2.9.21
6c70e1f22 Fix error handling for the time func alias
4d221ce46 Fail on invalid time zone
e3dc5240f Improve handling of <nil> Params
268065cb2 Merge branch 'release-0.86.1'
e0304c06e releaser: Add release notes for 0.86.1 [ci skip]
7aa8b1cd7 releaser: Prepare repository for 0.87.0-DEV
f6821b88a releaser: Add release notes to /docs for release of 0.86.1
580d320a6 releaser: Bump versions for release of 0.86.1
b75d4526e releaser: Add release notes for 0.86.1 [ci skip]
94b616bdf config: Fix a potential deadlock in config reading
e90b3591a build(deps): bump github.com/evanw/esbuild from 0.12.16 to 0.12.17
4b7da6a9d build(deps): bump github.com/getkin/kin-openapi from 0.67.0 to 0.68.0
7907d24ba tpl/lang: Add new localized versions of lang.FormatNumber etc.
726fe9c3c Go back to WARNING for Page deprecations
b5de37ee7 Handle toml.LocalDate and toml.LocalDateTime in front matter
bf301daf1 deps: Upgrade github.com/pelletier/go-toml/v2 v2.0.0-beta.3 => v2.0.0-beta.3.0.20210727221244-fa0796069526
a3701e093 Switch to go-toml v2
40b6016cf build(deps): bump github.com/tdewolff/minify/v2 from 2.9.19 to 2.9.20
7e1305710 Add a TOML front matter benchmark
efa5760db Add timezone support for front matter dates without one
a57dda854 Localize time.Format
f9afba933 build(deps): bump github.com/getkin/kin-openapi from 0.61.0 to 0.67.0
a5d2ba429 build(deps): bump github.com/spf13/cast from 1.3.1 to 1.4.0
31972f364 build(deps): bump google.golang.org/api from 0.45.0 to 0.51.0
2e58782f9 build(deps): bump github.com/sanity-io/litter from 1.5.0 to 1.5.1
7b68f6524 build(deps): bump github.com/mattn/go-isatty from 0.0.12 to 0.0.13
81265af2c build(deps): bump github.com/spf13/cobra from 1.1.3 to 1.2.1
c102c9719 build(deps): bump github.com/mitchellh/mapstructure from 1.3.3 to 1.4.1
7c0f904f2 build(deps): bump github.com/google/go-cmp from 0.5.5 to 0.5.6
b2fbd4d13 build(deps): bump github.com/mitchellh/hashstructure from 1.0.0 to 1.1.0
90041d1b6 build(deps): bump github.com/gobuffalo/flect from 0.2.2 to 0.2.3
05047096f build(deps): bump github.com/pelletier/go-toml from 1.9.0 to 1.9.3
a469156ea build(deps): bump github.com/aws/aws-sdk-go from 1.38.23 to 1.40.8
18fdd85bc build(deps): bump github.com/tdewolff/minify/v2 from 2.9.18 to 2.9.19
aeb1935d4 deps: Update github.com/evanw/esbuild v0.11.16 => v0.12.16
c7252224c Deprecate Blackfriday and fix a potential deadlock in config
e09d7882c deps: Update github.com/yuin/goldmark v1.3.9 => v1.4.0
15c0eed04 build(deps): bump github.com/frankban/quicktest from 1.12.0 to 1.13.0
91cbb9630 Bump all long-living deprecations to ERRORs
a352d19d8 Fix theme count in release notes
11bb67dcf releaser: Prepare repository for 0.87.0-DEV
41c6c52ea releaser: Add release notes to /docs for release of 0.86.0
d270eaf4f releaser: Bump versions for release of 0.86.0
b2e67505f Release 0.86.0
32508045d navigation: Check Page first in URL()
e521c9a36 Update 0.86.0-relnotes.md
dfb1cc431 releaser: Add release notes for 0.86.0
0294a4a4f Merge commit '53a352795a'
53a352795 Squashed 'docs/' changes from 6ebb5dad9..60a58d123
351ed0f56 commands: Fix panic on invalid config in "hugo mod get" and similar
d831d2fce Simplify "active menu" logic for section menus
634481ba8 Fix Params case handling for menu items defined in site config
c19f65f95 minifiers: Make keepWhitespace = true default for HTML
022c47955 hugofs: Make FileMeta a struct
f27e54244 markup: Add tabindex="0" to default <pre> wrapper
ae6cf93c8 Fix default values when loading from config dir
a70da2b74 Fix the deprecation error/warn log levels
805664818 markup/goldmark: Rename/reorder the hook methods
ee3d2bb1d markup/goldmark: Support auto links in render hook
eb2a50036 Adjust a test helper
5cb52c231 Add config.cascade
30eea3915 resources: Regenerate image golden testdata
8f40f34cd Fix transparency problem when converting 32-bit images to WebP
8ddbc9546 releaser: Prepare repository for 0.86.0-DEV
724d5db58 releaser: Add release notes to /docs for release of 0.85.0
875fe4050 releaser: Bump versions for release of 0.85.0
56362e4bc Update 0.85.0-relnotes.md
f5cfb9e25 releaser: Add release notes for 0.85.0
04dc469fb commands: Move time notification to after any build errors
07919d1cc exif: Log warning for metadata decode error
f75f90079 Fix tab selection of disabled items in internal pagination template
e31b1d194 commands: Make the --poll flag a duration
43a23239b docs: Regen CLI docs
4479f09c9 Merge commit '7eb0e10a80'
7eb0e10a8 Squashed 'docs/' changes from 710856e5a..6ebb5dad9
24ce98b6d Add polling as a fallback to native filesystem events in server watch
0019d60f6 deps: Bump github.com/yuin/goldmark v1.3.9
e451b984c Fix panic when theme has permalinks config
b4d60b3db releaser: Prepare repository for 0.85.0-DEV
020e4acee releaser: Add release notes to /docs for release of 0.84.4
4c34faf42 releaser: Bump versions for release of 0.84.4
a339f6266 releaser: Add release notes for 0.84.4 [ci skip]
4c8552b11 Fix Cloudflare vs Netlify cache dir issue
34e4742f0 Fix date format in schema and opengraph templates
bffa2a2a9 releaser: Prepare repository for 0.85.0-DEV
a1b0353cc releaser: Add release notes to /docs for release of 0.84.3
bc6f84c58 releaser: Bump versions for release of 0.84.3
80410257e releaser: Add release notes for 0.84.3 [ci skip]
6c8c0c8b6 config: Fix Netlify default cache dir logic
49fedbc51 config: Fix handling of invalid OS env config overrides
829072010 releaser: Prepare repository for 0.85.0-DEV
e0c67958f releaser: Add release notes to /docs for release of 0.84.2
f6b9ce6eb releaser: Bump versions for release of 0.84.2
4b03399b7 releaser: Add release notes for 0.84.2 [ci skip]
40dfdd095 modules: Add module.import.noMounts config
3a6dc6d3f modules: Use value type for module.Time
6cd2110ab commands: Add version time to "hugo config mounts"
6a365c271 commands: Add some more info to "hugo config mounts"
19aa95fc7 Fix config handling with empty config entries after merge
923dd9d1c Fix config loading for "hugo mod init"
d9bdd37d3 deps: Update to Minify v2.9.18
b2eaf4c8c Remove credit from release notes
efb6ee6c1 releaser: Prepare repository for 0.85.0-DEV
4bd65e224 releaser: Add release notes to /docs for release of 0.84.1
ff2266300 releaser: Bump versions for release of 0.84.1
8677cfb04 releaser: Add release notes for 0.84.1 [ci skip]
093dacab2 Fix language menu config regression
4a9d408fe config: Fix merge of config with map[string]string values.
931205988 releaser: Bump to Goreleaser v0.171.0
a7e3da242 markup: Rename Header(s) to Heading(s) in ToC struct
b70a12ec4 Merge commit '4dd90050f1'
4dd90050f Squashed 'docs/' changes from 3a923e155..710856e5a
3d544c9ae releaser: Prepare repository for 0.85.0-DEV
2c4689f7b releaser: Add release notes to /docs for release of 0.84.0
9c0860f74 releaser: Bump versions for release of 0.84.0
a1694b06a releaser: Increase timeout
219ec3800 releaser: Add release notes for 0.84.0
be6b901cf docs: Regenerate docs helper
643b67193 output: Make WebAppManifestFormat NotAlternative=true
ab4e1dfa4 media: Adjust  test assertion
02f31897b media: support application/manifest+json
402da3f8f docs: Regenerate docshelper
92405e5b0 Squashed 'docs/' changes from 4c81c6c2a..3a923e155
a074f758b Merge commit '92405e5b0a'
bb2aa0870 Implement configuration in a directory for modules
9096842b0 tpl: Rename err-missing-instagram-accesstoken => error-missing-instagram-accesstoken
3aa7f0b27 deps: Update github.com/alecthomas/chroma v0.9.1 => v0.9.2
9b870aa78 deps: Run go mod tidy
93aad3c54 Split out the puthe path/filepath functions into common/paths
5af045eba resources/image: Fix fill with smartcrop sometimes returning 0 bytes images
8eafe0845 deps: Update to Goldmark v1.3.8
31fb29fb3 Do not read config from os.Environ when running tests
d392893cd Misc config loading fixes
a886dd53b github: Set a dummy Instagram token
a91cd7652 docs: Regenerate docs helper
162f41d0e Merge commit '32ba623541'
32ba62354 Squashed 'docs/' changes from bcc4f9324..4c81c6c2a
552cef5c5 Update to Go 1.16.5, Goreleaser 0.169.0
73483d0f9 tpl: Add a terse pagination template variant to improve performance
9b5debe4b Upgrade Instagram shortcode
12530519d Fix nested OS env config override when parent does not exist
f55d2f437 tpl/fmt: Add erroridf template func
282f1aa3d tpl/data: Print response body on HTTP errors
fcd63de3a tpl/data: Misc header improvements, tests, allow multiple headers of same key
150d75738 tpl/data: Allows user-defined HTTP headers with getJSON and getCSV
06d295427 hugofs: Set modTime at creation time
26ae12c0c Fix invalid timestamp of the "public" folder
ee733085b config: Fix env split to allow = character in  values
01758f99b Add math.Max and math.Min
845a7ba4f Catch incomplete shortcode error
10f60de89 Use SPDX license identifier
785a31b5b navigation: Cache and copy Menu for sorting
bc1e05286 deps: Update to LibSASS 3.6.5
f518b4f71 publisher: Make the HTML element collector more robust
dc6b7a75f Revert "publisher: Make the HTML element collector more robust"
3f515f0e3 Revert "publisher: Get the collector in line with the io.Writer interface"
a9bcd3818 publisher: Get the collector in line with the io.Writer interface
ef0f1a726 publisher: Make the HTML element collector more robust
abbc99d4c common/maps: Add Scratch.DeleteInMap
76c95f55a Display version when building site (#8533)
2c7f5b62f docs: Update querify function description and examples
c46fc838a tpl: Allow 'Querify' to take lone slice/interface argument
504c78da4 modules/npm: Change SetEscapeHTML to false
b660ea8d5 Add a benchmark
64f88f301 readme: Update dependency list
7a2c10ae6 tpl: Fix countwords to handle special chars
e1c328df2 releaser: Prepare repository for 0.84.0-DEV
5afe0a57d releaser: Add release notes to /docs for release of 0.83.1
8900e3391 releaser: Bump versions for release of 0.83.1
9753e1b9c releaser: Add release notes for 0.83.1 [ci skip]
ececd1b12 langs/i18n: Fix warning regression in i18n
b0ca723eb releaser: Prepare repository for 0.84.0-DEV
4c65ceccc releaser: Add release notes to /docs for release of 0.83.0
57a471a0d releaser: Bump versions for release of 0.83.0
9b63af55b Update 0.83.0-relnotes.md
23fc65832 docs: Fix shortcode
e7b5e36e0 releaser: Add release notes for 0.83.0
a9b52b417 docs: Regenerate docs helper
b073a1c97 docs: Regenerate CLI docs
4227cc1bd commands: Remove all dates from gendoc
c239c643f Squashed 'docs/' changes from fb551cc75..bcc4f9324
d7b22aee4 Merge commit 'c239c643fe'
3cc4fdd6f deps: Update getkin/kin-openapi v0.60.0 => v0.61.
7eb80a9e6 langs/i18n: Fix multiple unknown language codes
78c1a6a7c deps: Update github.com/evanw/esbuild v0.11.14 => v0.11.16
f6745ad35 Remove .Site.Authors from embedded templates
f523e9f0f deploy: Don't treat a NotFound response for Delete as a fatal error.
63cd05ce5 snap: Switch to deb packages of nodejs and python3-pygments
902535ef1 snapcraft.yaml: Install bin/node from node/14/stable
70aebba04 build(deps): bump github.com/getkin/kin-openapi from 0.55.0 to 0.60.0
3e3b7d447 build(deps): bump github.com/evanw/esbuild from 0.11.13 to 0.11.14
c13d36874 resources/page: Fix permalinks pattern detection for some of the sections variants
048418ba7 deps: Update to Chroma v0.9.1
eebde0c2a langs/i18n: Improve plural handling of floats
e4dc9a82b tpl/collections: Fix where on type mismatches
0d86a32d8 Make the shortcode template lookup for output formats stable
65c502cc8 build(deps): bump github.com/evanw/esbuild from 0.11.12 to 0.11.13
537c905ec langs/i18n: Revise the plural implementation
243951ebe snapcraft.yaml: Update to "base: core20"
fe2ee0280 build(deps): bump github.com/frankban/quicktest from 1.11.3 to 1.12.0
316d65cd7 build(deps): bump google.golang.org/api from 0.44.0 to 0.45.0
b95229ab4 build(deps): bump github.com/aws/aws-sdk-go from 1.37.11 to 1.38.23
0551df090 Correct function name in comment
bca40cf0c Fix Params case handling in where with slices of structs (e.g. Pages)
057e5a22a deps: Upgraded github.com/evanw/esbuild v0.11.0 => v0.11.12
fd96f65a3 docs: Regen docs helper
8f7891e70 Merge commit '07b8d9466d'
07b8d9466 Squashed 'docs/' changes from 9cece6640..fb551cc75
d3a64708f build(deps): bump github.com/tdewolff/minify/v2 from 2.9.15 to 2.9.16
3b56244f4 build(deps): bump golang.org/x/text from 0.3.5 to 0.3.6
f5d3d635e publisher: Remove some unreachable code
0d3c42da5 build(deps): bump github.com/getkin/kin-openapi from 0.39.0 to 0.55.0
ef34dd8f0 publisher: Some performance tweaks for the HTML elements collector
bc80022e0 publisher: Exclude comment and doctype elements from writeStats
2bb9496ce Merge branch 'release-0.82.1'
fda3c4d1e releaser: Prepare repository for 0.83.0-DEV
60618210b releaser: Add release notes to /docs for release of 0.82.1
f8b064f3c releaser: Bump versions for release of 0.82.1
4713e509b releaser: Add release notes for 0.82.1 [ci skip]
6e9d2bf0c Regression in media type suffix lookup
e73f7a770 Regression in media type suffix lookup
3ddffd064 build(deps): bump github.com/yuin/goldmark from 1.3.2 to 1.3.5
6fc52d185 Remove duplicate references from release notes
73c3ae818 build(deps): bump github.com/spf13/afero from 1.5.1 to 1.6.0
7ca118fdf build(deps): bump github.com/pelletier/go-toml from 1.8.1 to 1.9.0
33d5f8059 Add webp image encoding support
509d39fa6 build(deps): bump google.golang.org/api from 0.40.0 to 0.44.0
7725c41d4 build(deps): bump github.com/nicksnyder/go-i18n/v2 from 2.1.1 to 2.1.2
5d36d8015 build(deps): bump github.com/rogpeppe/go-internal from 1.6.2 to 1.8.0
9b34d42bb Remove extraneous space from figure shortcode
c2d8f87cf build(deps): bump github.com/magefile/mage from 1.10.0 to 1.11.0
cbc246616 build(deps): bump github.com/google/go-cmp from 0.5.4 to 0.5.5
fa432b17b org: Disable broken pretty relative links feature
0cd55c66d deps: Update go-org to v1.5.0
0d5cf256e build(deps): bump github.com/jdkato/prose from 1.2.0 to 1.2.1
36527576b build(deps): bump github.com/spf13/cobra from 1.1.1 to 1.1.3
9b83f45b6 Add complete dependency list in "hugo env -v"
7fdd2b95e Add hugo.IsExtended
3d5dbdcb1 publisher: Also test minified HTML in the element collector
8a308944e publisher: Skip script, pre and textarea content when looking for HTML elements
7b4ade56d output: Only output mediaType once in docshelper JSON
7c7974b71 Fix typo in docshelper.go
5656a908d tpl: Remove the FuzzMarkdownify func for now
2dc222cec Add slice syntax to sections permalinks config
4d22ad580 deps: Upgrade github.com/evanw/esbuild v0.9.6 => v0.11.0
5e2f12891 Try to fix the fuzz build
97934779e releaser: Prepare repository for 0.83.0-DEV
9d9607843 releaser: Add release notes to /docs for release of 0.82.0
1efd93c09 releaser: Bump versions for release of 0.82.0
584a9b3e2 releaser: Add release notes for 0.82.0
86b4fd35e docs: Regenerate docs helper
195d108da docs: Regen CLI docs
81689af79 Squashed 'docs/' changes from bb15e9804..9cece6640
c94aa5cf4 Merge commit '81689af799'
df8bb8812 Simplify some config loading code
57d8d208e deps: Update github.com/evanw/esbuild v0.9.0 => v0.9.6
fc06e8508 Apply OS env overrides twice
b725253f9 Attributes for code fences should be placed after the lang indicator only
35dedf15c deps: Bump github.com/tdewolff/minify/v2 v2.9.15
7ed56c694 Fix OS env override for nested config param only available in theme
24c716cac Fix `new theme` command description
137d2dab3 github: More explicit support link to discourse
ba1d0051b media: Make Type comparable
1b1dcf586 deps: Update to esbuild v0.9.0
f6612d8bd exif: Fix handling of utf8 runes in nullString()
0a2ab3f8f exif: Allow more spacing characters in strings
4d24e2a32 media: Add a basic benchmark
18074d0c2 Fix output format handling for render hooks
35bfb6622 Rename a test
6d21559fb Add a debug helper
ba16a14c6 Add support for Google Analytics v4
782c79ae6 Bump go.mod to Go 1.16
5afcae7e0 #8210 Upgrade golang version for Dockerfile
60469f429 Update CONTRIBUTING.md
aed7df62a markup: Handle attribute lists in code fences
cd0c5d7ef Allow markdown attribute lists to be used in title render hooks
e7e194435 Merge commit '9d31f650da'
9d31f650d Squashed 'docs/' changes from d343ebf71..bb15e9804
88a85dcea build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.7 to 2.2.8
7f8530039 tpl: Add method mappings for strings.Contains, strings.ContainsAny
01dd7c16a Fixes #7698.
c8f45d1d8 commands: Fix autocomplete docs
b3504a0ee releaser: Prepare repository for 0.82.0-DEV
59d15c97d releaser: Add release notes to /docs for release of 0.81.0
9e2d086ca releaser: Bump versions for release of 0.81.0
b65518ac6 releaser: Increase build timeout
0e9cd8128 releaser: Add release notes for 0.81.0
fe77f7434 tpl: Make the build green again
9e99950c6 docs: Regen CLI docs
1b364b003 docs: Regen docs helper
acb9109df Squashed 'docs/' changes from ef9c4913c..d343ebf71
7d0a26198 Merge commit 'acb9109df7'
c60806550 tpl: Regenerate internal templates
ffd9dac42 tpl: Update date logic of opengraph and schema internal templates
88b93a09d Run go mod tidy
29fb456c9 build: Add arm64 to Darwinextended build and add vendorInfo
718fba7d6 Update Travis, GitHub, CircleCI and Snap to Go 1.16 (only)
9650e5684 tpl: Add temporary patch to fix template data race
e77b2e3aa Pull in latest Go 1.16 template source
b5485aeae Add breaking tests for "map read and map write in templates"
ccb822eb5 Pull in latest Go template source
21e9eb18a Expand template newline testcase to commands
ae57ba6a9 Add a test case for Go 1.16 template action newlines
cf3e077da tpl/internal: Synch Go templates fork with Go 1.16dev
66beac99c deps: Update github.com/tdewolff/minify/v2 v2.6.2 => v2.9.13
968dd7a71 build(deps): bump github.com/frankban/quicktest from 1.11.2 to 1.11.3
38f29e817 build(deps): bump github.com/getkin/kin-openapi from 0.32.0 to 0.39.0
cd87813aa build(deps): bump github.com/aws/aws-sdk-go from 1.36.33 to 1.37.11
4e815b063 build(deps): bump github.com/sanity-io/litter from 1.3.0 to 1.5.0
652a59d38 build(deps): bump github.com/olekukonko/tablewriter from 0.0.4 to 0.0.5
84f0ec7f8 deps: Update to esbuild v0.8.46
bdfbcf6f4 modules: Add config option modules.vendorClosest
b60e9279a js: Fix potential path issue on Windows
a9b0fea6a build(deps): bump google.golang.org/api from 0.26.0 to 0.40.0
e8df09774 Change version string format and add VendorInfo to help with issue triaging
3a5ee0d2d modules: Allow absolute paths for any modules resolved via project replacement
4ffaeaf15 modules: Throw an error running hugo mod vendor on mountless module
bf55afd71 Fix some humanize issues
5f621df25 commands: Add PowerShell completion support
7118f89cf Refer to mage instead of make in comment regarding commitHash
e6dd31281 markup/goldmark: Fix handling of legacy attribute config
2681633db markup/goldmark: Add attributes support for blocks (tables etc.)
1b2472825 deps: Update to Goldmark v1.3.2
441b11bee Update to Dart Sass Protocol beta6
4867cd1de tpl/embedded: Exclude pages without Permalink from sitemap
92c6c4041 langs/i18n: Support translation files with suffix *.yml
d36fd5b3e Refactor: Write to stdout by default
a7c515e1b Refactor: Remove powershell support
216b00f35 Feat: Add zsh, fish and powershell completion support
144943798 github: Enable NPM tests on Windows
440fdb0eb deps: Update to esbuild v0.8.39
b2a48dce5 Trim whitespace in elements written to hugo_stats.json
35def0ae4 tpl/data: Add default user-agent header for getJSON requests
2f9dadae4 build(deps): bump github.com/aws/aws-sdk-go from 1.35.0 to 1.36.33
ed3071b75 docs: Remove mention of a file size limit for readFile
ee9c13676 tpl/os: remove 1mb limit for readFile.
32b86076e js: Add Inject config option
241b7483e tpl: Fix race condition in text template baseof
e19a046c4 js: Add Shims option
a1fe552fc Fix nilpointer in js.Build error handling
a1a9f088b Merge commit 'e48ffb7635'
e48ffb763 Squashed 'docs/' changes from 1de7a358c..ef9c4913c
07ad283f6 build(deps): bump github.com/spf13/afero from 1.4.1 to 1.5.1
2c8b5d916 pipes: Add external source map support to js.Build and Babel
0004a733c tpl: Fix metrics hint tracking
8a26ab0bc tpl: Do not return errors in substr for out-of-bounds cases
788e50ad3 tpl: Add missing test scenario for strings.Substr
4d2b6fc4c Run go mod tidy
212e5e554 deps: Update go-org to v1.4.0
4fdec67b1 rst: Adjust log level
9b681ecfb releaser: Prepare repository for 0.81.0-DEV
792ef0f41 releaser: Add release notes to /docs for release of 0.80.0
5b3fc1c67 releaser: Bump versions for release of 0.80.0
63a33afee Update 0.80.0-relnotes.md
69aa3d459 releaser: Add release notes for 0.80.0
ffbf5e45f Allow Dart Sass transformations to be cached on disk
48994ea76 dartsass: Dart Sass only supports `expanded` and `compressed`
428b0b329 dartsass: Add missing OutputStyle option
1f7e9f733 Update emoji import paths and version
cea157402 Add Dart Sass support
f9f779786 GroupByParamDate now supports datetimes
a9718f44c para: Skip para test when not on CI
f802bb236 Update SECURITY.md
6c2941827 releaser: Add release notes to /docs for release of 0.79.1
10ae7c321 Improve LookPath
ae2d1bd52 docs: create a SECURITY.md
81975f847 Fix Resource.ResourceType so it always returns MIME's main type
8103188b9 para: Show more detail on failed time test
3ba147e70 images: Add images.Overlay filter
a2d146ec3 tpl: Regenerate templates
d2d493ab5 tpl: Fix series detection in opengraph
ce96895de hugolib/paths: Fix typo
04b89857e all: Fix minor typos
21fa1e86f Fix BenchmarkMergeByLanguage
c84ad8db8 deps: Bump github.com/spf13/cobra from 0.15.0 to 0.20.0
4e0acb89b chore: configure proper link to discourse.gohugo.io (#8020)
718e09ed4 tpl/internal/go_templates: Revert formatting
d90e37e0c all: Format code with gofumpt
32471b57b build(deps): bump github.com/evanw/esbuild from 0.8.15 to 0.8.17
4fc918e02 tpl: Add title parameter to YouTube shortcode
0ad378b09 Use --baseURL path for live-reload URL
aebfe156f Fix RelURL and AbsURL when path starts with language
907d9e926 build(deps): bump github.com/getkin/kin-openapi from 0.31.0 to 0.32.0
5862fd2a6 tpl: Fix substr when length parameter is zero
64789fb5d tpl: Refactor and fix substr logic
32d4bf68d releaser: Prepare repository for 0.80.0-DEV
1415efdcd releaser: Add release notes to /docs for release of 0.79.0
4e6bf7907 releaser: Bump versions for release of 0.79.0
50be4370b Update 0.79.0-relnotes.md
3d2e6a30d releaser: Add release notes for 0.79.0
4f1e4bb3f Merge commit '9f1265fde4'
9f1265fde Squashed 'docs/' changes from 57c1d1a67..1de7a358c
d162bbd79 publisher: Fix memory usage in writeStats
17e0bbe82 build(deps): bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0
e442cf30a Fix server rebuild issue with partials referenced from render hooks
7e223b3ba Allow setting the delimiter used for setting config via OS env, e.g. HUGO_
8a6e70605 deps: Update to github.com/evanw/esbuild 0.8.11 to 0.8.14
34061706e output: Add more layout lookup tests
6f7633df7 build(deps): bump github.com/google/go-cmp from 0.5.2 to 0.5.3
a546059a9 examples: Remove unneeded meta tag from blog example
b5d906e31 build(deps): bump github.com/getkin/kin-openapi from 0.30.0 to 0.31.0
fd70bdafe docs: Regen docshelper
8f5c9a747 Add menu params
e4fcb672e resources: Preserve url set in frontmatter without sanitizing
18c13adcd watcher: Add file deleted by accident
20a35374a Revert "docs: Regenerate docshelper"
caf16c208 docs: Regenerate docshelper
b298c06e0 deps: Update to Chroma v0.8.2
55e290af4 build(deps): bump github.com/evanw/esbuild from 0.8.8 to 0.8.11
506a190a8 build(deps): bump github.com/getkin/kin-openapi from 0.26.0 to 0.30.0
fc81de643 build(deps): bump github.com/evanw/esbuild from 0.8.6 to 0.8.8
fcaa324e3 releaser: Prepare repository for 0.79.0-DEV
959724f0e releaser: Add release notes to /docs for release of 0.78.2
a3012d85d releaser: Bump versions for release of 0.78.2
fc7f73927 releaser: Add release notes for 0.78.2 [ci skip]
78f227b66 js: Let ESBuild handle all imports from node_modules
5e03f644a build(deps): bump github.com/evanw/esbuild from 0.8.5 to 0.8.6
a92ef20ff build(deps): bump github.com/evanw/esbuild from 0.8.4 to 0.8.5
0d54a8440 build(deps): bump github.com/getkin/kin-openapi from 0.22.1 to 0.26.0
943f3c932 Update GH docs to say "main" as default branch
4f20bf29e Updated year in header
4c613d5d5 Added first fuzzer
82a182e52 build(deps): bump github.com/frankban/quicktest from 1.11.1 to 1.11.2
dfc662b20 build(deps): bump golang.org/x/text from 0.3.3 to 0.3.4
2f0917cc0 build(deps): bump github.com/evanw/esbuild from 0.8.3 to 0.8.4
7565cda1f releaser: Prepare repository for 0.79.0-DEV
347f2de67 releaser: Add release notes to /docs for release of 0.78.1
210f6d38a releaser: Bump versions for release of 0.78.1
03f87f8f0 releaser: Add release notes for 0.78.1 [ci skip]
3437174c3 Disable NPM test on Travis on Windows
f66302ca0 travis: Install nodejs on Windows
944150baf js: Remove external source map option
bf2837a31 js: Misc fixes
cf6131dc1 releaser: Prepare repository for 0.79.0-DEV
fd62817bb releaser: Add release notes to /docs for release of 0.78.0
3ebe83aea releaser: Bump versions for release of 0.78.0
0c16debc7 Update 0.78.0-relnotes.md
794e1f9e7 releaser: Add release notes for 0.78.0
c64e9504d Merge commit 'b74591123e'
b74591123 Squashed 'docs/' changes from d1157b687..57c1d1a67
3b2fe3cd3 js: Add avoidTDZ option
85e4dd737 Make js.Build fully support modules
3089fc0ba js.Build: Generate tsconfig files
e10e36cf7 releaser: Prepare repository for 0.78.0-DEV
ef290125c releaser: Add release notes to /docs for release of 0.77.0
5d2fceeca releaser: Bump versions for release of 0.77.0
0696df668 Release 0.77.0
5ba49c877 Update 0.77.0-relnotes.md
c3ccda8fa releaser: Add release notes for 0.77.0
beabc8d99 modules: Allow absolute paths for project imports
332b65e4c docs: Regen docs helper
3553fc533 Merge commit '9cabb46f68'
9cabb46f6 Squashed 'docs/' changes from 9abd3043a..d1157b687
173187e26 Add module.replacements
8a1c637c4 Fix setting HUGO_MODULE_PROXY etc. via env vars
6d95dc9d7 tpl: Fix reflection bug in merge
56a343507 deploy: Do not call CDN service invalidation when executing a dry run deployment
d48a98c47 create: Pass editor arguments from newContentEditor correctly
3261678f6 deps: Bump github.com/spf13/cobra from 0.0.7 to 1.1.1
f465c5c30 build: Allow optional "nodeploy" tag to exclude deploy command from bin
3400aff25 Allow cascade _target to work with non toml fm
fdfa4a5fe Allow getJSON errors to be ignored
8cbe2bbfa build(deps): bump github.com/evanw/esbuild from 0.7.15 to 0.7.18
807db97af tpl: Refactor time.AsTime location implementation
26eeb2914 tpl: Update Hugo time to support optional [LOCATION] parameter
b886fa46b Revert "Add benchmark for building docs site"
14bce18a6 highlight: Avoid making unnecessary allocation
837e084bb Add benchmark for building docs site
08e4f9ff9 embedded: Always show page number when 5 pages or less
acfa15386 output: Improve layout path construction
f033d9f01 build(deps): bump github.com/frankban/quicktest from 1.11.0 to 1.11.1
59fe27942 build(deps): bump github.com/evanw/esbuild from 0.7.14 to 0.7.15
62119022d Merge branch 'release-0.76.5'
2f3f41f73 releaser: Prepare repository for 0.77.0-DEV
60f0725b3 releaser: Add release notes to /docs for release of 0.76.5
dcf70ea5a releaser: Bump versions for release of 0.76.5
7487c0abf releaser: Add release notes for 0.76.5 [ci skip]
79a022a15 Render aliases even if render=link
ead5799f7 Render aliases even if render=link
d57be1132 build(deps): bump github.com/spf13/afero from 1.4.0 to 1.4.1
d07059669 build(deps): bump github.com/evanw/esbuild from 0.7.9 to 0.7.14
f5ea359dd docker: Update to Go 1.15 and Alpine 3.12
78b26d538 output: Test all lookup permutations in TestLayout
28179bd55 output: Reformat TestLayout table
fef057b48 releaser: Prepare repository for 0.77.0-DEV
50dfe40b9 releaser: Add release notes to /docs for release of 0.76.4
1ef4211fe releaser: Bump versions for release of 0.76.4
b148063ec releaser: Add release notes for 0.76.4 [ci skip]
e9a7ebaf6 snap: Install postcss v8 explicitly as it is now a peer dependency
506820435 lang/i18n: Fix for language code case issue with pt-br etc.
49972d079 Merge branch 'release-0.76.3'
c98132e30 Add merge helper
af19253f4 releaser: Prepare repository for 0.77.0-DEV
e96234590 releaser: Add release notes to /docs for release of 0.76.3
d62bc7477 releaser: Bump versions for release of 0.76.3
1b1d62fdc releaser: Add release notes for 0.76.3 [ci skip]
33e9d79b7 langs/i18n: Add workaround for known language, but missing plural rule error
fc6abc39c langs/i18n: Fix for bare TOML keys
18ed22be5 releaser: Prepare repository for 0.77.0-DEV
207913f34 releaser: Add release notes to /docs for release of 0.76.2
830b1a94d releaser: Bump versions for release of 0.76.2
605cff407 releaser: Add release notes for 0.76.2 [ci skip]
6dd60fca7 Revert "deps: Update to  github.com/tdewolff/minify v2.9.4"
138a02591 releaser: Prepare repository for 0.77.0-DEV
58ac83a98 releaser: Add release notes to /docs for release of 0.76.1
2b8e8e6d9 releaser: Bump versions for release of 0.76.1
aef836986 releaser: Add release notes for 0.76.1 [ci skip]
f9e798e8c langs/i18n: Fix i18n .Count regression
ee56efffc Fix typo in 0.76.0 release note
2c4e76e96 releaser: Prepare repository for 0.77.0-DEV
9c7d6e475 releaser: Add release notes to /docs for release of 0.76.0
4482958f9 releaser: Bump versions for release of 0.76.0
e1ec3bc2b Release 0.76.0
1cfa63b9e releaser: Add release notes for 0.76.0
b9318e431 docs: Regen docshelper
5e39eb20a Merge commit 'e556848805'
e55684880 Squashed 'docs/' changes from 4895c29c5..9abd3043a
634938908 pagemeta: Make BuildConfig.Render an enum
c63db7f1f Allow cascade to be a slice with a _target discriminator
5e2a547cb Add force flag to server redirects config
ee090c094 build(deps): bump github.com/evanw/esbuild from 0.7.8 to 0.7.9
edc5c4741 tpl: Add Do Not Track (dnt) option to Vimeo shortcode
05e358fd3 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.5 to 2.9.7
a2e85d9a7 build(deps): bump github.com/aws/aws-sdk-go from 1.34.34 to 1.35.0
4fba78dd0 build(deps): bump github.com/getkin/kin-openapi from 0.22.0 to 0.22.1
c011b4667 build(deps): bump github.com/aws/aws-sdk-go from 1.34.33 to 1.34.34
35348b4b3 build(deps): bump github.com/evanw/esbuild from 0.7.7 to 0.7.8
34915777c build(deps): bump github.com/aws/aws-sdk-go from 1.34.27 to 1.34.33
0f4a837ed build(deps): bump github.com/evanw/esbuild from 0.7.4 to 0.7.7
b395d686e build(deps): bump github.com/tdewolff/minify/v2 from 2.9.4 to 2.9.5
97987e5c0 langs/i18n: Upgrade to go-i18n v2
111344113 publisher: Fix writeStats with quote inside quotes
4855c186d build(deps): bump github.com/evanw/esbuild from 0.7.2 to 0.7.4
0c3d2b67e Fix CLI example for PostCSS 8
6f07ec7e9 build(deps): bump github.com/aws/aws-sdk-go from 1.34.26 to 1.34.27
4318dc72f build(deps): bump github.com/alecthomas/chroma from 0.8.0 to 0.8.1
acdc27a32 build(deps): bump github.com/evanw/esbuild from 0.7.1 to 0.7.2
3acde9ae0 Make sure CSS is rebuilt when postcss.config.js or tailwind.config.js changes
473b6610d Fix typo in redirect error message
0bce97703 build(deps): bump github.com/aws/aws-sdk-go from 1.34.22 to 1.34.26
b254532b5 deps: Update to  github.com/tdewolff/minify v2.9.4
05a228929 snap: Bump bundled Node.js from v12.18.3 to v12.18.4
8e553dcde markup/asciidocext: Add preserveTOC option
d4fc70a3b build(deps): bump github.com/frankban/quicktest from 1.10.2 to 1.11.0
d905abc00 build(deps): bump github.com/evanw/esbuild from 0.6.32 to 0.7.1
8f3946746 build(deps): bump github.com/rogpeppe/go-internal from 1.5.1 to 1.6.2
b01b2564e build(deps): bump github.com/jdkato/prose from 1.1.1 to 1.2.0
9fa5ebe2c build(deps): bump github.com/spf13/afero from 1.2.2 to 1.4.0
efaed306b releaser: Prepare repository for 0.76.0-DEV
a4a7bab73 releaser: Add release notes to /docs for release of 0.75.1
2a9dce423 releaser: Bump versions for release of 0.75.1
30159b58e releaser: Add release notes for 0.75.1 [ci skip]
cd00f7f96 resources/image: Fix nilpointer for images with no Exif
214afe4c1 modules/npm: Preserve the original package.json if it exists
cd830bb02 tpl: Fix grammar in the new 'requires non-zero' error message
a8458bfb2 releaser: Prepare repository for 0.76.0-DEV
fef924baf releaser: Add release notes to /docs for release of 0.75.0
07b5e602f releaser: Bump versions for release of 0.75.0
70f16e84e Release 0.75.0
abadf2954 releaser: Add release notes for 0.75.0
377ad87a5 Set PWD in environment when running the Node apps
292b0e26e typo: already -> already
534ae9c57 Squashed 'docs/' changes from d3eb97a33..4895c29c5
df56682a1 Merge commit '534ae9c57a'
be2404c8b docs: Regen docs helper
c8da8eb1f docs: Regenerate CLI docs
787da6bd5 releaser: Drop 32-bit for MacOS
85ba9bfff Add "hugo mod npm pack"
9df60b62f Print layout name if it was specified when showing missing layout file error
4fad43c8b build(deps): bump github.com/aws/aws-sdk-go from 1.34.21 to 1.34.22
fb0f2cc71 markup/highlight: Add support to linkable line anchors on Chroma
748fd4cb0 snap: Bump bundled Node.js from v8.12.0 to v12.18.3
b82f440c5 Revert "snap: Change confinement from strict to classic"
c8143efa5 build(deps): bump github.com/getkin/kin-openapi from 0.14.0 to 0.22.0
c80132bbe build(deps): bump github.com/aws/aws-sdk-go from 1.34.20 to 1.34.21
75fa4c5c9 build(deps): bump github.com/spf13/viper from 1.6.1 to 1.7.1
fd7969e0b deps: Run "go mod tidy"
b7fa3c4bb deps: Update to Goldmark v1.2.1
6a848cbc3 markup/asciidocext: Fix AsciiDoc TOC with code
746ba803a build(deps): bump github.com/aws/aws-sdk-go from 1.27.1 to 1.34.20
612b7d376 build(deps): bump github.com/mitchellh/mapstructure from 1.1.2 to 1.3.3
6f4ff1a46 snap: Change confinement from strict to classic
ddeca4593 build(deps): bump github.com/spf13/cobra from 0.0.5 to 0.0.7
31f2091f5 build(deps): bump github.com/sanity-io/litter from 1.2.0 to 1.3.0
d4611c432 modules: Add noVendor to module config
20af9a078 modules: Add ignoreImports to module imports config
9a1e6d15a modules: Make ignoreVendor a glob pattern
84adecf97 build(deps): bump github.com/gorilla/websocket from 1.4.1 to 1.4.2
573558a07 build(deps): bump github.com/fsnotify/fsnotify from 1.4.7 to 1.4.9
8b10c22f8 build(deps): bump github.com/kyokomi/emoji
195bd1243 build(deps): bump github.com/markbates/inflect from 1.0.0 to 1.0.4
6a544ece2 build(deps): bump github.com/frankban/quicktest from 1.7.2 to 1.10.2
4b430d456 Encode & in livereload injected code
b9f10c75c build(deps): bump github.com/niklasfasching/go-org from 1.3.1 to 1.3.2
537c598e9 build(deps): bump github.com/bep/golibsass from 0.6.0 to 0.7.0
67348676f build(deps): bump golang.org/x/text from 0.3.2 to 0.3.3
f9cc0ec76 build(deps): bump github.com/evanw/esbuild from 0.6.5 to 0.6.32
b5483eed6 build(deps): bump github.com/nicksnyder/go-i18n from 1.10.0 to 1.10.1
90285f475 Revert "Update dependabot.yml"
4949bdc2e markup/asciidocext: Fix broken test
f7c1b5fe1 docs: Update replaceRE func
183e86260 docs: Update replace func
f50ee6bbe docs: Update merge function
c0655ba6c Update dependabot.yml
a2dda22c3 Create dependabot.yml
910d81a69 Remove Pygments from requirements.txt
8c490a73b docs: Regen CLI docs
e6cd9da42 docs: Regen docs helper
dcf25c0b4 markup/asciidocext: Revert trace=true
7d7771b67 Squashed 'docs/' changes from 7297c1172..d3eb97a33
b9e4f5898 Merge commit '7d7771b673'
e820b366b Update to Go 1.15.1 and 1.14.8
4055c1218 Fix some change detection issues on server reloads
3ba7c9253 markup/asciidoc: Add support for .TableOfContents
19ef27b98 markup/goldmark: Add a test case
c6b661de8 js.Build: Add SourceMap flag with inline option
cdfd1c99b tpl: Add limit support to replaceRE
047af7cfe tpl: Extend merge to accept multiple parameters
f9ebaaed1 tpl: Add limit option to replace template function
d39636a5f commands: Remove logic that hides 'Building Sites' message after build completes
ad01aea3f Fixed misspelled words
ec3742046 Improve stderr logging for PostCSS and simlilar
ae63c2b5c Fail on  partials with return when given none or a zero argument
e627449c0 Update to Go 1.15
c2235c6a6 Revert "Update stale.yml"
4f69ade71 Update stale.yml
f8b8b091f Merge commit 'cb39847dee'
cb39847de Squashed 'docs/' changes from a26d0e610..7297c1172
5f4259014 Remove trailing whitespace and tabs from RSS templates
f3cb0be35 Fix a typo in CONTRIBUTING.md
bffc4e12f Revert "Fix ellipsis display logic in pagination template"
12f6a1cdc Respect mediatypes for deploy
2fa851e65 Fix ellipsis display logic in pagination template
21dbfa1f1 mage: Add uninstall target
e5591e89d deps: Update Chroma to 0.8.0
88929bc23 deps: Update go-org to v1.3.1
850c18bfe releaser: Prepare repository for 0.75.0-DEV
da0437b48 releaser: Add release notes to /docs for release of 0.74.3
90fe00df0 releaser: Bump versions for release of 0.74.3
02efadc24 releaser: Add release notes for 0.74.3 [ci skip]
00e00da23 publisher: Collect transition attributes as classes
45c665d39 Fix Asciidoctor args
a06c06a5c Fix date format in internal schema template
0256959a3 resources/js: Add option for setting bundle format
eded9ac2a resources/js: Simplify options handling
8d7251282 make sure documentation intro text only appears once
e81aef0a9 resources/js: Add es5 build target
673e622fa Merge commit '28bd06265e'
28bd06265 Squashed 'docs/' changes from c3b4f8410..a26d0e610
9f9191471 deps: esbuild v0.6.5
3727a9d11 releaser: Prepare repository for 0.75.0-DEV
48565de62 releaser: Add release notes to /docs for release of 0.74.2
808e12621 releaser: Bump versions for release of 0.74.2
aa85a46dc releaser: Add release notes for 0.74.2 [ci skip]
35011bcb2 Add .Defines to js.Build options
084624baa releaser: Prepare repository for 0.75.0-DEV
15163266c releaser: Add release notes to /docs for release of 0.74.1
a74f7d3cc releaser: Bump versions for release of 0.74.1
cb84d9816 releaser: Add release notes for 0.74.1 [ci skip]
c91dbe4ce Fix baseof block regression
6e0452e18 releaser: Prepare repository for 0.75.0-DEV
d2b116268 releaser: Add release notes to /docs for release of 0.74.0
626518430 releaser: Bump versions for release of 0.74.0
797127010 Release 0.74.0
1672a332d releaser: Add release notes for 0.74.0
823ce055e Squashed 'docs/' changes from cfd74b57d..c3b4f8410
5f7a65a08 Merge commit '823ce055ed'
25e3da334 docs: Regenerate docs helper
9df98ec49 Add proper Media Type handling in js.Build
2fc338070 Add js.Build asset bundling
f1916f114 Merge commit '6aa5c9117f'
6aa5c9117 Squashed 'docs/' changes from ac2c4a487..cfd74b57d
12a65e76d Add openapi3.Unmarshal
58c0f5e61 Remove trailing hyphen from auto heading ID
a1c3e3c1f deploy: Ensure that non-trivial default flag values are passed through.
42e150fbf Fix server reload when non-HTML shortcode changes
028b35678 tpl/strings: Add strings.Count
e9f87c4e3 Update formats.md doc for new allowed extensions.
defd7106b tpl: Add debug.Dump
beb6c03bc Update config.go to add two Asciidoctor extensions
4a3efea7e Add support for inline partials
c66dc6c74 Add support for native Org dates in frontmatter
127d5feb3 deps: Update go-org to v1.3.0
2d42ba912 deps: Update go-org to v1.2.0
5b7b5dea1 Update bug_report.md
ccfaeb678 hugolib: Add missing zero check on file
057b1377c cache: Remove some unused code
48dbb593f commands: Add an option to print memory usage at intervals
f0266e2ef Rework external asciidoctor integration
77aa385b8 Enable the embedded template test when race detector is off
545a1c1ce Merge branch 'release-0.73.0'
47aaa52e3 releaser: Prepare repository for 0.74.0-DEV
428907cc3 releaser: Add release notes to /docs for release of 0.73.0
a78b3e341 releaser: Bump versions for release of 0.73.0
cfcb01451 Release 0.73.0
0b579db80 Updated installation instruction about Sass/SCSS support
ee5d027cd releaser: Add release notes for 0.73.0
4a340ba25 Remove some old release notes
3466884e3 Create robots.txt in the domain root directory
6ff435aa3 Make GroupByParamDate work with string params
82abca32f Add GroupByLastmod
fc045e12a Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy
9679023f2 Fix aliases with path in baseURL
0a9172672 Merge commit 'efa74c5c6e'
efa74c5c6 Squashed 'docs/' changes from 9be494de3..ac2c4a487
6408c1cbc Fix server data race/nil pointer in withMaps
522ba1cd9 Fix order of GetTerms
889dc47ce Add genDocsHelper mage target
f720fe56d Fix aliases with uglyURLs
d6ed17c60 Fix crash for closing shortcode with no .Inner set
145b3fcce Fix aliases with relativeURLs
01e249e97 Regenerate templates
4b560cc11 Beautify HTML generated by pagination template
e3e627e6b Add a nested data dir test
83d03a520 hugofs: Use os.PathError  in RootMappingFs.doLstat
fc0f13b68 commands: Fix URL rewrites vs fast render server mode
7eeebe1e5 tpl/crypto: Add hmac
740fa4a91 Remove credit (#7347)
f8c67f93e Allow hook template per section/type
3d9235e8f tpl: Fix bad rounding in NumFmt
f7d909f39 releaser: Prepare repository for 0.73.0-DEV
8a7ef3cf4 releaser: Add release notes to /docs for release of 0.72.0
2dfe242ea releaser: Bump versions for release of 0.72.0
7a1464e54 Release 0.72.0
41d50b4dd releaser: Add release notes for 0.72.0
4d53ae697 releaser: Adjust the "thanks" section
626b16e02 Merge commit '9e1dcefc5f'
9e1dcefc5 Squashed 'docs/' changes from 6c2195936..9be494de3
2919a6a50 common/maps: Add Scratch.Values
432885c49 deps: Update Goldmark to improve Typographer
6a3e89743 Add redirect support to the server
9613e3e8a Fix typo in install instructions
c950c86b4 publisher: Fix tag collector for nested table elements
915202494 snap: Fix build error: my previous commits did not fix it
b3e4f911f releaser: Prepare repository for 0.72.0-DEV
a301f6b2a releaser: Add release notes to /docs for release of 0.71.1
646bc8508 releaser: Bump versions for release of 0.71.1
5c0d10045 releaser: Add release notes for 0.71.1 [ci skip]
81f563324 Add some more date test cases
9698b0dab Fix RenderString vs render hooks
32344fe3d Prevent WARNINGs in RenderString
4d7fa9f11 Fix IsAncestor/IsDescendant for taxonomies
a985efcec Fix GetPage on section/bundle name overlaps
6c3c6686f Fix Go template script escaping
c34bf4856 Add a test helper
833d16d46 releaser: Prepare repository for 0.72.0-DEV
06150c87b releaser: Add release notes to /docs for release of 0.71.0
330e52ebe releaser: Bump versions for release of 0.71.0
9e7823537 Release 0.71
7cd66c53b releaser: Add release notes for 0.71.0
723ec555e Fix Babel on Windows
518d14964 commands: Use WARN log level also for the early initialization
e0e81b280 Merge commit 'c9403cbcea'
c9403cbce Squashed 'docs/' changes from ec0abe052..6c2195936
3cc41523b Update to Go 1.14.3 and Go 1.13.11
2fd0a5a67 Improve error message when no Babel installed
6e051c053 Add test for headings render hook
423b8f2fb Add render template hooks for headings
991934497 Add math.Pow
558c09305 deploy: Do not suppress .well-known/ directory
b69a36140 snap: Quote "@babel/cli" to solve build error
a0103864a snap: Remove custom x-nodejs plugin
b342e8fbd Upgrade chroma to 0.7.3 to fix invalid css
6205d56b8 Use .Lastmod for og:updated_time
a5039ddda releaser: Prepare repository for 0.71.0-DEV
7f47b99ea releaser: Add release notes to /docs for release of 0.70.0
b98e2f66b releaser: Bump versions for release of 0.70.0
57ebab7c2 Release 0.70.0
0e314925f releaser: Add release notes for 0.70.0
e4621446c Merge commit '89044b8f87'
89044b8f8 Squashed 'docs/' changes from 19f44e150..ec0abe052
01befcce3 deps: Update minify to v2.6.2
04b1a6d99 Add support for sort by boolean
dd31e8000 deps: Update to Libsass 3.6.4
6add6d77b Rename transpileJS to babel
2a171ff1c resources: Add JavaScript transpiling solution
67f920419 Disable a test locally
c03ea2b66 Fix some missing JS class collector cases
fe60b7d9e Add diagnostic hints to init timeout message
c2d9fd1eb releaser: Prepare repository for 0.70.0-DEV
ec9dcf304 releaser: Add release notes to /docs for release of 0.69.2
03802ff3c releaser: Bump versions for release of 0.69.2
5e31198c9 releaser: Add release notes for 0.69.2 [ci skip]
8d5766d41 Fix IsAncestor and IsDescendant when the same page is passed
5c41f41ad deps: Update goldmark-highlighting
27a4c4410 Fix IsAncestor and IsDescendant under subsection
ade27699e releaser: Prepare repository for 0.70.0-DEV
17661debb releaser: Add release notes to /docs for release of 0.69.1
8549189e8 releaser: Bump versions for release of 0.69.1
c2c7a4ce5 releaser: Add release notes for 0.69.1 [ci skip]
49e6c8cb4  hugolib/filesystems: Fix typo in test suite
f37e77f2d Fix class collector when running with --minify
27af5a339 related: Fix toLower
b3c825756 Fix broken test
5146dc614 tpl/tmplimpl/template: Change defer RLock to RUnlock
736f84b2d hugolib: Add Unlock before panic
cd4d82020 docs: Fix typo in Hugo's Security Model
2b28e5a9c deps: Update go-org to v1.1.0
102ec2da7 commands: Modify gen chromastyles to output all CSS classes
feaa582cb deps: Update to goldmark v1.1.28
ee67dbeff Fix query parameter handling in server fast render mode
4a3f2427e releaser: Prepare repository for 0.70.0-DEV
4205844bc releaser: Add release notes to /docs for release of 0.69.0
9b55d1358 releaser: Bump versions for release of 0.69.0
6f56a636f Update 0.69.0-relnotes.md
5ec7fa343 releaser: Add release notes for 0.69.0
b7ff4dc23 docs: Regen docs helper
da3c3e5fb Squashed 'docs/' changes from 20d77860b..19f44e150
30748decf Merge commit 'da3c3e5fbd'
095bf64c9 Collect HTML elements during the build to use in PurgeCSS etc.
7791a804e deps: Update to latest emoji package
c774b230e Update hosting-on-aws-amplify.md
2f721f8ec Add basic "post resource publish support"
8568928aa tpl: Extend Jsonify to support options map
1bc93021e tpl: Extend Jsonify to support optional indent parameter
7eba37ae9 Typo correction
efc61d6f3 commands: Use semver for min_version per recommendations
d8d6a25b5 modules: Fix hugo mod vendor for regular file mounts
9f12be54e Revert "Revert "common/herrors: Fix typos in comments""
4437e918c Revert "common/herrors: Fix typos in comments"
4de3ecdc2 deps: Updateto gitmap v1.1.2
1123711b0 common/herrors: Fix typos in comments
3d84ef972 Merge commit 'c494c37a45'
c494c37a4 Squashed 'docs/' changes from 2a0ea423d..20d77860b
9c9987535 helpers: Fix TrimShortHTML
4a39564ef Fix IsDescendant/IsAncestor for overlapping section names
b6e097cfe fix typo in getting started
19a8accc9 releaser: Prepare repository for 0.69.0-DEV
157669a0e releaser: Add release notes to /docs for release of 0.68.3
8f49df946 releaser: Bump versions for release of 0.68.3
1a68ad4e3 releaser: Add release notes for 0.68.3 [ci skip]
523d51948 Fix _build.list.local logic
971b28904 releaser: Prepare repository for 0.69.0-DEV
63bbb40df releaser: Add release notes to /docs for release of 0.68.2
73ae6d581 releaser: Bump versions for release of 0.68.2
e18a2ad3f releaser: Add release notes for 0.68.2 [ci skip]
cfa73050a Fix cache reset for a page's collections on server live reload
244e49c0e releaser: Prepare repository for 0.69.0-DEV
98dc46e1a releaser: Add release notes to /docs for release of 0.68.1
87dd5725d releaser: Bump versions for release of 0.68.1
8c6a03a92 releaser: Add release notes for 0.68.1 [ci skip]
1ce3e7d52 releaser: Include "Revert" commits in change log
c9dc316ad Revert "resources: Add data context to the key in ExecuteAsTemplate"
1664a0e89 releaser: Prepare repository for 0.69.0-DEV
1e67854b1 releaser: Add release notes to /docs for release of 0.68.0
e1b609af9 releaser: Bump versions for release of 0.68.0
8e5566af6 Release 0.68.0
1005f754e Update 0.68.0-relnotes.md
efde7078e releaser: Add release notes for 0.68.0
2ebb9f548 Fix Go build version
7204b354a Some minify configuration adjustments
574c2959b Add minify config
99958f90f Allow headless bundles to list pages via $page.Pages and $page.RegularPages
1d91d8e14 Update to Go 1.14.1 and 1.13.9
95f492114 Fix GetTerms nil pointer
c947351d7 Merge commit 'aa54803a84'
aa54803a8 Squashed 'docs/' changes from 988f7d5c2..2a0ea423d
cc2a5d52a Pass directory name to filters in LstatIfPossible in the same way as Readdir
52c159c45 Update to goldmark 1.1.25.
c7b6d74e8 resources: Fix scss vs css import regexp
1a8af7d4f Add workaround for regular CSS imports in SCSS
03b93bb98 Add .RegularPagesRecursive
94fb4dc3d releaser: Prepare repository for 0.68.0-DEV
4f44227bd releaser: Add release notes to /docs for release of 0.67.1
99d36237c releaser: Bump versions for release of 0.67.1
e371162c3 releaser: Add release notes for 0.67.1 [ci skip]
5eadc4c0a metrics: Fix --templateMetricsHints
18cb21ff2 resources: Add data context to the key in ExecuteAsTemplate
df298558a Improve Tailwind/PostCSS error messages
b1106f871 deps: Update Blackfriday
c0177fe2b resources: Try to fix a Go 1.15 go vet error
5914f91b6 Add languageDirection to language configuration
5b4659fa0 releaser: Prepare repository for 0.68.0-DEV
7f1da3efc releaser: Add release notes to /docs for release of 0.67.0
f7d4b01c6 releaser: Bump versions for release of 0.67.0
b809b9680 Update 0.67.0-relnotes.md
a9c91361c releaser: Add release notes for 0.67.0
63393230c docs: Doument the server config
6b61f2a5b Merge commit '14e369b961'
14e369b96 Squashed 'docs/' changes from 341ecabb2..988f7d5c2
6cceef65c Fix ambigous error on site.GetPage
ffcb4aeb8 Fix handling of HTML files without front matter
8279d2e22 Support unComparable args of uniq/complement/in
c4fa2f079 tpl: Fix error with unicode in file paths
108314444 Add HTTP header support for the dev server
51e178a6a deploy: Add include and exclude support for remote
cb12f41a9 releaser: Prepare repository for 0.67.0-DEV
78c3c78fc releaser: Add release notes to /docs for release of 0.66.0
713132cd4 releaser: Bump versions for release of 0.66.0
bbaefd7e3 Update 0.66.0-relnotes.md
cc1a71886 releaser: Add release notes for 0.66.0
6a34f88dc Skip some tests on CircleCI
ae383f04c {{ in }} should work with html.Template type
ee31e61fb docs: Regen CLI docs
760a87a45 commands: Add --all flag to hugo mod clean
3d3fa5c3f Add build.UseResourceCacheWhen
ee3d02134 Update dependency list in README.md
8947c3fa0 Fix ref/relref short lookup for pages in sub-folder
d7798906d tpl: Change error message on missing resource
305ce1c9e resources: Add full filename to image when processing fails
3e9db2ad9 hugolib: Fix error handling in page collector
449deb7f9 Update dependency list in README
1746e8a9b Fix ref/relRef regression for relative refs from bundles
6f48146e7 identity: Fix potential infinite recursion in server change detection
b0d850321 Fix rebuild logic when editing template using a base template
b66d38c41 resources: Add basic @import support to resources.PostCSS
05a74eaec deploy: Implement include/exclude filters for deploy
33ae62108 Update to Go 1.14 and 1.13.8
1352bc880 Add hugo.IsProduction function
d184e5059 tpl: Add math.Sqrt
322c285ba releaser: Prepare repository for 0.66.0-DEV
211ba42a9 releaser: Add release notes to /docs for release of 0.65.3
0ac528d74 releaser: Bump versions for release of 0.65.3
d8bde266c releaser: Add release notes for 0.65.3 [ci skip]
0bd6356c6 Fix panic when home page is drafted
ca68abf0b Fix goldmark toc rendering
a524124be Fix crashes for 404 in IsAncestor etc.
c1eb62512 releaser: Add release notes to /docs for release of 0.65.2
1510f0778 releaser: Bump versions for release of 0.65.2
aa2ef4542 releaser: Add release notes for 0.65.2 [ci skip]
76b2afe64 Apply missing go fmt
f46053034 Fix panic on no output formats
4c2a0de41 Fix panic in 404.Parent
6be6684cc releaser: Add release notes to /docs for release of 0.65.1
dbaa15d40 releaser: Bump versions for release of 0.65.1
a449e87da releaser: Add release notes for 0.65.1 [ci skip]
7ef5a4c83 hugolib: Fix 2 Paginator.Pages taxonomy regressions
a70bbd069 hugolib: Fix deletion of orphaned sections
24afe2b82 releaser: Add release notes to /docs for release of 0.65.0
9fd7d3957 releaser: Bump versions for release of 0.65.0
c45025cb9 releaser: Add release notes for 0.65.0
a5ebdf7d1 docs: Regenerate CLI docs
9bdedb251 Fix lazy publishing with publishResources=false
dce210ab5 modules: Improve "hugo mod clean"
0b96aba02 commands: Add "hugo mod verify"
fa520a2d9 Add Page.GetTerms
4b670bc8c Squashed 'docs/' changes from 16753a78d..341ecabb2
82029c1ec Merge commit '4b670bc8cc'
7489a8645 Add a list terms benchmark
da54787cf Handle disabled RSS even if it's defined in outputs
c7975b48b Fix goMinorVersion on non-final Go releases
b2dcd53e3 Use the tree for taxonomy.Pages()
36983e618 Add some cagegories to the site collections benchmarks
d73e37387 tpl: Adjust the RSS taxonomy logic
aa3e18305 tpl: Fix RSS template for the terms listing
1b7acfe76 Fix taxonomy
19e12caf8 Fix RenderString for pages without content
20f2211fc modules: Do not try to get local themes in "hugo mod get"
a21a9373e deps: Update goldmark-highlighting
775c7c247 commands: Support "hugo mod get -u ./..."
eada236f8 Introduce a tree map for all content
e5329f13c Another benchmark rename
5b145ddc4 Rename the Edit benchmarks
3c568ad01 markup/highlight: Fix chroma highlight
54bdcaaca Refactor a benchmark to make it runnable as test
1622510a5 Add benchmark for content edits
56d0b6588 Add "go mod verify" to build scripts
75c3787fc Add git to Dockerfile
9babb1f0c deps: Update go.sum
8a5124d6b commands: Rename doWithCommandeer to cfgInit/cfgSetAndInit
898a0a96a deps: Update golibsass
3b721110d Shuffle test files before insertion
40ba7e6d6 Update to LibSass v3.6.3
4f43c9022 releaser: Prepare repository for 0.65.0-DEV
c327e75d0 releaser: Add release notes to /docs for release of 0.64.1
8bd8d4fe9 releaser: Bump versions for release of 0.64.1
ad7c38cd6 releaser: Add release notes for 0.64.1 [ci skip]
b78576fd3 hugofs: Fix mount with hole regression
18888e09b Fix bundle resource ordering regression
1e5eb8679 Merge commit '3c0036805d'
3c0036805 Squashed 'docs/' changes from bd0e15bb6..16753a78d
7f0ebd4a3 CONTRIBUTING: Fix note about CGO
23ea43180 Update Go version requirement
6a74cbe91 releaser: Prepare repository for 0.65.0-DEV
241db8f78 releaser: Add release notes to /docs for release of 0.64.0
7624ab028 releaser: Bump versions for release of 0.64.0
8490a0aa9 Update 0.64.0-relnotes.md
bd731d27b releaser: Add release notes for 0.64.0
80dd6ddde Fix module mount in sub folder
299731012 Mention a "no CGO rule"
2bbc865f7 commands: Fix config environment handling
0792cfa9f Update to Go 1.13.7 and Go 1.12.16
b3f0674b8 transform/livereloadinject: Add defer to livereload script tag
ef78a0d18 transform/livereloadinject: Don't use document.write to inject livereload
585958645 hubolig: Add a render hook whitespace test
2d159e9cc Do not render alias paginator pages for non-HTML outputs
f45cb3172 Fix base template handling with preceding comments
49ef64720 modules: Fix "hugo mod get -u" with no arguments
8f08cdd0a transform/livereloadinject: Inject livereload script right after head if possible
281abb18e deps: Update goldmark to v1.1.22
d8e685154 releaser: Prepare repository for 0.64.0-DEV
934ee21fa releaser: Add release notes to /docs for release of 0.63.2
c7427a50e releaser: Bump versions for release of 0.63.2
49e2931eb releaser: Add release notes for 0.63.2 [ci skip]
e8831a056 hubolib: Revert to .Type = "page" when empty
74b6c4e5f And now finally fix the 404 templates
8df5d76e7 Fix 404 with base template regression
8ae2c9c3d releaser: Prepare repository for 0.64.0-DEV
ce9aceb74 releaser: Add release notes to /docs for release of 0.63.1
fd32849bf releaser: Bump versions for release of 0.63.1
417f9ddf5 releaser: Add release notes for 0.63.1 [ci skip]
0df7bd62d deps: Make the build flags shared between sites
f441f6751 Fix baseof with regular define regression
7ed22e9fb Revert to minify v2.6.1
fb974ae87 releaser: Prepare repository for 0.64.0-DEV
745ddcbba releaser: Add release notes to /docs for release of 0.63.0
3b3f5a259 releaser: Bump versions for release of 0.63.0
d10ed683c Release 0.63.0
19e387d18 releaser: Add release notes for 0.63.0
cafb1d53c docs, output: Add base template lookup variant to docs.json
4f466db66 docs: Regen docs helper
17af79a03 Fix 0.62.1 server rebuild slowdown regression
2fefc0160 tpl/compare: Fix eq when > 2 args
0c251be66 Allow multiple arguments in ne/ge/gt/le/lt functions Treat op arg1 arg2 arg3 ... as (arg1 op arg2) && (arg1 op arg3) and so on for ne/ge/gt/le/lt.
836c24261 hugolib: Disable a test assertion on ARM
c6d650c8c tpl/tplimpl: Rework template management to get rid of concurrency issues
8585b388d deps: Update go-org
d61bee5e0 examples: Fix blog not building
21ca2e9ce Add support for newline characters in raw string shortcode
3efa1d812 deps: Update github.com/alecthomas/chroma
65ec8fe82 deps: Update minify to v2.7.2
d3e8ab2e3 deps: Update Goldmark to v1.1.21
da8145565 Allow raw string literals in shortcode params
0c0bb3728 deps: Update github.com/gohugoio/testmodBuilder
ddd75f212 hugolib: Some more benchmark adjustments
4ed6ebef4 hugolib: Adjust site benchmarks
94cfdf6be deps: Update direct dependencies
451380177 minifiers: Update to new CSS config
56354a63b deps: Update to Minify v2.7.0
b9b73a2f6 Revert "Add support for freebsd/arm64"
aead8108b Add support for freebsd/arm64
1cf235412 tpl: Put Go's internal template funcs in Hugo's map
df6e9efd8 Update releasenotes_writer.go
ea05c0e84 hugolib: Add a benchmark with lots of templates
273047b5b releaser: Prepare repository for 0.63.0-DEV
83e501849 releaser: Add release notes to /docs for release of 0.62.2
12230b689 releaser: Bump versions for release of 0.62.2
afdb180e2 releaser: Add release notes for 0.62.2 [ci skip]
196a9df58 hugolib: Fix relative .Page.GetPage from bundle
9b6e61464 markup/goldmark: Adjust auto ID space handling
d62ede8e9 docs: Document the new autoHeadingIDType setting
81b7e48a5 docs: Regenerate docshelper
16e7c1120 markup/goldmark: Add an optional Blackfriday auto ID strategy
8f071fc15 markup/goldmark: Make the autoID type config a string
469351d5b Merge commit '26f1458a2d'
26f1458a2 Squashed 'docs/' changes from 54f0e8776..bd0e15bb6
5ee1f0876 markup/goldmark: Simplify code
a82d2700f markup/goldmark: Make auto IDs GitHub compatible
ae816452b releaser: Prepare repository for 0.63.0-DEV
a1518704a releaser: Add release notes to /docs for release of 0.62.1
3a21a1708 releaser: Bump versions for release of 0.62.1
451746ddd releaser: Add release notes for 0.62.1 [ci skip]
ff6253bc7 Support files in content mounts
aa4ccb8a1 Update alpine base image in Dockerfile to 3.11
5509954c7 hugolib: Fix inline shortcode regression
6b59b64f0 releaser: Prepare repository for 0.63.0-DEV
6608f1557 releaser: Add release notes to /docs for release of 0.62.0
b361d9a46 releaser: Bump versions for release of 0.62.0
592a7d104 Release 0.62.0
93216fda7 releaser: Add release notes for 0.62.0
8a4005cf2 Squashed 'docs/' changes from af4b7ac5b..54f0e8776
740b72558 Merge commit '8a4005cf2b'
1fb17be9a deps: Update Goldmark to v1.1.18
51d89dab1 deps: Update go-org
c8bfe47c6 docs: More on hooks
50cc7fe54 tpl: Do not return any value in errorf
1773d71d5 tpl: Add a warnf template func
8a58ebb31 hugolib: Improve error and reload handling  of hook templates in server mode
045368381 deps: Update to Goldmark v1.1.17
55c29d4de docs: Regen docshelper
ccb1bf1ab tpl/collections: Some more params merge adjustments
a67d95fe1 Preserve HTML Text for image render hooks
ad6504e6b Fix abs path handling in module mounts
158e7ec20 Fix incorrect MIME type from image/jpg to image/jpeg
eef934ae7 deps: Update Goldmark
00954c5d1 Preserve HTML Text for link render hooks
1b785a7a6 tpl/collections: Fix merge vs Params
d20ca3700 tpl: Get rid of the custom template truth logic
3e316155c docs: Footnote
e625088ef Add render template hooks for links and images
67f3aa72c Merge commit '2e711a28c7'
2e711a28c Squashed 'docs/' changes from 51c4f3184..af4b7ac5b
0947cf958 Enhance accessibility to issues
3c24ae030 hugolib: Fix test
03d6960a1 deps: Re-introduce the correct version of Goldmark
92c7f7ab8 tpl: Add some comments
a03c631c4 Rework template handling for function and map lookups
167c01530 Create lightweight forks of text/template and html/template
4c804319f markup/tableofcontents: Add config option for ordered list
186a5ebfc releaser: Prepare repository for 0.62.0-DEV
9b445b9da releaser: Add release notes to /docs for release of 0.61.0
3af783966 releaser: Bump versions for release of 0.61.0
31f322a61 Release 0.61.0
38c60f2be releaser: Add release notes for 0.61.0
3cc217a65 deps: Update Goldmark
5f8c2818f Deprecate Ace and Amber
c5f2f5837 markup: Add typographic chars from goldmark to toc
0efb00c2a tpl/partials: Allow any key type in partialCached
40a092b06 markup: Reimplement pygmentsCodefencesGuessSyntax
d534ce942 deps: Update Goldmark
a6b6b135a releaser: Prepare repository for 0.61.0-DEV
960667561 releaser: Add release notes to /docs for release of 0.60.1
6c0556308 releaser: Bump versions for release of 0.60.1
f5250ec09 releaser: Add release notes for 0.60.1 [ci skip]
86a5b59f6 deps: Update minify
bb80fff69 Fix headless regression
347cfb0c1 deps: Update Goldmark
b60ae35b9 hugolib: Fix timeout number parsing for YAML/JSON config
003ba5b10 releaser: Prepare repository for 0.61.0-DEV
f2dea9b03 releaser: Add release notes to /docs for release of 0.60.0
763b0dcb9 releaser: Bump versions for release of 0.60.0
b2969b7a7 Release 0.60.0
60fea562c releaser: Add release notes for 0.60.0
14a1de14f modules: Add some more output if modules download takes time
dcde8af8c Add some internal template image tests
c91970c08 tpl/tplimpl: Featured and Site.Params image support for Schema
dd1e5fc0b hugolib: Disable test assertion on Windows
b0c7749fa deps: Update Goldmark
25a6b3369 tpl/tplimpl: Add support for featured and global image to OpenGraph template
017664392 hugolib: Fix cascade in server mode
da5352359 hugolib: Fix .Sections vs siblings
96f09659c Fix language handling in ExecuteAsTemplate
03b369e67 hugolib: Adjust .Site.Permalinks deprecation level
69fd1c60d hugolib: Remove .Site.Ref/RelRef
33d733300 Deprecate mmark
e3451371b hugolib: Fix recently broken timeout config
5c5231e09 commands: Use HUGO_ENV if set
d6f7a9e28 resources/images: Make the image cache more robust
031f948f8 Update to Go 1.13.4 and Go 1.12.13
71597bd1a mage: Restore -v behaviour
a8e9f8389 hugolib: Increase default timeout value to 30s
03e2d7462 hubolig: Fix potential data race
ea96e1dc5 Revert "deps: Update Goldmark"
822191286 deps: Update Goldmark
8beaa4c25 mage: Fix mage check on darwin and add debugging output
8a89b8582 commands: Fix jekyll metadata import on individual posts
e1175ae83 Improve grammar in README.md
a2d77f4a8 markup/highlight: Replace the temp for with a dependency
b546417a2 deps: Update Chroma
4175b0468 deps: Update Goldmark
55f951cbb markup/tableofcontents: GoDoc etc.
20f351ee4 Minor cleanups
bfb9613a1 Add Goldmark as the new default markdown handler
a3fe5e5e3 Fix Params case handling in the index, sort and where func
cd07e6d57 Fix GetPage Params case issue
628efd6e2 common/para: Add parallel task executor helper
2dcc1318d Add some more output if loading modules takes time
14a985f8a Update homepage.md
0cf85c071 hugolib: Add a benchmark
20ec9fa2b modules: Do not check for remote modules if main project is vendored
812688fc2 hugolib: Fix emoji handling inside shortcodes
a2670bf46 tpl/collections: Allow dict to create nested structures
1a36ce9b0 commands: Add hint when dir not empty
90d0cdf23 tpl/collections: Add collections.Reverse
95ef93be6 tpl/collections: Make index work with slice as the last arg
79355043e Merge commit 'efc0b1bb6c'
efc0b1bb6 Squashed 'docs/' changes from 723da4a37..51c4f3184
d1d1f240a hubolib: Headless bundles should not be listed in .Pages
70a1aa345 Support Go time format strings in permalinks
cafecca44 travis: Increase timeout to 30000 for mage -v check
5f6b6ec68 Prepare for Goldmark
366ee4d8d deps: Update quicktest
c26d00db6 hugolib: Fix ref/relref anhcor handling
8483b53ae deps: Update to Chroma v0.6.9 for Java lexer fix
9f46a72c7 tpl/collections: Add some index map test cases
9abd39678 helpers: Use pointer receiver for ContentSpec
ad4c56b55 travis: Allow arm64 to fail
3717db1f9 minifiers: Add a JSON roundtrip test
ae4fde086 Update .travis.yml for arm64 support, etc.
c6d69d0c9 mage: Skip Test386 on non-AMD64 architectures
c3d433af5 Update past go-cmp's checkptr fix
07a203406 releaser: Prepare repository for 0.60.0-DEV
d5dab232c releaser: Add release notes to /docs for release of 0.59.1
e04a22c5e releaser: Bump versions for release of 0.59.1
d14265da8 releaser: Add release notes for 0.59.1 [ci skip]
33c474b9b hugofs: Fix crash in multilingual content fs
ed2682325 Dockerfile: Switch to mage builds, various optimizations
66fe68ffc resources/images: Add exception for new test image
c5e1e8241 Adjust benchmark templates
baa975082 deps: Update to Chroma v0.6.8 to fix a crash
3e8b5a5c0 deps: Update quicktest
e6aa6edb4 Do not attempt to build if there is no config file
6bcc5ad8b releaser: Prepare repository for 0.60.0-DEV
1dd0c69c7 releaser: Add release notes to /docs for release of 0.59.0
b084af4bf releaser: Bump versions for release of 0.59.0
0237d4595 Release 0.59.0
109ac877c releaser: Add release notes for 0.59.0
5ac0f751a Squashed 'docs/' changes from 0584815c8..723da4a37
de8ca7e4d Merge commit '5ac0f751aa'
5070ba6c9 Squashed 'docs/' changes from fdea5430f..0584815c8
ec5962278 Merge commit '5070ba6c9e'
b9bd35d72 Squashed 'docs/' content from commit fdea5430f
27aef3f1f Merge commit 'b9bd35d72e' as 'docs'

git-subtree-dir: docs
git-subtree-split: 9b06f951e61081c503927bb772b75f93504aeba8
2024-06-21 09:35:57 +02:00
Dietrich Epp
d5542ed286 deploy: Add stripIndexHtml target option
This new configuration parameter causes paths matching
"<dir>/index.html" to be stored as "<dir>/" remotely. This simplifies
the cloud configuration needed for some use cases, such as CloudFront
distributions with S3 bucket origins. Before this change, users must
configure their S3 buckets as public websites (which is incompatible
with certain authentication / authorization schemes), or users must add
a CloudFormation function to add index.html to the end of incoming
requests. After this change, users can simply use an ordinary CloudFront
distribution (no additional code) with an ordinary S3 bucket origin (and
not an S3 website).

This adds tests to ensure that functionality like matchers is unaffected
by this change. I have also tested that the functionality works as
expected when deploying to a real S3 / CloudFront website.

Closes #12607
2024-06-20 19:37:22 +02:00
Bjørn Erik Pedersen
478a9107a6 Speed up GetTerms
```text
name                               old time/op    new time/op    delta
TaxonomiesGetTerms/pages_100-10      5.25ms  5%    5.13ms  4%     ~     (p=0.486 n=4+4)
TaxonomiesGetTerms/pages_1000-10     30.1ms  1%    26.8ms  1%  -11.13%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_10000-10     1.33s 24%     0.29s  2%  -78.42%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_20000-10     5.50s 12%     0.83s 28%  -84.88%  (p=0.029 n=4+4)

name                               old alloc/op   new alloc/op   delta
TaxonomiesGetTerms/pages_100-10      4.08MB  0%    4.06MB  0%   -0.59%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_1000-10     25.1MB  0%    24.9MB  0%   -0.87%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_10000-10     238MB  2%     233MB  0%   -1.94%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_20000-10     469MB  0%     465MB  0%   -1.00%  (p=0.029 n=4+4)

name                               old allocs/op  new allocs/op  delta
TaxonomiesGetTerms/pages_100-10       49.5k  0%     48.9k  0%   -1.17%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_1000-10       304k  0%      298k  0%   -1.97%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_10000-10     3.02M  7%     2.81M  0%   -7.09%  (p=0.029 n=4+4)
TaxonomiesGetTerms/pages_20000-10     5.77M  1%     5.59M  0%   -3.19%  (p=0.029 n=4+4)

```

Note that the numbers above represents a full site build, but GetTerms is a big part of the site in question.

Fixes #12610
2024-06-19 15:18:43 +02:00
Bjørn Erik Pedersen
b46d101d5a
Update README.md 2024-06-19 12:13:30 +02:00
Joe Mooring
8efc75b73f markup/goldmark: Add the Hugo Goldmark Extras "delete" extension
With Goldmark v1.7.1 and earlier, the Goldmark "strikethrough" extension was
triggered by wrapping text within a pair of double-tilde characters. With
Goldmark v1.7.2 and later, to provide full GFM compatibility, the Goldmark
"strikethrough" extension is triggered by wrapping text within a pair of
single- or double-tilde characters.

This change created a conflict with the Hugo Goldmark Extras "subscript"
extension.

When enabling the Hugo Goldmark Extras "subscript" extension, if you
want to render subscript and strikethrough text concurrently, you must:

1. Disable the Goldmark "strikethrough" extension
2. Enable the Hugo Goldmark Extras "delete" extension

Closes #12597
2024-06-18 18:56:20 +02:00
Bjørn Erik Pedersen
ad6d91cabd Fix live reload when both CSS and HTML changes
This seems to be a browser bug (tested in both Chrome and Safari on MacOS), but it seems that doing a `window.location.reload()` (or `window.location.reload(true)`) doesn't refresh the CSS changes, even if HTTP caching is disabled.

This commit works around this by doing additional refreshes of the CSSes.

Closes #12600
2024-06-15 20:13:42 +02:00
Joe Mooring
57165d44ed resources: Update Dart Sass error message 2024-06-13 16:25:50 +02:00
Razon Yang
7ee36b3718
config: Fix typo 2024-06-09 17:22:23 +02:00
Bjørn Erik Pedersen
9c3143c45a resources/page: Deprecate PageSize in favor of PagerSize
See #12572
2024-06-09 12:28:24 +02:00
Bjørn Erik Pedersen
9f22bc4414 Rename DefaultPageSize => PagerSize
This was recently introduced. so no breaking change.

The thing is:

* We do not commonly use the prefix Default* even if it can be overridden in the templates.
* PagerSize makes more sense and is also the term used in the code.
2024-06-09 12:28:24 +02:00
Joe Mooring
8cf94aea73 deps: Upgrade github.com/alecthomas/chroma v2.13.0 => v2.14.0
Closes #12580
2024-06-08 20:25:42 +02:00
Joe Mooring
cba2de6ec9 resources/page: Let GroupByParam return nil instead of error
Closes #12578
2024-06-08 18:35:14 +02:00
Bjørn Erik Pedersen
9c4e14eb4f Add option to not generate aliases for first page of pagination pages
Also consolidate the pagination configuration into a struct.

Closes #12572
2024-06-08 15:42:01 +02:00
Bjørn Erik Pedersen
1cdd3d0a9e js: Support more recent targets with js.Build / esbuild
Closes #12575
2024-06-08 11:40:19 +02:00
Bjørn Erik Pedersen
b57306d61b deps: Upgrade github.com/evanw/esbuild v0.20.2 => v0.21.4
See #12575
2024-06-08 11:40:19 +02:00
hugoreleaser
1a53a8c2f5 releaser: Prepare repository for 0.128.0-DEV
[ci skip]
2024-06-05 10:41:48 +00:00
hugoreleaser
74e0f3bd63 releaser: Bump versions for release of 0.127.0
[ci skip]
2024-06-05 10:27:59 +00:00
Bjørn Erik Pedersen
2b05a50f8f Misc remote HTTP/content adapter enhancements
* Recover from server errors
* Improve go adapter rebuilds when adding new content

See #12502
Fixes #12570
2024-06-05 12:16:40 +02:00
Bjørn Erik Pedersen
bc05d854b2
resources: Fix spelling 2024-06-04 18:48:39 +02:00
Bjørn Erik Pedersen
be47830a87
deps: Upgrade github.com/gohugoio/httpcache v0.6.0 => v0.7.0
This was somehow missed when merging #12523
2024-06-04 18:32:02 +02:00
Bjørn Erik Pedersen
447108fed2
Add a HTTP cache for remote resources.
Fixes #12502
Closes #11891
2024-06-04 16:07:39 +02:00
hugoreleaser
c71e24af51 releaser: Prepare repository for 0.127.0-DEV
[ci skip]
2024-06-02 13:15:24 +00:00
hugoreleaser
44f1edcb06 releaser: Bump versions for release of 0.126.3
[ci skip]
2024-06-02 13:02:43 +00:00
Bjørn Erik Pedersen
917199a94e content adapter: Fix site.GetPage using the base part of the path
Fixes #12561
2024-06-02 13:30:52 +02:00
Joe Mooring
c8dac67def resources/page: Deprecate .Sites.First in favor of .Sites.Default
Closes #12513
2024-06-01 18:02:19 +02:00
Razon Yang
0068f03290
metrics: Increase maximum length of cumulative duration to 15 2024-06-01 17:48:43 +02:00
Bjørn Erik Pedersen
0221ddb39e content adapter: Handle <!--more--> separator in content.value
Closes #12556
2024-06-01 12:04:05 +02:00
Bjørn Erik Pedersen
74b9b8a229
releaser: Try to fix the last failing step 2024-05-31 09:03:09 +02:00
Bjørn Erik Pedersen
420f26b6bb
releaser: Prepare repository for 0.127.0-DEV 2024-05-30 18:58:47 +02:00
hugoreleaser
312b71232d releaser: Bump versions for release of 0.126.2
[ci skip]
2024-05-30 16:07:40 +00:00
Bjørn Erik Pedersen
1464091ad6 content adapter: Fix server crash on partial edit
Fixes #12538
2024-05-30 16:22:26 +02:00
Bjørn Erik Pedersen
2c88e454d8
Delete .github/workflows/test-dart-sass-v1.yml
That work flow was added to make sure Hugo kept on working for people using the old Dart Sass Protocol binary. We still do, but testing it on every PR build is too much now that all/most people should have upgraded.
2024-05-30 11:42:07 +02:00
Bjørn Erik Pedersen
eaa42a8754
commands: Add shorthand flags -M (--renderToMemory) and -N (--navigateToChanged)
Closes #12530
2024-05-30 11:35:02 +02:00
Bjørn Erik Pedersen
245928a1ff content adapter: Add support for menus in AddPage
Fixes #12507
2024-05-30 11:29:21 +02:00
Bjørn Erik Pedersen
519f41dbd7 content adapter: Fix issue with content starting out with a shortcode
Fixes #12544
2024-05-30 11:29:21 +02:00
Joe Mooring
7f3061723e hugolib: Allow override of sitemap file name
Closes #12525
2024-05-23 07:55:53 +02:00
Joe Mooring
931e096f21 commands: Improve list command
- Improve help text
- Add "kind" and "section" to CSV output
- Add a "published" subcommand to list content that is not draft,
  expired, or future.

Closes #12520
2024-05-22 19:50:58 +02:00
Joe Mooring
548dc21378 config: Remove extraneous BuildConfig setting
Closes #12519
2024-05-21 14:34:49 +02:00
Joe Mooring
b893a09aa6 tpl/tplimpl: Resolve render hook destinations with leading ./
Closes #12514
2024-05-21 09:38:25 +02:00
Bjørn Erik Pedersen
6b006616e5 Also warn about duplicate content paths with --printPathWarnings
Closes #12511
2024-05-17 21:55:05 +02:00
hugoreleaser
3d40aba512 releaser: Bump versions for release of 0.126.1
[ci skip]
2024-05-15 10:42:34 +00:00
Bjørn Erik Pedersen
39cf906bc0 Fix mixed case Page params handling in content adapters
Fixes #12497
2024-05-15 12:39:33 +02:00
Bjørn Erik Pedersen
1aacfced39 Fix paths with dots issue with content adapters
Fixes #12493
2024-05-15 12:39:33 +02:00
hugoreleaser
32c967551b releaser: Bump versions for release of 0.126.0
[ci skip]
2024-05-14 13:24:11 +00:00
Bjørn Erik Pedersen
266140251f
docs: Regen docshelper 2024-05-14 14:46:16 +02:00
Joe Mooring
74ab839ccb tpl/tplimpl: Plainify title and description in twitter_cards.html
Closes #12433
Improves #10900
2024-05-14 14:45:04 +02:00
Joe Mooring
92290aa892 tpl/tplimpl: Plainify title and description in schema.html
Closes #12432
2024-05-14 14:18:49 +02:00
Joe Mooring
6dbbe6dd3a resources/images: Handle NaN EXIF latitude and longitude
Fixes #12490
2024-05-14 14:16:58 +02:00
Bjørn Erik Pedersen
e2d66e3218
Create pages from _content.gotmpl
Closes #12427
Closes #12485
Closes #6310
Closes #5074
2024-05-14 13:12:08 +02:00
Joe Mooring
55dea41c1a create/skeletons: Remove superfluous language code fallback
Closes #12479
2024-05-14 10:24:53 +02:00
Joe Mooring
87ab7f7ffc tpl/tplimpl: Improve locale value in opengraph.html
Closes #12480
2024-05-14 10:24:17 +02:00
dependabot[bot]
ee26e69ce3 build(deps): bump golang.org/x/net from 0.24.0 to 0.25.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/net/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 22:33:46 +02:00
dependabot[bot]
6e83d00a83 build(deps): bump golang.org/x/image from 0.15.0 to 0.16.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.15.0 to 0.16.0.
- [Commits](https://github.com/golang/image/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 22:33:33 +02:00
Bjørn Erik Pedersen
d02f0622b4 livereload: Improve the livereload script build and update to v4.0.2
This script has very infrequent updates, but just copy pasting the minified source creates some potential trust issues.

This JS will now be pulled from a Git version and both the unminified and minified version gets written to disk.

This way it should be easier to reason about changes in the future.

To upgrade, change the commit hash and run `mage generate`.

Closes #12451
Closes #6290
2024-05-10 22:33:08 +02:00
Joe Mooring
6dfeb9f038 tpl/tplimpl: Retain query string and fragment in render-image.html
Closes #12468
2024-05-10 22:32:48 +02:00
Joe Mooring
ca9a77ef92 markup/goldmark: Support extras extension
Enables inclusion of these HTML elements in Markdown:

- Inserted Text (++inserted++)
- Mark Text (==marked==)
- Subscript (H~2~O)
- Superscript (1^st^)
2024-05-10 22:32:02 +02:00
hugoreleaser
b1bf0bff2c releaser: Prepare repository for 0.126.0-DEV
[ci skip]
2024-05-08 15:00:23 +00:00
hugoreleaser
b1d808bc37 releaser: Bump versions for release of 0.125.7
[ci skip]
2024-05-08 14:46:24 +00:00
Bjørn Erik Pedersen
3c6260f046 deps: Downgrade github.com/getkin/kin-openapi v0.124.0 => v0.123.0
We have received reports from users of Hugo's `openapi3.Unmarshal` about breaking behavior in the mentioned `kin-openapi` version, so revert for now, pending further investigation.
2024-05-08 16:42:48 +02:00
Bjørn Erik Pedersen
70c13f444e
readme: Update Sponsors 2024-05-08 11:37:56 +02:00
hugoreleaser
c46d603a02 releaser: Prepare repository for 0.126.0-DEV
[ci skip]
2024-05-05 11:05:28 +00:00
hugoreleaser
69ede10edc releaser: Bump versions for release of 0.125.6
[ci skip]
2024-05-05 10:52:52 +00:00
Bjørn Erik Pedersen
bb59a7ed97 Fix one more resource change eviction logic issue
This is how we should have fixed #1239.

Fixes #12456
2024-05-05 12:41:51 +02:00
Bjørn Erik Pedersen
503d20954f
Make the cache eviction logic for stale entities more robust
Fixes #12458
2024-05-04 19:45:43 +02:00
dependabot[bot]
68e95327f7 build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.1 to 2.2.2
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 11:29:07 +02:00
Bjørn Erik Pedersen
9cd7db61d3
Run mage generate 2024-05-02 10:49:09 +02:00
Bjørn Erik Pedersen
c892e75fbc
resources/page: Pull internal Page methods into its own interface
So it doesn't get visible when passing it to `jsonify`.
2024-05-02 10:49:02 +02:00
hugoreleaser
4255d13d3e releaser: Prepare repository for 0.126.0-DEV
[ci skip]
2024-05-01 15:36:00 +00:00
hugoreleaser
c8b9f9f81c releaser: Bump versions for release of 0.125.5
[ci skip]
2024-05-01 15:22:11 +00:00
Bjørn Erik Pedersen
7be7f89bf6 Fix rebuilds on cascade deletes/renames
And also avoid reading sub directories on simple changes to branch `_index.md` files.

Fixes #12449
2024-05-01 17:18:30 +02:00
Bjørn Erik Pedersen
c8e400b621 commands: Print "Webserver is ..." right before "Total ..."
Also fix it so

* It's not printed when running `hugo -w`
* It'd printed for all kinds of rebuilds

Fixes #12384
2024-05-01 10:52:40 +02:00
Bjørn Erik Pedersen
9dd687027f Make sure replaced pages gets marked as stale
Fixes #12436
2024-04-30 20:57:44 +02:00
hugoreleaser
1961327536 releaser: Prepare repository for 0.126.0-DEV
[ci skip]
2024-04-25 13:40:37 +00:00
hugoreleaser
cc3574ef4f releaser: Bump versions for release of 0.125.4
[ci skip]
2024-04-25 13:27:26 +00:00
Peter van Dijk
fe84cc218e
commands: Clarify that create or install a theme are two options 2024-04-25 14:38:22 +02:00
Bjørn Erik Pedersen
babcb339a8 config: Setups with only one active language can never be multihost
Fixes #12288
2024-04-25 14:35:49 +02:00
Bjørn Erik Pedersen
7203a95a60 Fix rebuilds when running hugo -w
This was partly broken in Hugo 0.123.0.

We have two internal config options that gets set from the CLI:

* Running; a web server is running
* Watching; either set via `hugo -w`  or `hugo server --watch=false`

Part of the change detection code wrongly used the `Running` as a flag when `Watching` would be the correct.

Fixes #12296
2024-04-25 14:35:49 +02:00
dependabot[bot]
fb084390cd build(deps): bump github.com/tdewolff/minify/v2 from 2.20.19 to 2.20.20
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.19 to 2.20.20.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.19...v2.20.20)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25 11:44:14 +02:00
Joe Mooring
fb51b698b3 tpl/tplimpl: Fix double-escaping in opengraph template
Closes #12418
2024-04-25 10:03:17 +02:00
Bjørn Erik Pedersen
6b867972ec Use Apache License without modification
Closes #12415
2024-04-23 09:15:29 +02:00
Bjørn Erik Pedersen
509ab08c1b markup/goldmark: Fix data race in the hugocontext wrapper
The window for this to happen is very small, but it has been reported by Go's race detector (-race flag) in a tests once.
2024-04-22 19:10:15 +02:00
Bjørn Erik Pedersen
2d75f539e1
Delete .hugo_build.lock
Added to Git by accident.
2024-04-22 16:57:48 +02:00
Bjørn Erik Pedersen
15a4b9b337 tpl: Escape .Title in built-in image and link render hooks
Co-authored-by: Joe Mooring <joe@mooring.com>
2024-04-22 16:54:24 +02:00
Joe Mooring
10a8448eee tpl/tplimpl: Improve embedded templates
- Do not call the YouTube oEmbed API
- Do not include the Hugo version in RSS feeds

Closes #12396
2024-04-22 15:57:37 +02:00
Eric Anderson
722c486a34 SECURITY.md: Update link to security model
The security model was moved in https://github.com/gohugoio/hugoDocs/pull/2495
2024-04-22 13:04:53 +02:00
Bjørn Erik Pedersen
f40f50ead0 modules: Fix potential infinite loop in module collection
Fixes #12407
2024-04-22 11:34:11 +02:00
hugoreleaser
4e483f5d4a releaser: Bump versions for release of 0.125.2
[ci skip]
2024-04-20 15:29:44 +00:00
Bjørn Erik Pedersen
06d248910c Only add root sections to the section pages menu
Fixes #12399
2024-04-20 17:23:33 +02:00
Bjørn Erik Pedersen
004b694390 Fix partial rebuilds for SCSS fetched with GetMatch and similar
Fixes #12395
2024-04-20 15:09:12 +02:00
Joe Mooring
da6112fc65 commands: Add gen chromastyles --lineNumbersTableStyle flag
For symmetry, also rename --linesStyle to --lineNumbersInlineStyle.

Closes #12393
2024-04-20 12:25:28 +02:00
Bjørn Erik Pedersen
faf9fedc3d
resources/images: Fix TestColorLuminance on s390x 2024-04-19 11:21:50 +02:00
Joe Mooring
11aa893198
commands: Provide examples for chromastyles flags
Closes #12387
2024-04-18 12:16:36 -07:00
hugoreleaser
d88cb5269a releaser: Prepare repository for 0.126.0-DEV
[ci skip]
2024-04-18 08:34:20 +00:00
hugoreleaser
68c5ad638c releaser: Bump versions for release of 0.125.1
[ci skip]
2024-04-18 08:21:19 +00:00
Bjørn Erik Pedersen
0c188fda24 tpl: Use erroridf for remote YouTube errors
So they can be silenced.

Fixes #12383
2024-04-18 10:02:36 +02:00
Bjørn Erik Pedersen
bbc6888d02
build: Fix `GLIBC_2.29' not found issue
Closes #12381
2024-04-17 12:04:00 +02:00
hugoreleaser
8c14d1edc3 releaser: Prepare repository for 0.126.0-DEV
[ci skip]
2024-04-16 15:21:02 +00:00
hugoreleaser
a32400b5f4 releaser: Bump versions for release of 0.125.0
[ci skip]
2024-04-16 15:04:41 +00:00
Bjørn Erik Pedersen
df9f2fb617
docs: Regen docshelper 2024-04-16 12:08:28 +02:00
Bjørn Erik Pedersen
fa60a2fbc3 Fix server rebuilds when adding a content file on Linux
Fixes #12362
2024-04-16 12:06:37 +02:00
dependabot[bot]
fe63de3a83 build(deps): bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 10:43:50 +02:00
Bjørn Erik Pedersen
e197c7b29d Add Luminance to Color
To sort an image's colors from darkest to lightest, you can then do:

```handlebars
{{ {{ $colorsByLuminance := sort $image.Colors "Luminance" }}
```

This uses the formula defined here: https://www.w3.org/TR/WCAG21/#dfn-relative-luminance

Fixes #10450
2024-04-16 10:02:46 +02:00
Bjørn Erik Pedersen
74e9129568
hugolib: Add an asciidoc rebuild test case
See #12375
2024-04-15 15:57:11 +02:00
Bjørn Erik Pedersen
df11327ba9 Pass .RenderShortcodes' Page to render hooks as .PageInner
The main use case for this is to resolve links and resources (e.g. images) relative to the included `Page`.

A typical `include` would similar to this:

```handlebars
{{ with site.GetPage (.Get 0) }}
  {{ .RenderShortcodes }}
{{ end }}
```

And when used in a Markdown file:

```markdown
{{% include "/posts/p1" %}}
```

Any render hook triggered while rendering `/posts/p1` will get `/posts/p1` when calling `.PageInner`.

Note that

* This is only relevant for shortcodes included with `{{%` that calls `.RenderShortcodes`.
* `.PageInner` is available in all render hooks that, before this commit, received `.Page`.
* `.PageInner` will fall back to the value of `.Page` if not relevant and will always have a value.

Fixes #12356
2024-04-15 09:49:57 +02:00
dependabot[bot]
a18e2bcb9a build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-14 17:53:18 +02:00
Joe Mooring
6049ba99f0 helpers: Fix TrimShortHTML when used with AsciiDoc content
Fixes #12369
2024-04-14 17:53:05 +02:00
Bjørn Erik Pedersen
8e50ccfae7 github: Add a "free space" step on Ubuntu 2024-04-14 16:42:04 +02:00
Bjørn Erik Pedersen
bfc3122f8e
helpers: Add BenchmarkTrimShortHTML 2024-04-14 15:54:49 +02:00
Bjørn Erik Pedersen
00ae8e8c72 github: Update actions 2024-04-14 13:40:46 +02:00
Bjørn Erik Pedersen
e423e56273 github: Format GitHub actions files 2024-04-14 13:40:46 +02:00
Joe Mooring
09eb822822 hugolib: Display server address after each rebuild
Closes #12359
2024-04-13 22:16:00 +02:00
Joe Mooring
a6e8439176 resources/page: Add taxonomies Page method
Closes #12316
2024-04-12 16:26:02 +02:00
Bjørn Erik Pedersen
38f68cd162 commands: Adjust completions 2024-04-11 15:34:26 +02:00
Ville Skyttä
a67650b6f7 completion: Improve existing argument completions, add many more
Do not offer filenames to arguments not taking one, complete arguments
of options taking resource kinds, directory names, --logLevel, release
--step, config and new --format.

As an internal refactoring, use higher level functions to set flag
completions.  SetAnnotation works, but is more verbose than
alternatives, and uses bash specific wording.

While at it, move setting completions next to flag definitions
consistently.

Remove superfluous --destination completer setting, which is already
set elsewhere.
2024-04-11 15:34:26 +02:00
Bjørn Erik Pedersen
2a060b37a3
Upgrade to Go 1.22.2
Closes #12351
2024-04-11 15:14:28 +02:00
dependabot[bot]
97df6be59f build(deps): bump golang.org/x/tools from 0.19.0 to 0.20.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 14:18:55 +02:00
Bjørn Erik Pedersen
9323376dfa github: Fix CI build 2024-04-11 13:29:19 +02:00
Eitan Adler
bf0b140364
all: Fix duplicate words in comments 2024-04-11 09:31:33 +02:00
dependabot[bot]
e9b8bec433 build(deps): bump golang.org/x/net from 0.23.0 to 0.24.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/net/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 09:29:14 +02:00
dependabot[bot]
888cc1e61e build(deps): bump github.com/getkin/kin-openapi from 0.123.0 to 0.124.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.123.0 to 0.124.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.123.0...v0.124.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-11 09:28:50 +02:00
Christian Oliff
17765a7451
all: Typo fixes 2024-04-11 09:23:17 +02:00
Bjørn Erik Pedersen
92de8625c7
babel: Run go fmt 2024-04-08 18:28:04 +02:00
guangwu
7907935a42
babel: Close file before removing 2024-04-08 15:23:08 +02:00
dependabot[bot]
02d5ec14f3 bump golang.org/x/mod from 0.16.0 to 0.17.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/mod/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 17:44:24 +02:00
curegit
26640525a3
hugolib: Fix regression for blank summaries
Fix regression in content summarization so that we can use empty
summary by using the manual summary divider. Since v0.123, there
has been the regression that causes Hugo to use automatic summary
generation when the manual summary results in an empty string,
even if there is a `<!--more-->` summary divider.
2024-04-05 17:43:55 +02:00
Bjørn Erik Pedersen
488b21d15b Fix sectionPagesMenu for pages in root level
Fixes #12306
2024-04-05 17:38:08 +02:00
Soren L. Hansen
4500b0e423 resources/page: Escape hash sign in permalinks
When creating a link to a file with a `#` in the filename, the link gets
truncated. This happens because the filename is eventaully passed to
`url.Parse` which (correctly!) interprets the `#` as fragment separator.

This commit escapes the `#` in the filename before creating the link.

Fixes #4926
Fixes #8232
Fixes #12342

Co-authored-by: Joe Mooring <joe.mooring@veriphor.com>
2024-04-05 15:57:02 +02:00
dependabot[bot]
060cce0a91 build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.1.1...v2.2.0)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 11:28:58 +02:00
dependabot[bot]
5608ba1f75 build(deps): bump github.com/yuin/goldmark from 1.7.0 to 1.7.1
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 11:27:59 +02:00
Joe Mooring
7bf1abfc55 tpl/strings: Improve type checking 2024-04-04 18:34:55 +02:00
dependabot[bot]
2fedca6c8a build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront
Bumps [github.com/aws/aws-sdk-go-v2/service/cloudfront](https://github.com/aws/aws-sdk-go-v2) from 1.32.6 to 1.35.4.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/fsx/v1.32.6...service/ecs/v1.35.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/service/cloudfront
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 11:16:30 +02:00
dependabot[bot]
07873b74bd build(deps): bump golang.org/x/net from 0.22.0 to 0.23.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-04 11:15:10 +02:00
Joe Mooring
8a0ea12d8a tpl/tplimpl: Improve youtube shortcode
Changes:

- Add query string params for controls, loop, mute, start, and end
- Add iframe loading attribute
- Obtain default iframe title from YouTube oEmbed API
- Fix autoplay feature
- Improve readability

Closes #3694
Closes #9213
Closes #10520
Closes #10575
Closes #10576

Co-authored-by: sgharms <sgharms@stevengharms.com>
2024-04-04 11:08:30 +02:00
seiya
6f07e5976d errors: Return error from cast.ToStringE() consistently 2024-04-04 11:00:14 +02:00
Joe Mooring
2da4ec5738 tpl/tplimpl: Improve embedded opengraph template
Changes:

- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability

Closes #8296
Closes #8698
Closes #8991
Closes #9818
Closes #9866
Closes #10647

Co-authored-by: tomy0000000 <git@tomy.me>
Co-authored-by: sean-au <sean@powerfulwebdesign.com.au>
2024-04-02 18:35:43 +02:00
Joe Mooring
6624979e1b tpl/strings: Create strings.Diff template function
Closes #12330
2024-04-02 18:25:44 +02:00
Bjørn Erik Pedersen
983b8d537c Fix resource bundling for overlapping page.md vs page.txt
Fixes #12320
2024-04-02 14:32:05 +02:00
Joe Mooring
6738a3e79d tpl/tplimpl: Optionally exclude content from sitemap
Define global inclusion/exclusion in site configuration, and override
via front matter. For example, to exclude a page from the sitemap:

    [sitemap]
    disable = true # default is false

Closes #653
Closes #12282

Co-authored-by: kolappannathan <kolappannathan@users.noreply.github.com>
Co-authored-by: felicianotech <FelicianoTech@gmail.com>
2024-04-02 11:21:03 +02:00
Joe Mooring
2f7df4b926
tpl/tplimpl: Remove trailing slash from void elements
Closes #11867
2024-04-01 08:07:02 -07:00
Joe Mooring
f0a26cf58e tpl/tplimpl: Update RSS template
- Use publication date for pubdate
- Include version in generator element

Closes #3918
Closes #11692
2024-03-30 18:32:58 +01:00
Joe Mooring
74ce5dc841 tpl/tplimpl: Update schema template
Changes:

- Remove trailing comma from list of keywords.
- Improve keywords precedence:
  1. Use "keywords" term page titles.
  2. Use "keywords" from front matter if "keywords" is not a taxonomy.
  3. Use "tags" term page titles.
  4. Use term page titles from all taxonomies.
- Enable schema for all page kinds, previously limited to kind = page.
- Remove trailing slashes from void elements.
- Improve readability.

Closes #7570

Co-authored by: 0urobor0s <0urobor0s@users.noreply.github.com>
2024-03-28 14:56:02 +01:00
Joe Mooring
54a8f0ce21 resources: Use different cache key when copying resources
Closes #10412
Closes #12310
2024-03-27 09:59:59 +01:00
Bjørn Erik Pedersen
38e05bd3c7 Fix panic with debug.Dump with Page when running the server
This replaces the current implementation with `json.MarshalIndent` which doesn't produce the same output, but at least it doesn't crash.

There's a bug in the upstream `litter` library. This can probably be fixed, but that needs to wait.

I have tested `go-spew` which does not crash, but it is very data racy in this context.

FIxes #12309
2024-03-26 20:41:30 +01:00
Joe Mooring
ebfca61ac4 tpl/tplimpl: Update Google Analytics template and config
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.

See https://support.google.com/analytics/answer/11583528.

Changes:

- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings

Closes #11802
Closes #10093
2024-03-26 15:40:51 +01:00
Joe Mooring
e1917740af hugolib: Conditionally suppress .Site.Author deprecation notice
Suppress the .Site.Author deprecation notice unless the Author key
is present and not empty in the site configuration.

Closes #12297
2024-03-26 10:28:03 +01:00
George Ma
27414d43a0
resources/page: Fix GoDoc comment 2024-03-22 08:56:10 +01:00
Joe Mooring
c837f36ab4 markup/asciidocext: Add Level to Heading struct
Closes #12291
2024-03-21 19:14:49 +01:00
hugoreleaser
a2f67152b3 releaser: Prepare repository for 0.125.0-DEV
[ci skip]
2024-03-20 11:53:43 +00:00
hugoreleaser
db083b05f1 releaser: Bump versions for release of 0.124.1
[ci skip]
2024-03-20 11:40:10 +00:00
Bjørn Erik Pedersen
758a876f90 Fix potential deadlock in Translations
Fixes #12129
2024-03-20 12:33:05 +01:00
Bjørn Erik Pedersen
19937a20ad Fix rebuild when changing mixed case named templates
Fixes #12165
2024-03-20 12:33:05 +01:00
Anthony Fok
c1ea22a232
testing: Set usesFMA as true for riscv64 too
This fixes TestImageOperationsGolden "values are not deep equal" error on riscv64 with Go 1.22 and above.
2024-03-20 08:59:13 +01:00
Bjørn Erik Pedersen
0750a9ec91 Fix regression for outputs defined in front matter for term pages
Fixes #12275
2024-03-19 15:07:48 +01:00
hugoreleaser
90bc1f802a releaser: Prepare repository for 0.125.0-DEV
[ci skip]
2024-03-16 15:57:20 +00:00
hugoreleaser
629f84e8ed releaser: Bump versions for release of 0.124.0
[ci skip]
2024-03-16 15:44:32 +00:00
Bjørn Erik Pedersen
76ef3f42fa
docs: Regen CLI docs 2024-03-16 15:54:33 +01:00
Bjørn Erik Pedersen
0ccb6cdc04
docs: Regen docshelper 2024-03-16 15:54:02 +01:00
Bjørn Erik Pedersen
1f1c62e6c7 Add segments config + --renderSegments flag
Named segments can be defined in `hugo.toml`.

* Eeach segment consists of zero or more `exclude` filters and zero or more `include` filters.
* Eeach filter consists of one or more field Glob matchers.
* Eeach filter in a section (`exclude` or `include`) is ORed together, each matcher in a filter is ANDed together.

The current list of fields that can be filtered are:

* path as defined in https://gohugo.io/methods/page/path/
* kind
* lang
* output (output format, e.g. html).

It is recommended to put coarse grained filters (e.g. for language and output format) in the excludes section, e.g.:

```toml
[segments.segment1]
  [[segments.segment1.excludes]]
    lang = "n*"
  [[segments.segment1.excludes]]
    no     = "en"
    output = "rss"
  [[segments.segment1.includes]]
    term = "{home,term,taxonomy}"
  [[segments.segment1.includes]]
    path = "{/docs,/docs/**}"
```

By default, Hugo will render all segments, but you can enable filters by setting the `renderSegments` option or `--renderSegments` flag, e.g:

```
hugo --renderSegments segment1,segment2
```

For segment `segment1` in the configuration above, this will:

* Skip rendering of all languages matching `n*`, e.g. `no`.
* Skip rendering of the output format `rss` for the `en` language.
* It will render all pages of kind `home`, `term` or `taxonomy`
* It will render the `/docs` section and all pages below.

Fixes #10106
2024-03-16 15:53:26 +01:00
Bjørn Erik Pedersen
f1d755965f Fix .Parent when there are overlapping regular pages inbetween
Fixes #12263
2024-03-16 14:48:04 +01:00
Bjørn Erik Pedersen
558f74f009 hugolib: Remove Site.HomeAbsURL
It's not in use and after #12266 it's also not corret to use on its own (use .Site.Home.Permalink).
2024-03-16 12:49:40 +01:00
Bjørn Erik Pedersen
ba03114aa9 deps: Upgrade github.com/gohugoio/hugo-goldmark-extensions/passthrough v0.1.0 => v0.2.0 2024-03-16 11:50:11 +01:00
Joe Mooring
3935faa417 hugolib: Fix sitemap index with monolingual site
Fixes #12266
2024-03-16 11:49:00 +01:00
Joe Mooring
d4d49e0f0e hugolib: Deprecate site methods Author, Authors, and Social
Closes #12228
2024-03-15 17:26:45 +01:00
Christian Oliff
78178d0c2a
all: Typo fixes 2024-03-15 17:25:52 +01:00
Bjørn Erik Pedersen
68d92ef9dd Fix translationKey handling for term pages
Fixes #12261
2024-03-15 16:54:18 +01:00
Bjørn Erik Pedersen
b40f3c7df6 Fix intersect and similar for term entry page collections
Fixes #12254
2024-03-15 16:45:53 +01:00
Bjørn Erik Pedersen
57206e7274 Upgrade to Go 1.22.1
Closes #12250
2024-03-15 16:40:36 +01:00
dependabot[bot]
b1f8676347 build(deps): bump github.com/evanw/esbuild from 0.20.1 to 0.20.2
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.20.1 to 0.20.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.20.1...v0.20.2)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-15 15:43:18 +01:00
Bjørn Erik Pedersen
07b2e535be Fix server rebuilds when adding sub sections especially on Windows
This commit also optimizes for the case where change events for both file (e.g. `_index.md`) and the container directory comes in the same event batch.

While testing this on Windows 11 (ARM64), I notice that Windows behaves a little oddly when dumping a folder of files into the content tree; it works (at least after this commit), but it seems like the event batching behaves differently compared to other OSes (even older Win versions).

A related tip would be to try starting the server with polling, to see if that improves the situation, e.g.:

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

Fixes #12230
2024-03-15 15:42:56 +01:00
Joe Mooring
f038a51b3e tpl/tplimpl: Remove deprecated method from sitemapindex.xml 2024-03-14 21:03:19 +01:00
dependabot[bot]
b4bff6190c build(deps): bump golang.org/x/tools from 0.18.0 to 0.19.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-14 11:16:50 +01:00
dependabot[bot]
d2cebee273 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.17 to 2.20.19
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.17 to 2.20.19.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.17...v2.20.19)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-14 11:16:07 +01:00
Paul Jolly
be914ff34d
deps: Upgrade github.com/alecthomas/chroma/v2 to v2.13.0
Closes #11862
2024-03-14 11:04:41 +01:00
Joe Mooring
48a0fea87a tpl/tplimpl: Modify figure shortcode to look for page resource
Closes #12244
Closes #12245
2024-03-14 10:21:40 +02:00
Bjørn Erik Pedersen
9ca1de09dd Fix panic when changing archetype files when servere is running
Fixes #12195
2024-03-13 19:35:28 +02:00
dependabot[bot]
e62675002e build(deps): bump golang.org/x/mod from 0.15.0 to 0.16.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.15.0 to 0.16.0.
- [Commits](https://github.com/golang/mod/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 19:23:42 +02:00
Bjørn Erik Pedersen
9668759ad8 Fix front matter date location when value gets inherited from other dates
Fixes #12236
2024-03-13 19:00:50 +02:00
Bjørn Erik Pedersen
9e9b1f110c Fix Name for nested resourced fetched in resources.ByName and similar
Fixes #12214
2024-03-13 18:59:50 +02:00
Joe Mooring
dc6a292133 common/hugo: Rename IsMultiHost and IsMultiLingual
hugo.IsMultiHost => hugo.IsMultihost
hugo.IsMultiLingual => hugo.IsMultilingual

Closes #12232
2024-03-13 17:34:42 +02:00
Joe Mooring
4f92f949ea hugolib: Deprecate .Site.MultiLingual in favor of hugo.IsMultiLingual
Closes #12224
2024-03-10 10:47:51 +02:00
Joe Mooring
d24ffdde5b
snap: Transition to from core20 to core22
Closes #12219
2024-03-09 08:47:53 -08:00
hugoreleaser
ca31b95f30 releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-03-07 13:28:40 +00:00
hugoreleaser
5fed9c591b releaser: Bump versions for release of 0.123.8
[ci skip]
2024-03-07 13:14:42 +00:00
Jonas Zeiger
134e7d1d3d markup/goldmark: TOC: render strikethrough, emojis
Configure the TOC (TableOfContents, toc.go) goldmark renderer to always
enable the Strikethrough and Emoji extensions. This allows handling
ast.KindStrikethrough and ast.KindEmoji AST nodes when rendering the TOC.

Fixes #7169
Fixes #11783
Fixes #12022
2024-03-07 14:08:29 +01:00
razonyang
1f48b717c7 Add hugo.IsMultiHost 2024-03-07 14:04:41 +01:00
Andreas Deininger
ada3fceea8 docs: Fix hyphens and grammar in synopsis of command 'hugo server' 2024-03-07 14:03:49 +01:00
Joe Mooring
05e23bd55c resources/images: Retain newlines with text overlays
Closes #12206
2024-03-07 09:52:30 +01:00
Bjørn Erik Pedersen
7afac3f1ad Don't auto-create empty sections for nested taxonomies
Fixes #12188
2024-03-07 09:50:50 +01:00
Bjørn Erik Pedersen
a4b17470a8 Fix resource name in resources.ByType
Fixes #12190
2024-03-07 09:50:50 +01:00
Bjørn Erik Pedersen
4d5e173cf8 Fix global resource isn't published when using an uncommon code construct
Fixes #12190
2024-03-07 09:50:50 +01:00
Bjørn Erik Pedersen
4271b6be0f Fix section page resource not published if resource filename partially matches content file name
Fixes #12198
2024-03-07 09:50:50 +01:00
Bjørn Erik Pedersen
0567a3e6f1 Fix taxonomy kind template lookup issue
Fixes #12193
2024-03-07 09:50:50 +01:00
Joe Mooring
632ad74fc5 tpl/tplimpl: Honor markdown attributes in embedded image render hook
Fixes #12203
2024-03-07 08:21:58 +01:00
hugoreleaser
b1de03f398 releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-03-01 16:30:33 +00:00
hugoreleaser
312735366b releaser: Bump versions for release of 0.123.7
[ci skip]
2024-03-01 16:16:06 +00:00
Bjørn Erik Pedersen
2b2f2b75ef hugofs: Fix vertical mount merge issue
Fixes #12175
2024-03-01 17:10:13 +01:00
Bjørn Erik Pedersen
0d6e593ffb Fix and add integration test for the Bootstrap SCSS module for both Dart Sass and Libsass
This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem).

The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios.

This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage.

Fixes #12178
2024-03-01 14:18:52 +01:00
Bjørn Erik Pedersen
7023cf0f07 Fix resources.GetMatch, resources.Match, and resources.ByType to they don't normalize permalinks
Fixes #12182
2024-03-01 13:34:05 +01:00
Bjørn Erik Pedersen
9dfa9e70e6 Make sure that sitemaps gets generated even if there is a content bundle with the same path
Fixes #12183
2024-03-01 13:34:05 +01:00
Joe Mooring
3f217fd664 resources/page: Make Taxonomy.Get and Taxonomy.Count case-insensitive
Closes #12177
2024-03-01 12:09:00 +01:00
hugoreleaser
92684f9a26 releaser: Bump versions for release of 0.123.6
[ci skip]
2024-02-28 18:29:40 +00:00
Bjørn Erik Pedersen
fce8d82b79 Fix panic when cascading headless from site config to section that does not have an _index.md file
Fixes #12172
2024-02-28 19:26:55 +01:00
Bjørn Erik Pedersen
4a502f7eb4 Fix assets vs data issue
And possibly some other related file mount issues.

Fixes #12133
2024-02-28 19:26:55 +01:00
Bjørn Erik Pedersen
be1dbba0f7 Fix draft for non-default content when content in default language does not exist
Fixes #12132
2024-02-28 19:26:55 +01:00
hugoreleaser
1007bcdf49 releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-02-28 16:01:41 +00:00
hugoreleaser
1904ba40e8 releaser: Bump versions for release of 0.123.5
[ci skip]
2024-02-28 15:47:09 +00:00
Bjørn Erik Pedersen
6a8b25e291 Fix .Page.Pages with similary named sections
Fixes #12169
2024-02-28 16:43:19 +01:00
Bjørn Erik Pedersen
a322282e70 Fix single mount rename panic
Fixes #12141
2024-02-28 13:38:12 +01:00
Bjørn Erik Pedersen
6bc0d745a5 Fix multihost processed image not copied to non-default content languages
Fixes #12163
2024-02-27 10:43:23 +01:00
dependabot[bot]
218690328c build(deps): bump github.com/bep/overlayfs from 0.9.1 to 0.9.2
Bumps [github.com/bep/overlayfs](https://github.com/bep/overlayfs) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/bep/overlayfs/releases)
- [Commits](https://github.com/bep/overlayfs/compare/v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: github.com/bep/overlayfs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 09:59:15 +01:00
hugoreleaser
673c634131 releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-02-26 16:46:48 +00:00
hugoreleaser
21a41003c4 releaser: Bump versions for release of 0.123.4
[ci skip]
2024-02-26 16:33:05 +00:00
Bjørn Erik Pedersen
1736ef7459 Fix cascade-pattern-with-extension for cascade in site config
Also clean up the log handling in the integration tester, most notably lost logs during the config loading.

Fixes #12151
2024-02-26 17:29:37 +01:00
dependabot[bot]
d4be1643a0 build(deps): bump github.com/spf13/fsync from 0.10.0 to 0.10.1
Bumps [github.com/spf13/fsync](https://github.com/spf13/fsync) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/spf13/fsync/releases)
- [Commits](https://github.com/spf13/fsync/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/fsync
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 17:08:34 +01:00
Bjørn Erik Pedersen
f27e578718 Fix term template lookup when its backed by a content file
Closes #12146
2024-02-25 18:28:16 +01:00
Bjørn Erik Pedersen
d310595a2b resource: Revert the normalization of Resource.Name
Which means that .Name now returns the same as it did in 0.122.0.

Closes #12142
2024-02-25 14:57:29 +01:00
Bjørn Erik Pedersen
049dd1d7e0 Fix panic for disableKinds page for content resources
Fixes #12144
2024-02-25 11:38:52 +01:00
Bjørn Erik Pedersen
189b72331e tocss: Fix the import resolving from absolute to relative assets paths
Fixes #12137
2024-02-24 16:41:18 +01:00
Bjørn Erik Pedersen
b2b7bfdd3a
Maek Resoyrce.Key as (mostly) internal 2024-02-24 15:17:15 +01:00
Joe Mooring
80e69344da
config/allconfig: Fix typo
Closes #12134
2024-02-23 12:40:15 -08:00
hugoreleaser
7508a16470 releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-02-23 17:22:38 +00:00
hugoreleaser
a75a659f6f releaser: Bump versions for release of 0.123.3
[ci skip]
2024-02-23 17:09:20 +00:00
Bjørn Erik Pedersen
03b88c6ddb
cache/dynacache: Reset ticker in case one cache eviction takes some time
Updates #12129
2024-02-23 17:56:29 +01:00
Bjørn Erik Pedersen
7ee0f70507
Revert "cache/dynacache: Prevent multiple concurrent resizes"
This reverts commit 564bae06f6.

Thinking about it, the above doesn't make any sense/having any effect.
2024-02-23 17:44:32 +01:00
Bjørn Erik Pedersen
564bae06f6
cache/dynacache: Prevent multiple concurrent resizes
Updates #12129
2024-02-23 17:27:52 +01:00
Bjørn Erik Pedersen
bf14d0cb26 Speed up GetPage
```
name                             old time/op    new time/op    delta
GetPage-10                          413ns ± 0%     287ns ± 1%  -30.47%  (p=0.029 n=4+4)
GetPageRegular/From_root-10         757ns ± 1%     706ns ± 1%   -6.75%  (p=0.029 n=4+4)
GetPageRegular/Page_relative-10     838ns ± 1%     786ns ± 1%   -6.16%  (p=0.029 n=4+4)

name                             old alloc/op   new alloc/op   delta
GetPage-10                           312B ± 0%       24B ± 0%  -92.31%  (p=0.029 n=4+4)
GetPageRegular/From_root-10          328B ± 0%      200B ± 0%  -39.02%  (p=0.029 n=4+4)
GetPageRegular/Page_relative-10      360B ± 0%      232B ± 0%  -35.56%  (p=0.029 n=4+4)

name                             old allocs/op  new allocs/op  delta
GetPage-10                           8.00 ± 0%      2.00 ± 0%  -75.00%  (p=0.029 n=4+4)
GetPageRegular/From_root-10          7.00 ± 0%      5.00 ± 0%  -28.57%  (p=0.029 n=4+4)
GetPageRegular/Page_relative-10      9.00 ± 0%      7.00 ± 0%  -22.22%  (p=0.029 n=4+4)
```
2024-02-23 16:29:21 +01:00
Bjørn Erik Pedersen
f521336c81 hugolib: Fix a .Page.GetPage from bundle case
Fixes #12120
2024-02-23 14:40:29 +01:00
Bjørn Erik Pedersen
c4fe45ff4c
resources: Skip the image golden tests when running locally
See #12119
2024-02-23 10:30:11 +01:00
Benjamin Altpeter
554aa58db6 js: Support JSX and JSXImportSourceOptions
Fixes #12118
2024-02-23 10:25:27 +01:00
Joe Mooring
36bf3cb98c hugolib: Add capitalizeListTitles config option
Whether to capitalize automatic page titles, applicable to section,
taxonomy, and term pages. Default is true.

Closes #9793
Closes #12115
2024-02-23 09:32:32 +01:00
hugoreleaser
ea0ba9751d releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-02-22 15:41:43 +00:00
hugoreleaser
929b91fe75 releaser: Bump versions for release of 0.123.2
[ci skip]
2024-02-22 15:27:15 +00:00
Bjørn Erik Pedersen
db3bb623d4 Fix it so not all bundled resources are removed when one translation is drafted
Fixes #12105
2024-02-22 16:16:44 +01:00
Razon Yang
f5fd7ec8cc
commands/mod: Ignore invalid module path 2024-02-22 16:00:03 +01:00
Bjørn Erik Pedersen
16406d9d77 Fix regression on handling of overlapping file mounts
But note that the overlay file system is set up horizontally (project -> module1 -> module2), so I would not recommend too complex overlapping mount setups within the same module.

But this worked in v0.122.0, so we should fix it.

Fixes #12103
2024-02-22 15:36:27 +01:00
Bjørn Erik Pedersen
e75784930d Sitemap should not use list.xml
Fixes #12101
2024-02-21 20:07:51 +01:00
Bjørn Erik Pedersen
b8ab5c9be6 Fix rebuild when adding a bundle with space in name
Fixes #12092
2024-02-21 17:49:15 +01:00
Bjørn Erik Pedersen
cf7023cb90 Fix relative import issue in libsass/dart sass
Fixes #12094
2024-02-21 17:27:45 +01:00
Bjørn Erik Pedersen
fd0185a84a Fix relref regression with trailing slash
Fixes #12096
2024-02-21 17:27:45 +01:00
hugoreleaser
6da1d8f370 releaser: Prepare repository for 0.124.0-DEV
[ci skip]
2024-02-21 08:30:57 +00:00
hugoreleaser
3f8434a62f releaser: Bump versions for release of 0.123.1
[ci skip]
2024-02-21 08:17:45 +00:00
Joe Mooring
c9f7ebf004 tpl/tplimpl: Resolve fragments in link render hook
Fixes #12084
2024-02-21 09:11:34 +01:00
Bjørn Erik Pedersen
eceeb19751 Fix rebuilding of pages without default content language
Fixes #12082
2024-02-20 18:42:14 +01:00
Bjørn Erik Pedersen
621194a319 Fix dart sass import regression
Fixes #12072
2024-02-20 17:00:32 +01:00
Bjørn Erik Pedersen
48eec2a4e6 Fall back to original name in Resources.GetMatch/Match
Same as we do in .Get.

Fixes #12076
2024-02-20 16:47:07 +01:00
Bjørn Erik Pedersen
a118cb4138 Fix robots.txt using the built-in template regression
Fixes #12071
2024-02-20 11:17:44 +01:00
Bjørn Erik Pedersen
2658a71e1b Squashed 'docs/' changes from a9584e3d1..8c46b304a
8c46b304a Correct description of build options > render > link
f57932df1 Fix front matter example
a7e5fea73 Clarify pagination restriction
3a7e665db Fix typos
f60845249 List translation keys reserved by nicksnyder/go-i18n
94f2a3608 Fix typo
2da1198ac Update FNV32a.md: new-in 0.98.0
d9a4c66ae Fix typo data-templates.md
0d3c2e2c3 Update partials.md
d7e9a0878 Update partials.md

git-subtree-dir: docs
git-subtree-split: 8c46b304a0679d4e2b6c923ed0363efdfdcf48c1
2024-02-19 18:59:28 +01:00
Bjørn Erik Pedersen
e8cc785a58
Merge commit '2658a71e1b' 2024-02-19 18:59:28 +01:00
hugoreleaser
8406a3e9dc releaser: Bump versions for release of 0.123.0
[ci skip]
2024-02-19 17:28:48 +00:00
dependabot[bot]
f54ba6f9ef build(deps): bump github.com/tdewolff/minify/v2 from 2.20.16 to 2.20.17
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.16 to 2.20.17.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.16...v2.20.17)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 17:21:17 +01:00
dependabot[bot]
4019b177e6 build(deps): bump github.com/evanw/esbuild from 0.20.0 to 0.20.1
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.20.0 to 0.20.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.20.0...v0.20.1)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 17:12:14 +01:00
Bjørn Erik Pedersen
5dbc29dc6c Handle rebuilds when resources passed to transform.Unmarshal etc. changes
Fixes #12065
2024-02-19 14:50:23 +01:00
Bjørn Erik Pedersen
5ada27bf65 Fix handling of build options for term pages
Fixes #12058
2024-02-18 16:50:35 +01:00
Bjørn Erik Pedersen
60b176cb57
docs: Regen docshelper 2024-02-18 13:20:15 +01:00
Bjørn Erik Pedersen
afe5b6d7df Fix sample logic when adding content files in server
The partial rebuilds works by calaulating a baseline from a change set.

For new content, this doesn't work, so to avoid rebuilding everything, we first
try to collect a sample of surrounding identities (e.g. content files in the same section).

This commit fixes a flaw in that logic that in some (many...) cases would return a too small sample set.

Fixes #12054
2024-02-18 12:24:27 +01:00
Christian Oliff
168d375784
all: Fix typos and some URLs 2024-02-18 12:16:30 +01:00
dependabot[bot]
4a53fd56b7 build(deps): bump golang.org/x/tools from 0.17.0 to 0.18.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 18:27:49 +01:00
Bjørn Erik Pedersen
fc6aabe938 Fix handling of draft term pages
By just removing the term page and all of its page entries.

Fixes #12055
2024-02-17 18:12:25 +01:00
Bjørn Erik Pedersen
9cc65757a1
releaser: Fix archive homepage and description
Fixes #12053
2024-02-17 13:32:15 +01:00
Bjørn Erik Pedersen
4835f9e898 commands: Fix --clock with the list command
Fixes #11888
2024-02-17 13:14:15 +01:00
Bjørn Erik Pedersen
5bdda0bdbf Don't use the same value in .Data.Term.Title as in .Title
Fixes #12041
2024-02-17 12:34:50 +01:00
Bjørn Erik Pedersen
9679443c15 Fix server panic on i18n file change
Fixes #12048
2024-02-17 11:46:45 +01:00
dependabot[bot]
2d1681d915 build(deps): bump golang.org/x/net from 0.20.0 to 0.21.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 11:16:15 +01:00
Bjørn Erik Pedersen
68f67c9aeb Fix rebuild regression on non-default content language edits
Fixes #12043
2024-02-16 19:05:18 +01:00
Fabian Kammel
43ea2cd660
Let standard library handle charset parameter to MIME types
Fixes #10734
2024-02-16 18:24:25 +01:00
Bjørn Erik Pedersen
f1491c900e Fix i18n rebuild regression
Fixes #12039
2024-02-16 16:17:57 +01:00
Bjørn Erik Pedersen
639073e4fe Fix rebuild with resources.Concat
Fixes #12017
2024-02-16 13:17:53 +01:00
Joe Mooring
21d9057dbf Add images.Dither filter
Closes #8598
2024-02-11 22:51:11 +02:00
Christian Oliff
0672b5c766
all: Fix typos 2024-02-11 13:51:33 +02:00
Rosano
e309f82efe
resources/page: Fix typo 2024-02-10 21:28:03 +02:00
Joe Mooring
6f59d96bba markup/goldmark: Update TOC test
- Change copyright date
- Change name of site configuration file
- Reference issue numbers in failing tests
2024-02-10 20:16:59 +02:00
Bjørn Erik Pedersen
caba6ba6e7 Fix taxonomy term with backing file regression
Fixes #12020
2024-02-10 18:48:53 +02:00
Joe Mooring
f4575e5f29 markup/goldmark: Improve TOC tests 2024-02-10 16:03:37 +02:00
Bjørn Erik Pedersen
0851c175ad Move the duplicate page/resource filter
Move the removal of duplicate content and resource files after we have determined if we're inside a leaf bundle or not.

Note that these would eventually have been filtered out as duplicates when  inserting them into the document store, but doing it here will preserve a consistent ordering.

Fixes #12013
2024-02-08 20:11:17 +01:00
Bjørn Erik Pedersen
676e6875da Make HTML behave exactly like other content formats (note)
Fixes #11999
2024-02-07 21:37:04 +01:00
Bjørn Erik Pedersen
068ccde4c7
docs: Regen CLI docs 2024-02-07 20:49:52 +01:00
Bjørn Erik Pedersen
7cb447ab8e
docs: Regenerate docshelper 2024-02-07 20:48:25 +01:00
Bjørn Erik Pedersen
6efb279bfa Squashed 'docs/' changes from 5c085a37b..a9584e3d1
a9584e3d1 ci: bump GitHub workflow actions to latest versions
f37ee374d Fix methods related to time.After
a49214057 Correct heading render hook example
4b696f936 Update README.md
b5a6e4039 Clean up the contributing section
a5d79ed19 Fixed typo: instea → instead
6150a60e3 Remove the "local file templates" page
9395743dc Update/vendor theme
33d8c10cc Remove output format "name" parameter
7200ad97d Add security section to resources.GetRemote page
3f1e056b2 Remove erroneous front matter field
07c9a7e42 Add alpha index to glossary
6619c8aa0 Fix Page.Params example
145a92359 Simplify string concat example in math.Add
42488bb09 Add string concat example to math.Add
eb20521a2 Fix flash of unstyled content with mathematical markup
74603bebe Fix typo in 'typesetting'

git-subtree-dir: docs
git-subtree-split: a9584e3d146c4a194d937a4dc8a37cde5ba1c618
2024-02-07 20:46:41 +01:00
Bjørn Erik Pedersen
b8d5090452
Merge commit '6efb279bfa' 2024-02-07 20:46:41 +01:00
dependabot[bot]
301bafabe0 build(deps): bump golang.org/x/mod from 0.14.0 to 0.15.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/mod/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 20:44:21 +01:00
Bjørn Erik Pedersen
9571246bcc Upgrade to Go 1.22
Fixes #12010
2024-02-07 20:42:42 +01:00
Bjørn Erik Pedersen
0257eb50a4 Avoid impporting deploy from config when nodeploy tag is set
Test:

```
go list -tags nodeploy ./... | grep deploy
```

Fixes #12009
2024-02-07 20:38:13 +01:00
Bjørn Erik Pedersen
a65622a13e Fix rebuild of changed bundled content files
Fixes #12000
2024-02-06 21:53:33 +01:00
Bjørn Erik Pedersen
146aedd7aa Fix site.Taxonomies for taxonomies with space in name
Fixes #12001
2024-02-06 18:17:30 +01:00
Bjørn Erik Pedersen
bd0200da6e
commands: Remove unused memstats flag 2024-02-05 19:06:27 +01:00
Bjørn Erik Pedersen
a80c3021ba
source: Remove unused Filesystem struct 2024-02-05 15:03:03 +01:00
Bjørn Erik Pedersen
9df7b295bc
Filter dot files etc. in i18n
Closes #11993
2024-02-05 14:54:02 +01:00
Bjørn Erik Pedersen
c37bf19c89
commands: Revert the recent changes that allowed profiling on server rebuilds
There have been indications that this may freeze the server.
2024-02-05 14:27:35 +01:00
Bjørn Erik Pedersen
9c6d377872 commands: Make the server flag --renderToDisk into --renderToMemory (note)
Fixes #11987
2024-02-05 14:04:17 +01:00
dependabot[bot]
58d7f83390 build(deps): bump github.com/yuin/goldmark from 1.6.0 to 1.7.0
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 11:48:46 +01:00
Bjørn Erik Pedersen
609d798e34 Handle resource changes when the resources is already evicted from cache
Also fix a logical flaw in the cache resizer that made it too aggressive. After this I haven't been able to reproduce #11988, but I need to look closer.

Closes #11973
Updates #11988
2024-02-04 16:55:06 +01:00
Bjørn Erik Pedersen
53f204310e
all: Rename Unmormalized => Unnormalized 2024-02-03 18:10:38 +01:00
Joe Mooring
7f82461407 hugolib: Formally deprecate .Page.NextPage .Page.PrevPage
Use .Page.Next and .Page.Prev instead.
2024-02-03 17:28:52 +01:00
Bjørn Erik Pedersen
b72f909725
hugio: Rename strigReadSeeker => stringReadSeeker 2024-02-03 17:25:34 +01:00
Joe Mooring
3a665ddbf9 resources/page: Formally deprecate .Site.LastChange
Use .Site.Lastmod instead.
2024-02-03 17:11:06 +01:00
Bjørn Erik Pedersen
46575baa02 Preserve file/dir name case when loading data
Fixes #11979
2024-02-03 16:30:10 +01:00
Bjørn Erik Pedersen
058f230a1b Detect now invalid path patterns in cascade
Closes #11977
2024-02-03 15:07:59 +01:00
Bjørn Erik Pedersen
a66480f70c Handle build vs _build in front matter
* Throw a detailed error message in the mentioned case
* Also fixed a dropped error

Fixes #11970
2024-02-03 15:07:59 +01:00
Bjørn Erik Pedersen
e33a632551 resources: Optimize reading resource Content when it's already a string 2024-02-03 15:07:59 +01:00
Bjørn Erik Pedersen
2873324898 Misc resource fixes/improvements
* Add --pprof flag to server to enable profile debugging.
* Don't cache the resource content, it seem to eat memory on bigger sites.
* Keep --printMemoryUsag running in server

Fixes #11974
2024-02-02 18:46:23 +01:00
Joe Mooring
d0788b96ae tpl/tplimpl: Update embedded instagram, twitter, and vimeo shortcodes
- Replace data.GetJSON calls with resources.GetRemote
- Remove usage of Facebook’s oEmbed Read feature

Fixes #11971
2024-02-02 08:01:45 +01:00
Bjørn Erik Pedersen
034fbef50d
Add some more context to error
Updates #11970
2024-02-01 21:40:32 +01:00
dependabot[bot]
54ad51e8a6 build(deps): bump github.com/getkin/kin-openapi from 0.122.0 to 0.123.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.122.0 to 0.123.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.122.0...v0.123.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 19:56:04 +01:00
dependabot[bot]
bd1bcc0f91 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.13 to 2.20.16
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.13 to 2.20.16.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.13...v2.20.16)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 19:55:31 +01:00
Bjørn Erik Pedersen
8d42a7942a Improve nilpointer error message 2024-02-01 19:53:51 +01:00
Bjørn Erik Pedersen
4174a7866b Fix disabled languages regression
Fixes #11959
2024-02-01 19:42:55 +01:00
Joe Mooring
5dd06b4136 tpl/data: Fix GetCSV deprecation message 2024-02-01 19:21:15 +01:00
Bjørn Erik Pedersen
f5ec75db36 hugolib: Adjust a test case 2024-02-01 18:20:13 +01:00
Joe Mooring
6cb3bda3d1 hugolib: Revert deprecation of .Page.Lang
Deprecation message was also emitted when calling .Page.Language.Lang.
Reverting for now, but will remove all references to .Page.Lang from
documentation.
2024-02-01 18:00:50 +01:00
Joe Mooring
963cecc12c all: Deprecate .Page.Lang and .Page.File.Lang
Use .Page.Language.Lang instead.
2024-02-01 17:12:52 +01:00
Bjørn Erik Pedersen
d8f0e30715
Fix failing test on Windows 2024-02-01 15:10:52 +01:00
Joe Mooring
b6def61727 config/security: Add SYSTEMDRIVE to OsEnv allowlist 2024-02-01 15:10:05 +01:00
Bjørn Erik Pedersen
1891d5e6b5
hugolib: Add some more details to the "paginator not supported" error
See #11949
2024-02-01 08:18:11 +01:00
Bjørn Erik Pedersen
156f08de35
Run go mod tidy 2024-02-01 08:08:58 +01:00
dependabot[bot]
b332f243fd build(deps): bump github.com/evanw/esbuild from 0.19.12 to 0.20.0
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.19.12 to 0.20.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.12...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 22:13:09 +01:00
Bjørn Erik Pedersen
d8c2734178 deploy: Fix CloudFront invalidation with AWS SDK2 2024-01-31 22:12:48 +01:00
Bjørn Erik Pedersen
d8e1e82188 deps: Update gocloud.dev/aws 2024-01-31 22:12:48 +01:00
Franky W
a1c64989df Upgrade to deploy to use AWS SDK V2 2024-01-31 22:12:48 +01:00
Bjørn Erik Pedersen
6c3b6ba3e6 Improve error message when attempting to paginate from a single page template
Fixes #11953
2024-01-31 16:54:34 +01:00
dependabot[bot]
4d98b0ed6a build(deps): bump github.com/aws/aws-sdk-go from 1.48.6 to 1.50.7
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.48.6 to 1.50.7.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.48.6...v1.50.7)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 13:43:46 +01:00
dependabot[bot]
15b9976b7a build(deps): bump golang.org/x/image from 0.14.0 to 0.15.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.14.0 to 0.15.0.
- [Commits](https://github.com/golang/image/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-31 13:42:24 +01:00
Bjørn Erik Pedersen
34d63c8d1c
Fix build error 2024-01-31 13:00:56 +01:00
Bjørn Erik Pedersen
51615440bf
docs: Make null booleans falsy in the docs helper 2024-01-31 12:34:28 +01:00
Bjørn Erik Pedersen
bd66d30295 Filter out duplicate content resource files
We do a slight normalisation of the content paths (lower case, replacing " " with "-") and remove andy language identifier before inserting them into the content tree.

This means that, given that that the default content language is `en`:

```
index.md
index.html
Foo Bar.txt
foo-bar.txt
foo-bar.en.txt
Foo-Bar.txt
```

The bundle above will be reduced to one content file with one resource (`foo-bar.txt`).

Before this commit, what version of the `foo-bar.txt` you ended up with was undeterministic. No  we pick the first determined by sort order.

Note that the sort order is stable, but we recommend avoiding situations like the above.

Closes #11946
2024-01-31 10:06:04 +01:00
Bjørn Erik Pedersen
7caa5b3e50
docs: Regen docs helper 2024-01-31 09:45:35 +01:00
Bjørn Erik Pedersen
309d61b220
output: Prevent setting Name directly in new output formats
Name is derived from the map key.

Closes #11947
2024-01-31 09:43:02 +01:00
Bjørn Erik Pedersen
5b7cb258ec Create default link and image render hooks
Fixes #11933
2024-01-30 20:12:19 +01:00
Bjørn Erik Pedersen
80595bbe3e Fix recent regression .Resources.Get for resources with spaces in filename
Fixes #11944
2024-01-30 20:12:03 +01:00
Bjørn Erik Pedersen
afee781f03 Emit a warning that can be turned off when overwriting built-in .Params values
Fixes #11941
2024-01-30 20:12:03 +01:00
Bjørn Erik Pedersen
4e84f57efb Add warnidf template function
Also rename config `ignoreErrors` => `ignoreLogs`

But the old still works.

Closes #9189
2024-01-30 20:12:03 +01:00
Bjørn Erik Pedersen
f31a6db797 Add path, kind and lang to content front matter
Note that none of these can be set via cascade (you will get an error)

Fixes #11544
2024-01-30 20:12:03 +01:00
Lars Lehtonen
ec22bb31a8
hugofs/glob: Fix dropped test error 2024-01-28 23:31:10 +01:00
Bjørn Erik Pedersen
a795acbcd8 all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
Bjørn Erik Pedersen
982d9513e7
testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
Bjørn Erik Pedersen
6dedb4efc7 Add the [params] concept to front matter
This is deliberately very simple, but should not break anything. We need to introduce this in baby steps, but this should allow us to introduce this in the documentation.

Note that the `params` section's key/values will be added to `.Params` last. This means that you can have different values for "Hugo's summary" and the custom ".Params.summary" if you want to.

Updates #11055
2024-01-28 21:38:40 +01:00
Bjørn Erik Pedersen
292626e679 tpl/data: Deprecate data.GetJSON and data.GetCSV 2024-01-28 16:37:36 +01:00
razonyang
60d954c785 modules: Print required Hugo version for incompatible modules 2024-01-28 15:23:21 +01:00
Bjørn Erik Pedersen
63e0a92894
hugolib: Remove unused test image 2024-01-28 15:14:53 +01:00
Kandula Naveen
ce7daa6156
navigation: Improve menu cache 2024-01-28 15:11:57 +01:00
Bjørn Erik Pedersen
2a0329423c
testing: Rename integration_test.go to PACKAGE_integration_test.go
Primary motivation making them easier to find in the code editor.
2024-01-28 11:41:59 +01:00
Bjørn Erik Pedersen
50dc327d1a
Port some integration tests to new test setup
The method I'm currently using (if other want to help) is:

* Add fmt.Println(b.DumpTxtar()) after the Build step
* Add that to a files var and pass that to Test(t, files) or similar
* Then, if possible, try to reduce the files/content down to what's needed in test.

Note that if the test is small, it's probably faster just to manually re-create the test.
2024-01-28 11:29:23 +01:00
Bjørn Erik Pedersen
7285e74090
all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning
There are some breaking changes in this commit, see #11455.

Closes #11455
Closes #11549

This fixes a set of bugs (see issue list) and it is also paying some technical debt accumulated over the years. We now build with Staticcheck enabled in the CI build.

The performance should be about the same as before for regular sized Hugo sites, but it should perform and scale much better to larger data sets, as objects that uses lots of memory (e.g. rendered Markdown, big JSON files read into maps with transform.Unmarshal etc.) will now get automatically garbage collected if needed. Performance on partial rebuilds when running the server in fast render mode should be the same, but the change detection should be much more accurate.

A list of the notable new features:

* A new dependency tracker that covers (almost) all of Hugo's API and is used to do fine grained partial rebuilds when running the server.
* A new and simpler tree document store which allows fast lookups and prefix-walking in all dimensions (e.g. language) concurrently.
* You can now configure an upper memory limit allowing for much larger data sets and/or running on lower specced PCs.
We have lifted the "no resources in sub folders" restriction for branch bundles (e.g. sections).
Memory Limit
* Hugos will, by default, set aside a quarter of the total system memory, but you can set this via the OS environment variable HUGO_MEMORYLIMIT (in gigabytes). This is backed by a partitioned LRU cache used throughout Hugo. A cache that gets dynamically resized in low memory situations, allowing Go's Garbage Collector to free the memory.

New Dependency Tracker: Hugo has had a rule based coarse grained approach to server rebuilds that has worked mostly pretty well, but there have been some surprises (e.g. stale content). This is now revamped with a new dependency tracker that can quickly calculate the delta given a changed resource (e.g. a content file, template, JS file etc.). This handles transitive relations, e.g. $page -> js.Build -> JS import, or $page1.Content -> render hook -> site.GetPage -> $page2.Title, or $page1.Content -> shortcode -> partial -> site.RegularPages -> $page2.Content -> shortcode ..., and should also handle changes to aggregated values (e.g. site.Lastmod) effectively.

This covers all of Hugo's API with 2 known exceptions (a list that may not be fully exhaustive):

Changes to files loaded with template func os.ReadFile may not be handled correctly. We recommend loading resources with resources.Get
Changes to Hugo objects (e.g. Page) passed in the template context to lang.Translate may not be detected correctly. We recommend having simple i18n templates without too much data context passed in other than simple types such as strings and numbers.
Note that the cachebuster configuration (when A changes then rebuild B) works well with the above, but we recommend that you revise that configuration, as it in most situations should not be needed. One example where it is still needed is with TailwindCSS and using changes to hugo_stats.json to trigger new CSS rebuilds.

Document Store: Previously, a little simplified, we split the document store (where we store pages and resources) in a tree per language. This worked pretty well, but the structure made some operations harder than they needed to be. We have now restructured it into one Radix tree for all languages. Internally the language is considered to be a dimension of that tree, and the tree can be viewed in all dimensions concurrently. This makes some operations re. language simpler (e.g. finding translations is just a slice range), but the idea is that it should also be relatively inexpensive to add more dimensions if needed (e.g. role).

Fixes #10169
Fixes #10364
Fixes #10482
Fixes #10630
Fixes #10656
Fixes #10694
Fixes #10918
Fixes #11262
Fixes #11439
Fixes #11453
Fixes #11457
Fixes #11466
Fixes #11540
Fixes #11551
Fixes #11556
Fixes #11654
Fixes #11661
Fixes #11663
Fixes #11664
Fixes #11669
Fixes #11671
Fixes #11807
Fixes #11808
Fixes #11809
Fixes #11815
Fixes #11840
Fixes #11853
Fixes #11860
Fixes #11883
Fixes #11904
Fixes #7388
Fixes #7425
Fixes #7436
Fixes #7544
Fixes #7882
Fixes #7960
Fixes #8255
Fixes #8307
Fixes #8863
Fixes #8927
Fixes #9192
Fixes #9324
2024-01-27 16:28:14 +01:00
Bjørn Erik Pedersen
5fd1e74903
Merge commit '9b0050e9aa' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00
Bjørn Erik Pedersen
9b0050e9aa Squashed 'docs/' content from commit 5c085a37b
git-subtree-dir: docs
git-subtree-split: 5c085a37b297bf12f59efeaae591418ec025c10d
2024-01-27 10:48:33 +01:00
Bjørn Erik Pedersen
fc7de7136a
docs: Prepare for new sub tree
See #11925
2024-01-27 10:47:28 +01:00
hugoreleaser
1083bf7c08 releaser: Prepare repository for 0.123.0-DEV
[ci skip]
2024-01-26 16:06:12 +00:00
hugoreleaser
b9a03bd59d releaser: Bump versions for release of 0.122.0
[ci skip]
2024-01-26 15:54:24 +00:00
dependabot[bot]
e0021f4961 build(deps): bump golang.org/x/tools from 0.16.0 to 0.17.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 13:19:29 +01:00
dependabot[bot]
d25902c0d8 build(deps): bump github.com/rogpeppe/go-internal from 1.11.0 to 1.12.0
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 12:55:48 +01:00
Bjørn Erik Pedersen
50042ee1f4
docs: Regen docshelper 2024-01-26 08:23:37 +01:00
Bjørn Erik Pedersen
3758456b31
Merge commit '7125ad401a' 2024-01-26 08:22:42 +01:00
Bjørn Erik Pedersen
7125ad401a Squashed 'docs/' changes from 4dd2d6415..3b1a8579d
3b1a8579d Update theme
b1f04fd47 params: Adjust the twitter handle
2c8ba029f Fix typo
4421e46ec Update Where.md
5f9fec6a5 Update glossary.md
fb16945cf collections.Where - Clarify description of "collection"
4d6d7018b Update Include.md - improve return statement example
037151073 Update IncludeCached - improve return statement example
b053fa09c Improve return types
f7d615267 Describe minimum required Windows version
e97762b2a Update front matter in math.Sub
9e4d03a79 Fix data.GetJSON examples
9029ee123 Update spellcheck GitHub Action
c852fe421 Add version verification step to quick start guide
8fafca49c Correct front matter example
b412fdf65 Fix closing tag in notes docs
9a64d9579 Add hreflang Tag to Translation Link example
2d2a82101 Fix inverted examples in Permalink and RelPermalink
ff3e67e3f Correct spelling
3904b72e3 Fix documentation contribution steps enumeration
348fd3c02 Fix some typos in the content summaries page
a5823459a Fix two links, one to bonsai.io and one to digital.gov
c36978686 Fix typo
0ee3ff44f Vendor theme
6b0a9b75d Fix typo
44e4cb5c6 Fix typos
815071742 Update min Go version to build from source
192d14df5 Fix typo
e4a18946e Miscellaneous corrections
f12b7b74e netlify: Hugo 0.121.2
97dbc1ea1 Merge branch 'tempv0.121.2'
dc1c0aeeb Add cache note to resources.Concat
a8d1a6020 Correct return type
eca22e97c Fix front matter
7de247a03 Correct return type
5058bc520 collections.Seq: Specify max slice size
e24d81a4b Fix typo on FAQ page
ff8cf5a88 Correct 'related' front matter values
88b21fae0 Adjust deprecation handling
f7e19a25b Update terminology on shortcode templates page
01e10942a Adjust formatting
6ed2e19c2 tpl/math: Add math.Rand template function
b494a8d8d Update js.md
6d78035f4 Add interval description to glossary (#2378)
f9b612b64 Templates Lookup Order: Add missing parenthesis
741ab1bb2 Show vendorClosest in module default config
eb8cb878f Fix Babel headings
cdcdfc8e8 Change project name in Codeowners example
f31fe0d63 Update link to image filters
9dee1ee0e Update Solus installation instructions
716636fee Add TOC to collections.Sort
f7c64143c Update collections.Sort
4b8f6b991 Add id attributes to Scratch and Store methods
2a1adea79 Add id attributes to GitInfo, File, and Resources methods
b12d9cb8f Add Alpine Linux installation instructions
dfbebeec7 Change writeStats to buildStats
175b8aac8 resources/images: Create AutoOrient image filter
ba8e05c31 Update img shortcode
7fc15a6cc Fix default value of  pluralizeListTitles
a0be4fd8a Add Comentario to available comment engines
71aa7d8ab Update GitInfo.md
348441491 EXIF: describe applicable image types
743497eda Disable TOC for lang.Translate
b3b1df75d Describe lang.Translate fallback behavior
a6d9c362c Categorize CLI commands to improve search results
08cc2da4b Document canonical config for enabling inline shortcodes
8945be9c6 Update description of the humanize ordinal conversion
b8b4ccb6f Fix grammatical error
f53f9f936 Fix description of strings.HasSuffix
cdbe19b5b Update Params.md
e00c4eea2 Reformat site config descriptions
6f50c0755 Enumerate root configuration keys
1f2e7b9b2 Use canonical key when documenting menu configs
7d5a13d8d Update images.Text filter
315d2f8c3 Add math.Counter example to warnf
8ed9cdaa9 Miscellaneous edits
2bda491eb Fix front matter example
5c5bbbe3a netlify: Bump to Hugo 0.121.1
ed08f5943 Update Gentoo installation instructions
e4eb48457 Miscellaneous edits
8c3700d12 netlify: Bump to Hugo 0.121.0
1bb5a377f Merge branch 'tempv0.121.0'
8cba89504 Improve where function
0dfc00b0f docs: Regen docshelper
028076a66 Fix link to Gentoo package
52d2db4ff Fix typo
120025c19 Improve Gentooo installation instructions
0c31a4b45 Update GitHub hosting workflow example
dee99c36a Defend against missing aliases in quick-reference shortcode
d305278f1 Add Gentoo installation instructions
be98a37e1 docs: Adjust last merge from docs repository
a703dab53 docs: Regen docs helper
2e9c3532f Merge commit '35dec7c96f'
f57fdb44b deps: Update github.com/tdewolff/minify/v2 v2.20.7 => v2.20.8
50cad5e38 tpl/transform: Add transform.XMLEscape template function

git-subtree-dir: docs
git-subtree-split: 3b1a8579d2e032c1aab8a74d4cf63849ba11e7a8
2024-01-26 08:11:52 +01:00
Jeremy Kun
d0d2c6795e markup/goldmark: Support passthrough extension
Fixes #10894
2024-01-26 08:11:35 +01:00
dependabot[bot]
2dd608378d build(deps): bump github.com/pelletier/go-toml/v2 from 2.1.0 to 2.1.1
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 19:48:59 +01:00
dependabot[bot]
45f52be7f8 build(deps): bump github.com/evanw/esbuild from 0.19.8 to 0.19.12
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.19.8 to 0.19.12.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.8...v0.19.12)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 19:48:32 +01:00
Daniel Terhorst-North
87bf2b9688 tpl/tplimpl: Fix incorrect lastBuildDate
Fixes #11600

Co-authored-by: Joe Mooring <joe@mooring.com>
2024-01-25 19:46:52 +01:00
Daniel Terhorst-North
f281ef8a4a tpl: fix incorrect lastBuildDate
Set the `<lastBuildDate>` field to be the most recent Lastmod date
of all the posts in the current selection.

Fixes #11600
2024-01-25 19:46:52 +01:00
August Feng
46f618756f parser/metadecoders: Accumulate org keywords into arrays
Closes #11743
2024-01-25 19:34:12 +01:00
James Tatum
8915343075 deps: Update github.com/tdewolff/minify/v2 v2.20.9 => v2.20.13
KeepConditionalComments was deprecated in the upstream library and replaced with KeepSpecialComments. This new option reflects that both conditional comments and Server Side Include comments can be optionally stripped by the minifier. As with KeepConditionalComments, the minifier is configured not to strip them by default.
2024-01-25 19:33:14 +01:00
Bjørn Erik Pedersen
a541e3b4d4
Upgrade to Go 1.21.6
Closes #11892
2024-01-16 10:49:03 +01:00
Joe Mooring
912c6576bb parser/metadecoders: Add CSV lazyQuotes option to transform.Unmarshal
If true, a quote may appear in an unquoted field and a non-doubled quote
may appear in a quoted field. It defaults to false.

Closes #11884
2024-01-16 09:26:44 +01:00
Joe Mooring
911bc60a7a
README: Update minimum Go version to 1.20 2024-01-06 05:31:49 -08:00
hugoreleaser
5ff6323320 releaser: Prepare repository for 0.122.0-DEV
[ci skip]
2024-01-05 12:34:12 +00:00
hugoreleaser
6d5b44305e releaser: Bump versions for release of 0.121.2
[ci skip]
2024-01-05 12:21:15 +00:00
dependabot[bot]
1ccd3147a0 build(deps): bump golang.org/x/crypto from 0.16.0 to 0.17.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-05 13:17:17 +01:00
Joe Mooring
e40b9fbbcf tpl/math: Add math.Rand template function
Closes #11833
2023-12-29 19:37:27 +01:00
Bjørn Erik Pedersen
9cd8fbb332
Adjust site benchmark 2023-12-29 16:42:33 +01:00
Bjørn Erik Pedersen
abcc61002a
Simplify baseline benchmark 2023-12-29 15:56:02 +01:00
Joe Mooring
648d00c7d8 resources/images: Create AutoOrient image filter
Closes #11717
2023-12-20 14:18:24 +01:00
Bjørn Erik Pedersen
8adba648cc all: Remove unused code
Using x/tools/cmd/deadcode
2023-12-18 19:51:26 +01:00
hugoreleaser
6f13430d4a releaser: Prepare repository for 0.122.0-DEV
[ci skip]
2023-12-08 09:01:24 +00:00
hugoreleaser
00b46fed8e releaser: Bump versions for release of 0.121.1
[ci skip]
2023-12-08 08:47:45 +00:00
Bjørn Erik Pedersen
eb9f1eb657
Upgrade to Go 1.21.5
Closes #11786
2023-12-07 12:40:10 +01:00
hugoreleaser
5186e762ac releaser: Prepare repository for 0.122.0-DEV
[ci skip]
2023-12-05 15:36:07 +00:00
hugoreleaser
e321c3502a releaser: Bump versions for release of 0.121.0
[ci skip]
2023-12-05 15:22:31 +00:00
Bjørn Erik Pedersen
255e0a9718
docs: Regen docshelper 2023-12-05 16:19:43 +01:00
dependabot[bot]
558f3258a7 build(deps): bump github.com/alecthomas/chroma/v2 from 2.11.1 to 2.12.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.11.1 to 2.12.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.11.1...v2.12.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-05 09:42:04 +01:00
Joe Mooring
6580cd30ad docs: Adjust last merge from docs repository 2023-12-04 16:57:15 +01:00
Bjørn Erik Pedersen
7617de86cd
docs: Regen docs helper 2023-12-04 15:24:34 +01:00
Bjørn Erik Pedersen
d19ed4d4e6
Merge commit '35dec7c96f' 2023-12-04 15:24:01 +01:00
Bjørn Erik Pedersen
35dec7c96f Squashed 'docs/' changes from 4d936aee6..4dd2d6415
4dd2d6415 Fix erroridf example
9ae8e9199 Clarify highlight options
f3943f9c8 Fix typo
b57ea5ac8 Add field to glossary of terms
3191e35b4 Clarify comment in the new-in shortcode
870c8d35c Correct description of Ref and RelRef page methods
c9df50e6e Specify encoding in description of crypto functions
749bb37e2 Add Ref, RelRef, and Site shortcode methods
994d4374b Update fmt functions
740f5ef96 Misc additions
77acdcdb6 Remove rssLimit from root config documentation
df84a1795 Document the openapi3.Unmarshal function
24236f57d Miscellaneous edits and corrections
41b54d421 Hide the "new in" button after some period of time
3c1ebac31 Update Ancestors.md
e699eb313 Add new-in tags to select functions and methods
5c41f0bf8 Clarify time.Format method
f7bd43ae1 Add link to built-in render hook for GoAT diagrams
06f9cd4c9 Document the diagrams.Goat function
5e432e12d Adjust quick reference weights
fc915efd6 Update FAQ
5bccf8b19 Use LinkTitle consistently in examples
36f207f3a Add page collection quick reference
699de883d Inlcude example of newScratch.Values
9bb7f8c78 Include RenderString example for emoji shortcodes
783fdd3ac Fix typo
26d5a4399 Fix typo
c7e86f0cf Fix typo
ad2a82fbd Clarify data type returned by partial and partialCached
1de5a52dd Miscellaneous corrections
3509e1b4d Update configuration-markup.md
8c6a9bf02 Clairfy figure shortcode output
c9d0dc8fb Update Markdownify.md
0c4bc1447 Update theme
0f0ab2ade Add methods deprecated in v0.120.0
e1c6ecd0f Miscellaneous edits
ec53b55b9 netlify: Hugo 0.120.4
23a1f3fd5 templates/internal.md: Correct GoogleAnalytics key name
6dcfa9a82 Update troubleshooting section
0c8857e8f Adjust code and code-toggle shortcodes
8820264d3 Reduce number of site audit warnings
526d06b90 Clarify hint option in image processing spec
310849daa Image Processing: Improve sentence and fix code sample
5bb67bfd4 Revert "Image Processing: Improve sentence and fix code sample" (#2318)
77c926fde Image Processing: Improve sentence and fix code sample
52179fb18 Miscellaneous edits
f4e886715 Revert change to hugo.work
c410fefa8 Update theme
8b72dfedd Rework where function documentation
f35a7126f Minor edits to global page function
903b42ebc Cleanup shortcode calls
c9247e98d Update documentation.md
dff3c4abb Clean up build option descriptions and examples
f46d31308 Use consistent signatures
2af2470b5 Minor correction to resources.GetRemote
45ec53fe0 Remove superfluous shortcode param
2a0544757 Improve deployment documentation
3cf36a7fc Clarify lang keyword
f10d6495d Update front-matter.md
dc94e20be Add Sveltia to CMS list
b15d6d670 Update front-ends.md
bb41588b2 Update FormatCurrency.md
b40fff396 Add showcase for hidden sections without index.html
71316e181 Improve image filter examples
d46f0b1d8 Miscellaneous edits
ad3f9cdb6 Adjust quick reference guides
8657804ba Update theme
d9e981147 Miscellaneous corrections
508666575 Miscellaneous updates
80b2241f9 Miscellaneous updates
723a827fd Namespace functions and methods
40212779a netlify: Hugo 0.120.3
66017c704 Bump GitHub workflows to latest versions
db0f1e682 Update related.md
7e758c23b netlify: Hugo 0.120.2
641ba3976 Update configuration.md
d2a9909d9 Update rss.md
7eb59d7a2 netlify: Hugo 0.120.1
708c351c4 Document debug.Timer
28e2388c2 Add new-in tag to images.Padding
ee24cffb5 Add new-in tags to hugo.IsDevelopment and hugo.IsServer
aa47ca023 netlify: Hugo 0.120.0
9c3e606fc docs: Regen docshelper
159fd971e commands/new: Remove format flag from new content cmd
9f7878092 Merge commit 'aaaf1c8df5'
65b2dd324 docs: Regenerate docshelper
2be620663 resources/images: Create padding image filter
c777d6c5e Merge commit '3710a5ec7e'
24f2afeb2 Merge commit 'e509cac533'
3f947c19a hugolib: Deprecate .Site.DisqusShortname
6bd1af892 hugolib: Deprecate .Site.GoogleAnalytics
78becc6ee tpl/tplimpl: Deprecate .Site.Social usage with internal templates
e3ec2a4f2 common/hugo: Add hugo.IsServer and hugo.IsDevelopment

git-subtree-dir: docs
git-subtree-split: 4dd2d641531f74025ed9f51ea5a961e936988cfb
2023-12-04 15:14:18 +01:00
Bjørn Erik Pedersen
9f978d387f
Pull in the latest code from Go's template packages (#11771)
Fixes #10707
Fixes #11507
2023-12-04 12:07:54 +01:00
Razon Yang
14d85ec136
tpl: Allow using page resources on the images page parameter for opengraph, schema and twitter_cards templates
The page images selection order as follows:

1. Page's images parameter, image resources are supported.
2. Page's image resources that naming in *feature*, *cover* or *thumbnail* pattern.
3. If no page images specified, then the first one of site's images will be used as the fallback, supports site resources.
2023-12-04 12:05:41 +01:00
Joe Mooring
171836cdfa hugolib: Apply titleCaseStyle to automatic section pages
Fixes #11547
2023-12-04 11:42:06 +01:00
Joe Mooring
9ea7103db7 tpl/urls: Retain query and fragment with absURL and absLangURL
Closes #11772
2023-12-04 11:41:30 +01:00
Joe Mooring
3fc42da3d0 markup: Add Level to Heading struct
Closes #10776
2023-12-04 11:41:01 +01:00
Joe Mooring
d24da1712f tpl/fmt: Print suppression help with erroridf
Closes #11506
2023-12-04 11:39:27 +01:00
Joe Mooring
4583b41305 tpl/transform: Display Chroma highlighting errors
Closes #9642
2023-12-04 11:38:23 +01:00
dependabot[bot]
507f4e356b build(deps): bump github.com/tdewolff/minify/v2 from 2.20.8 to 2.20.9
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.8 to 2.20.9.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.8...v2.20.9)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 11:36:50 +01:00
dependabot[bot]
a7e721e02d build(deps): bump github.com/spf13/cast from 1.5.1 to 1.6.0
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.5.1...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 11:04:04 +01:00
dependabot[bot]
2627b91d3a build(deps): bump github.com/getkin/kin-openapi from 0.121.0 to 0.122.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.121.0 to 0.122.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.121.0...v0.122.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 08:35:21 +01:00
Bjørn Erik Pedersen
6d4b012412
github: Fix CI build on Windows 2023-11-30 19:22:29 +01:00
dependabot[bot]
e536d461a5 build(deps): bump golang.org/x/image from 0.13.0 to 0.14.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/image/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-30 10:55:58 +01:00
Joe Mooring
bfc325f561 deps: Update github.com/tdewolff/minify/v2 v2.20.7 => v2.20.8
Closes #5748
2023-11-30 10:13:40 +01:00
dependabot[bot]
36a60f65d0 build(deps): bump github.com/spf13/afero from 1.10.0 to 1.11.0
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-30 10:05:41 +01:00
dependabot[bot]
de2fcc5e1d build(deps): bump github.com/evanw/esbuild from 0.19.7 to 0.19.8
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.19.7 to 0.19.8.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.7...v0.19.8)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-30 10:04:51 +01:00
Lars Lehtonen
26a8ec207f
Fix handling of dropped error in test 2023-11-29 09:37:26 +01:00
dependabot[bot]
9ca889ba49 build(deps): bump google.golang.org/api from 0.151.0 to 0.152.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.151.0 to 0.152.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.151.0...v0.152.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 16:53:57 +01:00
Bjørn Erik Pedersen
e2a624dd6c common/para: Skip flaky test on CI 2023-11-28 12:23:38 +01:00
Bjørn Erik Pedersen
4fb40ee873 deps: Upgrade to libwebp 1.3.2
Closes #11746
2023-11-28 12:23:38 +01:00
dependabot[bot]
bc93a36133 build(deps): bump github.com/aws/aws-sdk-go from 1.48.4 to 1.48.6
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.48.4 to 1.48.6.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.48.4...v1.48.6)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 10:57:53 +01:00
dependabot[bot]
3e5bc6f3b3 build(deps): bump golang.org/x/tools from 0.15.0 to 0.16.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.15.0...v0.16.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 10:57:23 +01:00
dependabot[bot]
7c47036f18 build(deps): bump github.com/getkin/kin-openapi from 0.120.0 to 0.121.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.120.0 to 0.121.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.120.0...v0.121.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 10:57:02 +01:00
dependabot[bot]
4d07e1fe8a build(deps): bump github.com/bep/logg from 0.3.0 to 0.4.0
Bumps [github.com/bep/logg](https://github.com/bep/logg) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/bep/logg/releases)
- [Commits](https://github.com/bep/logg/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/bep/logg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 10:56:09 +01:00
Bjørn Erik Pedersen
1c41232e61 deps: Upgrade to github.com/bep/simplecobra v0.4.0 2023-11-28 09:15:23 +01:00
dependabot[bot]
f11ca0fad4 build(deps): bump github.com/aws/aws-sdk-go from 1.48.2 to 1.48.4
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.48.2 to 1.48.4.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.48.2...v1.48.4)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 23:38:35 +01:00
Bjørn Erik Pedersen
30a18e8825
watcher: Skip flaky test for now 2023-11-27 17:54:57 +01:00
dependabot[bot]
d7a2f3f980 build(deps): bump golang.org/x/tools from 0.14.0 to 0.15.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 10:53:02 +01:00
Joe Mooring
b4c5df42ff tpl/transform: Add transform.XMLEscape template function
Fixes #3268
2023-11-27 10:52:33 +01:00
dependabot[bot]
ef12d169c8 build(deps): bump github.com/gorilla/websocket from 1.5.0 to 1.5.1
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 10:48:08 +01:00
dependabot[bot]
a62bbfa9ea build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-27 10:47:37 +01:00
Joe Mooring
8d32ca223d tpl/tplimpl: Remove superfluous type attr on script elements
Closes #6379
2023-11-27 10:45:53 +01:00
dependabot[bot]
5887230b7d build(deps): bump golang.org/x/net from 0.17.0 to 0.18.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 11:14:19 +01:00
dependabot[bot]
a4a66b8216 build(deps): bump github.com/evanw/esbuild from 0.19.5 to 0.19.7
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.19.5 to 0.19.7.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.5...v0.19.7)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 11:13:10 +01:00
dependabot[bot]
813390b5a2 build(deps): bump github.com/alecthomas/chroma/v2 from 2.10.0 to 2.11.1
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.10.0 to 2.11.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.10.0...v2.11.1)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-23 11:12:18 +01:00
dependabot[bot]
d528bbd6d0 build(deps): bump github.com/tdewolff/minify/v2 from 2.20.5 to 2.20.7
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.5 to 2.20.7.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.5...v2.20.7)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 18:56:02 +01:00
dependabot[bot]
af7f6c8b3e build(deps): bump google.golang.org/api from 0.138.0 to 0.151.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.138.0 to 0.151.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.138.0...v0.151.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 12:51:06 +01:00
dependabot[bot]
e70849ea79
build(deps): bump github.com/aws/aws-sdk-go from 1.45.14 to 1.48.2 (#11724)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.45.14 to 1.48.2.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.45.14...v1.48.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Updates #11723
2023-11-22 12:19:01 +01:00
Joe Mooring
dd6cd6268d resources/resource: Fix GroupByParamDate with raw TOML dates
Closes #11563
2023-11-22 12:09:48 +01:00
Bjørn Erik Pedersen
27620daa20
common/para: Skip flaky tests on Windows 2023-11-16 18:24:20 +01:00
Joe Mooring
80d2fdbaa0 navigation: Unexport menu entry methods
- MenuEntry.IsEqual
- MenuEntry.IsSameResource

Closes #11670
2023-11-16 18:22:31 +01:00
Joe Mooring
805cc1773b markup/goldmark: Sync image render hook code with Goldmark
Fixes #11681
2023-11-16 18:21:32 +01:00
Joe Mooring
0bde6931ac helpers: Fix TrimShortHTML used by markdownify and RenderString
Closes #11698
2023-11-16 18:21:01 +01:00
hugoreleaser
ac7cffa7e2 releaser: Prepare repository for 0.121.0-DEV
[ci skip]
2023-11-08 11:32:02 +00:00
hugoreleaser
f11bca5fec releaser: Bump versions for release of 0.120.4
[ci skip]
2023-11-08 11:18:07 +00:00
Bjørn Erik Pedersen
9315a2d2c4
Upgrade to go 1.21.4
Closes #11685
2023-11-08 11:53:26 +01:00
Bjørn Erik Pedersen
cee3a56a91
Add a new test helper 2023-11-02 09:50:18 +01:00
hugoreleaser
da2a8e6402 releaser: Prepare repository for 0.121.0-DEV
[ci skip]
2023-11-01 18:11:30 +00:00
hugoreleaser
a4892a07b4 releaser: Bump versions for release of 0.120.3
[ci skip]
2023-11-01 17:57:00 +00:00
Joe Mooring
cb98e9061b tpl/tplimpl: Fix deprecation logic in embedded templates
Closes #11658
2023-11-01 17:42:45 +01:00
Bjørn Erik Pedersen
5fa97ee964 Remove some old and unused deprecation code 2023-11-01 16:40:26 +01:00
Bjørn Erik Pedersen
4d38f47250 Add a field prefix to the deprecated log statements
To make theme easier to spot, esp. on INFO level.
2023-11-01 16:40:26 +01:00
Bjørn Erik Pedersen
80f793c38d Avoid double printing INFO deprecation messages
Fixes #11645
2023-11-01 16:40:26 +01:00
dependabot[bot]
a9079d7a63 build(deps): bump github.com/tdewolff/parse/v2 from 2.7.1 to 2.7.3
Bumps [github.com/tdewolff/parse/v2](https://github.com/tdewolff/parse) from 2.7.1 to 2.7.3.
- [Release notes](https://github.com/tdewolff/parse/releases)
- [Commits](https://github.com/tdewolff/parse/compare/v2.7.1...v2.7.3)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/parse/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 16:07:37 +01:00
dependabot[bot]
4914b7f18c build(deps): bump github.com/tdewolff/minify/v2 from 2.20.1 to 2.20.5
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.1 to 2.20.5.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.1...v2.20.5)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 10:32:33 +01:00
hugoreleaser
9e06fd3394 releaser: Prepare repository for 0.121.0-DEV
[ci skip]
2023-10-31 16:40:29 +00:00
hugoreleaser
9c2b2414d2 releaser: Bump versions for release of 0.120.2
[ci skip]
2023-10-31 16:27:18 +00:00
Bjørn Erik Pedersen
ab21433689 Fix deprecation printing on info level
Fixes #11638
2023-10-31 10:42:23 +01:00
Joe Mooring
23fcfb7f74
tpl/tplimpl: Fix deprecation logic in RSS template
Closes #11639
2023-10-31 08:34:30 +01:00
hugoreleaser
47bf2fcbe2 releaser: Prepare repository for 0.121.0-DEV
[ci skip]
2023-10-30 16:57:41 +00:00
hugoreleaser
16fb2cae88 releaser: Bump versions for release of 0.120.1
[ci skip]
2023-10-30 16:44:31 +00:00
Joe Mooring
2bedcf3d18 deps: Update github.com/tdewolff/minify/v2 v2.20.0 => v2.20.1
Fixes #11633
2023-10-30 17:41:33 +01:00
hugoreleaser
935999e2fa releaser: Prepare repository for 0.121.0-DEV
[ci skip]
2023-10-30 14:20:34 +00:00
hugoreleaser
20c3bae2c4 releaser: Bump versions for release of 0.120.0
[ci skip]
2023-10-30 14:06:47 +00:00
Bjørn Erik Pedersen
29b6e133a8
docs: Regen docshelper 2023-10-30 15:03:10 +01:00
Bjørn Erik Pedersen
7f8ab74681
Add Solaris build
Closes #3500
2023-10-30 12:43:36 +01:00
dependabot[bot]
59bcc098cf build(deps): bump github.com/fsnotify/fsnotify from 1.6.0 to 1.7.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 12:42:17 +01:00
dependabot[bot]
e26ba752d2 build(deps): bump github.com/google/go-cmp from 0.5.9 to 0.6.0
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.9 to 0.6.0.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.9...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 10:31:21 +01:00
dependabot[bot]
bcf07fa639 build(deps): bump github.com/alecthomas/chroma/v2 from 2.9.1 to 2.10.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.9.1 to 2.10.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.9.1...v2.10.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-30 10:28:42 +01:00
Bjørn Erik Pedersen
b6a7568131 Make site.BaseURL and $pager.URL a string
Was template.URL.
2023-10-30 10:26:06 +01:00
Joe Mooring
acf01bfb78 create/skeletons: Fix menu template
Check identifier existence before calling lang.Translate to prevent
empty warnings when using the --printI18nWarnings flag.

Closes #11519
2023-10-30 09:02:49 +01:00
Joe Mooring
27b22cd87e commands/new: Remove format flag from new content cmd
Fixes #11462
2023-10-30 09:02:26 +01:00
Joe Mooring
a2488b1c95 hugolib: Display correct markup identifier in error message
Fixes #11538
2023-10-30 09:01:34 +01:00
Bjørn Erik Pedersen
8f60c0c1ec livereloadinject: Save some allocations
As suggested by @DominoPivot

```
name                 old time/op    new time/op    delta
LiveReloadInject-10    1.11µs ± 2%    1.04µs ± 2%   -6.45%  (p=0.029 n=4+4)

name                 old alloc/op   new alloc/op   delta
LiveReloadInject-10    1.23kB ± 0%    0.89kB ± 0%  -27.69%  (p=0.029 n=4+4)

name                 old allocs/op  new allocs/op  delta
LiveReloadInject-10      12.0 ± 0%      10.0 ± 0%  -16.67%  (p=0.029 n=4+4)
```
2023-10-29 18:37:05 +01:00
Domino Goupil
9dc608084b livereloadinject: Use more robust injection method 2023-10-29 18:37:05 +01:00
Joe Mooring
a349aafb7f tpl/urls: Return strings from URL functions
Closes #11511
2023-10-29 18:12:24 +01:00
Bjørn Erik Pedersen
b8fbd4a578
transform/livereloadinject: Add benchmark 2023-10-29 17:50:55 +01:00
dependabot[bot]
e2b2092ce6 build(deps): bump golang.org/x/tools from 0.13.0 to 0.14.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 16:38:06 +01:00
dependabot[bot]
f4df7b88b3 build(deps): bump github.com/tdewolff/minify/v2 from 2.12.9 to 2.20.0
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.12.9 to 2.20.0.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.12.9...v2.20.0)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 11:36:23 +01:00
dependabot[bot]
3d9bd404ee build(deps): bump github.com/mattn/go-isatty from 0.0.19 to 0.0.20
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.19 to 0.0.20.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.19...v0.0.20)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 11:35:16 +01:00
dependabot[bot]
5f5e55aa8d build(deps): bump golang.org/x/image from 0.12.0 to 0.13.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/image/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 11:34:13 +01:00
Bjørn Erik Pedersen
aaaf1c8df5 Squashed 'docs/' changes from 417593493..4d936aee6
4d936aee6 Fix function signatures
8182a27ed Simplify example usage of apply function

git-subtree-dir: docs
git-subtree-split: 4d936aee622b779ef5541154750b51051dc0bf14
2023-10-29 11:33:05 +01:00
Bjørn Erik Pedersen
0baa4f9837
Merge commit 'aaaf1c8df5' 2023-10-29 11:33:05 +01:00
Bjørn Erik Pedersen
d3d4ab41a9
docs: Regenerate docshelper 2023-10-29 11:31:51 +01:00
Bjørn Erik Pedersen
28d844642a
Revert "modules: Throttle the "downloading modules …" log entries"
This reverts commit 66904097e0.
2023-10-29 10:57:27 +01:00
Bjørn Erik Pedersen
eb5fd3127f
Revert "modules: Adjust the log throttle logic a little"
This reverts commit 3f64b5a3de.
2023-10-29 10:57:25 +01:00
Joe Mooring
3ed28e4bfe resources/images: Create padding image filter
Closes #11599
2023-10-29 10:16:37 +01:00
OMOTO Tsukasa
db14238ba3
markup/goldmark: Update the CJK extension to allow specifying line break styles
This commit follows https://github.com/yuin/goldmark/pull/411
2023-10-29 10:13:56 +01:00
Bjørn Erik Pedersen
3f64b5a3de
modules: Adjust the log throttle logic a little 2023-10-28 17:40:07 +02:00
Bjørn Erik Pedersen
66904097e0
modules: Throttle the "downloading modules …" log entries 2023-10-28 17:15:34 +02:00
Bjørn Erik Pedersen
e54139c85b tpl/collections: Make delimit return a string
Closes #10876
Closes #11502
2023-10-28 11:54:23 +02:00
Bjørn Erik Pedersen
3710a5ec7e Squashed 'docs/' changes from cb18a5183..417593493
417593493 Fix broken link
9829e2862 Mention Go variable naming rules
11ce3a59c Fix typo
0d62feed5 Update glossary
5e9ecb217 Prepare for pending deprecations
c5f76c776 Update Twitter Cards URL

git-subtree-dir: docs
git-subtree-split: 4175934933feca8fa1f9936ccf7d16b90b41e833
2023-10-27 10:06:44 +02:00
Bjørn Erik Pedersen
705e3cd5f5
Merge commit '3710a5ec7e' 2023-10-27 10:06:44 +02:00
dependabot[bot]
8c61fd2541 build(deps): bump golang.org/x/net from 0.15.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.15.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:57:12 +02:00
dependabot[bot]
d3145e4e5d build(deps): bump github.com/evanw/esbuild from 0.19.3 to 0.19.5
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.19.3 to 0.19.5.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.3...v0.19.5)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:56:40 +02:00
dependabot[bot]
743a1da3ef build(deps): bump github.com/spf13/afero from 1.9.5 to 1.10.0
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.9.5 to 1.10.0.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.9.5...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:56:05 +02:00
dependabot[bot]
123901b741 build(deps): bump github.com/bep/logg from 0.2.0 to 0.3.0
Bumps [github.com/bep/logg](https://github.com/bep/logg) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/bep/logg/releases)
- [Commits](https://github.com/bep/logg/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/bep/logg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 09:55:05 +02:00
Bjørn Erik Pedersen
71fd79a3f4 Revise the deprecation logging
This introduces a more automatic way of increasing the log levels for deprecation log statements based on the version it was deprecated.

The thresholds are a little arbitrary, but

* We log INFO for 6 releases
* We log WARN for another 6 releases
* THen ERROR (failing the build)

This should give theme authors plenty of time to catch up without having the log filled with warnings.
2023-10-26 20:41:19 +02:00
Bjørn Erik Pedersen
c4a530f104 Remove rest of the now unused emoji code
See #11598
2023-10-26 09:20:56 +02:00
Joe Mooring
272484f8bf
markdown: Pass emoji codes to yuin/goldmark-emoji
Removes emoji code conversion from the page and shortcode parsers. Emoji
codes in markdown are now passed to Goldmark, where the goldmark-emoji
extension converts them to decimal numeric character references.

This disables emoji rendering for the alternate content formats: html,
asciidoc, org, pandoc, and rst.

Fixes #7332
Fixes #11587
Closes #11598
2023-10-24 12:04:13 +02:00
Razon Yang
de4e466036
Fix so hugo get -u updates transitively 2023-10-22 16:32:01 +02:00
Oleksandr Redko
c23a0c4a0f watcher/filenotify: Remove redundant duplicated comments 2023-10-21 18:57:35 +02:00
Oleksandr Redko
a95670b981 docs: Remove outdated note from CONTRIBUTING.md 2023-10-21 18:57:01 +02:00
Bjørn Erik Pedersen
46bdc03885
tpl/debug: Add average and median to timer output 2023-10-21 15:41:21 +02:00
Bjørn Erik Pedersen
5160c7efa5 tpl/debug: Add debug.Timer
Closes #11580
2023-10-20 09:46:45 +02:00
Bjørn Erik Pedersen
e2dd4cd05f
Merge commit 'e509cac533' 2023-10-20 09:43:56 +02:00
Bjørn Erik Pedersen
e509cac533 Squashed 'docs/' changes from 7ef2dbce4..cb18a5183
cb18a5183 Fix broken link
07a0198bf Config: Place Google Analytics tag ID under the services key
4bf0c719f Fix typo
50d8ad1af Fix muiltilingual menu definition instructions
1a32519a9 Fix typos
6f34ca8e0 Explain usage of front matter to target a template
5bd977257 Improve goldmark config docs
447632938 Remove Docker notes from installation instructions
84741d173 Update reference to hugo.work
0338d7c71 Fix menu template
f5d2f5ed4 Fix typos in content/en/functions/fmt
a3a40ff99 Add return type to functions
85ac3e779 Remove outdated feature image
d47d889e4 Fix signatures
7551ba28f Document safe.JSStr function
e77993be0 Document keyVals function
4dba20db3 Update theme
babf91544 Update echoparam
8c8203efa Adjust related functions
4cb1b30fc Fix example
ba95eca64 Improve showcase prose
5d3dcf366 Add Overmind Studios showcase
8d634ac70 Change code blocks from indented to fenced
cfab978e6 Add missing code fences
407dd5c47 Limit related pages for functions to other functions
9fa67d981 Fix .Site.LastChange doc
393aa16d0 netlify: Hugo 0.119.0
f864af97a docs: Even more about images.Process
9d772d5f0 docs: More about images.Process
bc655f869 docs: Regen docshelper
41c3536d1 Merge commit '9aec42c545'
918ed53f4 Add images.Process filter
573645883 Add $image.Process
a1151b0fd Add images.Opacity filter

git-subtree-dir: docs
git-subtree-split: cb18a5183fc62f301ffde50b8c39f03e4b897aec
2023-10-20 09:42:39 +02:00
Bjørn Erik Pedersen
fd38171810
Add some convenient integration test helpers 2023-10-18 18:54:15 +02:00
Joe Mooring
2eca1b3cc1 hugolib: Deprecate .Site.DisqusShortname
Use .Site.Config.Services.Disqus.Shortname instead.
2023-10-18 17:35:54 +02:00
Lars Lehtonen
625162674d
tpl/tplimpl: Fix dropped error 2023-10-18 17:33:00 +02:00
Joe Mooring
a692278bc6 hugolib: Deprecate .Site.GoogleAnalytics
Use .Site.Config.Services.GoogleAnalytics.ID instead.
2023-10-17 20:06:42 +02:00
Joe Mooring
d4016dd5cd tpl/tplimpl: Deprecate .Site.Author usage in RSS template 2023-10-17 20:04:49 +02:00
Joe Mooring
4910312ee7 tpl/tplimpl: Deprecate .Site.Social usage with internal templates 2023-10-17 20:04:24 +02:00
Joe Mooring
1b5f78b6b7 markup/tableofcontents: Return template.HTML from .Fragments.ToHTML
Closes #11545
2023-10-09 18:42:03 +02:00
Joe Mooring
d5d0f420d8 deps: Update github.com/tdewolff/minify/v2 v2.12.7 => v2.12.9
Fixes #11533
2023-10-06 19:44:25 +02:00
Joe Mooring
5993afa4c5 commands: Update message displayed when running CLI from GUI
Fixes #11525
2023-10-06 19:39:35 +02:00
Joe Mooring
d1b4458536 common/hugo: Add hugo.IsServer and hugo.IsDevelopment
And deprecate site.IsServer.

Closes #11510
2023-10-06 16:26:51 +02:00
Oleksandr Redko
274852bcf2 all: Format files with gofmt 2023-10-05 14:45:55 +02:00
abdullah-alaadine
37a2d5eb4e magefile: Update isGoLatest to check for Go 1.21 2023-10-04 16:07:40 +02:00
Joe Mooring
4c95389c25 resources/integrity: Return string instead of template.HTMLAttr
Closes #11513
2023-10-02 20:14:50 +02:00
Bjørn Erik Pedersen
3af8bded26
Update README.md 2023-09-27 19:32:41 +02:00
Joe Mooring
46da0b7aaa tpl/lang: Formally deprecate lang.NumFmt
Use lang.FormatNumberCustom instead.
2023-09-27 17:34:45 +02:00
Joe Mooring
75f56b4ce6 tpl/collections: Fix and deprecate echoParams
Fixes #11498
2023-09-27 17:34:13 +02:00
hugoreleaser
d234a963eb releaser: Prepare repository for 0.120.0-DEV
[ci skip]
2023-09-24 15:32:33 +00:00
hugoreleaser
b84644c008 releaser: Bump versions for release of 0.119.0
[ci skip]
2023-09-24 15:20:17 +00:00
Bjørn Erik Pedersen
a9d19dbdd6
docs: Even more about images.Process 2023-09-24 12:26:00 +02:00
Bjørn Erik Pedersen
12d713176f
docs: More about images.Process 2023-09-24 12:11:03 +02:00
Oleksandr Redko
6b65b2fae6 common: Remove unused constants 2023-09-24 11:59:49 +02:00
Bjørn Erik Pedersen
1768684d8b
docs: Regen docshelper 2023-09-24 11:56:43 +02:00
Bjørn Erik Pedersen
9aec42c545 Squashed 'docs/' changes from 686c7b6eb..7ef2dbce4
7ef2dbce4 Cleanup RSS templates page
0e23d5e1a Fix multilingual permalinks example
b3c342b07 Update faq.md
f73109ae2 Regen CLI docs
ac6ee2027 Fix minor nitpicks (#2233)
f24fcffe1 Mention the Giscus comments system (#2234)
418fa981e Remove reference to Ghost migration tool
94a76df29 Adjust table layout
e263ad6b9 content: Fix typos
fd1eb26b5 Update featured image in digital.gov showcase
d3d946555 Correct directory description
bbe1dff56 Use sentence case for heading
acfa0be54 Add hosting provider fetch depth to GitInfo variables page
d78c427e6 Fix typo
751517fea Fix spelling mistake
cdd77aa9a Update content for v0.118.0
c77d09b1c Format netlify.toml
d5a6c4f51 netlify: Hugo 0.118.1
8c717301a Revert "netlify: Hugo 0.118.0"
a9b2ef5c2 netlify: Hugo 0.118.0
61959591c Merge commit '77b976dd92'
95f2029a1 docs: Regen docs helper
fd57ba960 markup/goldmark: Add CJK extension
2bfb3bf4c docshelper: Improve template lookup order descriptions
b0baa890e cache: Hide IsResourceDir from the exported config
b4b071ea0 docs: Replace docs.json with docs.yaml

git-subtree-dir: docs
git-subtree-split: 7ef2dbce4ad728d32c218761c6cfbe2f58f8da16
2023-09-24 11:54:45 +02:00
Bjørn Erik Pedersen
eb0ed33dfd
Merge commit '9aec42c545' 2023-09-24 11:54:45 +02:00
Bjørn Erik Pedersen
6a246d1152 Add images.Process filter
This allows for constructs like:

```
{{ $filters := slice (images.GaussianBlur 8) (images.Grayscale) (images.Process "jpg q30 resize 200x") }}
{{ $img = $img | images.Filter $filters }}
```

Note that the `action` option in `images.Process` is optional (`resize` in the example above), so you can use the above to just set the target format, e.g.:

```
{{ $filters := slice (images.GaussianBlur 8) (images.Grayscale) (images.Process "jpg") }}
{{ $img = $img | images.Filter $filters }}
```

Fixes #8439
2023-09-24 11:54:29 +02:00
Bjørn Erik Pedersen
ef0e7149d6 Add $image.Process
Which supports all the existing actions: resize, crop, fit, fill.

But it also allows plain format conversions:

```
{{ $img = $img.Process "webp" }}
```

Which will be a simple re-encoding of the source image.

Fixes #11483
2023-09-24 11:54:29 +02:00
Carl Johnson
c32094ace1 google_analytics_async.html: Add deprecation warning 2023-09-23 18:57:19 +02:00
dependabot[bot]
a262fd4ddb build(deps): bump golang.org/x/tools from 0.12.0 to 0.13.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 16:34:14 +02:00
dependabot[bot]
f0d32455d2 build(deps): bump github.com/alecthomas/chroma/v2 from 2.8.0 to 2.9.1
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.8.0 to 2.9.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.8.0...v2.9.1)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 16:33:44 +02:00
dependabot[bot]
e8bc8e6d02 build(deps): bump github.com/evanw/esbuild from 0.19.2 to 0.19.3
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.19.2 to 0.19.3.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.19.2...v0.19.3)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 16:32:39 +02:00
Bjørn Erik Pedersen
f9b3c0f486 Add images.Opacity filter
Fixes #11471
2023-09-22 15:03:16 +02:00
dependabot[bot]
11fcda971c build(deps): bump github.com/aws/aws-sdk-go from 1.44.314 to 1.45.14
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.314 to 1.45.14.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.314...v1.45.14)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-21 21:42:32 +02:00
dependabot[bot]
f31375d4cc build(deps): bump github.com/getkin/kin-openapi from 0.118.0 to 0.120.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.118.0 to 0.120.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.118.0...v0.120.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-21 21:41:30 +02:00
dependabot[bot]
6415b599be build(deps): bump golang.org/x/image from 0.11.0 to 0.12.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/image/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-21 21:40:20 +02:00
Bjørn Erik Pedersen
1e9b87f760 Upgrade to Go 1.21.1
See https://github.com/golang/go/issues?q=milestone%3AGo1.21.1+label%3ACherryPickApproved

Fixes #11474
Fixes #11414
2023-09-21 21:38:41 +02:00
Bjørn Erik Pedersen
275c0acbf6
commands: Update CLI docs with the important -u flag in hugo mod get 2023-09-20 18:01:52 +02:00
Joe Mooring
f9163155d3 create/skeletons: Improve viewport meta tag
Remove initial-scale=1.0 (this is the browser default)
Remove minimum-scale=1.0 (opinionated, can throw WCAG warning)
2023-09-19 11:46:05 +02:00
Bjørn Erik Pedersen
79a17d9e55 Fix tests for Go 1.21.1
Fixes #11450
2023-09-14 13:09:45 +02:00
Joe Mooring
75c0f88289 commands/gen: Remove default highlight style
Fixes #11445
2023-09-14 12:08:52 +02:00
Bjørn Erik Pedersen
18ce854626
Fix recently broken benchmark 2023-09-12 11:50:31 +02:00
Bjørn Erik Pedersen
69f5bad40f
Adjust baseline benchmarks 2023-09-12 10:48:04 +02:00
ilmari-lauhakangas
525bed9919
commands: Print language code after web server address info 2023-09-11 11:38:24 +02:00
hugoreleaser
2ae4786ca1 releaser: Prepare repository for 0.119.0-DEV
[ci skip]
2023-08-31 11:35:48 +00:00
hugoreleaser
da7983ac4b releaser: Bump versions for release of 0.118.2
[ci skip]
2023-08-31 11:23:51 +00:00
Bjørn Erik Pedersen
df5d76fed9
release: Revert to building with Go 1.20
We need to investigate these issues, but that needs to wait.

Updates #11414
2023-08-31 13:20:35 +02:00
hugoreleaser
7362ba2204 releaser: Prepare repository for 0.119.0-DEV
[ci skip]
2023-08-31 09:56:08 +00:00
hugoreleaser
0eb480aa1d releaser: Bump versions for release of 0.118.1
[ci skip]
2023-08-31 09:42:31 +00:00
Bjørn Erik Pedersen
7e9092eeeb
Revert to bullseye as the release build image
This was not available when I upgraded to Go 1.21, but is now, for some odd reason.

See 7761572995

Fixes #11414
2023-08-31 11:37:36 +02:00
hugoreleaser
0200eaf58f releaser: Prepare repository for 0.119.0-DEV
[ci skip]
2023-08-31 07:49:58 +00:00
hugoreleaser
28b640a220 releaser: Bump versions for release of 0.118.0
[ci skip]
2023-08-31 07:36:55 +00:00
Bjørn Erik Pedersen
db45dbbee8
Merge commit '77b976dd92' 2023-08-30 19:24:34 +02:00
Bjørn Erik Pedersen
77b976dd92 Squashed 'docs/' changes from a7e1e9be8..686c7b6eb
686c7b6eb ci(Netlify): specify `HUGO_VERSION` environment variable once
da99a356f fix: change heading level
e57da3f00 Update taxonomy methods
746172490 Update description of rendered breadcrumb navigation
6bc52fd40 Clarify term
dab07dcb0 Fix typo
e50fa452a Fix typo
6c1ea83c2 Update template overview page
a5dc97845 Clarify the append function
a135e52a0 Update GitHub hosting instructions
a51bf9f4f Update sections page
ed35fc6c4 Update archetypes and glossary
1a4522b3e Format examples
a70f20094 Use "hugo new content" to create content
673846ff9 Remove comment
b7febf0c5 Fix link
6f6fe2133 Miscellaneous edits
99227dd18 Remove lookup order table from output formats page
bc8870657 tools/editors: Add Prettier Plugin for Go Templates
157b169eb Update docs.yaml
1c8f514e0 Update cond function
e5f1f8113 Add assumptions to taxonomy and term template lookup order examples
475b406e2 Update postprocess
2d6cb8dfc glossary: Update content type
03b514bac Add descriptions to template lookup order example sections
06678f919 glossary: Fix broken link
4cd505612 Simplify news listing
fadb980db Update glossary of terms
491bacd78 Change order of example sections for template lookup order
04b8f39ec Create glossary of terms
12e896bc0 Remove reference to asciidoctor-rouge extension
055f7bb37 Insert missing words
8cd6ac387 Miscellaneous edits
2cbe17f41 Update configuration.md
529615373 Update data-templates.md
853154e65 Update theme
45f08627a resources.getRemote: Fix definition list
29a51dac1 Update docshelper
3bdfe88c6 Remove link to gitter from site footer
cacd0e461 Use "map" instead of "dictionary"
704dd5da6 Document the transform.Remarshal template function
e8d744951 Populate news section via GitHub releases API
3ff1118c7 Replace docs.json with docs.yaml
7726bbcac Use docs.json to generate default config throughout the site
57dca93df Use docs.json to generate default config for related content
74d5082c7 Add some .RenderShortcodes docs
cf5ab5062 netlify: Hugo 0.117.0
420f7aa69 Add all config to docshelper.json

git-subtree-dir: docs
git-subtree-split: 686c7b6eb182ed335dc94b3a0b80c564f7658380
2023-08-30 19:23:47 +02:00
Bjørn Erik Pedersen
e847a98db6
docs: Regen docs helper 2023-08-30 19:23:34 +02:00
Bjørn Erik Pedersen
45c9bbc6ca
Don't use the OS environment when creating config for docs 2023-08-30 19:22:44 +02:00
Bjørn Erik Pedersen
94fbab2a88 Delay the creation of cache directories until they're used
Fixes #11390
2023-08-30 16:39:06 +03:00
Matt Brown
c3f273b2d7 deploy: Create AWS session for CloudFront invalidation via Go CDK
This allows the AWS credentials to be picked up from the configured
target URL (like blob does) rather than the current behaviour of only
relying on the defaults.

Relying on the defaults here means having to specify credentials twice
(once in the URL for the blob, once in the environment for this code
path) when non-default AWS credentials are in used (e.g. via a profile).
2023-08-30 16:38:20 +03:00
OMOTO Tsukasa
d7dcc76d27
markup/goldmark: Add CJK extension
Fixes #10472
2023-08-30 13:08:45 +02:00
dependabot[bot]
9bf76fd7e8 build(deps): bump google.golang.org/api from 0.134.0 to 0.138.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.134.0 to 0.138.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.134.0...v0.138.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 13:44:19 +03:00
Bjørn Erik Pedersen
15d3e48cec Fix RegularPagesRecursive for the home page
Fixes #11396
2023-08-30 13:44:04 +03:00
dependabot[bot]
b2a02c3c5a build(deps): bump golang.org/x/tools from 0.11.1 to 0.12.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.11.1...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 12:17:42 +03:00
dependabot[bot]
6821d6f159 build(deps): bump gocloud.dev from 0.33.0 to 0.34.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 12:17:10 +03:00
dependabot[bot]
93c7ad12ec build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.9 to 2.1.0
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.0.9 to 2.1.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.0.9...v2.1.0)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 12:16:46 +03:00
Bjørn Erik Pedersen
d2ae9e1363
testscripts: Move hugo new tests to where they belong 2023-08-30 10:31:08 +02:00
Bjørn Erik Pedersen
3a8aad6b19
Fix .RawContent for empty content pages (#11407)
Fixes #11406
2023-08-30 10:11:20 +02:00
Lars Lehtonen
a7b93e6564
hugolib: Handle dropped error 2023-08-24 19:57:44 +03:00
Oleksandr Redko
65871d5cf4 common/loggers: Fix typo in option name 2023-08-23 22:52:37 +02:00
Joe Mooring
2e4bf89ec7 misc: Change dart-sass labels in workflows and snapcraft 2023-08-23 22:51:46 +02:00
Bjørn Erik Pedersen
ebaa733d45 Make sure resources directory isn't created in hugo new theme
Fixes #11382
2023-08-23 22:50:35 +02:00
Bjørn Erik Pedersen
24b1be45c1 Go 1.21 Upgrade
Fixes #11351
2023-08-23 21:49:27 +02:00
Bjørn Erik Pedersen
111f02db2a testscripts: Make mod vendor test stable 2023-08-23 20:52:09 +02:00
michalbiesek
8a08f91d5b
dockerfile: Update Docker images
- `golang:1.21-alpine`
- `alpine:3.18`
2023-08-23 18:06:52 +02:00
Bjørn Erik Pedersen
dcf425c846 Fix it so disable a module does not disable transitive dependency required by others
The motivation behind the original implementation was probably to show disabled modules when running `hugo mod graph`.

Fixes #11376
2023-08-23 18:05:18 +02:00
Joe Mooring
9a8c84d600 create/skeletons: Move theme's site config to top level
Closes #11380
2023-08-23 18:05:00 +02:00
dependabot[bot]
a19d03b0e6 build(deps): bump github.com/yuin/goldmark from 1.5.5 to 1.5.6
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.5.5 to 1.5.6.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.5.5...v1.5.6)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-23 13:19:49 +02:00
Joe Mooring
cdf0b3b7a6
modules: Make new cache directories read/write
Leave newly-created directories in the module cache read-write instead
of making them read-only.

Closes #11369
2023-08-22 08:47:02 +02:00
Oleksandr Redko
d979831dbd deploy: Update InvalidateCloudFront to use Go CDK helper 2023-08-21 16:57:41 +02:00
Bjørn Erik Pedersen
bcf7421ea5 Avoid escaping HTML chars inside hugo_stats.json
Fixes #11371
2023-08-21 13:17:21 +02:00
Joe Mooring
b6538532f4 commands/new: Embed site and theme skeletons
The skeletons are used when creating new sites and themes with the CLI.

Closes #11358
2023-08-21 10:38:22 +02:00
Joe Mooring
90944aa261 docshelper: Improve template lookup order descriptions
- Always include example for "with layout/type set"
- Use lowercase for "set to" examples (lookup is case sensitive)
- Consistent use of taxonomy and term

Fixes gohugoio/hugoDocs#1734
2023-08-15 12:53:18 +02:00
dependabot[bot]
db7bc49690 build(deps): bump github.com/evanw/esbuild from 0.18.17 to 0.19.2
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.17 to 0.19.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.17...v0.19.2)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 11:46:23 +02:00
Bjørn Erik Pedersen
a2f6400d65
cache: Hide IsResourceDir from the exported config 2023-08-09 23:49:08 +02:00
Bjørn Erik Pedersen
7d74cd0cc8 commands: Handle floats without decimals in hugo config
Updates #11345
2023-08-08 09:13:17 +02:00
Bjørn Erik Pedersen
d139f30234 docs: Replace docs.json with docs.yaml
Updates #11345
2023-08-08 09:13:17 +02:00
Bjørn Erik Pedersen
b1b6912412
config: Add a type value for the tags related config entry
Which doesn't have any practical difference, but it looks cleaner in the generated docs.
2023-08-07 18:01:46 +02:00
dependabot[bot]
0de81c6430 build(deps): bump golang.org/x/net from 0.13.0 to 0.14.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.13.0 to 0.14.0.
- [Commits](https://github.com/golang/net/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 14:20:55 +02:00
Bjørn Erik Pedersen
851bf3515e Add all config to docshelper.json
Also consolidate so the mediaTypes and outputFormats are listed once only.

Fixes #11328
2023-08-07 13:42:54 +02:00
dependabot[bot]
d4a6c16c17 build(deps): bump golang.org/x/image from 0.10.0 to 0.11.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/image/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 12:18:03 +02:00
Bjørn Erik Pedersen
5d5fb22ead
Merge commit '7c62d6ef16' 2023-08-07 10:38:12 +02:00
Bjørn Erik Pedersen
7c62d6ef16 Squashed 'docs/' changes from c43daf45f..a7e1e9be8
a7e1e9be8 Clarify front matter date fields
69df4fc22 Clarify how to determine if .Inner is populated
9046bf424 Document strings.ContainsNonSpace
8dbe5df90 Fix indentation and broken image
48ad4124e Typo: functions/after.md
d4c01b57b Link to detailed descriptions of canonfiyURLs and relativeURLs
4d9597302 Explain behaviour when appending to a slice containing other slices
69e24e44e Standardize right arrow usage
01b378726 Remove references to Google's Universal Analytics and the async template
d415bae24 Use shared file to describe regex syntax
e75dee6b8 snap: How to enable or revoke access to SSH keys
feed2d1c0 Remove hasPrefix and hasSuffix in favor of namespaced versions
3c6d2cfe5 security: Use default execution settings
461b5fcaf netlify: Hugo 0.116.1
95fac27a5 configuration: correct cacheDir description
cd9f1f929 configuration: Fix broken link
605394de4 netlify: Upgrade to Hugo 0.116.0
baf2a0f7b Merge branch 'tempv0.116.0'
ee51a9323 Update requirements for building from source
40189956d Editor tools: Remove duplicate sentence
fb0ff2621 docs: Regenerate CLI docs
e8a5665c4 Update where.md
7bc5cf15d Update hosting instructions
018a04314 docs: Update where
d33ae91cf docs: Update where function operators
9a108a664 docs: Rework the cacheDir documentation

git-subtree-dir: docs
git-subtree-split: a7e1e9be851b95e636ab5360e5151156b4f89044
2023-08-07 10:35:12 +02:00
Bjørn Erik Pedersen
641390f8f5
Try to make test more stable 2023-08-05 11:40:18 +02:00
Bjørn Erik Pedersen
2e6191b2e0 deps: Sync go-i18n with upstream
Closes #11336
2023-08-05 11:37:04 +02:00
Bjørn Erik Pedersen
22861cb4dc Return original error on resources.GetRemote retry timeouts
See #11327
2023-08-04 21:12:04 +02:00
Bjørn Erik Pedersen
16da1ade70 testing: Write test caches to /tmp
Fixes #11327
2023-08-04 18:46:43 +02:00
Bjørn Erik Pedersen
a3d42a277d Add retry in resources.GetRemote for temporary HTTP errors
Fixes #11312
2023-08-04 17:16:52 +02:00
dependabot[bot]
2c20fd557a build(deps): bump gocloud.dev from 0.24.0 to 0.33.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.24.0 to 0.33.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.24.0...v0.33.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 14:54:26 +02:00
dependabot[bot]
243736e751 build(deps): bump golang.org/x/net from 0.11.0 to 0.13.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.13.0.
- [Commits](https://github.com/golang/net/compare/v0.11.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 14:53:33 +02:00
dependabot[bot]
bf891c2259 build(deps): bump github.com/marekm4/color-extractor from 1.2.0 to 1.2.1
Bumps [github.com/marekm4/color-extractor](https://github.com/marekm4/color-extractor) from 1.2.0 to 1.2.1.
- [Commits](https://github.com/marekm4/color-extractor/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/marekm4/color-extractor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 12:37:05 +02:00
dependabot[bot]
da0df0ada3 build(deps): bump github.com/frankban/quicktest from 1.14.5 to 1.14.6
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.14.5 to 1.14.6.
- [Commits](https://github.com/frankban/quicktest/compare/v1.14.5...v1.14.6)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 12:36:48 +02:00
dependabot[bot]
0885f8ec2b build(deps): bump golang.org/x/image from 0.9.0 to 0.10.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/image/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 12:36:29 +02:00
dependabot[bot]
61be050a95 build(deps): bump github.com/clbanning/mxj/v2 from 2.5.7 to 2.7.0
Bumps [github.com/clbanning/mxj/v2](https://github.com/clbanning/mxj) from 2.5.7 to 2.7.0.
- [Release notes](https://github.com/clbanning/mxj/releases)
- [Commits](https://github.com/clbanning/mxj/compare/2.5.7...v2.7)

---
updated-dependencies:
- dependency-name: github.com/clbanning/mxj/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 09:54:06 +02:00
dependabot[bot]
65af75fb00 build(deps): bump golang.org/x/tools from 0.9.3 to 0.11.1
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.11.1.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.9.3...v0.11.1)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 09:53:24 +02:00
dependabot[bot]
2d75f74b86 build(deps): bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3
Bumps [go.uber.org/automaxprocs](https://github.com/uber-go/automaxprocs) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/uber-go/automaxprocs/releases)
- [Changelog](https://github.com/uber-go/automaxprocs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/automaxprocs/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: go.uber.org/automaxprocs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 09:52:50 +02:00
dependabot[bot]
2ac3d61604 build(deps): bump github.com/hairyhenderson/go-codeowners
Bumps [github.com/hairyhenderson/go-codeowners](https://github.com/hairyhenderson/go-codeowners) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/hairyhenderson/go-codeowners/releases)
- [Commits](https://github.com/hairyhenderson/go-codeowners/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/hairyhenderson/go-codeowners
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 09:52:33 +02:00
Bjørn Erik Pedersen
ade7ec8187 Add Page.RenderShortcodes
A layouts/shortcodes/include.html shortcode may look like this:

```html
{{ $p := site.GetPage (.Get 0) }}
{{ $p.RenderShortcodes }}
```

Fixes #7297
2023-08-03 20:00:57 +02:00
Joe Mooring
8fa8ce3e48 Update GitHub issue template 2023-08-02 18:07:31 +02:00
dependabot[bot]
9dce45c25d build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.8 to 2.0.9
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.0.8 to 2.0.9.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.0.8...v2.0.9)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 11:23:57 +02:00
hugoreleaser
239f2e2c99 releaser: Prepare repository for 0.117.0-DEV
[ci skip]
2023-08-01 07:36:32 +00:00
hugoreleaser
3e1ea030a5 releaser: Bump versions for release of 0.116.1
[ci skip]
2023-08-01 07:24:54 +00:00
Bjørn Erik Pedersen
30885a6c5f Fix module config watch regression
Fixes #11313
2023-08-01 09:05:53 +02:00
Joe Mooring
58da8554cb deps: Fix Chroma dependency version
Fixes #11311
2023-07-31 21:01:43 +02:00
hugoreleaser
92c1594372 releaser: Prepare repository for 0.117.0-DEV
[ci skip]
2023-07-31 10:40:27 +00:00
hugoreleaser
5a7e0da84e releaser: Bump versions for release of 0.116.0
[ci skip]
2023-07-31 10:28:28 +00:00
dependabot[bot]
d7db096a9d build(deps): bump github.com/evanw/esbuild from 0.18.11 to 0.18.17
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.11 to 0.18.17.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.11...v0.18.17)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 11:30:01 +02:00
Bjørn Erik Pedersen
c1df5b1b0b
config: Do not fail on unknown config keys
Make it a warning.

One such example I found in an old site is `blackfriday`. These should be fixed/removed, but it's not important enough
to fail the build.
2023-07-31 11:20:37 +02:00
Bjørn Erik Pedersen
be8e2de597
resources: Fix spelling in method name 2023-07-30 21:12:33 +02:00
Bjørn Erik Pedersen
d297c8e1b5
docs: Regenerate CLI docs 2023-07-30 18:54:08 +02:00
Bjørn Erik Pedersen
fbb8eb39ec Fix so temporary images do not get published
Fixes #10255
2023-07-30 18:52:34 +02:00
Sojon
87d9bffe74
readme: Fix link 2023-07-30 11:06:31 +02:00
Joe Mooring
d9fdcbe939 commands: Update cacheDir description 2023-07-29 22:09:55 +02:00
Bjørn Erik Pedersen
295d733883
Update where.md 2023-07-29 22:06:22 +02:00
Bjørn Erik Pedersen
d5247788ee
docs: Update where
Go doesn't use the RE2 (C++) library, it's a pure Go implementation.
2023-07-29 19:27:30 +02:00
Joe Mooring
036e260d8d docs: Update where function operators
Related to #11281
2023-07-29 16:11:53 +02:00
Bjørn Erik Pedersen
a50356b9a2
docs: Rework the cacheDir documentation 2023-07-29 11:59:37 +02:00
Bjørn Erik Pedersen
8859be1c01
Merge commit '87de22d746' 2023-07-29 11:17:28 +02:00
Bjørn Erik Pedersen
87de22d746 Squashed 'docs/' changes from 85befbb4d..c43daf45f
c43daf45f Update build-options.md
3ebbfedd4 Build options: Improve readability
5091bf6a0 Improve safeHTMLAttr explanation
b64cbce2e Fix description of collections.Apply
6ea264b9c netlify: Hugo 0.115.4
b42e7c542 Revert "config: Remove disableLiveReload"
35ce2290e Remove excess spaces in configuration docs
2edf761de Update listed titleCaseStyle default value
887f6fb97 config: Remove disableLiveReload
c9f49fb26 Fix typo
37d8569ac Remove tools associated with Atom
871d11b72 Fix URL in postprocess docs
bbb17d29f Update GitLab workflow
bc53ea5ce Use sentence-style capitalization for headings
7ca578786 netlify: Hugo 0.115.3
c5e010bd0 Merge branch 'tempv0.115.3'
c885604bf Remove starter kits page
4c0fe269e Update mention of Netlify CMS to Decap CMS
05067175c Consistently use file name instead of filename
763dd6404 Improve multilingual config example and descriptions
e5aa61ec5 Use lowercase when referring to front matter (#2132)
7ba3d0c72 docs: Refresh docs.json
de8bddedf Update description of timeout configuration value
e1245d9f8 netify: Hugo 0.115.2
153a36bdf Merge branch 'tempv0.115.2'
707cec754 Fix typo in figure example in shortcodes.md
128cbe1e5 Improve taxonomy template examples
4e743ec36 Improve highlight function example
f96fa6805 transpile sass: Fixes typo
e4a8a21f7 Compile Sass to CSS, not SCSS
c1538bd00 docs: Regenerate CLI docs
bd4e33436 Add titleCaseStyle none and firstupper
6ff93d478 Update quick-start.md
5c6653cb1 Update build config examples and explanation
1458d9a43 Remove the `url` parameter
6a1e92044 netlify: Hugo 0.115.1
a9d5d6f2f Merge branch 'tempv0.115.1'
4c4882384 docs: Regen docs helper
d1aa1c1f5 Add link to PowerShell vs Windows PowerShell documentation
6e3b70c21 Fix link to Git installation instructions
4f8a9ca38 Clarify resources.Copy arguments
ee86dd121 Update theme
dc7c305cf Update theme
60c23920b Clarify caching for resources.FromString (#2120)
5bf2fef6d netlify: Hugo 0.115.0
46bde87c5 Merge branch 'tempv0.115.0'
42cc48c16 Specify target path caching for resources.ExecuteAsTemplate (#2027)
a54bf4cd0 Correct the sample code of mermaid (#2119)
8c49b06fc docs: Update permalinks documentation
a4818d99b Page bundles: link to info about single vs. list page templates (#2116)
3fc7744d7 snap: Document removable media access
dbd08f58a Update theme
df5b88633 netlify: Hugo 0.114.1
6b859834a Fix typo
9ec92cf68 Improve Dart Sass example for Netlify
2d294ece9 Add Dart Sass installation and usage documentation
4c6b77d6c Fix placement of curly braces
897812a50 Update template-debugging.md to include a jsonify example
22bca519b Update GitHub Pages hosting instructions (#2109)
a964d93ce Document math functions new in v0.114.0 (#2108)
9f4cb040e netlify: Hugo 0.114.0
55b4d9221 Merge branch 'tempv0.114.0'
93c4dcf93 docs: Regen docshelper
96f03c77f docs: Regen CLI docs
8e22a228a Clarify resource media type variables (#2106)
2652da8d4 Update transform.Unmarshal.md (#2105)
92657177a Update theme
4601c1d65 Update theme
a216f3145 Merge commit '3c1deaf201'
eed8794f5 cache: Set default cache path based on $USER

git-subtree-dir: docs
git-subtree-split: c43daf45fdc36c254f4274a0815ea62d4d8c37e0
2023-07-29 11:15:54 +02:00
Bjørn Erik Pedersen
bec9b80d95
Deprecate taxonomyTerm
In favour of 'taxonomy'

Closes #11256
2023-07-28 15:14:24 +02:00
Bjørn Erik Pedersen
1c97095ac0
Warn about unknown kinds in disableKinds
See #11256
2023-07-28 15:14:23 +02:00
Bjørn Erik Pedersen
b3cb6788b2
Move all Kind constants to its own package
See #11256
2023-07-28 15:14:23 +02:00
dependabot[bot]
5542f02fbc
build(deps): bump github.com/rogpeppe/go-internal
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.10.1-0.20230508101108-a4f6fabd84c5 to 1.11.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/commits/v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-28 14:50:56 +02:00
dependabot[bot]
0bc7ed9a17 build(deps): bump golang.org/x/image from 0.8.0 to 0.9.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/image/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-28 14:49:34 +02:00
Bjørn Erik Pedersen
36b5126050
Remove unused autogenerated method 2023-07-28 10:31:37 +02:00
Oleksandr Redko
2589b1295c
commands: Replace deprecated ioutil with os 2023-07-28 10:23:20 +02:00
Bjørn Erik Pedersen
ef6e813ca8
tpl/collections: Add BenchmarkWhereOps
```
BenchmarkWhereOps/eq-10 	    8702	    120410 ns/op	   52280 B/op	    2515 allocs/op
BenchmarkWhereOps/ne-10 	    9829	    120759 ns/op	   52280 B/op	    2515 allocs/op
BenchmarkWhereOps/like-10           6754	    176377 ns/op	   52917 B/op	    2515 allocs/op
```
2023-07-28 10:08:13 +02:00
Joe Mooring
f4598a0986 tpl/collections: Add like operator to where function
Closes #11279
2023-07-28 09:53:00 +02:00
Joe Mooring
dc2a544fac tpl/collections: Fix description of apply function
The collections.Apply template function cannot be used with maps.
2023-07-28 09:51:01 +02:00
Joe Mooring
916397320b
snap: Set cache location to $HOME/.cache/hugo_cache 2023-07-27 12:43:52 -07:00
Bjørn Erik Pedersen
b3f10556f0
Use os.UserCacheDir as first fallback if cacheDir is not set
We will now try

1. cacheDir (or, commonly set in environment as `HUGO_CACHEDIR`)
2. if on Netlify we use `/opt/build/cache/hugo_cache/`
3. os.UserCacheDir
4. A temp dir

Storing the cache, especially the module cache, in a temporary idea has had lots of hard to debug issues, especially on MacOS,
which this commit tries to fix.

This should also make it easier to locate the Hugo cache:

>UserCacheDir returns the default root directory to use for user-specific cached data. Users should create their own
application-specific subdirectory within this one and use that.
>
>On Unix systems, it returns $XDG_CACHE_HOME as specified by
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if non-empty, else $HOME/.cache. On Darwin, it
returns $HOME/Library/Caches. On Windows, it returns %LocalAppData%. On Plan 9, it returns $home/lib/cache.
>
>If the location cannot be determined (for example, $HOME is not defined), then it will return an error.

Fixes #11286
Fixes #11291
2023-07-27 20:59:47 +02:00
Bjørn Erik Pedersen
4d7af757c9
Add a common regexp cache
```
BenchmarkGetOrCompileRegexp-10    	73959368	        13.71 ns/op	       0 B/op	       0 allocs/op
BenchmarkCompileRegexp-10         	 3143529	       380.1 ns/op	     872 B/op	      10 allocs/op
```
2023-07-27 19:23:12 +02:00
Bjørn Erik Pedersen
7f058b8bab Fix multiple languages in HUGO_DISABLELANGUAGES
Fixes #11278
2023-07-27 15:51:25 +02:00
Joe Mooring
575d7f8068
snap: Allow access to SSH keys and $HOME/.config/hugo
Closes #11288
2023-07-26 22:15:21 -07:00
Joe Mooring
739d10e8bd deps: Upgrade github.com/yuin/goldmark v1.5.4 => v1.5.5 2023-07-26 21:05:02 +02:00
hugoreleaser
0dbe0f1a07 releaser: Prepare repository for 0.116.0-DEV
[ci skip]
2023-07-20 07:02:18 +00:00
hugoreleaser
dc95245212 releaser: Bump versions for release of 0.115.4
[ci skip]
2023-07-20 06:49:57 +00:00
Bjørn Erik Pedersen
d70b6c7d01 Fix broken handling of legacy taxonomyTerm in disableKinds
Fixes #11257
2023-07-19 19:59:17 +02:00
Bjørn Erik Pedersen
d947db3713
commands: Move testscript into its correct place 2023-07-19 19:54:36 +02:00
Bjørn Erik Pedersen
d8c94c354a publisher: Improve class collector for dynamic classes
E.g.

* AlpinesJS' :class="isTrue 'class1' : 'class2'"
* And dynamic classes with colon in them, e.g. `hover:bg-white`
2023-07-19 19:50:37 +02:00
Bjørn Erik Pedersen
6bbec90014 Fix cache busting setup
By correctly capturing the target variable when compiling the cache buster.

Fixes #11268
2023-07-19 19:50:37 +02:00
Bjørn Erik Pedersen
5bd22ba85f commands: Delay server builds after the watcher is set up
See #11264
2023-07-19 19:50:37 +02:00
Bjørn Erik Pedersen
7ae62f4aa3 Create hugo_stats.json if it's mounted but does not exists
A common pattern for Tailwind 3 is to mount that file to get it on the server watch list.

A common pattern is also to add hugo_stats.json to .gitignore.

This has meant that the first time you start the server (no hugo_stats.json), it just doesn't work as expected.

Fixes #11264
2023-07-19 19:50:37 +02:00
Bjørn Erik Pedersen
f1a061e9ed Re-instate disableLiveReload as a config option (and not just a flag)
Closes #11259
2023-07-19 19:50:37 +02:00
Joe Mooring
2f11e673c5 common/htime: Fix localization of abbreviated month names
Fixes #11267
2023-07-19 19:00:18 +02:00
Bjørn Erik Pedersen
387c5f60f9 Improve error messages for PostCSS etc.
Fixes #9730
2023-07-17 20:42:32 +02:00
Bjørn Erik Pedersen
c406fd3a0e Fix setting config from env with complex (e.g. YAML) strings
So you can do

```
HUGO_OUTPUTS="home: [rss]"  hugo
```

And similar.

Fixes #11249
2023-07-16 18:08:23 +02:00
David Karlsson
286821e360
Fix for data mounts in sub folders
Before this change, data files from Hugo modules were always mounted at the
root of the `data` directory. The File and FileMetaInfo structs for modules
are different from 'native' data directories.

This changes how the keyParts for data files are generated so that data
from modules or native directories are treated the same.
2023-07-15 11:13:08 +02:00
hugoreleaser
79f15be5b0 releaser: Prepare repository for 0.116.0-DEV
[ci skip]
2023-07-13 16:23:50 +00:00
hugoreleaser
5c2e014a51 releaser: Bump versions for release of 0.115.3
[ci skip]
2023-07-13 16:11:34 +00:00
Bjørn Erik Pedersen
cc44583cc3 Improve behavior of defaultContentLanguageInSubdir when only the default language is enabled
1 .Create sitemapindex in root of publishDir (will contain link to sitemap.xml in defaultContentLanguage site)
2. Create index.html in root of publishDir (will redirect to defaultContentLanguage site)

Fixes #11229
2023-07-13 18:06:36 +02:00
Bjørn Erik Pedersen
4da672af88 Return error when .Render is invoked without arg
Fixes #11243
2023-07-13 18:06:36 +02:00
Joe Mooring
f1886f8c37 js: Pass tsconfig.json to esBuild
Note that esBuild only inspects/honors certain fields.
See https://esbuild.github.io/content-types/#tsconfig-json.

Fixes #11232
2023-07-13 15:19:04 +02:00
Bjørn Erik Pedersen
5bec50838c tpl/collections: Fix WordCount (etc.) regression in Where, Sort, Delimit
Fixes #11234
2023-07-11 12:11:39 +02:00
Joe Mooring
f650e4d751 config/allconfig: Update timeout description 2023-07-08 23:22:26 +02:00
Joe Mooring
c934a45069 docs: Refresh docs.json 2023-07-08 23:20:11 +02:00
hugoreleaser
91b02091a5 releaser: Prepare repository for 0.116.0-DEV
[ci skip]
2023-07-08 17:19:03 +00:00
hugoreleaser
8966424e0e releaser: Bump versions for release of 0.115.2
[ci skip]
2023-07-08 17:06:56 +00:00
Joe Mooring
72510969a6 snap: Allow access to AWS, Azure, and GCS config/credentials
Fixes #11122
2023-07-08 09:43:04 -07:00
Joe Mooring
70c5e485bb snap: Update metadata and security.exec.osEnv
See #11217
2023-07-08 09:43:04 -07:00
Bjørn Erik Pedersen
a78b17d7f1 Make imageConfig work with modules
Fixes #11205
2023-07-08 17:20:18 +02:00
Bjørn Erik Pedersen
a481942532 Restore language.disabled config
Fixes #11219
2023-07-08 16:51:48 +02:00
Bjørn Erik Pedersen
0f921ace6f Fix hugo mod vendor for modules with hugo.toml
Fixes #11221
2023-07-08 16:08:46 +02:00
Bjørn Erik Pedersen
6019953769 Fix static content files multilingual root regression
Fixes #11223
2023-07-08 16:08:46 +02:00
Bjørn Erik Pedersen
92e86702ea Fix defaultContentLanguageInSubdir with only 1 language
Fixes #10064
2023-07-08 16:08:46 +02:00
David Karlsson
6c9ea022a9
config: Expand default security.exec.osEnv policy
To better support private Hugo modules and automatically
launching a text editor on content creation, this change
adds the following environment variables to the default
security policy:

- HOME
- XDG_CONFIG_HOME
- USERPROFILE
- SSH_AUTH_SOCK
- DISPLAY
- LANG

Fixes #9333
2023-07-07 13:54:06 +02:00
Bjørn Erik Pedersen
12d3469dd1 Add titleCaseStyle none and firstupper
Fixes #11204
2023-07-05 20:35:20 +02:00
Anthony Fok
bf7ee8a91a Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0 2023-07-04 09:14:48 +02:00
hugoreleaser
d912491f2d releaser: Prepare repository for 0.116.0-DEV
[ci skip]
2023-07-03 17:39:56 +00:00
hugoreleaser
857374e693 releaser: Bump versions for release of 0.115.1
[ci skip]
2023-07-03 17:28:25 +00:00
Bjørn Erik Pedersen
c27639b9a0
docs: Regen docs helper 2023-07-03 19:25:27 +02:00
Bjørn Erik Pedersen
ceb486f98c
Fix buildStats when tags and classes are disabled
Fixes #11202
2023-07-03 09:58:33 +02:00
Bjørn Erik Pedersen
5afc89f2bf Rework the build.writeStats struct
Mostly to make it easier to toggle on/off this feature from the env.

See #11191
2023-07-02 13:04:11 +02:00
Joe Mooring
c1eac616d5
snap: Explicitly set security.exec.osenv during build
Fixes #11199
2023-07-01 17:55:23 -07:00
Joe Mooring
3c8256a137
snap: Restore security.exec.osenv whitelist
Fixes #11195
2023-07-01 14:55:57 -07:00
Bjørn Erik Pedersen
19d76ae96b github: Build for Dragonfly in CI build
To discover upstream issues before we release.
2023-07-01 18:53:48 +02:00
Bjørn Erik Pedersen
11ecea6106 Make build.writeStats a struct
So you can do

```toml
[build.writeStats]
  tags = true
  classes = true
  ids = false
```

Fixes #11191
2023-07-01 15:38:32 +02:00
dependabot[bot]
da98724bc8 build(deps): bump github.com/evanw/esbuild from 0.18.10 to 0.18.11
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.10 to 0.18.11.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.10...v0.18.11)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-01 15:33:24 +02:00
dependabot[bot]
4d470bb732 build(deps): bump github.com/alecthomas/chroma/v2 from 2.7.0 to 2.8.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-01 10:33:49 +02:00
Bjørn Erik Pedersen
0ff8e13c1c
commands: Fix index out of range in hugo mod get
Fixes #11190
2023-06-30 15:57:46 +02:00
Bjørn Erik Pedersen
ffd37d4f75 Only print the path warnings once
We could reset and rerun it on server rebuilds, but that report needs a full build to make sense.

Also clean up the config vs flags in this area: Make all config settings match the flags e.g. `printPathWarnings`, but set up aliases for the
old.

Fixes #11187
2023-06-30 10:24:28 +02:00
Bjørn Erik Pedersen
b4b65245b2
Update README.md 2023-06-30 08:01:25 +02:00
hugoreleaser
87886f40d1 releaser: Prepare repository for 0.116.0-DEV
[ci skip]
2023-06-29 16:09:06 +00:00
hugoreleaser
67caf50698 releaser: Bump versions for release of 0.115.0
[ci skip]
2023-06-29 15:56:39 +00:00
Bjørn Erik Pedersen
7917961d59 Misc permalinks adjustments
* Move config loading to the page package
* Fix a lower bound panic for the `:sections` slice syntax.
* Always return the `:title`
* Add some permalinks integration tests
* Also see issues below

Fixes #9448
Fixes #11184
See #8523
2023-06-29 10:14:19 +02:00
Bjørn Erik Pedersen
80ecb95895
commands: Handle hugo mod get --help
Fixes #11141
2023-06-29 08:53:50 +02:00
Joe Mooring
58e09cc6c7 Update README.md 2023-06-28 20:14:41 +02:00
Andreas Deininger
635cc346ce commands: Fix panic when running hugo new theme without theme name
Closes #11162.
2023-06-28 16:20:54 +02:00
Mos Roshanavand
12646750aa Print help message when triggered with no flags 2023-06-28 14:58:36 +02:00
Bjørn Erik Pedersen
79639c981c Fix output formats and media type per language config regression
Fixes #11159
2023-06-28 12:33:33 +02:00
dependabot[bot]
9b313cec1b build(deps): bump github.com/evanw/esbuild from 0.18.5 to 0.18.10
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.5 to 0.18.10.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.5...v0.18.10)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 10:22:19 +02:00
khayyam
b74b8d6478
common/collections: Fix append regression to allow appending nil
Closes #11180
2023-06-28 09:41:36 +02:00
Andreas Deininger
793e38f5ce
commands: Fix help message for hugo new theme
Closes #11161.
2023-06-28 09:30:27 +02:00
Bjørn Erik Pedersen
7f698c8934
Don't panic on invalid security whitelist regexp
Fixes #11176
2023-06-28 08:57:28 +02:00
Bjørn Erik Pedersen
fa0e16f4c7 Fix false path warnings with resources.PostProcess
Fixes #7735
2023-06-27 21:55:35 +02:00
Joe Mooring
12e4c4d5dc docs: Update permalinks documentation
See #8523
See #10847
2023-06-27 11:04:49 +02:00
Bjørn Erik Pedersen
bac03f4076
Merge branch 'master' of github.com:gohugoio/hugo 2023-06-26 20:48:44 +02:00
Mai-Lapyst
cc14c6a52c
resources/page: Allow section and taxonomy pages to have a permalink configuration
Allows using permalink configuration for sections (branch bundles) and
also for taxonomy pages. Extends the current permalink configuration to
be able to specified per page kind while also staying backward compatible:
all permalink patterns not dedicated to a certain kind, get automatically
added for both normal pages and term pages.

Fixes #8523
2023-06-26 15:31:01 +02:00
Oleksandr Redko
e3308a0bbc tpl/tplimpl: Fix typo in global variable name 2023-06-26 15:12:21 +02:00
Joe Mooring
019299b0b0 commands: Enable format flag with hugo new site
Fixes #11155
2023-06-24 20:26:54 +02:00
Bjørn Erik Pedersen
23ed087c4e
Update README.md 2023-06-24 11:28:29 +02:00
Bjørn Erik Pedersen
a018259bcf
Merge branch 'release-0.114.1' 2023-06-23 13:18:21 +02:00
hugoreleaser
ad5e04daa4 releaser: Prepare repository for 0.115.0-DEV
[ci skip]
2023-06-23 11:14:00 +00:00
hugoreleaser
e9b716ad98 releaser: Bump versions for release of 0.114.1
[ci skip]
2023-06-23 11:02:58 +00:00
Bjørn Erik Pedersen
ae31dbdd1e
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.30.0"
This reverts commit 941818295d.
2023-06-23 13:01:09 +02:00
Bjørn Erik Pedersen
5b4bfc2db7 Fix broken nodeploy setup
Fixes #11149
2023-06-23 12:40:43 +02:00
dependabot[bot]
92f55f1121 build(deps): bump github.com/niklasfasching/go-org from 1.6.6 to 1.7.0
Bumps [github.com/niklasfasching/go-org](https://github.com/niklasfasching/go-org) from 1.6.6 to 1.7.0.
- [Commits](https://github.com/niklasfasching/go-org/compare/v1.6.6...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/niklasfasching/go-org
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-23 12:17:35 +02:00
Bjørn Erik Pedersen
078226dd66
Fix broken nodeploy setup
Fixes #11149
2023-06-23 12:11:45 +02:00
Joe Mooring
06d228aad1
snap: Switch from Embedded Dart Sass to Dart Sass (#11146)
- Continues to get latest version of Dart Sass during each build
- Removes superfluous BUILD_TAGS logic (we only build extended)
2023-06-21 15:39:02 -07:00
Bjørn Erik Pedersen
b1016d2e26
commands: Make hugo env respect --logLevel
Fixes #11145
2023-06-21 23:18:38 +02:00
Brian Knight
49336bfc58
commands: Update Jekyll post-import output
Update CLI output after a successful Jekyll import to
suggest a maintained theme and include clearer steps
to running a server locally.

Fixes #10715

Co-authored-by: Joe Mooring <joe@mooring.com>
2023-06-21 20:38:54 +02:00
dependabot[bot]
941818295d build(deps): bump gocloud.dev from 0.24.0 to 0.30.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.24.0 to 0.30.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.24.0...v0.30.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 14:25:37 +02:00
dependabot[bot]
5491e55477 build(deps): bump github.com/evanw/esbuild from 0.18.4 to 0.18.5
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.4 to 0.18.5.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.4...v0.18.5)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-20 09:57:34 +02:00
Joe Mooring
bf7af9043d deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.7
Fixes #11132
2023-06-20 09:18:18 +02:00
hugoreleaser
5e12bf7dc3 releaser: Prepare repository for 0.115.0-DEV
[ci skip]
2023-06-19 17:12:27 +00:00
hugoreleaser
9df2ec7988 releaser: Bump versions for release of 0.114.0
[ci skip]
2023-06-19 17:01:43 +00:00
Bjørn Erik Pedersen
59300faae4
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0"
This reverts commit 7bed16c30f.

Again ...

It doesn't build on Dragonfly:

```
../gomodcache/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/blockblob/chunkwriting.go:273:15: undefined: mmb
../gomodcache/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/blockblob/chunkwriting.go:279:65: undefined: mmb
../gomodcache/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/blockblob/chunkwriting.go:281:22: undefined: mmb
../gomodcache/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/blockblob/chunkwriting.go:287:39: undefined: mmb
../gomodcache/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/blockblob/chunkwriting.go:293:18: undefined: newMMB
../gomodcache/github.com/!azure/azure-sdk-for-go/sdk/storage/azblob@v1.0.0/blockblob/chunkwriting.go:303:37: undefined: mmb
• core: Total in 123.22s …
error running command: exit status 1

Exited with code exit status 1

```
2023-06-19 18:56:31 +02:00
Bjørn Erik Pedersen
9f98b3e718
docs: Regen docshelper 2023-06-19 17:52:52 +02:00
Bjørn Erik Pedersen
3ab84651c6
Add empty Environ when loading test config
To prevent OS environment vars confusing the tests.
2023-06-19 17:49:45 +02:00
Bjørn Erik Pedersen
7241b5fd51
docs: Regen CLI docs 2023-06-19 17:40:17 +02:00
Bjørn Erik Pedersen
6dfbd24797
common/loggers: Drop the bold INFO etc. prefixes
That looked a little too much.
2023-06-19 17:35:43 +02:00
Bjørn Erik Pedersen
f59c3c0214
loggers: Avoid using Logf for the LevelLoggerToWriter
To prevent issues with percentage chars.
2023-06-19 15:56:44 +02:00
Bjørn Erik Pedersen
3ca29b1563
tocss/dartsas: Avoid using Logf for the internal Dart Sass logging
As that does not work when percentages are used in the log messages.
2023-06-19 13:27:03 +02:00
Bjørn Erik Pedersen
fdb0b7fb19
helpers: Remove superflous formatting flag in deprecation warnings 2023-06-19 13:02:47 +02:00
Bjørn Erik Pedersen
49dd53a405 Revert "deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6"
This reverts commit 409c6c3fcd.

See #11132
2023-06-19 12:54:15 +02:00
Andreas Deininger
68d9d3ebd7
all: Fix some typos 2023-06-19 09:28:10 +02:00
Oleksandr Redko
9009c8cdca all: Fix typos in function names and comments 2023-06-19 09:26:29 +02:00
Bjørn Erik Pedersen
12dc9a6e4a deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN)
This was broken in the config rewrite in Hugo 0.112.0.

The workaround is to be explicit about setting these flag values (even if just using the defaults), e.g.:

```
hugo deploy --invalidateCDN --maxDeletes 256
```

Fixes #11127
2023-06-18 19:38:34 +02:00
Bjørn Erik Pedersen
1b85303ac2
common/loggers: Re-add trailing newline in logger.Printf
Fixes #11130
2023-06-18 18:56:45 +02:00
dependabot[bot]
8a04d47ab7 build(deps): bump github.com/evanw/esbuild from 0.18.3 to 0.18.4
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.3 to 0.18.4.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.3...v0.18.4)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-18 13:43:00 +02:00
Bjørn Erik Pedersen
7c9fada778 Replace the old log setup, with structured logging etc.
Fixes #11124
2023-06-18 13:03:04 +02:00
Joe Mooring
0e79446586
Revert "snap: Transition base snap from core20 to core22 (#11101)" (#11125)
Closes #11116
2023-06-17 08:41:15 -07:00
dependabot[bot]
aaf2e9693a build(deps): bump github.com/evanw/esbuild from 0.18.2 to 0.18.3
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.2...v0.18.3)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-16 07:42:25 +02:00
Bjørn Erik Pedersen
ee359df172 Fix upstream Go templates bug with reversed key/value assignment
The template packages are based on go1.20.5 with the patch in befec5ddbbfbd81ec84e74e15a38044d67f8785b  added.

This also includes a security fix that now disallows Go template actions in JS literals (inside backticks).

This will throw an error saying "... appears in a JS template literal".

If you're really sure this isn't a security risk in your case, you can revert to the old behaviour:

```toml
[security]
[security.gotemplates]
allowActionJSTmpl = true
```

See https://github.com/golang/go/issues/59234

Fixes #11112
2023-06-15 23:04:33 +02:00
dependabot[bot]
0f989d5e21 build(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.2.0 to 0.3.0.
- [Commits](https://github.com/golang/sync/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 19:52:14 +02:00
Bjørn Erik Pedersen
f73c567534 common/collections: Always make a copy of the input slice in Append
Fixes #10458.
2023-06-14 20:18:54 +02:00
Bjørn Erik Pedersen
d178fe94fe tpl/collections: Fix append when appending a slice to a slice of slices
Fixes #11093
2023-06-14 20:18:54 +02:00
dependabot[bot]
732dcb848f build(deps): bump google.golang.org/api from 0.123.0 to 0.127.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.123.0 to 0.127.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.123.0...v0.127.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 18:59:07 +02:00
dependabot[bot]
944859f1ad build(deps): bump golang.org/x/tools from 0.9.1 to 0.9.3
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.9.1...v0.9.3)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 14:43:15 +02:00
Bjørn Erik Pedersen
90b2674ddc
Re-add site.RSSLink (and deprecate it)
Fixes #11110
2023-06-14 12:18:11 +02:00
dependabot[bot]
bb9377b5e5 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.11 to 2.2.12
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.11 to 2.2.12.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.11...v2.2.12)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 12:06:11 +02:00
dependabot[bot]
e88f1b80b8 build(deps): bump github.com/getkin/kin-openapi from 0.117.0 to 0.118.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.117.0 to 0.118.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.117.0...v0.118.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 12:05:47 +02:00
dependabot[bot]
516f0cb6ce build(deps): bump golang.org/x/net from 0.10.0 to 0.11.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/net/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-14 11:58:31 +02:00
Bjørn Erik Pedersen
21d17566a3 Fix .Width and .Height for animated gifs
Fixes #11079
2023-06-14 09:21:22 +02:00
Joe Mooring
35e9b3ed1e
snap: Transition base snap from core20 to core22 (#11101)
- Syntax changes
- Bump Go from 1.19 to 1.20
- Remove unused build tag logic (we only build the extended version)
2023-06-13 14:52:19 -07:00
Bjørn Erik Pedersen
3c1deaf201 Squashed 'docs/' changes from 1d5548d73..85befbb4d
85befbb4d Update plainify.md
56e137043 Update comparison operators (#2104)
4241135e0 Front matter docu: improve link to TOML spec (#2102)
5115de3c0 netlify: Hugo 0.113.0
99b74a053 Merge branch 'temp01130'
1622d5d1a docs: Regenerate CLI docs
adb4297eb netlify: Hugo 0.112.7
cd6813309 Update editors.md to include vim-hugo (#2098)
f7c2406dd netlify: Hugo 0.112.6
b891028c3 docs: Regenerate CLI docs

git-subtree-dir: docs
git-subtree-split: 85befbb4dc2f526da99fa9f47d54a12e6282d36e
2023-06-13 20:43:03 +02:00
Bjørn Erik Pedersen
a0009e070a
Merge commit '3c1deaf201' 2023-06-13 20:43:03 +02:00
dependabot[bot]
7bed16c30f build(deps): bump gocloud.dev from 0.24.0 to 0.29.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.24.0 to 0.29.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.24.0...v0.29.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 20:42:04 +02:00
Bjørn Erik Pedersen
2ba2271e4a
tpl/math: Allow variadic math functions to take slice args, add math.Product, math.Sum
* Update math.Min and math.Max to allow 1 or more args, either scalar or slice, or combination of the two
* Add math.Sum (allow 1 or more args, either scalar or slice, or combination of the two)
* Add math.Product (allow 1 or more args, either scalar or slice, or combination of the two)

Fixes #11030
2023-06-13 20:00:00 +02:00
Bjørn Erik Pedersen
60a2cdf72d
Fix config merge regression with root slices (e.g. disableKinds)
Fixes #11089
2023-06-13 18:01:23 +02:00
dependabot[bot]
e08cfc8ca0 build(deps): bump golang.org/x/image from 0.7.0 to 0.8.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/image/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 17:55:34 +02:00
Bjørn Erik Pedersen
ef147f4e87 commands: Remove flags log, verboseLog, add flag logLevel, deprecate flags verbose and debug
Fixes #9648
Fixes #11071
2023-06-13 17:49:38 +02:00
dependabot[bot]
489519566e build(deps): bump github.com/magefile/mage from 1.14.0 to 1.15.0
Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/magefile/mage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 12:59:49 +02:00
dependabot[bot]
91c0b0f76b build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.6 to 2.0.8
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.0.6 to 2.0.8.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.0.6...v2.0.8)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 12:58:44 +02:00
dependabot[bot]
baef235d50 build(deps): bump github.com/evanw/esbuild from 0.17.19 to 0.18.2
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.17.19 to 0.18.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.17.19...v0.18.2)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 12:57:46 +02:00
Bjørn Erik Pedersen
0541a1b57d
Fix handling of aliases (e.g. hugo serve)
Fixes #11090
2023-06-13 10:47:51 +02:00
Erica Mays
258884f44f cache: Set default cache path based on $USER
Change the default cache directory to `$TMPDIR/hugo_cache_$USER`, so
that multi-user systems do not have caches that interfere with each
other.  The other cache-choosing logic (e.g. Netlify exceptions,
configuration options) are not affected.

Fixes #7391
2023-06-12 21:33:35 +02:00
dependabot[bot]
254c2b323c build(deps): bump go.uber.org/atomic from 1.10.0 to 1.11.0
Bumps [go.uber.org/atomic](https://github.com/uber-go/atomic) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/uber-go/atomic/releases)
- [Changelog](https://github.com/uber-go/atomic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/atomic/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: go.uber.org/atomic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 21:02:49 +02:00
dependabot[bot]
84f71ba8ff build(deps): bump github.com/hairyhenderson/go-codeowners
Bumps [github.com/hairyhenderson/go-codeowners](https://github.com/hairyhenderson/go-codeowners) from 0.2.3-0.20201026200250-cdc7c0759690 to 0.3.0.
- [Release notes](https://github.com/hairyhenderson/go-codeowners/releases)
- [Commits](https://github.com/hairyhenderson/go-codeowners/commits/v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/hairyhenderson/go-codeowners
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 18:00:11 +02:00
Bjørn Erik Pedersen
69f0e88a4a resources: Remove failing and superflous test assertion 2023-06-12 17:57:18 +02:00
dependabot[bot]
82adc972e8 build(deps): bump github.com/frankban/quicktest from 1.14.4 to 1.14.5
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.14.4 to 1.14.5.
- [Commits](https://github.com/frankban/quicktest/compare/v1.14.4...v1.14.5)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 17:57:18 +02:00
dependabot[bot]
60533fdc06 build(deps): bump github.com/mattn/go-isatty from 0.0.17 to 0.0.19
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.17 to 0.0.19.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.17...v0.0.19)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 17:03:22 +02:00
dependabot[bot]
261143bbbc build(deps): bump github.com/spf13/afero from 1.9.3 to 1.9.5
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.9.3 to 1.9.5.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.9.3...v1.9.5)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 17:03:04 +02:00
Oleksandr Redko
b8526f32fa commands,config: Fix typo in log and error messages 2023-06-12 16:45:20 +02:00
Bjørn Erik Pedersen
ed7e250068 helpers: Avoid url.Parse in RelURL and AbsURL if we can
```
RelURL-10            159ns ± 5%      18ns ± 4%   -88.89%  (p=0.029 n=4+4)
AbsURL/relurl-10     532ns ± 0%     537ns ± 0%    +1.09%  (p=0.029 n=4+4)
AbsURL/absurl-10     142ns ± 0%       4ns ± 3%   -96.91%  (p=0.029 n=4+4)

name              old alloc/op   new alloc/op   delta
RelURL-10             144B ± 0%        0B       -100.00%  (p=0.029 n=4+4)
AbsURL/relurl-10      544B ± 0%      544B ± 0%      ~     (all equal)
AbsURL/absurl-10      144B ± 0%        0B       -100.00%  (p=0.029 n=4+4)

name              old allocs/op  new allocs/op  delta
RelURL-10             1.00 ± 0%      0.00       -100.00%  (p=0.029 n=4+4)
AbsURL/relurl-10      10.0 ± 0%      10.0 ± 0%      ~     (all equal)
AbsURL/absurl-10      1.00 ± 0%      0.00       -100.00%  (p=0.029 n=4+4)
```
2023-06-12 16:15:59 +02:00
Bjørn Erik Pedersen
6a09e7f28e
Adjust benchmarks 2023-06-12 16:06:11 +02:00
Bjørn Erik Pedersen
29e5cbb699
Adjust benchmark 2023-06-12 15:18:41 +02:00
Bjørn Erik Pedersen
ded6866001
Add BenchmarkAbsURL 2023-06-12 15:15:28 +02:00
Joe Mooring
e1d43021ca helpers: Improve schema detection when creating relative URLs
Fixes #11080
2023-06-12 15:01:30 +02:00
Bjørn Erik Pedersen
5db215d4d6
helpers: Add a basic benchmark for RelURL 2023-06-12 14:44:07 +02:00
Bjørn Erik Pedersen
b7dc93ca11
config: Remove unexpected _merge keys introduced in author and social maps
Fixes #11083
2023-06-12 14:30:43 +02:00
Bjørn Erik Pedersen
f210188da3 Upgrade to v2 of the Dart Sass Embedded Protocol
Fixes #11059
2023-06-12 13:47:38 +02:00
Bjørn Erik Pedersen
c782ebd89c Fix indented SASS imports for Dart Sass
Fixes #11074
2023-06-12 13:47:38 +02:00
hugoreleaser
73779707a2 releaser: Prepare repository for 0.114.0-DEV
[ci skip]
2023-06-05 15:16:33 +00:00
hugoreleaser
085c1b3d61 releaser: Bump versions for release of 0.113.0
[ci skip]
2023-06-05 15:04:51 +00:00
Bjørn Erik Pedersen
6c955cc3df
docs: Regenerate CLI docs 2023-06-05 11:54:57 +02:00
Bjørn Erik Pedersen
5446900dee
commands: Update CLI docs vs server and production
Fixes #11067
2023-06-05 11:53:14 +02:00
Bjørn Erik Pedersen
cf38c73f53
commands: Add TLS/HTTPS support to hugo server
* commands: Add TLS/HTTPS support to hugo server

The "auto cert" handling in this PR is backed by mkcert (see link below).

To get this up and running on a new PC, you can:

```
hugo server trust
hugo server --tlsAuto
```

When `--tlsAuto` (or `--tlsCertFile` and `--tlsKeyFile`) is set and no `--baseURL` is provided as a flag, the server is
started with TLS and `https` as the protocol.

Note that you only need to run `hugo server trust` once per PC.

If you already have the key and the cert file (e.g. by using mkcert directly), you can do:

```
hugo server --tlsCertFile mycert.pem --tlsKeyFile mykey.pem
```

See https://github.com/FiloSottile/mkcert

Fixes #11064
2023-06-05 09:53:53 +02:00
hugoreleaser
536bf71abe releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-06-02 07:19:22 +00:00
hugoreleaser
ea3c95a7b0 releaser: Bump versions for release of 0.112.7
[ci skip]
2023-06-02 07:07:11 +00:00
Bjørn Erik Pedersen
5e5ce00d41 Fix menuItem.URL when pageRef is not set
Fixes #11062
2023-06-02 09:04:00 +02:00
Bjørn Erik Pedersen
a191b38ac8 Don't inject livereload script on hugo -w
Fixes #11061
2023-06-02 09:04:00 +02:00
Oleksandr Redko
382c726e63 markup: Fix typo in function and struct names 2023-06-01 17:59:44 +02:00
Oleksandr Redko
4c46f9400b all: Replace deprecated ioutil with io and os 2023-06-01 17:52:21 +02:00
hugoreleaser
8c7a4e995b releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-06-01 09:15:08 +00:00
hugoreleaser
2ca0fcc448 releaser: Bump versions for release of 0.112.6
[ci skip]
2023-06-01 09:03:29 +00:00
Bjørn Erik Pedersen
a6d774e809
docs: Regenerate CLI docs 2023-06-01 10:51:41 +02:00
Bjørn Erik Pedersen
dfb1895e4b Squashed 'docs/' changes from 1798dc0d5..1d5548d73
1d5548d73 build.cachebusters
3c966904d netlify: Hugo 0.112.5
b32c3a811 Bump min Go version to 1.19 when building from source (#2095)
9dea2d2f9 netlify: Hugo 0.112.4
b3fb4a1bc docs: Regenerate CLI docs
291ecd301 docs: Regen CLI docs
c886958e2 Merge commit 'd3927310d5'

git-subtree-dir: docs
git-subtree-split: 1d5548d7355be39364404a67eee7186d5ea71930
2023-06-01 10:51:24 +02:00
Bjørn Erik Pedersen
9e4072ac23
Merge commit 'dfb1895e4b' 2023-06-01 10:51:24 +02:00
Bjørn Erik Pedersen
0ef2952846 commands: Add --lang to hugo config
Fixes #11057
2023-06-01 10:49:21 +02:00
Bjørn Erik Pedersen
e3ae8f025d Make sure any default mounts show up in "hugo config"
Fixes #11040
2023-06-01 10:49:21 +02:00
Bjørn Erik Pedersen
06faee5beb github: Fix Windows build
Also update some Actions to get rid of some warnings.

Fixes #11052
2023-06-01 09:54:40 +02:00
Joe Mooring
409c6c3fcd deps: Update github.com/tdewolff/minify/v2 v2.12.5 => v2.12.6 2023-05-31 08:08:26 +02:00
Joe Mooring
ff77a927f9 tpl/tplimpl: Use .Language.LanguageCode in built-in templates 2023-05-30 20:10:16 +02:00
Bjørn Erik Pedersen
9cdca1f958 Fail on invalid defaultContentLanguage
Fixes #11044
2023-05-30 15:59:43 +02:00
Bjørn Erik Pedersen
6462eecfbd Avoid panic in invalid language config
Fixes #11046
2023-05-30 15:59:43 +02:00
Bjørn Erik Pedersen
a7d6b1413f Don't panic on empty yaml config params
Fixes #11047
2023-05-30 15:59:43 +02:00
Bjørn Erik Pedersen
3f497d496f Prevent double escaping of image alt-text in Goldmar typographer
Fixes #11045
2023-05-30 15:03:54 +02:00
Bjørn Erik Pedersen
32585696be Fix potential deadlock in ByParam
Fixes #11039
2023-05-29 14:01:07 +02:00
hugoreleaser
d47225ce9e releaser: Bump versions for release of 0.112.5
[ci skip]
2023-05-29 06:43:02 +00:00
Bjørn Erik Pedersen
e3dfc76fa8
Fix it so languageCode on top level config still works
This is common for monolingual sites, and we broke this in Hugo 0.112.4.

Fixes #11037
2023-05-28 18:42:10 +02:00
hugoreleaser
cd59216de4 releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-05-28 13:15:07 +00:00
hugoreleaser
e285153d7f releaser: Bump versions for release of 0.112.4
[ci skip]
2023-05-28 13:04:00 +00:00
Bjørn Erik Pedersen
20ea2e0c65
docs: Regenerate CLI docs 2023-05-28 13:07:47 +02:00
Bjørn Erik Pedersen
51d0a0ab01
commands: Add the common build flags to the config commands
Which allows to see the config with `--theme` applied.

Updates #11018
2023-05-28 13:06:26 +02:00
Bjørn Erik Pedersen
fd099331ec Fix Processed images count regression for multiple languages
Fixes #11002
2023-05-28 12:55:44 +02:00
Bjørn Erik Pedersen
43f1282e73 commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod
Fixes #11018
2023-05-28 12:55:44 +02:00
Bjørn Erik Pedersen
e96cdfe966 Don't create the public folder unless needed
Fixes #11031
2023-05-28 12:55:44 +02:00
Bjørn Erik Pedersen
ffdbce5787
docs: Regen CLI docs 2023-05-27 17:03:14 +02:00
Bjørn Erik Pedersen
a838a27e4c
Merge commit 'd3927310d5' 2023-05-27 17:02:23 +02:00
Bjørn Erik Pedersen
d3927310d5 Squashed 'docs/' changes from 39af43ef1..1798dc0d5
1798dc0d5 Update theme
403fa716e Update CLI documentation (#2092)
aade5a09e Correct media subtype example
53cd9dea6 netlify: Hugo 0.112.3
b78b86cb1 Add source/target warning to resources.Copy (#2091)
50c299729 netlify: Hugo 0.112.2
73197046f Change config.xxx to hugo.xxx throughout the documentation (#2090)
d489d4c6f Add hugo.WorkingDir to docs (#2089)
7487df809 Fix typos (#2088)
6d0572cd6 netlify: Hugo 0.112.1
6838600b2 netlify: Hugo 0.112.0
513e7a80f Merge branch 'tempv0.112.0'
91eb44275 Some more about 0.112.0
bd3b33a27 docs: Regen docshelper
fb3027daf docs: Regen CLI docs
8e7b8e987 Merge commit 'f96384a3b5'
a942ceef4 tpl/tplimpl: Add img loading attribute to figure shortcode  (#10927)
0e0c7b25e tpl/urls: Return empty string when JoinPath has zero args
310ce949a tpl/urls: Add JoinPath template function
ae435ca77 tpl: Add math.Abs
f340139f8 Revert "Update syntax-highlighting.md (#10929)" (#10930)
917a0e24d Update syntax-highlighting.md (#10929)

git-subtree-dir: docs
git-subtree-split: 1798dc0d54ce048dd975863b490cd809ef14268a
2023-05-27 16:59:59 +02:00
Bjørn Erik Pedersen
273d9f69a6 commands: Fail the build when no config file or config dir
Fixes #11019
2023-05-27 16:56:54 +02:00
Bjørn Erik Pedersen
a6257d8a44 langs: Remove the Language.Params deprecation message for now
Closes #11025
2023-05-27 16:56:54 +02:00
Bjørn Erik Pedersen
6c2db0dfb0 Add language.LanguageCode
But keep an alias at Site

Closes #11027
2023-05-27 16:56:54 +02:00
Bjørn Erik Pedersen
8f293a1855 Fix --renderStaticToDisk regression
Fixes #11026
2023-05-27 16:56:54 +02:00
Bjørn Erik Pedersen
901cd970db commands: Re-introduce the -f shorthand for hugo new site
Fixes #11015
2023-05-27 16:56:54 +02:00
Bjørn Erik Pedersen
f86b5f70a6 commands: Move the --format flag to only the commands that support it
Fixes #11022
2023-05-27 16:56:54 +02:00
hugoreleaser
3297b395d8 releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-05-24 14:54:43 +00:00
hugoreleaser
ba6f74e404 releaser: Bump versions for release of 0.112.3
[ci skip]
2023-05-24 14:42:50 +00:00
Bjørn Erik Pedersen
231374a1fa Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set
Fixes #11013
2023-05-24 16:39:31 +02:00
hugoreleaser
5adc837904 releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-05-24 10:57:20 +00:00
hugoreleaser
f89108f2b1 releaser: Bump versions for release of 0.112.2
[ci skip]
2023-05-24 10:45:31 +00:00
Bjørn Erik Pedersen
dd67922013 minifiers: Make sure JS.Version always has a value
Fixes #11012
2023-05-24 12:42:56 +02:00
Bjørn Erik Pedersen
9a235d0afc Fix regression with site.IsServer when not running a server
Fixes #11006
2023-05-24 12:42:56 +02:00
hugoreleaser
99407c39ba releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-05-23 17:38:44 +00:00
hugoreleaser
7c90c19d28 releaser: Bump versions for release of 0.112.1
[ci skip]
2023-05-23 17:26:16 +00:00
Bjørn Erik Pedersen
ed906a86e2 Fix regression when config for OutputFormat.BaseName is an empty string
Fixes #11000
2023-05-23 19:23:39 +02:00
hugoreleaser
d666edad71 releaser: Prepare repository for 0.113.0-DEV
[ci skip]
2023-05-23 08:25:56 +00:00
hugoreleaser
0a95d6704a releaser: Bump versions for release of 0.112.0
[ci skip]
2023-05-23 08:14:20 +00:00
Bjørn Erik Pedersen
70b2aaf873
circleci: Add github.com to known hosts 2023-05-23 10:12:16 +02:00
Bjørn Erik Pedersen
f014921159
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.29.0"
This reverts commit baa5569042.

See #10993
2023-05-23 09:24:58 +02:00
Bjørn Erik Pedersen
bd38e35f97
Revert "postcss: Improve validation of option 'config'"
This reverts commit 9a0370e8eb.

Closes #10990
2023-05-22 20:31:59 +02:00
Bjørn Erik Pedersen
85b13c105a Add --format to hugo config
Now default to TOML.
2023-05-22 20:26:02 +02:00
Bjørn Erik Pedersen
b6e6438f7f docs: Regen docshelper 2023-05-22 18:54:34 +02:00
Bjørn Erik Pedersen
943ff7f7ce commands: Add missing gen docshelper command
Updates #10953
2023-05-22 18:54:34 +02:00
Bjørn Erik Pedersen
288be1976d Fix "unknown command" message when no suggestion
Updates #10953
2023-05-22 18:54:34 +02:00
Andreas Deininger
9a0370e8eb
postcss: Improve validation of option 'config' 2023-05-22 18:14:10 +02:00
Bjørn Erik Pedersen
10d0fcc01f
docs: Regen CLI docs 2023-05-22 16:48:58 +02:00
Bjørn Erik Pedersen
b95e156940
Merge commit 'f96384a3b5' 2023-05-22 16:47:07 +02:00
Bjørn Erik Pedersen
f96384a3b5 Squashed 'docs/' changes from 6e32d0591..39af43ef1
39af43ef1 Update postprocess.md
3ec192d08 Update multilingual.md
7fc7bf862 Add a note about some changes in 0.112.0
742510ae8 Fix ordinal abbrev example
fe557031a Correct spelling for 'GitHub' and 'GitLab' (#2082)
84a059b9a Fix typo in hosting-on-azure.md (#2080)
3383786fe Add i18n to list of directories affected by ignoreFiles
5bfb95234 Update 404.md (#2076)
87545a4fd Update hosting-on-cloudflare-pages.md (#2078)
aa5952c28 Add default module mount to example (#2075)
ced5292c8 Align permalinks examples (#2073)
77b5009fd Fix typo
c79319a6a Clarify description of baseURL
e93a9807b Fix typo in frontmatter description (#2071)
05fe9163a Remove erroneous statement
aa59ef383 docs: Remove note about hugo server not using 404 (#2068)
4a387a6b8 Clarify findRESubmatch (#2065)
47a9181b5 Clarify findRE, replaceRE, and findRESubmatch (#2064)
e5eedbb5e Update theme
5d392c3d4 Clarify pageRef menu property (#2059)
a557b0ebf Fix typos on Configure Hugo page (#2058)
17ef283e6 Clarify module.replacements wording (#2052)
5db4aa421 Fixing broken links (#2057)
9afa0c2fa Fix broken links (#2055)
49b981b1f Correct repo URL for migration tool (contentful.com) (#2056)
969c24c16 Remove duplicate content
0b91e7676 Revert "Delete duplicate content"
3229e79f2 Delete duplicate content
ec4eddb98 Fix typo
6509159d5 Describe snap package strict confinement (#2050)
1589bcdb7 Remove hugo.Generator admonition (#2048)
7e553d11b Add example
48bec0335 Replace blockquotes with admonitions where appropriate (#2043)
98226fe61 Remove orphaned param fron admonition calls (#2042)
2a37a1d21 Clarify cast functions (#2041)
03fd1d404 Fix typo
1898013ef Fix typos
944e27430 Replace output shortcode calls
0c66fb055 Add example of shortcode calls within sample code
f25a79c69 Replace tip and warning shortcode calls
3afac22fc Refactor code shortcode
ad65d2931 Clarify seq function
59f8a1f48 Clarify title function
47535dc87 Cleanup hasPrefix hasSuffix
7bee3e4c1 Cleanup action delimiters
cc96070f0 Correct functions archetype
ffe5d39b9 Remove duplicate shortcodes
075c9f3fe Remove old todos
bc3ec033c Front matter cleanup (#2039)
928b94505 Add code fence types (#2038)
856fa293c Document .File.Filename (#2037)
0988c4a42 Update output-formats.md (#2036)
289da5658 Change findRe to findRE
1e50f0583 Update theme
f90fb1bf5 Improve type formatting (#2032)
7785fa7d9 Use code-toggle shortcode where appropriate
f11cabf37 Add space after and before action delimiters
ac333c795 Replace erroneous use of nocopy shortcode param
064896c06 Use bool param when calling code-toggle
fb33bf59b Update code-toggle shortcode
6ddeab4f8 Add missing go-html-template code fence type (#2030)
1bba4cefb Fix links (#2029)
77f4d6c32 Link destination cleanup (#2028)
fc0ecc027 Improve breadcrumb example (#2026)
6148be2de Update the breadcrumb navigation example (#2025)
6ebb37b1b Clarify sort function (#2024)
31269bad9 Add Winget installation method (#1988)
d6c5f940e Resource methods: add signatures, minor improvements (#2017)
d2e594cbc Modify inner variable shortcode-template explanation (#1985)
a54927a7f Update GitHub Pages starter workflow (#2023)
2964c2d44 Remove orphaned static files (#2022)
97e5567cc Complete documentation on '.Scratch' and '.Store' (#2016)
fa7b2e299 Fix typo
bdce77c57 Remove literal from example menu template
c0f23b216 Correct and improve menu documentation (#2010)
464368fd9 Document .Page.Store (#2011)
a3d7c4a3a Improve urls.Parse function (#2012)
d2cec3776 Clarify postcss config option (#2013)
eb3003fef Fixed typo (#2007)
90c82d7ea Clarify mermaid markdown example (#2004)
1b11dcd5c docs(Diagrams): Update mermaid import mechanism (#1967)
4aceb6855 Fingerprinting, asset management: minor improvements (#2003)
bcbc519bb resources.GetRemote: minor improvement (#2002)
d54185bef Clarify markdownify behavior (#1999)
afb582a80 Clarify usage of slug in front matter (#1998)
f71985315 Update hasSuffix.md
29ad622a3 netlify: Hugo 0.111.3
adf223ecc Merge branch 'tempv0.111.3'
06858c646 docs: Improve examples of variadic math functions
8b656994e tpl/math: Allow multi numbers in add, sub, mul, div, min and max
2a38c4046 tpl: Add hasSuffix alias
4e0b98d54 switch transfers to workers
11651ac0f customize parallel transfer count
142f5da81 Update GitHub hosting instructions (#1991)
ad7901d2f netlify: Hugo 0.111.2
0651a76e0 add headings to distinguish render hook context params
d96d75be4 netlify: Hugo 0.111.1
226cb9e3a Add a paragraph about the new page template function
4c0157a49 Add .Fragments docs
6c78c0679 netlify: Bump to Hugo 0.111.0
7b11c24cf Merge branch 'feat/related-fragments'
615d18ef8 Add Related fragments config
a36449b0c cods: Regen docs helper
0272fa45f Merge commit '336622d5e7'
c5a962b93 related: Add config option cardinalityThreshold
f91677377  docs: Another fix related docs example
17aa939ea docs: Fix related docs example
12c449150 Merge commit 'cf591b7c0c'
cb998b3d6 Add page fragments support to Related

git-subtree-dir: docs
git-subtree-split: 39af43ef11c23b8eaea7e17b59ff065a169305ac
2023-05-22 16:43:12 +02:00
Bjørn Erik Pedersen
4cac5f5e30 Avoid writing to hugo_stats.json when there are no changes
Fixes #10985
2023-05-22 16:27:19 +02:00
Bjørn Erik Pedersen
2c3d4dfb74 Add cache busting config to support Tailwind 3
Fixes #10974
2023-05-22 14:14:35 +02:00
dependabot[bot]
1292d5a26a build(deps): bump github.com/tdewolff/parse/v2 from 2.6.5 to 2.6.6
Bumps [github.com/tdewolff/parse/v2](https://github.com/tdewolff/parse) from 2.6.5 to 2.6.6.
- [Release notes](https://github.com/tdewolff/parse/releases)
- [Commits](https://github.com/tdewolff/parse/compare/v2.6.5...v2.6.6)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/parse/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 13:58:40 +02:00
dependabot[bot]
baa5569042 build(deps): bump gocloud.dev from 0.24.0 to 0.29.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.24.0 to 0.29.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.24.0...v0.29.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 13:58:15 +02:00
dependabot[bot]
a5413c1f89 build(deps): bump github.com/gobuffalo/flect from 0.3.0 to 1.0.2
Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.3.0 to 1.0.2.
- [Release notes](https://github.com/gobuffalo/flect/releases)
- [Commits](https://github.com/gobuffalo/flect/compare/v0.3.0...v1.0.2)

---
updated-dependencies:
- dependency-name: github.com/gobuffalo/flect
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 12:28:49 +02:00
dependabot[bot]
9cea58a8a6 build(deps): bump golang.org/x/image from 0.5.0 to 0.7.0
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.5.0 to 0.7.0.
- [Commits](https://github.com/golang/image/compare/v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 12:28:08 +02:00
dependabot[bot]
1a5dce4cc5 build(deps): bump github.com/tdewolff/minify/v2 from 2.12.4 to 2.12.5
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.12.4 to 2.12.5.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.12.4...v2.12.5)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 12:27:50 +02:00
Bjørn Erik Pedersen
6ca8a40f25 commands: Make all list commands list what 'all' did before
Also, always include the CSV header.

Updates #10953
2023-05-22 12:27:19 +02:00
InLaw
2db7ec622f
tpl/tplimpl: Add img loading attribute to figure shortcode (#10927) 2023-05-21 12:28:45 -07:00
Bjørn Erik Pedersen
e6dc8053bf
commands: Fix build logic when listing expired/future draft content
Fixes #10972
2023-05-21 10:16:25 +02:00
Bjørn Erik Pedersen
2637b4ef4d Allow whitelisting mediaTypes used in resources.GetRemote
Fixes #10286
2023-05-20 20:16:45 +02:00
Bjørn Erik Pedersen
7c7baa6183 Add hugo.WorkingDir
Fixes #10969
2023-05-20 17:45:56 +02:00
Bjørn Erik Pedersen
4f085e80da Make language merging of markup etc. config without values in the root
Updates #10953
2023-05-20 12:40:32 +02:00
Joe Mooring
150d190ff0 tpl/urls: Return empty string when JoinPath has zero args 2023-05-20 11:14:18 +02:00
dependabot[bot]
065ae003a5 build(deps): bump github.com/dustin/go-humanize from 1.0.0 to 1.0.1
Bumps [github.com/dustin/go-humanize](https://github.com/dustin/go-humanize) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/dustin/go-humanize/releases)
- [Commits](https://github.com/dustin/go-humanize/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/dustin/go-humanize
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 20:04:32 +02:00
dependabot[bot]
1a7d57c0b6 build(deps): bump google.golang.org/api from 0.76.0 to 0.123.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.76.0 to 0.123.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.76.0...v0.123.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 20:03:46 +02:00
dependabot[bot]
bba54e6949 build(deps): bump golang.org/x/tools from 0.4.0 to 0.9.1
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.4.0 to 0.9.1.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.4.0...v0.9.1)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 18:00:58 +02:00
dependabot[bot]
737054311a build(deps): bump github.com/cli/safeexec from 1.0.0 to 1.0.1
Bumps [github.com/cli/safeexec](https://github.com/cli/safeexec) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/cli/safeexec/releases)
- [Commits](https://github.com/cli/safeexec/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/cli/safeexec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 18:00:42 +02:00
dependabot[bot]
f6269ee928 build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.117.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.110.0 to 0.117.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.110.0...v0.117.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 18:00:28 +02:00
Bjørn Erik Pedersen
715d484045 deps: Update github.com/evanw/esbuild v0.17.0 => v0.17.19 2023-05-19 18:00:04 +02:00
Bjørn Erik Pedersen
0a51dfac9e commands: Fix data race
By wrapping all use of the shared config in a lock.

Updates #10953
2023-05-19 16:34:22 +02:00
Bjørn Erik Pedersen
c371171ab8 deps: Update github.com/alecthomas/chroma/v2 v2.7.0 2023-05-19 12:35:05 +02:00
Bjørn Erik Pedersen
d6197a41fa Re-add --printUnusedTemplates and --printPathWarnings
And now with tests.

Updates #10953
2023-05-19 11:37:05 +02:00
Bjørn Erik Pedersen
e4e0313c80
tpl/urls: Fix build broken by a merge 2023-05-19 10:57:03 +02:00
Joe Mooring
5b3e165bad tpl/urls: Add JoinPath template function
See https://pkg.go.dev/net/url#JoinPath

Closes #9694
2023-05-19 10:31:17 +02:00
Bjørn Erik Pedersen
03cb38e6c6
Allow legacy taxonomyTerm in disableKinds
Updates #10953
2023-05-19 09:17:55 +02:00
Andreas Deininger
ad4bc969da Fix warn message about custom params on the language top level 2023-05-19 08:43:02 +02:00
cui fliter
4003c7903f
Fix some spelling mistakes 2023-05-19 08:40:08 +02:00
Oleksandr Redko
610cedaa61 all: Fix comments for exported functions and packages 2023-05-18 21:25:27 +02:00
Bjørn Erik Pedersen
24e7d0c174 deps: Update github.com/bep/golibsass v1.1.0 => v1.1.1
Fixes #10629
Fixes #10491
2023-05-18 21:24:33 +02:00
Benjamin Elder
008170c8a9
Make GOMAXPROCS to be CPU limit aware
Fixes #10950
2023-05-18 19:32:49 +02:00
Bjørn Erik Pedersen
7c647bcaeb Allow empty params.mainSections
Updates #10953
2023-05-18 17:55:29 +02:00
Oleksandr Redko
95818e27dc modules: Fix format flag in error 2023-05-18 16:26:20 +02:00
Bjørn Erik Pedersen
3f00f47535 commands: Load config before creating the filesystem
To allow publishDir to be set in config file.
2023-05-18 15:38:25 +02:00
Bjørn Erik Pedersen
834b3d7e41
Fix some recently introduced error handling issues
Updates #10953
2023-05-18 12:47:23 +02:00
Joe Mooring
1155bbca9d tpl/lang: document delimiter option for FormatNumberCustom
Closes gohugoio/hugoDocs#1760
2023-05-17 23:35:43 +02:00
Bjørn Erik Pedersen
86b2a27438
Re-add site.LanguagePrefix
Updates #10947
2023-05-17 23:27:40 +02:00
Bjørn Erik Pedersen
35955f50e6
github: Trim the test flow a little
We now have much improved end to end tests, so cut the building of the docs site to save some time of the PR builds.
2023-05-17 22:14:15 +02:00
Bjørn Erik Pedersen
8a69ccbb00 commands: Improve the common build flag handling
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
7ce033a89d Support, but warn, about top level language custom params
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
05542130ba Handle transient errors in config loading etc.
As in: Get the Kubernetes site to build with the new Hugo version.

Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5251f015bf Re-establish all the server flags
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
5d857165fe Deprecate site.Language.Params and some other fixes
Updates #10947
2023-05-17 22:13:29 +02:00
Bjørn Erik Pedersen
0106cf1a6d
Revert "Make GOMAXPROCS CPU limit aware"
I shouldn't have merged this without running the tests.

This libray logs to stderr on init, which is a no go for us.

Re. test failure:

```
[stderr]
2023/05/17 18:21:04 maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
```
This reverts commit 59050f97f6.
2023-05-17 21:01:52 +02:00
Benjamin Elder
59050f97f6
Make GOMAXPROCS CPU limit aware
Fixes #10950
2023-05-17 20:17:22 +02:00
Bjørn Erik Pedersen
faa6998f26
Add Sections to Site interface
See https://github.com/gohugoio/hugo/issues/10947#issuecomment-1550012671

Updates #10947
2023-05-16 18:53:34 +02:00
Oleksandr Redko
3d90871e9e helpers: simplify path tests with T.TempDir 2023-05-16 18:35:19 +02:00
Oleksandr Redko
bda082c98c
tpl: Add math.Abs
Fixes #10941.
2023-05-16 18:32:07 +02:00
Bjørn Erik Pedersen
241b21b0fd Create a struct with all of Hugo's config options
Primary motivation is documentation, but it will also hopefully simplify the code.

Also,

* Lower case the default output format names; this is in line with the custom ones (map keys) and how
it's treated all the places. This avoids doing `stringds.EqualFold` everywhere.

Closes #10896
Closes #10620
2023-05-16 18:01:29 +02:00
Bjørn Erik Pedersen
6aededf6b4 Improve date parsing performance for the common case
```
name                    old time/op    new time/op    delta
Baseline/skiprender-10    24.5ms ±10%    22.3ms ± 4%   -8.93%  (p=0.029 n=4+4)

name                    old alloc/op   new alloc/op   delta
Baseline/skiprender-10    30.0MB ± 0%    26.2MB ± 0%  -12.74%  (p=0.029 n=4+4)

name                    old allocs/op  new allocs/op  delta
Baseline/skiprender-10      373k ± 0%      279k ± 0%  -25.07%  (p=0.029 n=4+4)
```

Fixes #10942
2023-05-15 11:25:24 +02:00
Bjørn Erik Pedersen
0988b76a78
Add a counter helper 2023-05-15 09:23:26 +02:00
Bjørn Erik Pedersen
e0e19a934f
Expand the baseline benchmark a little 2023-05-15 08:39:52 +02:00
Joe Mooring
bcd7ac7704
Revert "Update syntax-highlighting.md (#10929)" (#10930)
This reverts commit a4fb8dc6bc.
2023-05-06 09:36:29 -07:00
Kirill Bobyrev
a4fb8dc6bc
Update syntax-highlighting.md (#10929) 2023-05-06 07:00:37 -07:00
Bjørn Erik Pedersen
4f341fa1af
Update README.md 2023-05-04 23:56:57 +02:00
Joe Mooring
5c7b79cf7f tpl/strings: Clarify findRESubmatch description 2023-04-27 22:02:41 +02:00
Joe Mooring
0cb6ca5906 langs/i18n: Fallback to defaultContentLanguage instead of English
Co-authored-by: 641bill <wo23636@126.com>

Fixes #9216
2023-04-24 21:20:09 +02:00
Bjørn Erik Pedersen
f1062519ae
tpl/debug: Add VisualizeSpaces 2023-04-20 11:27:55 +02:00
Bjørn Erik Pedersen
46a3cf6186
Update README.md 2023-04-18 08:35:37 +02:00
Bjørn Erik Pedersen
9906c1ae52
Prevent the global error collector to panic when sending on closed channel 2023-04-13 11:44:22 +02:00
Bjørn Erik Pedersen
5596dc24a0 markup/goldmark: Add config options for the typographer extension
Note that the config per language part of this will be handled in #10602.

Updates #9772
2023-04-12 14:41:32 +02:00
Kiril Isakov
d01731d53c
readme: Fix build command 2023-04-09 11:59:46 +02:00
Bjørn Erik Pedersen
f1e8f010f5
Update README.md 2023-03-30 10:19:35 +02:00
Bjørn Erik Pedersen
5748133d50 Add test for ToC vs include
See #10866
2023-03-29 17:49:01 +02:00
Andreas Deininger
05c095a0e6 resources.functions: improve validation 2023-03-20 14:53:57 +01:00
Oleksandr Redko
891b2918d2 resources: Fix typos in error message and variables 2023-03-20 14:52:59 +01:00
Bjørn Erik Pedersen
b0b1b76dc9 markup/goldmark: Fail on invalid Markdown attributes 2023-03-15 08:54:34 +01:00
Bjørn Erik Pedersen
0fbab7cbc5
commands: Fix data race in test
Note that this is a test fix only.
2023-03-14 12:18:42 +01:00
septs
f5eddf89bf
tpl/math: Return error if less than 2 input numbers
Fixes #10827
2023-03-14 09:28:38 +01:00
hugoreleaser
0e8ab20a84 releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-12 11:51:49 +00:00
hugoreleaser
5d4eb5154e releaser: Bump versions for release of 0.111.3
[ci skip]
2023-03-12 11:40:50 +00:00
Niklas Fasching
1c841ec914 deps: Update go-org to v1.6.6
among other things, fixes a race condition in html writer and bug preventing
explicit line breaks immediately following emphasis
2023-03-12 12:38:12 +01:00
Bjørn Erik Pedersen
e7148f335f Fix "unknown shortcode token" when calling shortcode within fenced code block
Fixes #10819
2023-03-12 11:39:38 +01:00
Andreas Deininger
d55af2abf0 Run gofmt -s on source files 2023-03-12 10:32:29 +01:00
Joe Mooring
b6f44aaf1a docs: Improve examples of variadic math functions 2023-03-12 10:32:01 +01:00
septs
84201e8d5d
tpl/math: Allow multi numbers in add, sub, mul, div, min and max 2023-03-11 11:21:08 +01:00
Andreas Deininger
04b9811643
readme: Update dependency list 2023-03-11 10:15:16 +01:00
Andreas Deininger
9818724b5b
Improve error message for unclosed shortcode with inner content 2023-03-10 18:41:17 +01:00
Bjørn Erik Pedersen
34a86e13f6 Don't fail when calling Paginate with an empty pages.PagesGroup
Fixes #10802
2023-03-10 16:34:17 +01:00
Oleksandr Redko
0f01bd4637 server: Replace golang.org/x/net/context with context 2023-03-08 10:19:25 +01:00
Jonathan Fisher
d171d1543d tpl: Add hasSuffix alias
strings.HasPrefix already has an alias of hasPrefix
but strings.HasSuffix has no such alias.
This PR adds a hasSuffix alias to the tpl function with corresponding
function documentation.
It also adds a Minor update to the hasPrefix function documentation
re: keywords and relatedfuncs.

 Completes https://github.com/gohugoio/hugo/issues/10474
2023-03-08 10:18:34 +01:00
Oleksandr Redko
02ab77da3e watcher: use time.NewTicker to prevent leaks
Replace time.Tick with time.NewTicker.
2023-03-08 10:16:34 +01:00
davidejones
873be9f90a ensure we default to 10 correctly 2023-03-07 15:38:26 +01:00
davidejones
bebb2b8d0a switch transfers to workers 2023-03-07 15:38:26 +01:00
davidejones
e6f029bdee customize parallel transfer count 2023-03-07 15:38:26 +01:00
johannesengl
bdbfacb868 metadecoders: Add support for native org dates in frontmatter
PR #7433 added support for Org timestamps for the DATE header. This PR widens the support with additional front matter headers LASTMOD, PUBLISHDATE and EXPIRYDATE.

Fixes #8536
2023-03-06 20:37:31 +01:00
hugoreleaser
32ea40aa82 releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-05 12:43:18 +00:00
hugoreleaser
4164f8fef9 releaser: Bump versions for release of 0.111.2
[ci skip]
2023-03-05 12:32:20 +00:00
Bjørn Erik Pedersen
b83050cb40 Fix .Fragments when called cross sites on uninitialized output format
Fixes #10794
2023-03-05 12:51:57 +01:00
Bjørn Erik Pedersen
df5608f8a0 Allow page.TableOfContents on self in shortcode
Fixes #10791
2023-03-05 12:51:57 +01:00
Bjørn Erik Pedersen
f56ce01ae1
tpl/partial: Consolidate GoDoc 2023-03-04 22:04:01 +01:00
Bjørn Erik Pedersen
3bbeb5688c Fix "context canceled" with partial
Make sure the context used for timeouts isn't created based on the incoming
context, as we have cases where this can cancel the context prematurely.

Fixes #10789
2023-03-04 21:29:05 +01:00
Oleksandr Redko
184a67ac47 cache: Fix --gc failure on Windows
Fixes "Error: failed to prune cache" on Windows and removes
work around from ec1c97e7e9.

Follows #10781.
2023-03-04 18:47:43 +01:00
Bjørn Erik Pedersen
6c798eba60 Page context handling in i18n
This is a workaround. We need to improve on this, but not today.

Fixes #10782
2023-03-04 17:19:14 +01:00
Bjørn Erik Pedersen
ec1c97e7e9 Work around --gc failure on Windows <= 10
This applies two related fixes/improvements:

* The --gc now keeps empty `_resources/_gen/images` etc folders, even if empty. This should have been the behaviour
from the start.
* Also, if removal of an empty dir on Windows fails with the "used by another process" error, just ignore it for now.

Fixes #10781
2023-03-04 13:40:55 +01:00
Bjørn Erik Pedersen
f10009e7f1
Update to Go 1.20.1
Fixes #10785
2023-03-04 10:36:59 +01:00
Joe Mooring
a950950f1b snap: Fix dart-sass-embedded installation
Closes #10783
2023-03-04 10:15:03 +01:00
Oleksandr Redko
36ce3a4a9d Correct typos in Go comments 2023-03-02 16:32:32 +01:00
hugoreleaser
17e60b77e1 releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-02 10:19:25 +00:00
hugoreleaser
39a4a3cf67 releaser: Bump versions for release of 0.111.1
[ci skip]
2023-03-02 10:08:26 +00:00
Bjørn Erik Pedersen
52f339dada
Merge branch 'release-0.111.0' 2023-03-02 11:05:24 +01:00
Bjørn Erik Pedersen
eef23a7f27 Fix "page" not defined
Fixes #10774
2023-03-02 10:39:44 +01:00
hugoreleaser
18cf75805c releaser: Prepare repository for 0.112.0-DEV
[ci skip]
2023-03-01 21:08:27 +00:00
hugoreleaser
3fa8bb8318 releaser: Bump versions for release of 0.111.0
[ci skip]
2023-03-01 20:57:44 +00:00
Bjørn Erik Pedersen
db9f74d24d
Revert "build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)"
This reverts commit c3a59a7d5a.

See #10770
2023-03-01 21:55:47 +01:00
Bjørn Erik Pedersen
60e6fa798f
build: Bump build images
To fix changed Shuffle behaviour on Go 1.20.
2023-03-01 21:32:12 +01:00
Bjørn Erik Pedersen
7e51ba03ca
build: Update Linux ARM build image 2023-03-01 18:55:22 +01:00
Joe Mooring
66f94b4945 tpl/tplimpl: Remove the Google News internal template
This was deprecated, with a warning message, on 21 Nov 2021.

Reference #9190
2023-03-01 18:11:44 +01:00
Khayyam Saleem
c0d15a2897
strings: fix Truncate behavior for formatted html
Before this fix, strings.Truncate would erroneously re-include
attributes from the opening tag in the closing tag when closing
formatted html, due to a bug in how tagnames were extracted from the
regex capture group for html tags used in `truncate.go`. This change
ensures that only the tagname is retained and all attributes are discarded
when storing the tags for closing them later.

Fixes #10399
2023-03-01 17:59:50 +01:00
Bjørn Erik Pedersen
2a61910e82
tpl/strings: Adjust benchmark 2023-03-01 17:59:02 +01:00
Bjørn Erik Pedersen
079d1b6540
tpl/strings: Add BenchmarkTruncate 2023-03-01 17:51:09 +01:00
Bjørn Erik Pedersen
a56b9071db
cods: Regen docs helper 2023-03-01 16:35:23 +01:00
Bjørn Erik Pedersen
5c317c55e7 Move the Related doc counter to prevent a race
Closes #10768
2023-03-01 16:28:43 +01:00
Bjørn Erik Pedersen
a669467d98 Misc ioutil deprecation adjustments
To make the tests pass.

* Replace io => os.ReadFile in magefile.go
* Adjust failing image test vs fs.DirEntry
* Adjust poller test

See #10732
2023-03-01 16:28:43 +01:00
Oleksandr Redko
d453c12742 Replace deprecated ioutil with io and os
https://pkg.go.dev/io/ioutil is deprecated since Go 1.16.
2023-03-01 16:28:43 +01:00
Bjørn Erik Pedersen
336622d5e7 Squashed 'docs/' changes from 36dd5483f..6e32d0591
6e32d0591 Update quick-start.md (#1984)
eddd25ff4 Mermaid: reflect latest docs specifications
b2a23b6f5 Mermaid: switch to ESM import
43d83c131 Update index.md

git-subtree-dir: docs
git-subtree-split: 6e32d05910fb9d623ef26b647def10ea0e00cd15
2023-03-01 11:56:07 +01:00
Bjørn Erik Pedersen
97b010f521
Merge commit '336622d5e7' 2023-03-01 11:56:07 +01:00
dependabot[bot]
4d36b99a4e build(deps): bump github.com/tdewolff/parse/v2 from 2.6.4 to 2.6.5
Bumps [github.com/tdewolff/parse/v2](https://github.com/tdewolff/parse) from 2.6.4 to 2.6.5.
- [Release notes](https://github.com/tdewolff/parse/releases)
- [Commits](https://github.com/tdewolff/parse/compare/v2.6.4...v2.6.5)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/parse/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 09:28:29 +01:00
dependabot[bot]
807237bc0e build(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.16 to 0.0.17.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.16...v0.0.17)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 11:56:40 +01:00
dependabot[bot]
79b03b3f79 build(deps): bump golang.org/x/image
Bumps [golang.org/x/image](https://github.com/golang/image) from 0.0.0-20211028202545-6944b10bf410 to 0.5.0.
- [Release notes](https://github.com/golang/image/releases)
- [Commits](https://github.com/golang/image/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 11:56:09 +01:00
Oleksandr Redko
e31441031d Remove unused temp directory 2023-02-27 09:21:16 +01:00
WaltCuller
39cc3a2a7e
exif: Return the proper exposure time value in some special cases
Return value in float64 if exposure time is int or greater than 1, otherwise return in fraction.

Fixes #10738
2023-02-26 11:19:49 +01:00
Bjørn Erik Pedersen
ce524d0b5e Add a page template func
Fixes #9339
2023-02-25 19:53:18 +01:00
Joe Mooring
2662faf61f dartsass: Import CSS without extension at compile time
Applicable to Dart Sass only:

- Sass imports with the .css extension indicate a plain CSS @import.
- Sass imports without the .css extension are imported at compile time.

Fixes #10592
2023-02-24 15:19:21 +01:00
Bjørn Erik Pedersen
271318ad78 Split parse and render for Goldmark
This also speeds up situations where you only need the fragments/toc and not the rendered content, e.g. Related
with fragments type indexing:

```bash

name            old time/op    new time/op    delta
RelatedSite-10    12.3ms ± 2%    10.7ms ± 1%  -12.95%  (p=0.029 n=4+4)

name            old alloc/op   new alloc/op   delta
RelatedSite-10    38.6MB ± 0%    38.2MB ± 0%   -1.08%  (p=0.029 n=4+4)

name            old allocs/op  new allocs/op  delta
RelatedSite-10      117k ± 0%      115k ± 0%   -1.36%  (p=0.029 n=4+4)
```

Fixes #10750
2023-02-24 10:40:06 +01:00
Bjørn Erik Pedersen
e442a63bb7 related: Add config option cardinalityThreshold
Fixes #10744
2023-02-23 17:06:22 +01:00
Bjørn Erik Pedersen
d5601e8391
docs: Another fix related docs example 2023-02-23 11:09:55 +01:00
Bjørn Erik Pedersen
cedd04db31
docs: Fix related docs example 2023-02-23 10:54:30 +01:00
dependabot[bot]
4bf91b9759 build(deps): bump golang.org/x/net from 0.4.0 to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 09:58:21 +01:00
Bjørn Erik Pedersen
ae48507d66 Fix shortcode error when closing without .Inner
Fixes #10672
2023-02-23 09:36:14 +01:00
Bjørn Erik Pedersen
7d78a498e1 Throw an error when shortcode is expected to be closed
Fixes #10675
2023-02-23 09:36:14 +01:00
Bjørn Erik Pedersen
0dbeac80cd Add some shortcode testcases
Closes #10671
2023-02-23 09:36:14 +01:00
Bjørn Erik Pedersen
b99d073caf
sass: Remove some unused leftover code 2023-02-23 07:57:53 +01:00
Joe Mooring
e965cb679c resources/sass: Remove debug statements
Closes #10470
2023-02-23 07:53:46 +01:00
Bjørn Erik Pedersen
cf591b7c0c Squashed 'docs/' changes from 1214f6ffb..36dd5483f
36dd5483f Clarify placement of 404 template
6f0a5f3f0 Update urls.Parse.md
c8070e578 Remove reference to Internet Explorer conditional comments (#1975)
3e3458f09 Describe default source map behavior for js.build (#1974)
08c9ed09a Simplify ordinal abbreviation example... (#1970)
b5aa8d598 docs(markdownify): mention a context limitation (#1968)
596af47f5 Fixing typo in configuration.md doc (#1966)
c47cadfcb Fix `hardWraps` config spelling (#1964)
5739a174e Add detail to tabWidth highlighting option
73a4bcd1f doc: Add hugo-lyra search engine (#1959)
6cc9ebdfd Update uniq function example (#1963)
686a65cf6 Update uniq.md
096f794d0 Update uniq.md
914ca0c38 remove `version` from SVG example (#1957)
58347d41f Update theme
7c806371f Fix 404 error for CloudCannon community learn docs (#1955)
58e42b03d Update theme
fd0385ee2 Update theme
513b7a43a Update findRe.md
4d39137ef Update configuration.md
b1c3b58a7 Update configuration.md
f827cce8d Update configuration.md
3d72ed8fb netlify: Hugo 0.110.0
e6f969c87 Merge branch 'feat/config-rename'
4c0b5a0b5 dos: Regen CLI docs
05d9db705 docs: Regen docshelper
f73bdb6e5 Merge commit 'ef6f101e75'
e83141f88 Format config
4cadf795e Rename config.toml -> hugo.toml
c8aa8617f Move config/_default/config.toml -> config.toml
2943c031a Add fill HTTP Response info into .Data in resources.GetRemote

git-subtree-dir: docs
git-subtree-split: 36dd5483fb8efb6db4488bbaca5f6ac855f8ffea
2023-02-23 07:52:04 +01:00
Bjørn Erik Pedersen
7e539cb398
Merge commit 'cf591b7c0c' 2023-02-23 07:52:04 +01:00
Bjørn Erik Pedersen
586fea0de6
page: Move the cache double check right after the lock 2023-02-22 21:24:41 +01:00
Bjørn Erik Pedersen
fa2d7adf10 page: Add some concurrency to the building of the related page index
But only in the case where we know that we will need to access the Page fragments/tableofcontents.

In normal situations this will spread naturally across the CPU cores, but not in the situation where
`site.RegularPages.Related` gets called as part of e.g. the single template.

```bash
name            old time/op    new time/op    delta
RelatedSite-10    18.0ms ± 2%    11.9ms ± 1%  -34.17%  (p=0.029 n=4+4)

name            old alloc/op   new alloc/op   delta
RelatedSite-10    38.6MB ± 0%    38.6MB ± 0%     ~     (p=0.114 n=4+4)

name            old allocs/op  new allocs/op  delta
RelatedSite-10      117k ± 0%      117k ± 0%   +0.23%  (p=0.029 n=4+4)
```

See #10711
2023-02-22 20:37:41 +01:00
Bjørn Erik Pedersen
4346987faf
related: Adjust benchmark 2023-02-22 19:17:22 +01:00
Aaron Hooper
2dad13c0e4 create: Fix typo in error message 2023-02-22 14:14:49 +01:00
Bjørn Erik Pedersen
ecf3cd514f tocss: Simplify the hugo:vars type handling
Instead of maintaing a list of all CSS units and functions this commit:

* Uses 3 regexps to detect typed CSS values (e.g. `24px`) + properly handle numeric Go types.
* These regexps may have some false positives -- e.g. strings that needs to be quoted.
* For that rare case, you can mark the string with e.g. `"32xxx" | css.Quoted`
* For the opposite case:  `"32" | css.Unquoted`

Updates #10632
2023-02-22 13:26:10 +01:00
AcClassic
a1a9c08b5f resource_transformers/tocss: Fixed hugo:vars casting
Variables passed via the hugo:vars function where passed as type string.
This caused problems when using the variables in sass functions because
these expect a specific type. Now we check if the passed variables have
to be quoted and therefore are of type string or if they should not be
quoted and let the type interpretation up to the sass compiler.

Fixes #10632
2023-02-22 13:26:10 +01:00
Bjørn Erik Pedersen
6abd15e781 Adjust tests for GO 1.20
Updates #10691
2023-02-22 11:26:52 +01:00
Bjørn Erik Pedersen
094135ff96 tpl/internal: Sync Go template src to Go 1.20
Updates #10691
2023-02-22 11:26:52 +01:00
Bjørn Erik Pedersen
4801e2e8ee build: Update to Go 1.20
Updates #10691
2023-02-22 11:26:52 +01:00
Bjørn Erik Pedersen
90da7664bf Add page fragments support to Related
The main topic of this commit is that you can now index fragments (content heading identifiers) when calling `.Related`.

You can do this by:

* Configure one or more indices with type `fragments`
* The name of those index configurations maps to an (optional) front matter slice with fragment references. This allows you to link
page<->fragment and page<->page.
* This also will index all the fragments (heading identifiers) of the pages.

It's also possible to use type `fragments` indices in shortcode, e.g.:

```
{{ $related := site.RegularPages.Related .Page }}
```

But, and this is important, you need to include the shortcode using the `{{<` delimiter. Not doing so will create infinite loops and timeouts.

This commit also:

* Adds two new methods to Page: Fragments (can also be used to build ToC) and HeadingsFiltered (this is only used in Related Content with
index type `fragments` and `enableFilter` set to true.
* Consolidates all `.Related*` methods into one, which takes either a `Page` or an options map as its only argument.
* Add `context.Context` to all of the content related Page API. Turns out it wasn't strictly needed for this particular feature, but it will
soon become usefil, e.g. in #9339.

Closes #10711
Updates #9339
Updates #10725
2023-02-21 17:56:41 +01:00
Bjørn Erik Pedersen
0afec0a9f4
related: Adjust benchmark
To make it easier to compare.
2023-02-21 11:06:29 +01:00
Bjørn Erik Pedersen
28540ed131
related: Add benchmark 2023-02-21 11:00:43 +01:00
Bjørn Erik Pedersen
9af78d1100
tpl/collections: Improve error message in Index 2023-02-08 10:22:20 +01:00
Bjørn Erik Pedersen
d33a7ebcc1 Make the HTML collector parsing more robust
Most notably better handling self-closing elements

Closes #10698
2023-02-07 09:11:02 +01:00
Bjørn Erik Pedersen
2a364cca64
Revert "build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0"
This reverts commit 87c78bd3e9.

There seem to be some breaking changes in the above that needs to be looked into.
2023-02-05 20:34:35 +01:00
Joe Mooring
3fb2417cb7 deps: Upgrade github.com/yuin/goldmark v1.5.3 => v1.5.4
Closes #10661
2023-02-05 20:09:06 +01:00
Bjørn Erik Pedersen
fce0890484 tpl/strings: Add strings.ContainsNonSpace 2023-02-05 20:08:44 +01:00
dependabot[bot]
87c78bd3e9 build(deps): bump github.com/getkin/kin-openapi from 0.110.0 to 0.114.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.110.0 to 0.114.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.110.0...v0.114.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-05 20:07:15 +01:00
Joe Mooring
69c369e114 deps: Upgrade github.com/alecthomas/chroma v2.4.0 => v2.5.0
Fixes #9890
Fixes #10692
2023-02-05 20:06:51 +01:00
Khayyam Saleem
73ece30d84
markup: Fix linenos codeblock hl option case regression
This fixes a regression introduced in v0.93.0 where previously, a
mixed-case key for lineNos would be successfully parsed. This change
moves the configuration key lowercasing step into the configuration
normalization stage, which is called whether the highlighting config
is being parsed from a `string` or a `map`.

Fixes #10682
2023-02-05 20:06:25 +01:00
Bjørn Erik Pedersen
f9fc0e045b Fix slow HTML elements collector for the pre case
```
name                           old time/op    new time/op    delta
ElementsCollectorWriterPre-10    25.2µs ± 1%     3.4µs ± 0%  -86.54%  (p=0.029 n=4+4)

name                           old alloc/op   new alloc/op   delta
ElementsCollectorWriterPre-10      624B ± 0%      142B ± 0%  -77.18%  (p=0.029 n=4+4)

name                           old allocs/op  new allocs/op  delta
ElementsCollectorWriterPre-10      16.0 ± 0%       6.0 ± 0%  -62.50%  (p=0.029 n=4+4)
```

Fixes #10698
2023-02-05 20:01:39 +01:00
Bjørn Erik Pedersen
4f4a1c00bf
publisher: Add benchmark 2023-02-05 16:39:31 +01:00
Anthony Fok
76c6140c52 snap: Install dart-sass-embedded for 32-bit ARM (armhf) too
See https://github.com/sass/dart-sass-embedded/releases/tag/1.54.7
which "Add[ed] support for 32-bit ARM releases on Linux" on 2022-08-30.
2023-02-03 14:58:11 +01:00
Anthony Fok
d4482e8bf4 snap: Add read access for ~/.gitconfig.local and ~/.config/git/* too
in hugo:gitconfig plug (personal-files interface) in case end users need
the flexibility of using additional custom git config files.

Fixes #10337
2023-02-03 14:57:53 +01:00
Bjørn Erik Pedersen
1477d0ba90 commands: Fix server url rewrites (http status 200)
Broken by me in Hugo 0.103.0 it seems. A little bit mysterious as it has worked for me after that, but started to fail just
recently.

Closes #10668
2023-01-31 12:42:31 +01:00
dependabot[bot]
dd37163f5a build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.10 to 2.2.11
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.10 to 2.2.11.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.10...v2.2.11)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-31 09:41:13 +01:00
dependabot[bot]
c3a59a7d5a
build(deps): bump gocloud.dev from 0.24.0 to 0.28.0 (#10610)
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.24.0 to 0.28.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.24.0...v0.28.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Closes #9778
2023-01-31 09:40:39 +01:00
Joe Mooring
4ccc8cfb4c Fix description of collections.Uniq 2023-01-31 08:12:45 +01:00
Bjørn Erik Pedersen
e2cfc3d5a2
Update CONTRIBUTING.md 2023-01-31 08:08:52 +01:00
Bjørn Erik Pedersen
168858331f Fix shortcode detection in RenderString
Fixes #10654
2023-01-26 11:41:07 +01:00
Bjørn Erik Pedersen
4ef9baf5bd Only invoke a given cached partial once
Note that this is backed by a LRU cache (which we soon shall see more usage of), so if you're a heavy user of cached partials it may be evicted and
refreshed if needed. But in most cases every partial is only invoked once.

This commit also adds a timeout (the global `timeout` config option) to make infinite recursion in partials
easier to reason about.

```
name              old time/op    new time/op    delta
IncludeCached-10    8.92ms ± 0%    8.48ms ± 1%   -4.87%  (p=0.016 n=4+5)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    6.65MB ± 0%    5.17MB ± 0%  -22.32%  (p=0.002 n=6+6)

name              old allocs/op  new allocs/op  delta
IncludeCached-10      117k ± 0%       71k ± 0%  -39.44%  (p=0.002 n=6+6)
```

Closes #4086
Updates #9588
2023-01-25 17:35:23 +01:00
Bjørn Erik Pedersen
93ed6e447a
Update README.md 2023-01-24 15:04:06 +01:00
hugoreleaser
0d1161b263 releaser: Prepare repository for 0.111.0-DEV
[ci skip]
2023-01-17 12:28:17 +00:00
hugoreleaser
e32a493b78 releaser: Bump versions for release of 0.110.0
[ci skip]
2023-01-17 12:16:09 +00:00
Bjørn Erik Pedersen
19e9605629
dos: Regen CLI docs 2023-01-17 12:52:53 +01:00
Bjørn Erik Pedersen
80e8bd3b72
docs: Regen docshelper 2023-01-17 12:52:08 +01:00
Bjørn Erik Pedersen
b661132e0a
Merge commit 'ef6f101e75' 2023-01-17 12:51:46 +01:00
Bjørn Erik Pedersen
ef6f101e75 Squashed 'docs/' changes from 2c0125b52..1214f6ffb
1214f6ffb Document cleanDestinationDir configuration setting
27ca65463 Clarify .Page.Param method (#1953)
3fa1792d2 Document the usage of `hardWrap` option for markdown rendering (#1951)
8b5afdfb4 Update theme
207e7f0a0 fix docs for getting remote font
1f7094b9e Correct typo
f9d6445c4 Added missing `/` in URL generator (#1946)
3a22ee7d6 Remove translations
b3b900f3f Update introduction.md
aca440052 rm Forestry - facing end-of-life shortly (#1944)
af0014e14 Update scss-sass.md
1c43bbbc9 Merge branch 'docs/goworkspace'
d034175ca netlify: Hugo 0.109.0
d3a6a5c3f Merge branch 'tempv0.109.0'
e033dbead docs: Regen docs helper JSON
452bf675c resource/page: Add Page.Ancestors
12edd7363 Add some docs for workspaces
8f0fcba6b Add HUGO_PUBLISHDIR to the Node environment
4e66d98ad Update theme
808aee6f6 config: Update to ga v4
1de2bc5a9 config: Update to ga v4
ddb5fd6b0 Merge commit '41bc6f702a'
54c54bf76 modules: Adjust watch logic vs workspace use definitions

git-subtree-dir: docs
git-subtree-split: 1214f6ffbf680e853746aaeb6cb097b28c0c556b
2023-01-17 12:51:01 +01:00
Bjørn Erik Pedersen
d595419031
related: Handly []any
See #10624
2023-01-17 12:50:26 +01:00
Bjørn Erik Pedersen
671f64b2eb Fix permalinks issue with repeated sections
Fixes #10377
2023-01-17 12:49:16 +01:00
Bjørn Erik Pedersen
2fb40ece5d tpl/strings: Add findRESubmatch
Fixes #10594
2023-01-17 12:14:11 +01:00
Bjørn Erik Pedersen
c6b3887696
config/security: Add O\w+ (e.g. GOROOT) to the default allowed list
Fixes #10429
2023-01-17 10:52:51 +01:00
Bjørn Erik Pedersen
21af5b359f Preserve front matter slice value types (e.g. int)
Fixes #10624
2023-01-17 08:58:05 +01:00
Bjørn Erik Pedersen
f38a2fbd2e Make hugo.toml the new config.toml
Both will of course work, but hugo.toml will win if both are set.

We should have done this a long time ago, of course, but the reason I'm picking this up now is that my VS Code setup by default picks up some
JSON config schema from some random other software which also names its config files config.toml.

Fixes #8979
2023-01-16 15:34:16 +01:00
Bjørn Erik Pedersen
6a579ebac3 Add fill HTTP Response info into .Data in resources.GetRemote
See #10604
2023-01-16 14:44:15 +01:00
Bjørn Erik Pedersen
f13531e608 Fix HEAD method in resources.GetRemote
Fixes #10604
2023-01-16 14:44:15 +01:00
Bjørn Erik Pedersen
b5d485060f Fix order when reading custom headers in resources.GetRemote
Fixes #10616
2023-01-16 14:44:15 +01:00
Bjørn Erik Pedersen
6e9fa9e0fd deps: Upgrade github.com/evanw/esbuild v0.15.18 => v0.17.0
Also add a test to make sure legal comments are preserved in JS bundles.

Closes #10536
2023-01-16 14:41:13 +01:00
Bjørn Erik Pedersen
c4f3a46ce6
Update README.md 2023-01-09 14:13:30 +01:00
Bjørn Erik Pedersen
fbc3e08c64
resource: Fix Go Doc vs .Data.Integrity 2023-01-07 10:58:34 +01:00
Bjørn Erik Pedersen
e402d91ee1 Misc doc, code refactoring to improve documentation 2023-01-04 18:01:26 +01:00
Bjørn Erik Pedersen
3c51625c71 Make readFile return nil when file not found (note)
Fixes #9620
2023-01-04 18:01:26 +01:00
Omar Kohl
dd6d0a6de1 Remove reference to Goreleaser in code comment
Hugo no longer uses the Goreleaser tool.
2023-01-03 20:25:44 +01:00
acclassic
f95fd57aac
tpl/compare: Sort special float values as string
When sorting strings a worng order is returned. This happens because the strings are first converted
to floating values to check whether or not they should be sorted as
floating values. When an error is returned the strings will be
handled as string literals.
No error will be returned when parsing Inf, Infinity or NaN (case insensitive) because they
will be coverted to special floating point values and therefore are
legal float values.
Now we check if the returned converted values are special floating
values and treat them as string literals.

Fixes #10389
2023-01-02 17:35:08 +01:00
Bjørn Erik Pedersen
e754d5cb3e
tpl/diagrams: Move Goat to its own file 2022-12-25 14:02:22 +01:00
Bjørn Erik Pedersen
002cd52807
Update CONTRIBUTING.md 2022-12-24 15:53:27 +01:00
Bjørn Erik Pedersen
a76c405d40
Update CONTRIBUTING.md 2022-12-24 15:49:00 +01:00
Bjørn Erik Pedersen
c0a03a2a39
Update README.md 2022-12-24 15:48:45 +01:00
hugoreleaser
e127d3e5c6 releaser: Prepare repository for 0.110.0-DEV
[ci skip]
2022-12-23 10:50:52 +00:00
hugoreleaser
47b12b83e6 releaser: Bump versions for release of 0.109.0
[ci skip]
2022-12-23 10:38:11 +00:00
Bjørn Erik Pedersen
180dfeba03
Adjust "you need the extended version" error message 2022-12-23 10:33:49 +01:00
Bjørn Erik Pedersen
10bb29d7f3
docs: Regen docs helper JSON 2022-12-23 10:15:48 +01:00
Bjørn Erik Pedersen
eb0c8f9d02 resource/page: Slight adjustment of Page.Ancestors
Fixes #10567
2022-12-23 10:14:53 +01:00
Septs
3a216186b2 resource/page: Add Page.Ancestors
Fixes #10567
2022-12-23 10:14:53 +01:00
dependabot[bot]
7874b96815 build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-23 09:26:10 +01:00
Joe Mooring
71832328f8 Annotate test assertions 2022-12-22 18:53:12 +01:00
Joe Mooring
37ab1cf12a hugolib: Exclude non-linkable pages from translations map
Fixes #9073
2022-12-22 18:53:12 +01:00
Bjørn Erik Pedersen
59af05cabc Add HUGO_PUBLISHDIR to the Node environment
So you can do  `process.env.HUGO_PUBLISHDIR` in your `postcss.config.js` to figure out where Hugo publishes
its files.

Note that the value will always be an absolute file path and will point to a directory on disk even when running `hugo server` in memory mode.

If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:

```
hugo server --renderToDisk
hugo server --renderStaticToDisk
```

Fixes #10554
2022-12-22 12:43:50 +01:00
Joe Mooring
4989da653d Revert "tpl/tplimpl: Use https in sitemap templates"
This reverts commit 3fd0b78498.
2022-12-22 08:53:58 +01:00
Bjørn Erik Pedersen
cd1ed563a8 tpl: Improve template funcs GoDoc 2022-12-21 15:33:02 +01:00
Bjørn Erik Pedersen
aa2c724195 tpl/resources: Fix data race in ToCSS
Fixes #10542
2022-12-21 12:26:42 +01:00
Bjørn Erik Pedersen
effa6a4226 tocss: Add some more test cases
See #10555
2022-12-21 11:21:07 +01:00
Septs
5d5f0a2371 tocss: Fix unquote case with double quotes
See #10555
2022-12-21 11:21:07 +01:00
Bjørn Erik Pedersen
d20d2651ea
Allow "fast render mode" even if --disableLiveReload is set
Fixes #10561
2022-12-21 11:02:21 +01:00
Bjørn Erik Pedersen
41a080b268 tocss: Add vars option
This commit adds a new `vars` option to both the Sass transpilers (Dart Sass and Libsass).

This means that you can pass a map with key/value pairs to the transpiler:

```handlebars
{{ $vars := dict "$color1" "blue" "$color2" "green" "$font_size" "24px" }}
{{ $cssOpts := (dict "transpiler" "dartsass" "outputStyle" "compressed" "vars" $vars ) }}
{{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
```

And the the variables will be available in the `hugo:vars` namespace. Example usage for Dart Sass:

```scss
@use "hugo:vars" as v;

p {
    color: v.$color1;
    font-size: v.$font_size;
}
```

Note that Libsass does not support the `use` keyword, so you need to `import` them as global variables:

```scss
@import "hugo:vars";

p {
    color: $color1;
    font-size: $font_size;
}
```

Hugo will:

* Add a missing leading `$` for the variable names if needed.
* Wrap the values in `unquote('VALUE')` (Sass built-in) to get proper handling of identifiers vs other strings.

This means that you can pull variables directly from e.g. the site config:

```toml
[params]
[params.sassvars]
color1 = "blue"
color2 = "green"
font_size = "24px"
image = "images/hero.jpg"
```

```handlebars
{{ $vars := site.Params.sassvars}}
{{ $cssOpts := (dict "transpiler" "dartsass" "outputStyle" "compressed" "vars" $vars ) }}
{{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts }}
```

Fixes #10555
2022-12-20 19:36:30 +01:00
Bjørn Erik Pedersen
41bc6f702a Squashed 'docs/' changes from 2201ac0e5..2c0125b52
2c0125b52 Remove .Site.Author
2cf8841b3 Update partialCached.md (#1924)
385487191 Update data-templates.md (#1926)
ce207e141 Remove redundant markdown and fix a few typos (#1936)
3687c2953 Make heading id linkable, take 2
45c79bea7 Make heading id linkable
b22079344 Delete duplicates the lines 557-569 and 570-582. (#1934)
0a90dc122 Rework the taxonomy variables page (#1935)
7f8979c50 Update theme
26e682a3a Update multilingual.md
d40e7693f Update postcss.md
375d75c01 Update postcss npm instructions (#1931)
63020094a Emphasize Window shell selection (#1930)
56824be2c Update configuration.md
b7b8f16b3 Docu 'Theme components': minor fix (#1929)
09dc81a05 Remove Docker from BSD page (#1927)
205fea204 netlify: Hugo 0.108.0
6abe49c28 Merge commit 'da670c38ee'
12b59a4c5 docs: Add basic doc for wrapStandAloneImageWithinParagraph etc.
ba07bd970 dartsass: Add sourceMapIncludeSources option

git-subtree-dir: docs
git-subtree-split: 2c0125b5290494d49334606c451446ebd9df3c21
2022-12-20 11:04:41 +01:00
Bjørn Erik Pedersen
9a215d6950
Merge commit '41bc6f702a' 2022-12-20 11:04:41 +01:00
Bjørn Erik Pedersen
eda1e720cd
modules: Improve "module workspace" not found error 2022-12-20 09:06:38 +01:00
Bjørn Erik Pedersen
330fa89411 modules: Adjust watch logic vs workspace use definitions 2022-12-19 20:17:33 +01:00
Bjørn Erik Pedersen
6db527483d Add any configured Go Workspace file to the config watcher
Fixes #10556
2022-12-19 20:17:33 +01:00
Bjørn Erik Pedersen
0d4b17d4c0 modules: Make the module.workspace=off as default (note)
Also, resolve any workspace file relative to the workingDir.

Fixes #10553
2022-12-19 20:17:33 +01:00
Bjørn Erik Pedersen
3afaca7584
release: Add a note section in release notes 2022-12-19 13:13:38 +01:00
Joe Mooring
2d217cba51
helpers: Allow at signs in UnicodeSanitize (note)
Closes #10548
2022-12-19 09:58:56 +01:00
Bjørn Erik Pedersen
17055d1fa7
parser/metadecoders: Remove superflous cast in test 2022-12-14 20:10:17 +01:00
Bjørn Erik Pedersen
2a81a49499 parser/metadecoders: Simplify nil check in Unmarshal 2022-12-14 18:03:47 +01:00
AcClassic
e30d711c29 parser/metadecoders: Add empty /data JSON file as empty map
When fetching JSON files from the /data folder that are empty they will
be added as empty map[string]any. This makes sure that no empty JSON
file causes the site to crash because of a failed unmarshal. This
happens because empty is not a valid JSON string. It is therefore
important to check the lenght of the data before passing it to the JSON
unmarshal function.

Fixes #8601
2022-12-14 18:03:47 +01:00
Bjørn Erik Pedersen
ad2059878a Also consider wrapped errors when checking for file IsNotExist errors
Fixes #10534
2022-12-14 13:51:06 +01:00
Bjørn Erik Pedersen
87e898a17a tpl/openapi3: Wrap *kopenapi3.T
To make it easier to document.
2022-12-14 12:29:40 +01:00
Bjørn Erik Pedersen
b54de1bd9b resources/js: Fix some import discrepancies between Hugo and ESBuild
This fixes the cases where

```js
import 'imp2/index.js';
import 'imp3/foo.js';
```

And these files lives in `assets` as:

```
imp2/index.ts
imp3/foo.ts
```

Fixes #10527
2022-12-13 18:58:17 +01:00
Bjørn Erik Pedersen
c9354d5463 github: Update to Dart Sass 1.56.2 2022-12-13 16:58:33 +01:00
Bjørn Erik Pedersen
d894269855 github: Use ruby/setup-ruby
Closes #10517
2022-12-11 19:43:46 +01:00
Joe Mooring
3fd0b78498 tpl/tplimpl: Use https in sitemap templates
Closes #10515
2022-12-11 18:53:30 +01:00
Francesco La Camera
e0e63f35e4
parser/metadecoders: Fix spelling 2022-12-10 19:37:47 +01:00
hugoreleaser
cc574ef120 releaser: Prepare repository for 0.109.0-DEV
[ci skip]
2022-12-06 13:50:51 +00:00
hugoreleaser
a0d64a46e3 releaser: Bump versions for release of 0.108.0
[ci skip]
2022-12-06 13:37:56 +00:00
Bjørn Erik Pedersen
f97544a830 Make the hugo env non verbose output slightly more verbose
This is how it may look like with a extended build:

```
hugo v0.107.0-6445b1e9ff963b07c55d9d69cb9abef8ef21fc5d+extended darwin/arm64 BuildDate=2022-12-06T11:21:50Z
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.19.3"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.2.4"
github.com/sass/dart-sass-embedded/protocol="1.1.0"
github.com/sass/dart-sass-embedded/compiler="1.56.1"
github.com/sass/dart-sass-embedded/implementation="1.56.1"
```
2022-12-06 13:37:08 +01:00
Bjørn Erik Pedersen
d8efe085ca Add dart-sass-embedded version info to hugo env -v
```
~ ❯❯❯ hugo env -v | grep dart
github.com/bep/godartsass="v0.16.0"
github.com/sass/dart-sass-embedded/compiler="1.56.1"
github.com/sass/dart-sass-embedded/implementation="1.56.1"
github.com/sass/dart-sass-embedded/protocol="1.1.0"
```
2022-12-06 13:37:08 +01:00
Bjørn Erik Pedersen
f5b5b71c60 deps: Upgrade github.com/bep/godartsass v0.15.0 => v0.16.0 2022-12-06 13:37:08 +01:00
Razon Yang
b82b547acb
tpl/embedded: Make Open Graph's series optional 2022-12-06 10:48:34 +01:00
Bjørn Erik Pedersen
da670c38ee Squashed 'docs/' changes from 4c1309cdf..2201ac0e5
2201ac0e5 Update theme

git-subtree-dir: docs
git-subtree-split: 2201ac0e5fa47400ecd182e28af823e0f03ed05b
2022-12-06 10:42:36 +01:00
Bjørn Erik Pedersen
c9f2fa2663
Merge commit 'da670c38ee' 2022-12-06 10:42:36 +01:00
Bjørn Erik Pedersen
5067775a6f
common/hugio: Fix multiWriteCloser.Close
Fixes #10505
2022-12-06 10:32:33 +01:00
dependabot[bot]
50549c867c build(deps): bump github.com/getkin/kin-openapi from 0.109.0 to 0.110.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.109.0 to 0.110.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.109.0...v0.110.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 10:22:14 +01:00
Bjørn Erik Pedersen
de9c5542ca
docs: Add basic doc for wrapStandAloneImageWithinParagraph etc.
See #10492
2022-12-05 16:50:47 +01:00
Bjørn Erik Pedersen
e93138dfdb dartsass: Add sourceMapIncludeSources option 2022-12-05 16:36:45 +01:00
Bjørn Erik Pedersen
7d16c3c0c1 github: Update Dart Sass Embedded to 1.56.1 2022-12-05 16:36:45 +01:00
Bjørn Erik Pedersen
63126c6359 markup/goldmark: Add removeSurroundingParagraph for Markdown images
* Removes any surrounding paragraph nodes
* And transfers any attributes from the surrounding paragraph down to the image node
* Adds IsBlock and Ordinal (zero based) field to the image context passed to the image render hooks

IsBlock is set to true if `wrapStandAloneImageWithinParagraph = false` and  the image's parent node has only one child.

Closes #8362
Fixes #10492
Fixes #10494
Fixes #10501
2022-12-05 15:00:47 +01:00
dependabot[bot]
535ea8cc9b build(deps): bump github.com/evanw/esbuild from 0.15.16 to 0.15.18
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.16 to 0.15.18.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.16...v0.15.18)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 10:35:54 +01:00
dependabot[bot]
8bbec426cd build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 10:34:54 +01:00
dependabot[bot]
0bfa293dcd build(deps): bump github.com/evanw/esbuild from 0.15.15 to 0.15.16
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.15 to 0.15.16.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.15...v0.15.16)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-04 15:04:05 +01:00
Joe Mooring
0b976d2b40 tpl/tplimpl: Allow alternate comment syntax
Allow alternate comment syntax before block definitions:

{{/* foo */}}
{{- /* foo */}}
{{- /* foo */ -}}

Fixes #10495
2022-12-04 09:25:51 +01:00
Anton Sattarov
a49e51fd0b
resources: Increase timeout for http.Client
Increase timeout for http.Client in resources.GetRemote  from 10 second to 1 minute

Fixes #10478
2022-12-03 15:47:47 +01:00
Bjørn Erik Pedersen
d373774cbe tpl/collections: Fix some index cases where the indices given is a slice and be more lenient with nil inputs
See adjusted tests for detail.

Fixes #10489
2022-12-03 11:54:33 +01:00
Bjørn Erik Pedersen
7d5e3ab8a8 tpl: Misco GoDoc improvements 2022-12-03 11:54:33 +01:00
septs
dc44bca963
config/security: Add CI env var to whitelist 2022-12-02 12:13:34 +01:00
Bjørn Erik Pedersen
da16527896 Squashed 'docs/' changes from 32cb8785e..4c1309cdf
4c1309cdf Fix broken link to front matter page (#1923)
8181fff20 Add footnote to Quick Start guide for Win users (#1922)
4fd934f61 Fix abslangurl.md (#1919)
bf2c45617 Quick start guide: fix broken links (#1915)
201b568df Update theme
874db199d Hide the news stripe on front page for now
aaf59e3e2 netlify: Hugo 0.107.0
79654c301 Merge branch 'tempv107'
8345e0347 docs: Regen docs helper
b5b4f15f9 Add assets directory to directory structure diagram (#1917)
76dd3a82a Follow-up: improve function signatures (#1914) (#1916)
656dc72ba Improving function signatures (#1914)
b715e8407 Explain how to create multilingual content (#1912)
8500ee417 Fix typo in Quick Start guide
ce60bb572 Add docu for undocumented functions (#1907)
372bf5e88 Improve Quick Start tutorial
71e81ec5f Remove asciicast from site
1e56c653f Update hosting-on-cloudflare-pages.md (#1903)
1686f60b1 Adding documentation page for function 'strings.FirstUpper' (#1901)
d533f7c9c Fixing typos (#1900)
2563eee45 Update multilingual.md (#1899)
2173ed799 Update theme
5591b8875 Update urls.md (#1897)
4a88890b5 netlify: Hugo 0.106.0
512879fdd docs: Regen CLI docs
f74b1d87d docs: Regenerate docs helper
9feacb48f Merge commit '00c4484c70'

git-subtree-dir: docs
git-subtree-split: 4c1309cdfe9858434684352f9d544bf0c5c9d646
2022-12-02 09:19:23 +01:00
Bjørn Erik Pedersen
ef518485ce
Merge commit 'da16527896' 2022-12-02 09:19:23 +01:00
Bjørn Erik Pedersen
83080df611 deps: Upgrade github.com/bep/godartsass v0.14.0 => v0.15.0 2022-12-02 09:08:22 +01:00
Joe Mooring
b8d5c378ba tpl: Use consistent delimiter spacing in examples 2022-11-25 09:54:35 +01:00
Bjørn Erik Pedersen
75f782a5a7
docs: Regen docs helper 2022-11-24 15:17:22 +01:00
hugoreleaser
2221b5b30a releaser: Bump versions for release of 0.107.0
[ci skip]
2022-11-24 13:59:45 +00:00
dependabot[bot]
6a004b8d94 build(deps): bump github.com/getkin/kin-openapi from 0.108.0 to 0.109.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.108.0 to 0.109.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.108.0...v0.109.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-24 13:21:23 +01:00
dependabot[bot]
0923622421 build(deps): bump github.com/evanw/esbuild from 0.15.14 to 0.15.15
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.14 to 0.15.15.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.14...v0.15.15)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-24 13:20:50 +01:00
Bjørn Erik Pedersen
7855b47f07 Add a cache for lexers.Get
```
name                            old time/op    new time/op    delta
Codeblocks/Default-10              152ms ±11%      12ms ± 1%  -92.44%  (p=0.029 n=4+4)
Codeblocks/Hook_no_higlight-10     142ms ± 0%       7ms ± 0%  -95.36%  (p=0.029 n=4+4)

name                            old alloc/op   new alloc/op   delta
Codeblocks/Default-10             11.9MB ± 0%    11.7MB ± 0%   -1.59%  (p=0.029 n=4+4)
Codeblocks/Hook_no_higlight-10    4.62MB ± 1%    4.43MB ± 0%   -4.08%  (p=0.029 n=4+4)

name                            old allocs/op  new allocs/op  delta
Codeblocks/Default-10               209k ± 0%      209k ± 0%   -0.03%  (p=0.029 n=4+4)
Codeblocks/Hook_no_higlight-10     68.4k ± 0%     68.3k ± 0%   -0.06%  (p=0.029 n=4+4)

```
2022-11-24 13:18:33 +01:00
Bjørn Erik Pedersen
34d1150d92
markup/goldmark: Improve benchmark 2022-11-24 12:04:44 +01:00
Joe Mooring
85e2ac1a44 commands: Create assets directory with new site
Closes #10460
2022-11-21 09:42:40 +01:00
dependabot[bot]
74776726df build(deps): bump github.com/frankban/quicktest from 1.14.3 to 1.14.4
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.14.3 to 1.14.4.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.14.3...v1.14.4)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-19 17:19:15 +01:00
dependabot[bot]
63f7f0ff5a build(deps): bump golang.org/x/tools from 0.2.0 to 0.3.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-19 16:33:23 +01:00
Bjørn Erik Pedersen
bcb62d8911 deps: Upgrade github.com/alecthomas/chroma/v2 v2.4.0 2022-11-19 11:55:30 +01:00
Joe Mooring
00fe7e0408 hugo/parser: Fix shortcode boolean param parsing
Fixes #10451
2022-11-18 09:34:10 +01:00
hugoreleaser
df85cb9ae2 releaser: Prepare repository for 0.107.0-DEV
[ci skip]
2022-11-17 18:46:38 +00:00
hugoreleaser
e08ce30fe4 releaser: Bump versions for release of 0.106.0
[ci skip]
2022-11-17 18:33:40 +00:00
Bjørn Erik Pedersen
a99fed4852 resources/tpl: Add a test for resources.Get
Updates #10101
2022-11-17 18:09:54 +01:00
shifterbit
db945a6ed2 tlp/resources: resources.Get returns nil when given empty string 2022-11-17 18:09:54 +01:00
dependabot[bot]
bafb389b38 build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.4 to 2.0.6
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.0.4 to 2.0.6.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.0.4...v2.0.6)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 17:07:40 +01:00
Bjørn Erik Pedersen
0a019a1a59
docs: Regen CLI docs 2022-11-17 16:19:22 +01:00
Bjørn Erik Pedersen
9f7fb0a73b
docs: Regenerate docs helper 2022-11-17 16:16:53 +01:00
Bjørn Erik Pedersen
f04cc581e1
Merge commit '00c4484c70' 2022-11-17 16:16:19 +01:00
Bjørn Erik Pedersen
00c4484c70 Squashed 'docs/' changes from 392668f4f..32cb8785e
32cb8785e Fix page weights in content management section (#1896)
11977b96f Make relURL and related functions consistent (#1895)
f12180207 Clarify github deployment (#1894)
958877789 Remove remaining references to Highlight.js (#1893)
fc487d263 Minor edit to taxonomy page
3b6a224b2 Update theme
b28553b62 Change "flavor" to "edition" when referring to builds (#1892)
660e7581c Replaced sudo in OpenBSD with doas (#1891)
e3fcdea10 fix a few minor grammatical issues on Firebase docs (#1889)
e4c8b30eb update Static Web Apps docs (#1890)
da2197c9e Update hosting-on-firebase.md (#1347)
5f2a0c271 Adding deployment guide for Azure Static Web Apps (#1456)
5aaf570cd add Azure Static Web App config to 404 template
35fc54362 add Azure Static Web App config to 404 template
d48f67ba1 Update 01-flavors.md
11debae8d Cleaned Use of ref and relref section, added refs of index.md and _in… (#1744)
b77604078 docs: Add link to menu entry variables (#1827)
0fa8a6bf0 Misc copy edits (#1887)
c27b545ac Improve explanation of safeHTMLAttr's function (#1503)
b04a4b32e Make CLI command summaries meaningful (#1886)
dbf00a81f Fix a typo in diagrams documentation (#1885)
11f884327 docs: Clarify how to remove draft/future/expired content (#1831)
6dc9e9860 Improve complement function (#1884)
56448a51a Remove erroneous sourcemap desc (#1883)
a0d0d2829 Merge branch 'divinerites-patch-1'
10f20cb5e Add a plausible-hugo theme component
9f1413eb5 Minor edits to showcase example
7d78420db fix broken link to Isso Comments
925cb291f Make directory tree consistent with other examples
300fff092 Add link to security policy from getenv.md (#1746)
7b4c517a6 Fix docs menu weights
ce35775e0 Update faq.md (#1763)
f3fb791a4 Remove dated new-in flags (#1879)
b6c634629 Remove deprecated templating langs (#1880)
1b25ca34f Update the findRE and replaceRE functions (#1881)
28757ec73 Add Alora Labs website to showcase (#1494)
e3c4bc4e7 Remove unimplemented "ugly" property
86afd84ff Update editors.md (#1878)
44c093911 Add urlquery function docs (#1633)
16a8c3548 Update links to installation page (#1876)
9e357f078 Add missing sections to BSD installation page (#1875)
1b1291634 Promote "Installation" to a section
9dd51235b Add detail to description of .Plain page variable (#1870)
d333d0287 Minor markdown linting fix and URL updates (#1873)
d57c8aa50 Remove extraneous apostrophe (#1871)
8c25cfc5c Update index.md
09fea41e0 Add lang to fenced code block
35b904798 Add small documentation about .Site.Social.twitter variable (#1854)
672042f89 Consolidate site configuration
dfd4dd873 Add help.ampio.com showcase. (#1863)
e8d0e7bdf Include link to internal templates code (#1794)
7db6f0c01 Add example to split function (#1867)
be87dba80 Clarify split function docs (#1792)
a079193f1 Fix typo on data templates page
b234c70ee Fix data templates page (#1855)
074232b45 Update front-matter.md (#1856)
711c8fa80 Added missing default value (#1862)
034762882 Fixed some grammar issues and typos (#1865)
764574a4d Fix spelling error
2698f2d44 update URLs to prevent redirects (#1864)
68f05fdc8 Fenced code blocks should have a language specified (#1861)
24393315b GitHub Workflows security hardening (#1859)
3eeee13bf Markdown formatting: Add Fenced code block languages (#1858)
e152cdf1f netlify: Hugo 0.105.0
4c7fc9f7e Merge branch 'tempv0.105.0'
d16710afc Change anchor reference to use relref function calls (#1853)
f52af8e4a tpl/encoding: Add noHTMLEscape option to jsonify
eca0046c4 Update hosting-on-keycdn docs (#1852)
ffbe17a48 Add note for rsync deploy command (#1415)
c482133f1 docs: Update quick start to clarify the need of extended version (#1828)
1e3b33804 use correct URL for Google Search console verification (#1851)
dac034f63 Markdown and formatting fixes (#1850)
43f177e3c Fix LiveReload in quick-start (#1739)
f78deaa5f Add link for ''Hugo Shortcode Syntax Highlighting' VS Code extension (#1765)
08087ecd7 Remove some hidden pages (#1848)
b6cb5ae48 Markdown linting fixes (#1846)
527ec5941 Update hugo.md (#1742)
83e8f2168 Clarify that a shortcode with .Inner must be closed (#1785)
4193f4445 Add Super Linter GitHub Action (#1845)
fd91bfe1a Formatting and grammar fixes (#1844)
ab5a49c49 Create codeql-analysis GitHub Action (#1812)
63b3e082e Add tutorial on using fusejs to search examples (#1756)
54c253ab0 Note that Google Universal Analytics are deprecated (#1770)
385fa77c6 Update articles.toml (#1840)
5e336bd26 Replace awkward wording (ESL?) (#1842)
2446ad349 Added Introduction to Hugo tutorial/video series (#1736)
7b21b2e76 Don't use self-closing generator tag
ef73712ff Image processing. available methods: add method 'Colors' (#1837)
018f83bbe [comment platform] - add new alternative (#1751)
5636c208b Grammar and spelling fixes (#1836)
3f2e26f77 Change link of repojacking vulnerable link - JekyllToHugo (#1834)
301379fc3 fix: use shorter image URL to make it easier to read (#1835)
de5fa7b30 Update search.md to include Pagefind (#1826)
e9d72bcda Breadcrumb example: add basic accessibility (#1832)
6cffff87a netlify: Hugo 0.104.3
892360f61 Update output-formats.md
09a7a46ae Remove my defunct and little used migrator (#1824)
347434cca netlify: Hugo 0.104.2
f8c721162 Update postcss.md
c2baf7155 netlify: Hugo 0.104.1
05d1192cd Update diagrams.md (#1823)
3c43a8bbe netlify: Hugo 0.104.0
57973b334 Merge branch 'tempv0.104.0'
da775a36d docs: Regen docs helper
ae48b5901 docs: Regenerate CLI docs
af4a823b1 resources/images: Add $image.Colors
8e3f9ca64 Remove outdated IE conditional comments example (#1821)
d1a84701b fix typo in template introduction (#1820)
c0c7339e0 Update internal.md
17aefc515 Remove the recommendation about where to put the GA tempalte
263297236 Adjust GA template instructions
1cc265d99 Update the GA template usage section
e11968338 config/security: Allow proxy variables in subcommands
9218ab993 netlify: Hugo 0.103.1
0b0e890d1 Update markdownify and RenderString documentation (#1818)
50f5d4776 Fix internal link (#1817)
6beb443c5 netlify: Hugo 0.103.0
14b5af248 Merge branch 'tempv0.103.0'
548e7aa62 server: Add 404 support
3a20aa0ba Update theme

git-subtree-dir: docs
git-subtree-split: 32cb8785ea74d5b82f2e2bea79d059cab497902a
2022-11-17 16:14:29 +01:00
dependabot[bot]
cdd83bf3c8 build(deps): bump github.com/evanw/esbuild from 0.15.13 to 0.15.14
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.13 to 0.15.14.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.13...v0.15.14)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-16 19:15:58 +01:00
Bjørn Erik Pedersen
e00220a06a
deps: Update the libweb version string 2022-11-15 18:21:08 +01:00
Bjørn Erik Pedersen
a662ddae13 deps: Upgrade github.com/bep/gowebp v0.1.0 => v0.2.0 2022-11-15 18:19:35 +01:00
Vignesh Mani
13adf3e028
readme: Update ToC 2022-11-15 18:19:16 +01:00
dependabot[bot]
fe08d35f24 build(deps): bump github.com/yuin/goldmark from 1.5.2 to 1.5.3
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 11:48:20 +01:00
dependabot[bot]
4b675ddd4a build(deps): bump github.com/spf13/afero from 1.9.2 to 1.9.3
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.9.2...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 10:01:23 +01:00
dependabot[bot]
24eaa290cf build(deps): bump github.com/getkin/kin-openapi from 0.107.0 to 0.108.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.107.0 to 0.108.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.107.0...v0.108.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 10:00:57 +01:00
Bjørn Erik Pedersen
f6ab9553f4 tpl/internal: Sync go_templates
Closes #10411
2022-11-14 22:31:50 +01:00
dependabot[bot]
58a98c7758 build(deps): bump github.com/clbanning/mxj/v2 from 2.5.6 to 2.5.7
Bumps [github.com/clbanning/mxj/v2](https://github.com/clbanning/mxj) from 2.5.6 to 2.5.7.
- [Release notes](https://github.com/clbanning/mxj/releases)
- [Commits](https://github.com/clbanning/mxj/compare/v2.5.6...2.5.7)

---
updated-dependencies:
- dependency-name: github.com/clbanning/mxj/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 22:20:38 +01:00
dependabot[bot]
900904fd11 build(deps): bump golang.org/x/net from 0.1.0 to 0.2.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.1.0...v0.2.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 19:08:03 +01:00
dependabot[bot]
24eca0cbe9 build(deps): bump github.com/evanw/esbuild from 0.15.12 to 0.15.13
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.12 to 0.15.13.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.12...v0.15.13)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 19:07:26 +01:00
Vignesh Mani
60e0e2c1d9
Add Go 1.16+ install method to README
Changed installation method to reflect Go 1.16+, as cloning the repo and doing a go install achieves the same process.

Also changed "Advanced Installation" to "Using the Go toolchain"
2022-11-10 17:36:31 +01:00
Bjørn Erik Pedersen
52ea07d2eb Fix taxonomy weight sort regression
Fixes #10406
2022-11-01 18:45:34 +01:00
hugoreleaser
77fc74a5b2 releaser: Prepare repository for 0.106.0-DEV
[ci skip]
2022-10-28 12:41:15 +00:00
hugoreleaser
0e3b42b4a9 releaser: Bump versions for release of 0.105.0
[ci skip]
2022-10-28 12:29:05 +00:00
dependabot[bot]
f50585442d build(deps): bump golang.org/x/tools from 0.1.12 to 0.2.0
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.12 to 0.2.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.12...v0.2.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-28 14:10:21 +02:00
dependabot[bot]
2aedccc9a9 build(deps): bump github.com/getkin/kin-openapi from 0.106.0 to 0.107.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.106.0 to 0.107.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.106.0...v0.107.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-28 14:09:21 +02:00
dependabot[bot]
c10931404f build(deps): bump golang.org/x/text from 0.3.7 to 0.4.0
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.4.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.4.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 12:28:57 +02:00
dependabot[bot]
4732c47d1d build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 12:28:37 +02:00
dependabot[bot]
62780ec8dd build(deps): bump github.com/getkin/kin-openapi from 0.103.0 to 0.106.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.103.0 to 0.106.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.103.0...v0.106.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-27 12:28:21 +02:00
dependabot[bot]
351d6b062b build(deps): bump github.com/tdewolff/minify/v2 from 2.12.1 to 2.12.4
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.12.1 to 2.12.4.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.12.1...v2.12.4)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 13:02:40 +02:00
Bjørn Erik Pedersen
631d768be9 Revise the fix for shortcode vs output format nilpointer
We do lazy initialization and (potentially) reuse of an output format's rendered content. We do this evaluation when we
start a new rendering a new output format. There are, however, situation where these borders gets crossed (e.g.
accessing content from another output format). We have a check for this in place for most cases, but not the content
rendering of inner markdown blocks inside shortcodes. This patch applies that same logic to the newly introduced
RenderContent method (which is not available from the templates).

Fixes #10391
2022-10-26 13:00:21 +02:00
davidejones
e5d2a8f6a3 Avoid nilpointer when shortcode page content output nil
Updates #10391
2022-10-26 13:00:21 +02:00
Bjørn Erik Pedersen
00ff161b67
livereload: Use text/javascript here, too 2022-10-26 12:54:50 +02:00
Bjørn Erik Pedersen
588710a7ac media: Rename application/javascript, application/typescript to text/javascript etc.
The former is deprecated.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
See https://discourse.gohugo.io/t/mime-type-for-javascript-is-now-text-javascript/40813
2022-10-26 10:38:27 +02:00
dependabot[bot]
ed930db2f0 build(deps): bump github.com/yuin/goldmark from 1.4.15 to 1.5.2
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.15 to 1.5.2.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.15...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 10:34:24 +02:00
dependabot[bot]
05df964816 build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.4 to 1.6.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.4...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 10:25:34 +02:00
Bjørn Erik Pedersen
20ef6dcf95
Skip flakey server tests on GitHub Action on Windows 2022-10-26 09:29:55 +02:00
dependabot[bot]
9860e0e186 build(deps): bump github.com/magefile/mage from 1.13.0 to 1.14.0
Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/magefile/mage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 16:13:08 +02:00
Bjørn Erik Pedersen
d1cd1db0e7
github: Avoid duplicate test runs 2022-10-25 16:08:41 +02:00
Bjørn Erik Pedersen
09e10110a3 tpl/encoding: Add noHTMLEscape option to jsonify 2022-10-24 17:21:42 +02:00
dependabot[bot]
2ef60dbd2d build(deps): bump github.com/evanw/esbuild from 0.15.9 to 0.15.12
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.9 to 0.15.12.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.9...v0.15.12)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 17:19:54 +02:00
Steffen Windoffer
6275aad9e2
Update Go and Alpine version in Dockerfile 2022-10-19 19:58:25 +02:00
JB
01ebb6e304
Don't use self-closing generator tag 2022-10-14 12:16:53 +02:00
Bjørn Erik Pedersen
a066e98851
build: Update to Go 1.19.2 2022-10-11 09:26:31 +02:00
Bjørn Erik Pedersen
1fd3320dcf
github: Use SHA versions 2022-10-05 16:37:37 +02:00
jongwooo
0fb2b3d143 Resolve dependency-path not found error in workflow 2022-10-05 20:39:45 +09:00
jongwooo
db05232d56 Use setup-go action to cache dependencies 2022-10-05 10:20:22 +02:00
hugoreleaser
2734f956c3 releaser: Prepare repository for 0.105.0-DEV
[ci skip]
2022-10-04 14:39:43 +00:00
hugoreleaser
58b8245813 releaser: Bump versions for release of 0.104.3
[ci skip]
2022-10-04 14:25:23 +00:00
Bjørn Erik Pedersen
ec57cf2c30
resources: Update golden image dithering exception list 2022-10-04 16:19:52 +02:00
Bjørn Erik Pedersen
3a9cb7b0fb resources/images: Fix 2 animated GIF resize issues
* Fix resize of animated GIF when target != GIF
* Avoid processing all GIF frames if targetFormat != GIF

Fixes #10354
2022-10-04 15:38:12 +02:00
Anthony Fok
0addb302ac server: Fix flaky TestServerPathEncodingIssues tests
Set getNumHomes: 1 to enable 567 ms or 2 s of wait for the server
to be ready in TestServerPathEncodingIssues/Unicode_paths and
TestServerPathEncodingIssues/Windows_multilingual_404.

Fixes #10332
2022-10-04 14:48:29 +02:00
Joe Mooring
b002d47953 commands: Remove extraneous newline from result of convert toTOML
Fixes #10351
2022-10-04 09:28:34 +02:00
Ricardo N Feliciano
e3f31352d4
config/security: Fix filename 2022-10-02 12:52:04 +02:00
hugoreleaser
ec02c537ed releaser: Prepare repository for 0.105.0-DEV
[ci skip]
2022-09-29 10:47:15 +00:00
hugoreleaser
84cbe72498 releaser: Bump versions for release of 0.104.2
[ci skip]
2022-09-29 10:31:09 +00:00
Bjørn Erik Pedersen
4611b6920b Fix htimes /: operation not permitted error on config changes
Regression introduced in v0.104.1.
2022-09-29 12:27:25 +02:00
Bjørn Erik Pedersen
2171e3c9a5
Revert "Adjust a test"
Committed by mistake.
This reverts commit cac773aeff.
2022-09-27 11:42:25 +02:00
Bjørn Erik Pedersen
cac773aeff
Adjust a test 2022-09-27 11:41:15 +02:00
hugoreleaser
51010a69bc releaser: Prepare repository for 0.105.0-DEV
[ci skip]
2022-09-26 17:17:27 +00:00
hugoreleaser
8958b8741f releaser: Bump versions for release of 0.104.1
[ci skip]
2022-09-26 17:05:45 +00:00
Bjørn Erik Pedersen
29ccb36069 Fix /static performance regression from Hugo 0.103.0
In `v0.103.0` we added support for `resources.PostProcess` for all file types, not just HTML. We had benchmarks that said we were fine in that department, but those did not consider the static file syncing.

This fixes that by:

* Making sure that the /static syncer always gets its own file system without any checks for the post process token.
* For dynamic files (e.g. rendered HTML files) we add an additional check to make sure that we skip binary files (e.g. images)

Fixes #10328
2022-09-26 19:02:25 +02:00
hugoreleaser
d8aba18e05 releaser: Prepare repository for 0.105.0-DEV
[ci skip]
2022-09-23 14:44:31 +00:00
hugoreleaser
c744dbd6ed releaser: Bump versions for release of 0.104.0
[ci skip]
2022-09-23 14:32:56 +00:00
Bjørn Erik Pedersen
5c41653364 Consolidate the glob case logic
Looking at the code as a whole, we ended up with a little to much "buttons". It turns out that doing case insensitive matching (lower both pattern and strings to match) performs just fine. Or at least, it
gives the penalty to the people who uses mixed case filenames.

```
GetGlob/Default_cache-10                          10.6ns ± 2%    10.6ns ± 1%   ~     (p=0.657 n=4+4)
GetGlob/Filenames_cache,_lowercase_searchs-10     10.6ns ± 2%    10.6ns ± 0%   ~     (p=1.000 n=4+4)
GetGlob/Filenames_cache,_mixed_case_searchs-10    29.7ns ± 1%    29.6ns ± 1%   ~     (p=0.886 n=4+4)
GetGlob/GetGlob-10                                13.7ns ± 1%    13.7ns ± 0%   ~     (p=0.429 n=4+4)

name                                            old alloc/op   new alloc/op   delta
GetGlob/Default_cache-10                           0.00B          0.00B        ~     (all equal)
GetGlob/Filenames_cache,_lowercase_searchs-10      0.00B          0.00B        ~     (all equal)
GetGlob/Filenames_cache,_mixed_case_searchs-10     5.00B ± 0%     5.00B ± 0%   ~     (all equal)
GetGlob/GetGlob-10                                 0.00B          0.00B        ~     (all equal)

name                                            old allocs/op  new allocs/op  delta
GetGlob/Default_cache-10                            0.00           0.00        ~     (all equal)
GetGlob/Filenames_cache,_lowercase_searchs-10       0.00           0.00        ~     (all equal)
GetGlob/Filenames_cache,_mixed_case_searchs-10      1.00 ± 0%      1.00 ± 0%   ~     (all equal)
GetGlob/GetGlob-10
```
2022-09-23 16:19:21 +02:00
satotake
281554ee97
hugofs: Fix glob case-sensitivity bug
On Linux, `hugofs.Glob` does not hit any directories which includes
uppercase letters. (This does not happen on macOS.)

Since `resources.GetMatch/Match` uses `Glob`,

```
{{ resources.GetMatch "Foo/bar.css" }}
```

this does not match `assets/Foo/bar.css` .

On the other hand, you can get it with

```
{{ resources.Get "Foo/bar.css" }}
```
2022-09-23 13:12:57 +02:00
Bjørn Erik Pedersen
f3560aa0e1 server: Fix 404 redirects on Windows
Fixes #10314
2022-09-23 13:07:56 +02:00
dependabot[bot]
edf9038a92 build(deps): bump github.com/evanw/esbuild from 0.15.8 to 0.15.9
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.8 to 0.15.9.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.8...v0.15.9)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-23 10:56:45 +02:00
dependabot[bot]
78f49b4c0d build(deps): bump github.com/yuin/goldmark from 1.4.14 to 1.4.15
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.14 to 1.4.15.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.14...v1.4.15)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 19:25:55 +02:00
dependabot[bot]
fa4b77e7ed build(deps): bump github.com/getkin/kin-openapi from 0.100.0 to 0.103.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.100.0 to 0.103.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.100.0...v0.103.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 19:05:44 +02:00
Bjørn Erik Pedersen
8377c3cea1
docs: Regen docs helper 2022-09-22 18:55:00 +02:00
dependabot[bot]
4d909d4768 build(deps): bump github.com/alecthomas/chroma/v2 from 2.2.0 to 2.3.0
Bumps [github.com/alecthomas/chroma/v2](https://github.com/alecthomas/chroma) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/chroma/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 18:54:27 +02:00
dependabot[bot]
4eb6d97404 build(deps): bump github.com/evanw/esbuild from 0.15.7 to 0.15.8
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.7 to 0.15.8.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.7...v0.15.8)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 18:53:12 +02:00
Bjørn Erik Pedersen
4f9cb4f344
docs: Regenerate CLI docs 2022-09-22 17:57:13 +02:00
Bjørn Erik Pedersen
0171fb2010
Run go mod tidy 2022-09-22 17:42:48 +02:00
Bjørn Erik Pedersen
a4028112e3 resources/images: Add $image.Colors
Which returns the most dominant colors of an image using a simple histogram method.

Fixes #10307
2022-09-22 15:57:35 +02:00
Bjørn Erik Pedersen
08f0984f91
commands: Skip flaky test on CI 2022-09-22 11:24:42 +02:00
Mathieu Parent
86653fa38e
config/security: Allow proxy variables in subcommands
In particular for go get
2022-09-19 12:37:35 +02:00
hugoreleaser
c46d104985 releaser: Prepare repository for 0.104.0-DEV
[ci skip]
2022-09-18 13:31:21 +00:00
hugoreleaser
b665f1e8f1 releaser: Bump versions for release of 0.103.1
[ci skip]
2022-09-18 13:19:01 +00:00
Bjørn Erik Pedersen
6be6752c8a server: Fix redirects when file path contains bytes > 0x80
Fixes #10287
2022-09-18 15:16:11 +02:00
Bjørn Erik Pedersen
8e9dce1092
Merge branch 'release-0.103.0' 2022-09-15 18:47:37 +02:00
hugoreleaser
00b71668b2 releaser: Prepare repository for 0.104.0-DEV
[ci skip]
2022-09-15 16:35:38 +00:00
hugoreleaser
beebf2afb0 releaser: Bump versions for release of 0.103.0
[ci skip]
2022-09-15 16:23:56 +00:00
Bjørn Erik Pedersen
3f0b40f674
Use standard GOOS/GOARCH values in release archives
But create aliases with old filenames for the 2 most downloaded archives (to avoid Netlify etc. breaking).

Fixes #10073
2022-09-15 18:22:35 +02:00
Bjørn Erik Pedersen
0bd79d30c1
Use standard GOOS/GOARCH values in release archives
But create aliases with old filenames for the 2 most downloaded archives (to avoid Netlify etc. breaking).

Fixes #10073
2022-09-15 12:26:22 +02:00
Bjørn Erik Pedersen
8e77bcc930
Filter out any duplicate files to post process
Updates #10269
2022-09-14 19:42:55 +02:00
Bjørn Erik Pedersen
74daca6b30 Support PostProcess for all file types
Not just HTML.

Fixes #10269
2022-09-14 19:09:20 +02:00
dependabot[bot]
1fd4c562af build(deps): bump github.com/gobuffalo/flect from 0.2.5 to 0.3.0
Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.2.5 to 0.3.0.
- [Release notes](https://github.com/gobuffalo/flect/releases)
- [Commits](https://github.com/gobuffalo/flect/compare/v0.2.5...v0.3.0)

---
updated-dependencies:
- dependency-name: github.com/gobuffalo/flect
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-14 18:12:47 +02:00
Bjørn Erik Pedersen
a5cda5ca4d server: Add 404 support 2022-09-14 14:25:33 +02:00
dependabot[bot]
5e2b28d6e6 build(deps): bump github.com/getkin/kin-openapi from 0.98.0 to 0.100.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.98.0 to 0.100.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.98.0...v0.100.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-14 11:21:14 +02:00
dependabot[bot]
f2019f0a23 build(deps): bump github.com/evanw/esbuild from 0.15.5 to 0.15.7
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.15.5 to 0.15.7.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.15.5...v0.15.7)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-14 10:58:32 +02:00
dependabot[bot]
475638fe02 build(deps): bump github.com/yuin/goldmark from 1.4.13 to 1.4.14
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.13 to 1.4.14.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.13...v1.4.14)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-14 10:58:12 +02:00
Bjørn Erik Pedersen
203cc54578
Feat/sponsors in readme (#10273)
* Update README.md

* Update README.md
2022-09-14 10:20:57 +02:00
Bjørn Erik Pedersen
90ad804505 Squashed 'docs/' changes from e5aa641a6..392668f4f
392668f4f Update theme
65d82c845 fix versions in GitHub Pages docs (#1815)
4e078a306 Create hosting-on-azure-static-web-apps.md (#1738)
e24e25052 fix requirement typo (#1814)
0790eb173 fix broken link (#1813)
f4a1b38c7 📄 Add more clarity on merging of config files (#1493)
2e82efff0 Install on Windows: Correct + augment (#1520)
4bffd076e Update frontends to add CloudCannon's CMS (#1509)
17eea3133 Update index.md to add resource (#1508)
5a5ac1d2f Add documentation for babel sourceMap (#1492)
899b7117c Update menu-templates.md
284dc4266 Include flexible translation in i18n.md
f03421274 docs: Escaping Hugo/GO template code
4f0755683 Improve the documentation of imageConfig and the image resource
89aa723cc Clarify leaf bundle explanation and related FAQ
0c6b32bb9 Update starter-kits.md
a68151b1b Update starter-kits.md
91b145384 Update starter-kits.md
c8104b422 Update hosting-on-21yunbox.md
51ee7603b Update hosting-on-21yunbox.md
d88314499 docs(en): add hosting on 21YunBox
aab04f269 Update shortcode-templates.md to correct an error.
ed48563aa Misc improvements
87dd24e1d Fix merge failure
0bcc6dca8 js.Build: Update docs to not allow boolean inputs for sourceMap
e50a28fbc js.Build: Add SourceMap flag into js.Build opts which can turn on sourcemap
9695093a1 Fix Arch Linux installation command
3de773d7a Please remove hugo-elasticsearch plugin.
6510f0a5a release: Add some more ignore expressions to release notes config
dc90b7517 typoe > typo (!)
3427c7436 Add hugoreleaser config
5a1f2d0dd Improves formatting of resources, assets sections (#1804)
03ba56fdd Remove Flesland Flis from Showcases
9f61dac7a Update slice.md
533e4e0cd Update theme
85e50325c Simplify writing
9b30e81b9 Typo fix and remove passive form
8974b6c53 dynamic-menu-configuration
1c5467329 netlify: Hugo 0.102.3
610a937b0 Remove Over from Showcase
99f5585bc  netlify: Hugo v0.102.2
9f230ac1f netlify: Hugo v0.102.1
a6fc3f864 netlify: Bump to Hugo v0.102.0
3e9bc1a62 Merge branch 'tempv0.102.0'
c08d6d898 Update en/templates/404.md with Firebase Hosting (#1796)
322b75f40 Update configuration.md
2fa6f0b94 404 template example: remove slash relURL arg
1195f168a Remove broken link (#1767)
e0838e574 Update RenderString.md
bee6adf71 Update page-resources.md
24e142f22 Remove duplicate word from cascade description
879fc3983 docs: Update the description of PostCSS config
2ffe539e3 fix: Use `=` instead of `:=` for variable reassignments (#1771)
7496b8f87 update 404 error for digitalocean docs
c85caca4a Merge commit 'bdf935d66c'
c3888b63a docs: Regen docshelper
8a5942555 Merge commit '475f87f685'
282007217 common: Add hugo.GoVersion
00b4b46da resources/page: Add :slugorfilename attribute

git-subtree-dir: docs
git-subtree-split: 392668f4f488d184b08b227028b01dbc02abd57a
2022-09-13 20:34:24 +02:00
Bjørn Erik Pedersen
af23cdca9c
Merge commit '90ad804505' 2022-09-13 20:34:24 +02:00
satotake
ab5ce59894 Fix usage description 2022-09-08 15:35:11 +02:00
satotake
7d40da876c Add --force to hugo new
Closes #9243
2022-09-08 15:35:11 +02:00
Jenny Rakoczy
02c89a446d scss: Handle single-file sourcemaps correctly
Simple sites may only have one css file. Update the replace directive to
correctly match single-file sourcemaps and multi-file sourcemaps.

Verified locally with and without SASS and CSS imports.

Fixes #8174
2022-09-06 10:52:28 +02:00
Bjørn Erik Pedersen
06c3ac6741
release: Bump Hugoreleaser version 2022-09-03 11:38:03 +02:00
Alex
5e03de0ddb Update stale.yml
Signed-off-by: sashashura <93376818+sashashura@users.noreply.github.com>
2022-09-02 20:13:02 +02:00
hugoreleaser
bef31b58aa releaser: Prepare repository for 0.103.0-DEV
[ci skip]
2022-09-01 10:34:57 +00:00
hugoreleaser
b76146b129 releaser: Bump versions for release of 0.102.3
[ci skip]
2022-09-01 10:16:19 +00:00
Bjørn Erik Pedersen
8e5044d7f5 Fix shortcode parser regression with quoted param values
This issue was introduced in `v0.102.0`.

In 223bf28004 we removed the byte source from the parsed page result, which
meant we had to preserve exact positioning for all elements. This introduced some new `TypeIgnore` tokens
which we, wrongly, assumed didn't matter where we put in the result slice (they should be ignored anyway).

But it seems that this broke the logic where we determine if it's positional or named params in the case
where the paramater value contains escaped quoutes.

This commit makes sure that these ignore tokens (the back slashes) are never sent back to the client, which is how it was before `v0.102.0`.

This commit also fixes some lost error information in that same commit.

Fixes #10236
2022-09-01 12:13:23 +02:00
Joe Mooring
5046a6c7ca deps: Update github.com/tdewolff/minify/v2 v2.12.0 => v2.12.1
Fixes #10230
2022-08-31 09:02:50 +02:00
Anthony Fok
160a067c81 snap: Use "snapcraftctl set-grade"
This, together with 'snapcraftctl set-version", negates the need to
modify snap/snapcraft.yaml upon each release, so the corresponding code
is removed from releaser/releaser.go.

Also, vendorInfo is extended to include the snap version number.

See #10225
2022-08-30 05:23:18 -06:00
Anthony Fok
e0ba1a805a
snap: Use "snapcraftctl set-version"
This allows the use of "git describe --tags" to recognize lightweight
version tags, and the removal of initial "v" in the hugo snap version.

See #10225
2022-08-29 23:14:22 -06:00
Anthony Fok
7b49c56a6a snap: Make external dependencies actually work
Git:
 - Set GIT_EXEC_PATH and include usr/lib/git-core so that git can find the
   git-remote-https helper (needed by e.g. "go mod download").

Go:
 - Put Go in its own snap part, and use stage-snaps instead of build-snaps
   so that it is included in the final snap.
 - Set GOCACHE to a writable directory. (In a previous commit,
   HOME is set to $SNAP_REAL_HOME which is unwritable.)

Hugo:
 - Patch config/security/securityConfig.go "[security.exec] osEnv" whitelist
   (during snap build) so that external dependencies can use the required
   environment variables to run properly from within the snap.

Asciidoctor:
 - Replace shebang line in asciidoctor so it can find the ruby executable.
 - Set RUBYLIB so that Ruby can find its libraries.
   Caveat/TODO: The Ruby version is hardcoded in our custom RUBYLIB.

Embedded Dart Sass:
 - Download from GitHub and install it, for amd64 and arm64 only.

Node.js:
 - Remove my incomplete include list so that npx is actually installed.
 - Set npm_config_{cache,init_module,userconfig} to writable locations.

Pandoc:
 - Set pandoc_datadir so that Pandoc can find its data files.

rst2html:
 - Install python3-docutils package for rst2html, rst2html5, etc.
 - Set PYTHONHOME so that Python can find its libraries.

Note that asciidoctor, pandoc and rst2html are not in Hugo’s default
"[security.exec] allow" whitelist, and the snap package does not change
that default, so they still needed to be whitelisted manually in
config.toml if necessary by the end user.

Special thanks to Joe Mooring (@jmooring) for meticulously diagnosing
the issue and providing a comprehensive test repository at
https://github.com/jmooring/hugo-snap-test without which I would not
have been able to understand and resolve the issue.

Fixes #9078
2022-08-29 12:24:58 -06:00
Bjørn Erik Pedersen
dffca57883
release: Add the releaser commits to the ignore list 2022-08-29 16:29:45 +02:00
Bjørn Erik Pedersen
79932e7225
release: Fix the Deb archives
Fixes #10220
2022-08-29 14:56:15 +02:00
hugoreleaser
9eb9b70a29 releaser: Prepare repository for 0.103.0-DEV
[ci skip]
2022-08-28 16:41:06 +00:00
hugoreleaser
0ff4a9326f releaser: Bump versions for release of 0.102.0
[ci skip]
2022-08-28 16:29:34 +00:00
Bjørn Erik Pedersen
45e1084ff2
Add linux/arm64 extended to release setup
Fixes #8257
2022-08-28 18:23:01 +02:00
Bjørn Erik Pedersen
c98348416c
license: Add copyright info
Closes #10218
2022-08-28 12:55:47 +02:00
dependabot[bot]
2de393c791 build(deps): bump go.uber.org/atomic from 1.9.0 to 1.10.0
Bumps [go.uber.org/atomic](https://github.com/uber-go/atomic) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/uber-go/atomic/releases)
- [Changelog](https://github.com/uber-go/atomic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/atomic/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: go.uber.org/atomic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-28 12:02:17 +02:00
dependabot[bot]
7efb35680f build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.9 to 2.2.10
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.9 to 2.2.10.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.9...v2.2.10)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 18:50:51 +02:00
dependabot[bot]
ddbcc67122 build(deps): bump github.com/getkin/kin-openapi from 0.97.0 to 0.98.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.97.0 to 0.98.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.97.0...v0.98.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 18:48:56 +02:00
Bjørn Erik Pedersen
fd75f129b2 deps: Update github.com/pelletier/go-toml/v2 v2.0.2 => v2.0.4
Closes #10210
2022-08-26 18:30:46 +02:00
dependabot[bot]
14878ca0a0 build(deps): bump github.com/spf13/afero from 1.8.2 to 1.9.2
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.8.2 to 1.9.2.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.8.2...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 12:01:51 +02:00
dependabot[bot]
e88873b803 build(deps): bump github.com/tdewolff/parse/v2 from 2.6.1 to 2.6.2
Bumps [github.com/tdewolff/parse/v2](https://github.com/tdewolff/parse) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/tdewolff/parse/releases)
- [Commits](https://github.com/tdewolff/parse/compare/v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/parse/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-26 12:01:19 +02:00
dependabot[bot]
4219993b0c build(deps): bump github.com/mattn/go-isatty from 0.0.14 to 0.0.16
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.14 to 0.0.16.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.14...v0.0.16)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-25 12:28:50 +02:00
dependabot[bot]
988e1417a0 build(deps): bump github.com/rogpeppe/go-internal from 1.8.1 to 1.9.0
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 13:36:47 +02:00
dependabot[bot]
42529882ce build(deps): bump github.com/yuin/goldmark from 1.4.12 to 1.4.13
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.12 to 1.4.13.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.12...v1.4.13)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 13:34:24 +02:00
dependabot[bot]
45f1b1cfc5 build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 06:53:38 +02:00
dependabot[bot]
369bdf22f8 build(deps): bump github.com/tdewolff/minify/v2 from 2.11.10 to 2.12.0
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.11.10 to 2.12.0.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.11.10...v2.12.0)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 00:00:14 +02:00
dependabot[bot]
d1b03a093f build(deps): bump github.com/evanw/esbuild from 0.14.43 to 0.15.5
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.43 to 0.15.5.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.43...v0.15.5)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 23:58:15 +02:00
Reece Russell
941c28ab0c
readme: Add Golang URL to Go links 2022-08-22 19:45:15 +02:00
Bjørn Erik Pedersen
ffbdcc75ab
Update README.md 2022-08-19 19:15:58 +02:00
Bjørn Erik Pedersen
95d9764518
Update README.md 2022-08-19 19:12:43 +02:00
Bjørn Erik Pedersen
b66f9f2665
Update README.md 2022-08-19 19:12:04 +02:00
Anthony Fok
f7e00c039f
github: Use GitHub's Choco-Install function to retry installs
Apparently, two instances of "choco install mingw" running simultaneously
(for go-version 1.18.x and 1.19.x) would often cause at least one of them
to fail to connect to SourceForge:

    ERROR: The remote file either doesn't exist, is unauthorized,
    or is forbidden for url
    'https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/ray_linn/GCC-10.X-with-ada/GCC-10.2.0-crt-8.0.0-with-ada-20201019.7z/download'.
    Exception calling "GetResponse" with "0" argument(s):
    "The request was aborted: Could not create SSL/TLS secure channel."

With Choco-Install however, it simply works every single time!

Thanks to keymanapp/api.keyman.com#156 for the great tip!

See the definition of the PowerShell Choco-Install function here:
https://github.com/actions/runner-images/blob/main/images/win/scripts/ImageHelpers/ChocoHelpers.ps1
2022-08-14 00:52:23 -06:00
Bjørn Erik Pedersen
f5ba6fd45c
common/hugio: One more fix for non-OS fs
Note that these are only used with OS fs, so no practical bugs, but still-
2022-08-13 19:22:45 +02:00
Bjørn Erik Pedersen
c4bbc1eeeb
common/hugio: Fix CopyDir when fs is not OS 2022-08-13 18:26:16 +02:00
Anthony Fok
0e0fb1b648
snap: Delete obsolete custom x-nodejs plugins 2022-08-12 21:39:25 -06:00
satotake
b017f7cb01 livereload: Inject script without head or body tag
Currently, Hugo does not inject `livereload` script if html does not contain `<head>` or `<body>`. This sometimes happens if you create new sites without `theme` and it is hard to catch the cause soon.

This PR:

* Inject livereload script even if html does not include `<head>`, `<body>`, or `<html>`
    - Modern browsers execute scripts even if they are outside `<html>`
    - Some js frameworks (confirmed with vite) inject HRM script without `<html>` tag
* Append warning script to html if `<head>` or `<body>` is not in html
* Fix bug that livereload cannot be appended to the tags with attrs

Close #10105
2022-08-07 18:34:01 +02:00
Bjørn Erik Pedersen
7fb28085ac releaser: Fat MacOS binaries
Closes #9131
2022-08-03 23:22:01 +02:00
Bjørn Erik Pedersen
0cd1929b9c Update to Go 1.19
Fixes #10145
2022-08-03 23:22:01 +02:00
piyo
cbdaff2135
markup/goldmark/codeblock: Fix attributes when no language identifier in CodeBlock
Fixes #10118
2022-08-03 11:32:08 +02:00
杨晴
3fefea06b8
commands: Fix embed in livereload.go 2022-08-01 11:42:26 +02:00
Bjørn Erik Pedersen
5c48ba9343
Update README.md
Updates #10136
2022-07-31 15:41:42 +02:00
Takeshi Sato
21562e3aad
Externalise and embed livereload.js string
This is a small refactoring. `livereload/livereload.go` has a wide
column. Sometimes language server does not work because of it.
Create a new js file and embed it.
2022-07-26 13:51:08 +02:00
Bjørn Erik Pedersen
9c24b86e4b Cache when not found in LookupLayout
Very visible when using the pprof mutex profiler.

```bash
name         old time/op    new time/op    delta
Baseline-10    58.4ms ± 1%    51.6ms ± 0%  -11.56%  (p=0.029 n=4+4)

name         old alloc/op   new alloc/op   delta
Baseline-10    64.3MB ± 0%    64.2MB ± 0%     ~     (p=0.114 n=4+4)

name         old allocs/op  new allocs/op  delta
Baseline-10      649k ± 0%      649k ± 0%     ~     (p=0.229 n=4+4)
```
2022-07-13 15:49:00 +02:00
Bjørn Erik Pedersen
223bf28004 parser/pageparser: Don't store the byte slices
On its own this change doesn't do any magic, but this is part of a bigger picture about making Hugo leaner in the
memory usage department.
2022-07-09 16:03:11 +02:00
Bjørn Erik Pedersen
72b0ccdb01
Make the baseline benchmark's test files stable
And add some assertions.
2022-06-30 12:36:55 +02:00
Bjørn Erik Pedersen
bdf935d66c Squashed 'docs/' changes from 30f32a624..e5aa641a6
e5aa641a6 remove erroneous foo
8307b474e Add hl_inline to highlight function documentation
8517b02d9 update GitHub 404 docs URL to prevent redirect
5c52c2715 remove aerobatic.com
3eb179558 Update syntax-highlighting.md
00cbe3f2f Check for nil Chroma .Aliases
45416515e netlify: Hugo 0.101.0
d5dcd1581 docs: Regen docshelper
4785e99b1 common: Add hugo.GoVersion
e679f1b7e resources/page: Add :slugorfilename attribute
f2cc72a1f Update spellcheck.yml (#1755)

git-subtree-dir: docs
git-subtree-split: e5aa641a629ce70de609a006fb9a57ee422922f5
2022-06-28 20:51:33 +02:00
Bjørn Erik Pedersen
65e52a7f5c
Merge commit 'bdf935d66c' 2022-06-28 20:51:33 +02:00
Anthony Fok
8ebcaa5394 Accept vendor-specified build date if .git/ is unavailable
Fixes #10053
2022-06-28 20:51:18 +02:00
Anthony Fok
241481931f
snap: Replace mage with "go build" and set VendorInfo=snap 2022-06-28 04:09:50 -06:00
Anthony Fok
5caed8a71f
snap: Use interface names etc-gitconfig and gitconfig, Take 2
as recommended by @alexmurray to keep consistency with other snaps; see
https://forum.snapcraft.io/t/system-files-and-personal-files-request-for-hugo/30598

I neglected to make the rename of system-gitconfig → etc-gitconfig and
user-gitconfig → gitconfig to the apps.plugs section in commit fd3953c,
hence this commit to fix the store upload scan failure:

  interface 'system-gitconfig' not found in base declaration
  interface 'user-gitconfig' not found in base declaration
  unknown plugs interface name reference 'system-gitconfig'
  unknown plugs interface name reference 'user-gitconfig'

Special thanks to Alex Murray and Igor Ljubuncic for approving the
system-files and personal-files request for Hugo.

Fixes #6226
2022-06-27 09:27:30 -06:00
Bjørn Erik Pedersen
d1278f696a
Extract the baseline benchmark to a test 2022-06-26 09:56:01 +02:00
Bjørn Erik Pedersen
92f31ae63b
Add a baseline benchmark 2022-06-25 18:26:40 +02:00
Anthony Fok
fd3953c18c
snap: Use interface names etc-gitconfig and gitconfig
as recommended by @alexmurray to keep consistency with other snaps; see
https://forum.snapcraft.io/t/system-files-and-personal-files-request-for-hugo/30598/2

One closer step towards fixing #6226
2022-06-24 00:59:37 -06:00
hugoreleaser
15463f835b releaser: Prepare repository for 0.102.0-DEV
[ci skip]
2022-06-16 07:51:58 +00:00
hugoreleaser
466fa43c16 releaser: Bump versions for release of 0.101.0
[ci skip]
2022-06-16 07:09:16 +00:00
hugoreleaser
6072ce0bcd releaser: Add release notes for 0.101.0
[ci skip]
2022-06-16 07:09:16 +00:00
Bjørn Erik Pedersen
2c5943ddc6
build: Update to Go 1.18.3
Fixes #9964
2022-06-16 08:27:08 +02:00
Bjørn Erik Pedersen
0cb459a20a
docs: Regen docshelper 2022-06-16 07:23:38 +02:00
Bjørn Erik Pedersen
475f87f685 Squashed 'docs/' changes from 96fdc246c..30f32a624
30f32a624 Update scss-sass.md
503130186 Update scss-sass.md
cbfaa6704 Remove references to outdated Blackfriday markdown processor (#1748)
e43948d26 netlify: Hugo 0.100.2
aaabe0ee9 Merge branch 'tempv0.100.2'
bc615f257 tpl/path: Add path.BaseName function
5dddbf95e Add Chinese translation for _documentation and _index.md
b1e4f3200 Add translation for search tools
23281633a Update introduction.md
3abb5fb5d netlify: Hugo 0.100.1
644ed3b01 Update faq.md
54f377051 Add some lines about resources.Copy
82cf08355 Remove most Blackfriday references
bfbe5aaf3 netlify: Update to Hugo 0.100.0
8b6f8577f docs: Regen CLI docs
858a5d39c docs: Regen docs helper
5037d504f Merge commit 'e4bfe59c4e'
03ca7be5b Fix indentation in highlight shortcode

git-subtree-dir: docs
git-subtree-split: 30f32a62433a6d62b680a2dd874c72bb8fb0b728
2022-06-16 07:22:11 +02:00
Bjørn Erik Pedersen
604cfffc5b
Merge commit '475f87f685' 2022-06-16 07:22:11 +02:00
Bjørn Erik Pedersen
d863dde6c6 markup/highlight: Add hl_inline option
Closes #9442
Closes #9635
Closes #9638
2022-06-15 20:04:20 +02:00
Bjørn Erik Pedersen
580b214a4c deps: Update github.com/alecthomas/chroma/v2 v2.1.0 => v2.2.0 2022-06-15 20:04:20 +02:00
dependabot[bot]
ddb9547085 build(deps): bump github.com/clbanning/mxj/v2 from 2.5.5 to 2.5.6
Bumps [github.com/clbanning/mxj/v2](https://github.com/clbanning/mxj) from 2.5.5 to 2.5.6.
- [Release notes](https://github.com/clbanning/mxj/releases)
- [Commits](https://github.com/clbanning/mxj/compare/v2.5.5...v2.5.6)

---
updated-dependencies:
- dependency-name: github.com/clbanning/mxj/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 14:19:26 +02:00
dependabot[bot]
288b0fb15a build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.1 to 2.0.2
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](https://github.com/pelletier/go-toml/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 14:17:56 +02:00
dependabot[bot]
3e1344632d build(deps): bump golang.org/x/tools from 0.1.10 to 0.1.11
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.10...v0.1.11)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 12:12:23 +02:00
dependabot[bot]
7a9ce0eca5 build(deps): bump github.com/tdewolff/minify/v2 from 2.11.5 to 2.11.10
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.11.5 to 2.11.10.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.11.5...v2.11.10)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 12:11:23 +02:00
dependabot[bot]
f2ba0cc8c5 build(deps): bump github.com/evanw/esbuild from 0.14.42 to 0.14.43
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.42 to 0.14.43.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.42...v0.14.43)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 12:10:55 +02:00
dependabot[bot]
62ceaabdce build(deps): bump github.com/getkin/kin-openapi from 0.94.0 to 0.97.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.94.0 to 0.97.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.94.0...v0.97.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 10:36:59 +02:00
Bjørn Erik Pedersen
35fa192838 deps: Udpate to github.com/alecthomas/chroma/v2
Fixes #9932
Fixes #9931
2022-06-14 14:08:40 +02:00
Khayyam Saleem
09ac733381 common: Add hugo.GoVersion
Closes #9849. This enables `hugo.GoVersion` in templates to access the
version of Go that the Hugo binary was built with.
2022-06-14 09:48:45 +02:00
Bjørn Erik Pedersen
66da1b7b2f resources: Panic on Copy of Resource with .Err
Fixes #10006
2022-06-14 09:47:41 +02:00
Dawid Potocki
5a9ecb82a3 resources/page: Add :slugorfilename attribute
Fixes #4739, #385
2022-06-13 21:45:03 +02:00
Bjørn Erik Pedersen
cbc35c48d2 Respect NO_COLOR
Fixes #10004
2022-06-13 18:07:37 +02:00
Andreas Deininger
44f3c07969
readme: Update dependency list 2022-06-13 13:16:45 +02:00
Bjørn Erik Pedersen
a5a4422aae Fix relURL with leading slash when baseURL includes a subdirectory
Fixes #9994
2022-06-13 11:40:25 +02:00
Bjørn Erik Pedersen
617e094482 js: Resolve index.esm.js
Same logic as for `index.{js,ts...}` files applies; if both `index.esm.js` and `index.js` exists (unlikely), you need to use the name
with extension when importing, else the `index.js` will win.

Fixes #8631
2022-06-12 20:09:37 +02:00
Bjørn Erik Pedersen
cf12fa6161 Add animated GIF support
Note that this is for GIFs only (and not Webp).

Fixes #5030
2022-06-12 18:17:08 +02:00
Bjørn Erik Pedersen
2e1c81770a resources: Add a Gif source file to golden tests 2022-06-12 16:29:19 +02:00
hugoreleaser
4276075c78 releaser: Prepare repository for 0.101.0-DEV
[ci skip]
2022-06-08 11:07:37 +00:00
hugoreleaser
d25cb2943f releaser: Bump versions for release of 0.100.2
[ci skip]
2022-06-08 10:25:57 +00:00
hugoreleaser
8b9bdc403d releaser: Add release notes for 0.100.2
[ci skip]
2022-06-08 10:25:57 +00:00
Bjørn Erik Pedersen
4e94d1db72
Update CONTRIBUTING.md 2022-06-07 17:22:17 +02:00
Bjørn Erik Pedersen
0566bbf7c7 Fix raw TOML dates in where/eq
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter
dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib.

Fixes #9979
2022-06-07 13:02:58 +02:00
Anthony Fok
534e7155bb deps: Update to github.com/pelletier/go-toml/v2 v2.0.1 2022-06-06 09:36:43 +02:00
Joe Mooring
953f215f32 tpl/path: Add path.BaseName function
Closes #9973
2022-06-06 09:36:16 +02:00
satotake
8e2fd55923 livereload: Use X-Forwarded-Host for Codespace
Codespace has 2 types of usage

1. in browser
2. vscode on local computer

As long as you select 2 (on local), Hugo handles livereload expectedly.
But if you use it in browser, Hugo does not reload on file change, as #9936 said.

This issue happens because `CheckOrigin` always fails.
Remote server could rewrite request host name.
Fix this by respecting `X-Forwarded-Host` header during origin checking

After merging this, you can preview changes lively with codespaece in browser.

```sh
hugo server --liveReloadPort 443
```

Close #9936
2022-06-05 11:16:24 +02:00
Bjørn Erik Pedersen
311b8008bf
helpers: Fix panic with invalid defaultMarkdownHandler
Fixes #9968
2022-06-04 17:47:20 +02:00
Paul van Brouwershaven
c7d5f9f067
resources: Register MediaTypes before build
Fixes #9971
2022-06-03 21:37:50 +02:00
hugoreleaser
bfebd8c02c releaser: Prepare repository for 0.101.0-DEV
[ci skip]
2022-06-01 10:54:16 +00:00
hugoreleaser
0afb4866e3 releaser: Bump versions for release of 0.100.1
[ci skip]
2022-06-01 10:11:48 +00:00
hugoreleaser
b1ec0c226f releaser: Add release notes for 0.100.1
[ci skip]
2022-06-01 10:11:48 +00:00
Bjørn Erik Pedersen
212d9e3017 Fix panic with markdownify/RenderString with shortcode on Page with no content file
Fixes #9959
2022-06-01 12:04:55 +02:00
hugoreleaser
4daac654d9 releaser: Prepare repository for 0.101.0-DEV
[ci skip]
2022-05-31 09:19:15 +00:00
hugoreleaser
27b077544d releaser: Bump versions for release of 0.100.0
[ci skip]
2022-05-31 08:37:12 +00:00
hugoreleaser
0f8343a2c2 releaser: Add release notes for 0.100.0
[ci skip]
2022-05-31 08:37:12 +00:00
Bjørn Erik Pedersen
3fcbee261a
docs: Regen CLI docs 2022-05-31 10:24:01 +02:00
Bjørn Erik Pedersen
db9d274275
docs: Regen docs helper 2022-05-31 10:23:20 +02:00
Bjørn Erik Pedersen
95baafeac4
Merge commit 'e4bfe59c4e' 2022-05-31 10:22:05 +02:00
Bjørn Erik Pedersen
e4bfe59c4e Squashed 'docs/' changes from 2d9da3a56..96fdc246c
96fdc246c Fix outdated i18n warnings flag mention on the multilingual page
39d197345 netlify: Hugo 0.99.1
fafd5070e Typo: Vriables > Variables
348c4e237 Update postcss.md
924fa76b6 netlify: Hugo 0.99.0
bb3f02ac1 Merge branch 'tempv0.99.0'
bdd0b6eaf Update usage.md
f562ff99d postcss: Fix import error handling
5d73f215f docs: Regen CLI docs

git-subtree-dir: docs
git-subtree-split: 96fdc246cc901a4c4ce6a28bab681fda2cff355b
2022-05-31 10:21:09 +02:00
Bjørn Erik Pedersen
6f7bf3f2d7 Fix indentation in highlight shortcode
This commit adds a new `.InnerDeindent` method to the shortcode context, which is `.Inner` with any
indendation removed. This is then used in the built-in `highlight` shortcode to prevent the extra
whitespace getting hightlighted.

Fixes #4717
2022-05-31 09:05:54 +02:00
Bjørn Erik Pedersen
9e904d756b
Make .RenderString render shortcodes
Fixes #6703
2022-05-30 11:32:55 +02:00
Bjørn Erik Pedersen
d2cfaede5b
Improve shortcode indentation handling
* Record the leading whitespace (tabs, spaces) before the shortcode when parsing the page.
* Apply that indentation to the rendered result of shortcodes without inner content (where the user will apply indentation).

Fixes #9946
2022-05-30 11:32:55 +02:00
Bjørn Erik Pedersen
322d19a81f
Add Markdown as an output format
The motivation behind this is not to make it easier to publish Markdown files, as that sounds unusual.

This is mainly meant for shortcodes that produces Markdown to be inlined.

You would do this by creating shortcodes with `*.md` suffix (e.g. `layouts/shortcodes/myshortcode.md`).

This output format is defined as plain text, and will use Go's much more lenient text template parser.

Updates #9821
2022-05-30 11:32:55 +02:00
dependabot[bot]
7cb484e121 build(deps): bump github.com/evanw/esbuild from 0.14.39 to 0.14.42
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.39 to 0.14.42.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.39...v0.14.42)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 11:32:04 +02:00
Bjørn Erik Pedersen
0b395f0b41
Run go mod tidy 2022-05-29 23:05:16 +02:00
Bjørn Erik Pedersen
c1a83076bf
Add a shortcode benchmark 2022-05-29 15:21:08 +02:00
Bjørn Erik Pedersen
0f8dc47037 Remove Blackfriday markdown engine
It has been deprecated for a long time, its v1 version is not maintained anymore, and there are many known issues. Goldmark should be
a mature replacement by now.

Closes #9934
2022-05-29 11:50:58 +02:00
Bjørn Erik Pedersen
3b478f50b7 Fix HasMenuCurrent and IsDescendant/IsAncestor when comparing to itself
There may be sites in the wild that depends on the faulty behaviour of IsDescendant/IsAncestor when comparing to itself, but

* The documentation and common sense says that a thing cannot be descendant or ancestor to itself.
* The bug introduced in `HasMenuCurrent` comes directly from that confusion.

Fixes #9846
2022-05-28 10:56:54 +02:00
dependabot[bot]
f343b8eb78 build(deps): bump github.com/sanity-io/litter from 1.5.4 to 1.5.5
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.4 to 1.5.5.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.4...v1.5.5)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-27 20:04:35 +02:00
Bjørn Erik Pedersen
60ede146b6 deps: Update to github.com/tdewolff/minify/v2 v2.11.5 2022-05-27 19:12:20 +02:00
Bjørn Erik Pedersen
dd9eaf19fd Don't use the baseURL /path as part of the resource cache key
As that prevents Hugo projects with sub paths in their `baseURL` to use themes with cached resources.

Fixes #9787
2022-05-27 19:11:16 +02:00
Bjørn Erik Pedersen
46a2ea6d0d postcss: Make the resource cache key more stable
By using the input map as the basis, which means the hash will not change if we add/rename/remove options.

This happened in Hugo 0.99, as we added a new options. This is unortunate.

Unfortunately this means that the cache keys for PostCSS will change one more time in 0.100, but will be stable going forward.

Note that we have implemented this pattern in all the other resource transformers.

Updates #9787
2022-05-27 18:38:44 +02:00
Bjørn Erik Pedersen
653ab2cc1f
commands: Fix case where languages cannot be configured
There are some commands that needs to complete without a complete configuration.
2022-05-27 13:34:20 +02:00
Bjørn Erik Pedersen
52edea0fec github: Set HUGO_BUILD_TAGS: extended when running tests
Also fix TestDecodeConfig/Basic which started to fail in the extended build in 0.99.1.

Closes #9935
2022-05-27 11:55:03 +02:00
Cameron Moore
6a5acd753a metrics: Fix divide by zero error
Under certain conditions, `howSimilarString` could reach a divide-by-
zero situation which causes bogus values to print in the cache potential
column of the template hints output.  This situation essentially causes
a `int(math.NaN())` value to be returned and hilarity ensues thereafter.
2022-05-26 10:39:29 +02:00
Bjørn Erik Pedersen
805b21555e
Fix error message when PostCSS config file is not found
Fixes #9927
2022-05-25 21:21:28 +02:00
Bjørn Erik Pedersen
8ca7052528
server: Skip watching dirs in ignoreFiles
Fixes #9838
2022-05-25 18:31:00 +02:00
Bjørn Erik Pedersen
bb232a351a
resources: Improve error message on .Resize etc. on SVGs
Fixes #9875
2022-05-25 18:06:20 +02:00
Bjørn Erik Pedersen
3854a6fa6c Fix Plainify edge cases
This commit replaces the main part of `helpers.StripHTML` with Go's implementation in its html/template package.

It's a little slower, but correctness is more important:

```bash
BenchmarkStripHTMLOld-10    	  680316	      1764 ns/op	     728 B/op	       4 allocs/op
BenchmarkStripHTMLNew-10    	  384520	      3099 ns/op	    2089 B/op	      10 allocs/op
```

Fixes #9199
Fixes #9909
Closes #9410
2022-05-25 17:55:23 +02:00
Bjørn Erik Pedersen
cd0112a05a Add resources.Copy
Implemented by most Resource objects, but not Page (for now).

Fixes #9313
2022-05-25 10:35:31 +02:00
satotake
6f7fbe03b1 basefs: add noBuildLock flag
If the flag is enabled, `.hugo_build.lock` will not be created.
This ensures safe running on read-only filesystem etc.
Close #9780
2022-05-24 13:57:23 +02:00
satotake
2fc2e9c871 import: Fix importing jekyll site
Just use `afero.OsFs` without building site.
Close #9817
2022-05-21 23:44:40 +02:00
hugoreleaser
e164834f0a releaser: Prepare repository for 0.100.0-DEV
[ci skip]
2022-05-18 12:01:09 +00:00
hugoreleaser
d524067382 releaser: Bump versions for release of 0.99.1
[ci skip]
2022-05-18 11:18:14 +00:00
hugoreleaser
31ce89f7f4 releaser: Add release notes for 0.99.1
[ci skip]
2022-05-18 11:18:14 +00:00
Bjørn Erik Pedersen
ee55fde5e5
releaser: Fix version replacement 2022-05-18 13:12:42 +02:00
Bjørn Erik Pedersen
2f9eac480f server: Fix multihost crash
As introduced in v0.99.0.

Fixes #9901
2022-05-18 11:10:04 +02:00
Bjørn Erik Pedersen
3a8189ee93
Update stale.yml 2022-05-17 13:57:01 +02:00
hugoreleaser
7bc3401eb5
common/hugo: Fix version logic
[ci skip]
2022-05-16 13:01:52 +02:00
hugoreleaser
1de333e7a3 releaser: Bump versions for release of 0.99.0
[ci skip]
2022-05-16 08:10:56 +00:00
hugoreleaser
35cb6eefb2 releaser: Add release notes for 0.99.0
[ci skip]
2022-05-16 08:10:55 +00:00
Bjørn Erik Pedersen
657d1a2d95
server: Refresh the error template
We cannot cache it forever, as that will not allow the end user to edit and preview it.
2022-05-16 09:24:30 +02:00
Bjørn Erik Pedersen
87a22eb6d6 server: Fix SIGINT handling after loading bad configuration
Also fix the config error messages.

Fixes #9664
2022-05-15 22:58:05 +02:00
Bjørn Erik Pedersen
fc9f315d86 Improve SASS errors
Fixes #9897
2022-05-15 20:25:25 +02:00
Bjørn Erik Pedersen
4b189d8fd9 postcss: Fix import error handling
Note that we will now fail if `inlineImports` is enabled and we cannot resolve an import.

You can work around this by either:

* Use url imports or imports with media queries.
* Set `skipInlineImportsNotFound=true` in the options

Also get the argument order in the different NewFileError* funcs in line.

Fixes #9895
2022-05-15 20:25:25 +02:00
dependabot[bot]
c2fa0a3320 build(deps): bump github.com/fsnotify/fsnotify from 1.5.3 to 1.5.4
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.3...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-14 15:01:01 +02:00
Bjørn Erik Pedersen
48ea24f89a
common/herrors: Remove unused struct 2022-05-14 13:56:28 +02:00
dependabot[bot]
9f563856c1 build(deps): bump github.com/evanw/esbuild from 0.14.38 to 0.14.39
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.38 to 0.14.39.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.38...v0.14.39)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-14 13:45:11 +02:00
Bjørn Erik Pedersen
5c96bda70a
errors: Misc improvements
* Redo the server error template
* Always add the content file context if relevant
* Remove some now superflous error string matching
* Move the server error template to _server/error.html
* Add file context (with position) to codeblock render blocks
* Improve JS build errors

Fixes #9892
Fixes #9891
Fixes #9893
2022-05-14 13:40:56 +02:00
Bjørn Erik Pedersen
4a96df96d9
server: Always rebuild the files involved in an error
Fixes #9884
2022-05-14 13:40:56 +02:00
Bjørn Erik Pedersen
e8537e6dd0
postcss: Fix line numbers in error messages
Fixes #9880
2022-05-14 13:40:55 +02:00
Bjørn Erik Pedersen
2fbdee7268
Update CONTRIBUTING.md
Add some info about commit subject prefixes.
2022-05-13 11:42:12 +02:00
Bjørn Erik Pedersen
91fe1b6c69
js: Bump test dependency
To work around a cache issue.
2022-05-13 11:08:23 +02:00
Bjørn Erik Pedersen
7de629121d deps: Update github.com/spf13/cast v1.4.1 => v1.5.0 2022-05-11 17:03:28 +02:00
Bjørn Erik Pedersen
9d7f166244
hugolib: Check for nil in shouldRender 2022-05-09 15:53:25 +02:00
Bjørn Erik Pedersen
51f08b0b6a Revise the use of htime.Since/htime.Now
We cannot (also, it doesn't add any value)  use that when the `clock` is set,

* To measure time (before that global is set)
* To compare file timestamps re cache eviction

Fixes #9868
2022-05-09 14:18:40 +02:00
Bjørn Erik Pedersen
860c51c314 tpl/collections: Make sort stable
Fixes #9865
2022-05-08 20:45:54 +02:00
Bjørn Erik Pedersen
855e5869c6
docs: Regen CLI docs 2022-05-08 16:57:29 +02:00
Bjørn Erik Pedersen
327aaed6d8 Squashed 'docs/' changes from 7030fe3a2..2d9da3a56
2d9da3a56 Update build-options.md
5d910e24d Update introduction.md
111482a8d netlify: Hugo 0.98.0
d5505ca6f docs: Regen docs helper

git-subtree-dir: docs
git-subtree-split: 2d9da3a563a90eb8bc80dfb387b25a34b328329e
2022-05-08 16:56:42 +02:00
Bjørn Erik Pedersen
1c7759028e
Merge commit '327aaed6d8' 2022-05-08 16:56:42 +02:00
Bjørn Erik Pedersen
35c88a7f90 Use configured timeZone for the clock
And some other related adjustments.

Updates #8787
2022-05-08 16:56:26 +02:00
satotake
e77ca3c105 Add clock cli flag
Close #8787
2022-05-08 16:56:26 +02:00
Bjørn Erik Pedersen
f2946da9e8 Improve error messages, esp. when the server is running
* Add file context to minifier errors when publishing
* Misc fixes (see issues)
* Allow custom server error template in layouts/server/error.html

To get to this, this commit also cleans up and simplifies the code surrounding errors and files. This also removes the usage of `github.com/pkg/errors`, mostly because of https://github.com/pkg/errors/issues/223 -- but also because most of this is now built-in to Go.

Fixes #9852
Fixes #9857
Fixes #9863
2022-05-06 19:43:22 +02:00
Bjørn Erik Pedersen
6eea32bd6b tpl: Improve godoc 2022-05-06 19:43:22 +02:00
nathannaveen
a6d545854a
github: Add permissions to test action 2022-05-03 09:23:47 +02:00
Bjørn Erik Pedersen
e5f2173169
tpl/crypto: Add example for FNV32a 2022-04-28 17:47:17 +02:00
hugoreleaser
89c1655ec8 releaser: Prepare repository for 0.99.0-DEV
[ci skip]
2022-04-28 11:02:45 +00:00
hugoreleaser
165d299cde releaser: Bump versions for release of 0.98.0
[ci skip]
2022-04-28 10:23:30 +00:00
hugoreleaser
e94dc6710a releaser: Add release notes for 0.98.0
[ci skip]
2022-04-28 10:23:30 +00:00
Bjørn Erik Pedersen
a4fff5753f
docs: Regen docs helper 2022-04-28 11:53:03 +02:00
Bjørn Erik Pedersen
3902f9a476 Squashed 'docs/' changes from 4c5edacfe..7030fe3a2
7030fe3a2 Remove .hvm file
dd0f98831 Add details for DigitalOcean (#1730)
ff0c8a6e7 netlify: Hugo 0.97.3
e254724a7 Delete hosting-on-bitbucket.md (#1723)
f4304fb7e Remove references to mmark (#1727)
255319023 remove broken link to codeplex.com (#1725)
06cc3856b delete broken link (#1724)
ec80dc069 Revert "netlify: Hugo 0.97.2"
211bad5de netlify: Hugo 0.97.2
cd549bca9 Revert "netlify: Update to Hugo 0.97.1" (#1722)
1039a0a48 netlify: Update to Hugo 0.97.1
a28e0d0d3 Update AddDate method
9077b443f Update lists.md
6b174329a Update lists.md
d87d9e296 netlify: Hugo 0.97.0
fa7db7c7e Merge branch 'tempv0.97.0'
dd6df54b5 Fix broken anchor links (#1717)
6b6743976 Remove StackImpact showcase
d00a7eda9 Fix for Cloudflare docs location (#1716)
890866722 Add git required FAQ & remove ZIP from Quick Start (#1713)
73e82d911 resources: Add `key` to reources.GetRemote options map
6795cd2a1 Correct possible typos re: Alias robots usage (#1165)
efd5d186a Hosting on Cloudflare Pages (#1709)
9239c5f2a deps: Update github.com/tdewolff/minify/v2 v2.10.0 => v2.11.0
859573bc8 Merge commit 'ec920363cd'
21f108f12 docs: Regen CLI docs
9b6e7afd2 Add environment as a new filter to _cascade.target

git-subtree-dir: docs
git-subtree-split: 7030fe3a2ea107a23a4442902cb693557a421523
2022-04-28 11:52:15 +02:00
Bjørn Erik Pedersen
4852a37653
Merge commit '3902f9a476' 2022-04-28 11:52:15 +02:00
Bjørn Erik Pedersen
fa80fe3c8a Some godoc adjustments and image struct renames 2022-04-27 23:53:56 +02:00
Bjørn Erik Pedersen
11047534e4 tpl/crypto: Add FNV32a
Main motivation to get a integer from a string.
2022-04-27 23:53:56 +02:00
Bjørn Erik Pedersen
d7b54a4c37 markup/goldmark: Fix attribute nilpointer
Fixes 9819
2022-04-27 23:53:56 +02:00
Bjørn Erik Pedersen
13ceef7599 deps: Update to gocloud.dev v0.24.0
Note that the v0.25.0 version is broken (for Hugo, at least).
2022-04-27 12:12:43 +02:00
dependabot[bot]
942d0dd2c7 build(deps): bump github.com/mitchellh/mapstructure from 1.4.3 to 1.5.0
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.3 to 1.5.0.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.3...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/mapstructure
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 10:06:21 +02:00
Joe Mooring
a022ca271b deps: Update github.com/yuin/goldmark v1.4.11 => v1.4.12
Fixes #9054
Fixes #9756
Fixes #9757
2022-04-27 10:04:00 +02:00
dependabot[bot]
d56b33955f build(deps): bump github.com/evanw/esbuild from 0.14.36 to 0.14.38
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.36 to 0.14.38.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.36...v0.14.38)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 10:03:12 +02:00
Joe Mooring
55e28c239e deps: Update github.com/tdewolff/minify/v2 v2.11.1 => v2.11.2
Fixes #9820
2022-04-26 20:01:45 +02:00
Bjørn Erik Pedersen
9a888c243a Some godoc adjustments 2022-04-23 22:22:50 +02:00
Bjørn Erik Pedersen
05b45c35c8 tpl/lang: Handle nil values in lang.Merge 2022-04-23 22:22:50 +02:00
Bjørn Erik Pedersen
625be77e08 resources/page: Mark some more interface methods as internal
For the new documenttion.
2022-04-23 22:22:50 +02:00
Bjørn Erik Pedersen
097fd588ca Deprecate page.Author and page.Authors
These are not documented, and they don't belong on Page. We should consider having author a first class citizen of Hugo, but as it is not it's better modelled as a taxonomy.
2022-04-23 22:22:50 +02:00
hugoreleaser
41cc4e4ba3 releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-18 18:01:38 +00:00
hugoreleaser
078053a43d releaser: Bump versions for release of 0.97.3
[ci skip]
2022-04-18 17:22:19 +00:00
hugoreleaser
7d9f888080 releaser: Add release notes for 0.97.3
[ci skip]
2022-04-18 17:22:19 +00:00
Bjørn Erik Pedersen
9b352f04a3 Fix syncing of /static regression
As introduced in Hugo `v0.76.1`.

And add a proper test for it.

Fixes  #9794
Closes #9788
2022-04-18 19:17:27 +02:00
Bjørn Erik Pedersen
e66e2e9ce5 Revert "Revert "Fix PostProcess regression for hugo server""
This reverts commit 6c35a1a9ea.

Updates #9794
2022-04-18 19:17:27 +02:00
hugoreleaser
5de6f8a02c releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-17 09:16:40 +00:00
hugoreleaser
5099abe600 releaser: Bump versions for release of 0.97.2
[ci skip]
2022-04-17 08:39:27 +00:00
hugoreleaser
99ec88d42d releaser: Add release notes for 0.97.2
[ci skip]
2022-04-17 08:39:27 +00:00
Bjørn Erik Pedersen
6c35a1a9ea
Revert "Fix PostProcess regression for hugo server"
This reverts commit 4deb5c6066.
2022-04-17 10:35:01 +02:00
hugoreleaser
363bc907c0 releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-16 17:35:04 +00:00
hugoreleaser
04efcb2a68 releaser: Bump versions for release of 0.97.1
[ci skip]
2022-04-16 16:57:30 +00:00
hugoreleaser
4560725521 releaser: Add release notes for 0.97.1
[ci skip]
2022-04-16 16:57:30 +00:00
Bjørn Erik Pedersen
4deb5c6066 Fix PostProcess regression for hugo server
Fixes #9788
2022-04-16 18:43:13 +02:00
Bjørn Erik Pedersen
397fce5603
Fix MediaType when reading images from cache
Fixes #8931
2022-04-16 16:36:15 +02:00
Bjørn Erik Pedersen
0093eaa683 deps: Upgrade github.com/bep/overlayfs v0.4.0 => v0.5.0
That version implement file.Readdir/Readdirnames for n > 0.

Closes #9783
2022-04-14 21:26:05 +02:00
hugoreleaser
d0f731c039 releaser: Prepare repository for 0.98.0-DEV
[ci skip]
2022-04-14 09:24:30 +00:00
hugoreleaser
c07f3626e7 releaser: Bump versions for release of 0.97.0
[ci skip]
2022-04-14 08:45:07 +00:00
hugoreleaser
42b5d16536 releaser: Add release notes for 0.97.0
[ci skip]
2022-04-14 08:45:07 +00:00
Bjørn Erik Pedersen
d80d5a104f
releaser: Reduce parallelism 2022-04-14 10:38:31 +02:00
Bjørn Erik Pedersen
842262f653
Revert "build(deps): bump gocloud.dev from 0.20.0 to 0.25.0"
This reverts commit 20162518c4.

Updates #9778
2022-04-13 17:29:36 +02:00
Bjørn Erik Pedersen
2dbdf38a54 resources: Add key to reources.GetRemote options map
If set, `key` will be used as the only cache key element for the resource.

The default behaviour is to calculate the key based on the URL and all the options.

This means that you can now do:

```
{{ $cacheKey := print $url (now.Format "2006-01-02") }}
{{ $resource := resource.GetRemote $url (dict "key" $cacheKey) }}
```

Fixes #9755
2022-04-13 09:18:17 +02:00
dependabot[bot]
f8c4e1690a build(deps): bump github.com/evanw/esbuild from 0.14.34 to 0.14.36
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.34 to 0.14.36.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.34...v0.14.36)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-12 15:03:47 +02:00
Bjørn Erik Pedersen
627eed1d62
Make string sorting (e.g. ByTitle, ByLinkTitle and ByParam) language aware
Fixes #2180
2022-04-12 13:24:16 +02:00
Bjørn Erik Pedersen
82ba634ed9 Fix gosum checksum errors
Both of the 2 libraries in question have had known "double releases" -- same tag pushed twice with different commits.

Note that this will not resolve itself in Hugo "fully" before we do a new release (which should happen in a day or two).

Fixes #9771
2022-04-11 20:12:11 +02:00
dependabot[bot]
d417a6cf74 build(deps): bump github.com/tdewolff/minify/v2 from 2.11.0 to 2.11.1
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.11.0 to 2.11.1.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.11.0...v2.11.1)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 11:48:11 +02:00
Bjørn Erik Pedersen
13dac7f3cd
compare: Add a string sort benchmark 2022-04-11 11:33:58 +02:00
Bjørn Erik Pedersen
30c2e54c25 Replace all usage of CopyOnWriteFs with OverlayFs
Fixes #9761
2022-04-10 13:49:31 +02:00
Joe Mooring
3117e58595 deps: Update github.com/tdewolff/minify/v2 v2.10.0 => v2.11.0
Fixes #9713
Fixes #9740

Adds support for minify.tdewolff.svg.keepComments (bool)
2022-04-08 21:44:29 +02:00
Bjørn Erik Pedersen
ec920363cd Squashed 'docs/' changes from 63386081c..4c5edacfe
4c5edacfe cSpell config update (#1700)
9df788b25 Fix broken link (hugo modules) (#1710)
9928a70d6 Fix workspace formatting (#1707)
55467e7c8 Update partials.md
9f4bd0023 Update formats.md
9b3913c86 Remove footnoteAnchorPrefix and footnoteReturnLinkContents (#1704)
94502a09b Code block render hooks are introduced in v0.93.0 (#1701)
c447270ef Update sitemap-template.md
78665c1e0 Update sitemap-template.md
60653c17d Update the caddy error docs link (#1696)
9a3675aad Update sitemap templates (#1699)
e0d08cdbb Add wpxr-to-static to list of migration tools (#1512)
b53eb5a08 Add page for deploying with rclone (#1511)
4207c57ff netlify: Hugo 0.96.0
a18d646ea docs: Regen docshelper
e3e0981ed docs: Regen CLI docs
fda988d01 Merge commit 'd276e901b3'
e4a26dbca tpl/crypto: Add optional encoding arg to hmac function

git-subtree-dir: docs
git-subtree-split: 4c5edacfeebd13eb7f876723c065466cd50e0cae
2022-04-08 13:32:01 +02:00
Bjørn Erik Pedersen
5b5dcb8d5a
Merge commit 'ec920363cd' 2022-04-08 13:32:01 +02:00
Bjørn Erik Pedersen
ffe3eb9195
docs: Regen CLI docs 2022-04-08 13:31:50 +02:00
Bjørn Erik Pedersen
d070bdf10f
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
2022-04-08 13:26:17 +02:00
Bjørn Erik Pedersen
b08193971a
Revert "Revert "Some minor adjustments to the new static filesystem logic""
This reverts commit 5ef8a9f32c.
2022-04-08 13:26:17 +02:00
Bjørn Erik Pedersen
0a56f2af4e
Revert "Revert "Allow rendering static files to disk and dynamic to memory in server mode""
This reverts commit 64b7b7a897.
2022-04-08 13:26:16 +02:00
dependabot[bot]
9e360d3844 build(deps): bump github.com/evanw/esbuild from 0.14.31 to 0.14.34
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.31 to 0.14.34.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.31...v0.14.34)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 11:38:43 +02:00
Joe Mooring
a8c221d33b modules/client: Vendor config directory if present
Fixes #9751
2022-04-05 20:39:04 +02:00
Bjørn Erik Pedersen
e58a540895 resources: Create a common ResourceFinder interface
And make both .Resources and resources implement it.

This gets us 2 new methods/functions, so you can now also do:

* .Resources.Get
* resources.ByType

Note that GetRemote is not covered by this interface, as that is only available as a global template function.

Fixes #8653
2022-04-05 18:00:44 +02:00
dependabot[bot]
20162518c4 build(deps): bump gocloud.dev from 0.20.0 to 0.25.0
Bumps [gocloud.dev](https://github.com/google/go-cloud) from 0.20.0 to 0.25.0.
- [Release notes](https://github.com/google/go-cloud/releases)
- [Commits](https://github.com/google/go-cloud/compare/v0.20.0...v0.25.0)

---
updated-dependencies:
- dependency-name: gocloud.dev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 17:01:25 +02:00
dependabot[bot]
6b469cc8fb build(deps): bump golang.org/x/tools from 0.1.9 to 0.1.10
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.9 to 0.1.10.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.9...v0.1.10)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 16:14:00 +02:00
dependabot[bot]
080dcac6b8 build(deps): bump github.com/magefile/mage from 1.12.1 to 1.13.0
Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.12.1 to 1.13.0.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.12.1...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/magefile/mage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 16:13:27 +02:00
dependabot[bot]
072fc8cc34 build(deps): bump github.com/gobuffalo/flect from 0.2.4 to 0.2.5
Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.2.4 to 0.2.5.
- [Release notes](https://github.com/gobuffalo/flect/releases)
- [Commits](https://github.com/gobuffalo/flect/compare/v0.2.4...v0.2.5)

---
updated-dependencies:
- dependency-name: github.com/gobuffalo/flect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 16:12:17 +02:00
Bjørn Erik Pedersen
658e11ebaa Localize all the GroupBy*Date methods
Fixes #9745
2022-04-05 16:11:11 +02:00
dependabot[bot]
e0a882fd3b build(deps): bump github.com/getkin/kin-openapi from 0.93.0 to 0.94.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.93.0 to 0.94.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.93.0...v0.94.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 13:54:36 +02:00
David Jones
d0657a436e
deploy: Set an MD5 attribute and use that if eTag not available
During Hugo deploy when a remote MD5 is invalid (e.g due to multipart eTag) Hugo reads the entire remote file and calculates the MD5 again which can be slow.

This commit updates the file upload so that it will also store an MD5 hash in the cloud provider's attributes. e.g in AWS this looks like x-amz-meta-md5chksum: 26fe392386a8123bf8956a16e08cb841.
2022-04-05 10:42:54 +02:00
dependabot[bot]
a6e2e38bb2 build(deps): bump github.com/sanity-io/litter from 1.5.2 to 1.5.4
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.2 to 1.5.4.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.2...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 10:39:27 +02:00
dependabot[bot]
510e179003 build(deps): bump github.com/evanw/esbuild from 0.14.25 to 0.14.31
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.25 to 0.14.31.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.25...v0.14.31)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 09:42:11 +02:00
dependabot[bot]
21484f9e12 build(deps): bump github.com/frankban/quicktest from 1.14.2 to 1.14.3
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.14.2 to 1.14.3.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.14.2...v1.14.3)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 09:41:45 +02:00
Cathrine Paulsen
da00e7714e
Add environment as a new filter to _cascade.target
Fixes #9612
2022-04-05 09:41:24 +02:00
Bjørn Erik Pedersen
ed9aa374dd
Merge branch 'release-0.96.0' 2022-04-03 19:57:04 +02:00
Further
2a231b0b57
Snap: Add {system,user}-gitconfig plugs to read gitconfig (#9619)
* Add system-gitconfig plug to read /etc/gitconfig
* Add user-gitconfig plug to read user-specific gitconfig file(s)
* Add app environment setting to set $HOME as $SNAP_REAL_HOME
2022-04-01 02:52:39 -06:00
hugoreleaser
69c590080f releaser: Prepare repository for 0.97.0-DEV
[ci skip]
2022-03-26 09:53:13 +00:00
hugoreleaser
2fd4a7d3d6 releaser: Bump versions for release of 0.96.0
[ci skip]
2022-03-26 09:15:58 +00:00
hugoreleaser
5a4ac2dac1 releaser: Add release notes for 0.96.0
[ci skip]
2022-03-26 09:15:58 +00:00
Bjørn Erik Pedersen
db1562e134
docs: Regen docshelper 2022-03-26 11:06:04 +02:00
Bjørn Erik Pedersen
5b18e10841
docs: Regen CLI docs 2022-03-26 11:05:30 +02:00
Bjørn Erik Pedersen
d276e901b3 Squashed 'docs/' changes from a393f4cf4..63386081c
63386081c update cSpell config update
15c76494b Update cSpell custom dictionary (#1694)
34f3167b7 Update image processing (#1625)
7462cc798 fix: pipes in sample code break table creation (#1686)
48736447e Update anchorize.md
2ff0bd10b netlify: Hugo 0.95.0
0fc1d21b2 Update configuration.md
41855e372 Fix #1682
8c663433e Update related.md
7aa072eab netlify: Hugo 0.94.2
1682c7ee7 Update render-hooks.md
ce1283cc4 Move the Render Hooks doc to its own page
bbbbfbfc6 Update configuration-markup.md
92d91a316 Update configuration-markup.md
2e8068823 Update configuration-markup.md
ff2dbca60 Update configuration-markup.md
89d8e5d65 Add code block documenation
e993539f0 Update shortcodes.md
c1b28dbfe netlify: Hugo 0.94.1
81b8c9b83 Merge branch 'tempv0.94.1'
4763b3d50 docs: Regenerate CLI docs
b18463971 netlify: Bump to Hugo 0.94.0
4152ebc1d Merge branch 'tempv0.94.0'
ba3a11ac2 docs: Regenerate docshelper
e64016d13 docs: Regenerate docshelper
29180e4d2 add `.html` suffix to partial usage and references
3213e00f2 Docs tidy-up
6cfcae4b7 docs: Regenerate CLI docs
8a6cd0b4d docs: Regenerate docshelper
b20ab262f Merge commit 'd706529720'

git-subtree-dir: docs
git-subtree-split: 63386081c55de6a7f97adde564a9cfc2ad326119
2022-03-26 11:04:57 +02:00
Bjørn Erik Pedersen
d7497b28c1
Merge commit 'd276e901b3' 2022-03-26 11:04:57 +02:00
Sara Op den Orth
94459680ba Deprecate .File.Extension
Fixes #9352
2022-03-26 10:03:36 +01:00
Bjørn Erik Pedersen
9202117ba0 resources: Add more details to .Err
This commit adds a .Data object (a map with `Body`, `StatusCode` etc.) to the .Err returned from `resources.GetRemote`, which means you can now do:

```
{{ with .Err }}
{{ range $k, $v := .Data }}
{{ end }}
{{ end }}
```

Fixes #9708
2022-03-25 16:40:36 +01:00
Joe Mooring
a6fa290f67 commands: Change link protocol to https 2022-03-25 15:29:50 +01:00
dependabot[bot]
0bbc2fb523 build(deps): bump github.com/getkin/kin-openapi from 0.91.0 to 0.93.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.91.0 to 0.93.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.91.0...v0.93.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 11:08:23 +01:00
Joe Mooring
94e8a90769 tpl/crypto: Add optional encoding arg to hmac function
Closes #9709
2022-03-23 19:42:56 +01:00
Panagiotis Koursaris
a461e9d01a Fix typo 2022-03-22 00:39:33 -06:00
cuishuang
48c98a8d24 Fix some typos
Signed-off-by: cuishuang <imcusg@gmail.com>
[foka@debian.org: Resolve merge conflict and squash 2 commits]
Signed-off-by: Anthony Fok <foka@debian.org>
2022-03-22 00:38:23 -06:00
Anthony Fok
bbd455fe79 Update CONTRIBUTING.md to use "go install" to install mage
In Go 1.18, "go get" no longer builds packages.
2022-03-21 21:01:24 -06:00
Anthony Fok
8309a2b1c1 Dockerfile: Make it build with Go 1.18 2022-03-21 21:01:24 -06:00
Anthony Fok
2b7231097f snap: Make it build with Go 1.18 2022-03-21 21:01:24 -06:00
dependabot[bot]
13ff4ded76 build(deps): bump github.com/yuin/goldmark from 1.4.10 to 1.4.11
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.10 to 1.4.11.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.10...v1.4.11)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 17:31:27 +01:00
dependabot[bot]
c3289eb5b8 build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 14:08:38 +01:00
Bjørn Erik Pedersen
9539069f5e commands: Improve server startup to make tests less flaky
Do this by announcing/listen on the local address before we start the server.
2022-03-21 09:32:35 +01:00
Bjørn Erik Pedersen
0e305d6958 all: Use strings.Cut
Updates #9687
2022-03-21 09:32:35 +01:00
Luke de Waal
5adb81ce39 Support '-u=patch' in hugo mod get
The control-flow for running `hugo mod get` was adapted to allow for passing `-u=patch`
instead of only being able to pass `-u`.

Fixes #9127
2022-03-20 22:07:26 +01:00
Bjørn Erik Pedersen
1c0e7c1ae1 Make sure file mounts higher up wins
Fixes #9693
2022-03-20 20:23:03 +01:00
Joe Mooring
cad2d8cc70 resources/images: Require width and height for Crop, Fill, and Fit
Closes #9696
2022-03-20 19:44:41 +01:00
Bjørn Erik Pedersen
b80853de90
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
2022-03-17 22:03:27 +01:00
Bjørn Erik Pedersen
423594e03a dartsass: Enable deprecation, @warn and @debug logging
* @warn and Sass deprecations are printed as WARN
* @debug is currently logged as INFO (needs the `--verbose` flag). We may adjust this if it gets too chatty.

Fixes #9683
2022-03-17 21:45:43 +01:00
Bjørn Erik Pedersen
64afb7ca51 Use revision etc. from debug.BuildInfo
Fixes #9680
2022-03-17 17:14:38 +01:00
hugoreleaser
004bec2e9a releaser: Prepare repository for 0.96.0-DEV
[ci skip]
2022-03-16 15:00:05 +00:00
hugoreleaser
9f2e76af65 releaser: Bump versions for release of 0.95.0
[ci skip]
2022-03-16 14:20:17 +00:00
hugoreleaser
f1d1576822 releaser: Add release notes for 0.95.0
[ci skip]
2022-03-16 14:20:17 +00:00
Bjørn Erik Pedersen
5930173cd0
readme: Add note about Go 1.18 2022-03-16 13:20:30 +01:00
Bjørn Erik Pedersen
3476b53343
tpl: Pull in Go 1.18 patch that fixes the "no space in {{ continue }} and {{ break }}" bug 2022-03-16 13:14:23 +01:00
Bjørn Erik Pedersen
e792d27017
readme: Add a contribution note 2022-03-16 13:09:17 +01:00
Bjørn Erik Pedersen
9d6495d774
github: Make it build with Go 1.18
I also ran some benchmarks comparing it to Go 1.17.8:

```bash
name                                      old time/op    new time/op    delta
SiteNew/Regular_Bundle_with_image-10        5.13ms ± 7%    4.23ms ± 7%  -17.47%  (p=0.029 n=4+4)
SiteNew/Regular_Bundle_with_JSON_file-10    5.12ms ± 1%    4.16ms ± 1%  -18.65%  (p=0.029 n=4+4)
SiteNew/Regular_Tags_and_categories-10      17.3ms ± 2%    15.1ms ± 1%  -12.53%  (p=0.029 n=4+4)
SiteNew/Regular_Canonify_URLs-10             106ms ± 1%      90ms ± 0%  -15.86%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-10        34.0ms ± 1%    30.0ms ± 2%  -11.72%  (p=0.029 n=4+4)
SiteNew/Regular_TOML_front_matter-10        22.7ms ± 2%    20.2ms ± 1%  -10.93%  (p=0.029 n=4+4)
SiteNew/Regular_Many_HTML_templates-10      16.7ms ± 0%    14.6ms ± 1%  -12.89%  (p=0.029 n=4+4)
SiteNew/Regular_Page_collections-10         22.2ms ± 1%    19.5ms ± 1%  -12.07%  (p=0.029 n=4+4)
SiteNew/Regular_List_terms-10               7.71ms ± 0%    6.59ms ± 1%  -14.52%  (p=0.029 n=4+4)

name                                      old alloc/op   new alloc/op   delta
SiteNew/Regular_Bundle_with_image-10        2.07MB ± 0%    2.04MB ± 0%   -1.40%  (p=0.029 n=4+4)
SiteNew/Regular_Bundle_with_JSON_file-10    1.85MB ± 0%    1.83MB ± 0%   -1.54%  (p=0.029 n=4+4)
SiteNew/Regular_Tags_and_categories-10      11.8MB ± 0%    11.1MB ± 0%   -6.11%  (p=0.029 n=4+4)
SiteNew/Regular_Canonify_URLs-10            95.8MB ± 0%    95.2MB ± 0%   -0.63%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-10        27.4MB ± 0%    26.9MB ± 0%   -1.68%  (p=0.029 n=4+4)
SiteNew/Regular_TOML_front_matter-10        15.2MB ± 0%    14.4MB ± 0%   -4.93%  (p=0.029 n=4+4)
SiteNew/Regular_Many_HTML_templates-10      8.45MB ± 0%    8.24MB ± 0%   -2.43%  (p=0.029 n=4+4)
SiteNew/Regular_Page_collections-10         16.5MB ± 0%    16.2MB ± 0%   -1.78%  (p=0.029 n=4+4)
SiteNew/Regular_List_terms-10               3.73MB ± 0%    3.64MB ± 0%   -2.30%  (p=0.029 n=4+4)

name                                      old allocs/op  new allocs/op  delta
SiteNew/Regular_Bundle_with_image-10         25.0k ± 0%     24.1k ± 0%   -3.60%  (p=0.029 n=4+4)
SiteNew/Regular_Bundle_with_JSON_file-10     25.1k ± 0%     24.1k ± 0%   -3.60%  (p=0.029 n=4+4)
SiteNew/Regular_Tags_and_categories-10        237k ± 0%      234k ± 0%   -1.29%  (p=0.029 n=4+4)
SiteNew/Regular_Canonify_URLs-10              365k ± 0%      363k ± 0%   -0.47%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-10          284k ± 0%      279k ± 0%   -1.98%  (p=0.029 n=4+4)
SiteNew/Regular_TOML_front_matter-10          252k ± 0%      249k ± 0%   -1.48%  (p=0.029 n=4+4)
SiteNew/Regular_Many_HTML_templates-10        117k ± 0%      115k ± 0%   -1.68%  (p=0.029 n=4+4)
SiteNew/Regular_Page_collections-10           184k ± 0%      181k ± 0%   -1.74%  (p=0.029 n=4+4)
SiteNew/Regular_List_terms-10                49.9k ± 0%     48.5k ± 0%   -2.79%  (p=0.029 n=4+4)
```
2022-03-16 11:32:39 +01:00
Bjørn Erik Pedersen
42cc5f88b6
tpl: Adjustments and an integration test for Go 1.18
Updates #9677
2022-03-16 10:36:46 +01:00
Bjørn Erik Pedersen
a6488e7bad
Remove Go 1.17 support
Go 1.18 had some breaking changes on source level meaning we cannot build on older Go versions anymore.

The improvements in Go 1.18 (e.g. `break` and `continue`)  were to good to pass on.

Note that you don't need Go (or Go 1.18) to run a pre-built binary.

Updates #9677
2022-03-16 08:57:58 +01:00
Bjørn Erik Pedersen
65a78cae1e
tpl: Sync go_templates for Go 1.18
Using Go tag go1.18 4aa1efed4853ea067d665a952eee77c52faac774

Updates #9677
2022-03-16 08:54:25 +01:00
Bjørn Erik Pedersen
4d6d1d08da
build: Bump to Go 1.18
Updates #9677
2022-03-16 08:43:18 +01:00
Bjørn Erik Pedersen
b60e1bbdfe dartsass: Improve error message when no read access
Fixes #9662
2022-03-15 16:34:54 +01:00
Cathrine Paulsen
61cf3c9f63 Fix and refactor typos 2022-03-14 19:39:07 +01:00
Bjørn Erik Pedersen
31fbc081c9 Improve server startup/shutdown
Closes #9671
2022-03-14 19:38:17 +01:00
Bjørn Erik Pedersen
cebd886ac1 commands: Improve server tests
Updates #9647
2022-03-14 09:16:33 +01:00
hugoreleaser
38f778cfcc releaser: Prepare repository for 0.95.0-DEV
[ci skip]
2022-03-12 11:02:38 +00:00
hugoreleaser
48fb9e4de3 releaser: Bump versions for release of 0.94.2
[ci skip]
2022-03-12 10:28:41 +00:00
hugoreleaser
0958167b38 releaser: Add release notes for 0.94.2
[ci skip]
2022-03-12 10:28:41 +00:00
Bjørn Erik Pedersen
b37183e48d deps: Update github.com/yuin/goldmark v1.4.9 => v1.4.10
Fixes #9658
2022-03-12 11:24:11 +01:00
hugoreleaser
04ccde3e94 releaser: Prepare repository for 0.95.0-DEV
[ci skip]
2022-03-11 14:30:03 +00:00
hugoreleaser
0fcd9a5d87 releaser: Bump versions for release of 0.94.1
[ci skip]
2022-03-11 13:53:32 +00:00
hugoreleaser
4146084367 releaser: Add release notes for 0.94.1
[ci skip]
2022-03-11 13:53:32 +00:00
Bjørn Erik Pedersen
3bc742bea0
docs: Regenerate CLI docs 2022-03-11 14:47:27 +01:00
Bjørn Erik Pedersen
1a796d723c deps: Fix Goldmark regression with HTML comments
Fixes #9650
2022-03-11 14:44:01 +01:00
Bjørn Erik Pedersen
64b7b7a897 Revert "Allow rendering static files to disk and dynamic to memory in server mode"
This reverts commit 7d8011ed63.

Updates #9647
2022-03-11 13:10:47 +01:00
Bjørn Erik Pedersen
5ef8a9f32c Revert "Some minor adjustments to the new static filesystem logic"
This reverts commit 63bb2a5b18.
2022-03-11 13:10:47 +01:00
hugoreleaser
3bc34666c8 releaser: Prepare repository for 0.95.0-DEV
[ci skip]
2022-03-10 10:25:00 +00:00
hugoreleaser
63b236603e releaser: Bump versions for release of 0.94.0
[ci skip]
2022-03-10 09:46:35 +00:00
hugoreleaser
b107b4b291 releaser: Add release notes for 0.94.0
[ci skip]
2022-03-10 09:46:35 +00:00
Bjørn Erik Pedersen
a4ac188c19
docs: Regenerate docshelper 2022-03-10 10:08:04 +01:00
Bjørn Erik Pedersen
b82d95575d
Revert "markup/highlight: Add hl_inline option"
This reverts commit a360cab75a.
2022-03-10 10:06:22 +01:00
Bjørn Erik Pedersen
4e14cf7607
Fail with error when double-rendering text in markdownify/RenderString
This commit prevents the most commons case of infinite recursion in link render hooks when the `linkify` option is enabled (see below). This is always a user error, but getting a `stack overflow` (the current stack limit in Go is 1 GB on 64-bit, 250 MB on 32-bit) error isn't very helpful. This fix will not prevent all such errors, though, but we may do better once #9570 is in place.

So, these will fail:

```
<a href="{{ .Destination | safeURL }}" >{{ .Text | markdownify }}</a>
<a href="{{ .Destination | safeURL }}" >{{ .Text | .Page.RenderString }}</a>
```

`.Text` is already rendered to `HTML`. The above needs to be rewritten to:

```
<a href="{{ .Destination | safeURL }}" >{{ .Text | safeHTML }}</a>
<a href="{{ .Destination | safeURL }}" >{{ .Text | safeHTML }}</a>
```

Fixes #8959
2022-03-10 08:19:03 +01:00
Bjørn Erik Pedersen
5697348e17 markup/goldmark: Default to https for linkify
Fixes #9639
2022-03-09 22:30:10 +01:00
Joe Mooring
f98e570b17 Add lang attribute to internal alias template
Closes #9586
2022-03-09 19:06:59 +01:00
Bjørn Erik Pedersen
cdb8b0842b
docs: Regenerate docshelper 2022-03-09 11:33:53 +01:00
Bjørn Erik Pedersen
a360cab75a markup/highlight: Add hl_inline option
If set to true, the highlighted code will not be wrapped in any div.

Closes #9442
2022-03-09 11:33:13 +01:00
Joe Mooring
c97fed08f9
minifiers: Make keepWhitespace = false default for HTML (note)
Closes #9456
2022-03-09 07:48:18 +01:00
Bjørn Erik Pedersen
53a6210d82 markup/goldmark/codeblocks: Fix slice bounds out of range
For the Position in code blocks we try to match the .Inner with the original source. This isn't always possible.

This commits avoids panics in these situations.

Fixes #9627
2022-03-08 21:50:21 +01:00
Bjørn Erik Pedersen
7182809d96
docs: Regenerate CLI docs 2022-03-08 19:40:50 +01:00
Bjørn Erik Pedersen
1f8cd2614d
docs: Regenerate docshelper 2022-03-08 19:40:07 +01:00
Bjørn Erik Pedersen
9d76b8fa34
Merge commit 'd706529720' 2022-03-08 19:39:33 +01:00
Bjørn Erik Pedersen
d706529720 Squashed 'docs/' changes from 3f95a2ace..a393f4cf4
a393f4cf4 Add a Spellcheck GitHub Action and config
8b6b1c381 netlify: Bump to Hugo 0.93.3
84515c183 Delete deployment-with-nanobox.md
dd45f9899 Fix typos in docs
e69de81a9 Update build-options.md
7745b7891 netlify: Hubo 0.93.2
037d63364 Clarify GitHub Pages Branches
94660c34b add missing %s
325de15e2 fix link to latest release note since the release notes were moved to GitHub: https://gohugo.io/news/no-more-releasenotes-here/
dbff41d01 Update introduction.md
0ecd627f7 netlify: Hugo 0.93.1
a74e16582 Update diagrams.md
33e310956 Add Goat example to test styling
fa0100a5b Update diagrams.md
64ac75367 Adjust diagram docs
f1d600044 Update theme
95bedff1a netlify: Bump to Hugo 0.93.0
849a8437f Merge commit 'c1398b91a9'
c0c60c43c docs: Regenerate docs helper
2c63fe518 cod: Regen CLI docs
f33ba4e5a CodeblockContext method renames
979b47968 Move the Goat template to the correct place
2df37e9e8 Add Markdown diagrams and render hooks for code blocks
bd8037d43 Allow images to be cropped without being resized
8b2af4b49 modules: Add modules.Workspace config for Go 1.18
46b99dea1 Add --printUnusedTemplates
1285302c9 commands: Rename --i18n-warnings to printI18nWarnings
dea2242c6 commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage
db782ea46 deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0

git-subtree-dir: docs
git-subtree-split: a393f4cf43829011e96d109de2f039a9b05b2d16
2022-03-08 19:37:17 +01:00
Bjørn Erik Pedersen
4576c82ed4 Cache reflect.MethodByName
The isolated benchmark for the function is obviously much faster:

```bash
name                old time/op    new time/op    delta
GetMethodByName-10    1.21µs ± 7%    0.23µs ± 5%   -81.42%  (p=0.029 n=4+4)

name                old alloc/op   new alloc/op   delta
GetMethodByName-10      680B ± 0%        0B       -100.00%  (p=0.029 n=4+4)

name                old allocs/op  new allocs/op  delta
GetMethodByName-10      20.0 ± 0%       0.0       -100.00%  (p=0.029 n=4+4)
```

But more pleasing is the overall performance looking at the site benchmarks:

```bash
name                                      old time/op    new time/op    delta
SiteNew/Regular_Bundle_with_image-10        6.25ms ± 2%    6.10ms ± 2%     ~     (p=0.057 n=4+4)
SiteNew/Regular_Bundle_with_JSON_file-10    6.30ms ± 2%    5.66ms ±11%     ~     (p=0.057 n=4+4)
SiteNew/Regular_Tags_and_categories-10      22.2ms ± 2%    17.4ms ± 1%  -21.88%  (p=0.029 n=4+4)
SiteNew/Regular_Canonify_URLs-10             108ms ± 0%     107ms ± 0%   -1.20%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-10        36.1ms ± 1%    33.8ms ± 1%   -6.44%  (p=0.029 n=4+4)
SiteNew/Regular_TOML_front_matter-10        24.9ms ± 1%    22.6ms ± 1%   -9.30%  (p=0.029 n=4+4)
SiteNew/Regular_Many_HTML_templates-10      17.9ms ± 1%    16.7ms ± 1%   -6.43%  (p=0.029 n=4+4)
SiteNew/Regular_Page_collections-10         23.3ms ± 1%    22.0ms ± 0%   -5.58%  (p=0.029 n=4+4)
SiteNew/Regular_List_terms-10               8.00ms ± 1%    7.63ms ± 0%   -4.62%  (p=0.029 n=4+4)

name                                      old alloc/op   new alloc/op   delta
SiteNew/Regular_Bundle_with_image-10        2.10MB ± 0%    2.07MB ± 0%   -1.46%  (p=0.029 n=4+4)
SiteNew/Regular_Bundle_with_JSON_file-10    1.88MB ± 0%    1.85MB ± 0%   -1.76%  (p=0.029 n=4+4)
SiteNew/Regular_Tags_and_categories-10      13.5MB ± 0%    11.6MB ± 0%  -13.99%  (p=0.029 n=4+4)
SiteNew/Regular_Canonify_URLs-10            96.1MB ± 0%    95.8MB ± 0%   -0.40%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-10        28.4MB ± 0%    27.3MB ± 0%   -3.83%  (p=0.029 n=4+4)
SiteNew/Regular_TOML_front_matter-10        16.9MB ± 0%    15.1MB ± 0%  -10.58%  (p=0.029 n=4+4)
SiteNew/Regular_Many_HTML_templates-10      8.98MB ± 0%    8.44MB ± 0%   -6.04%  (p=0.029 n=4+4)
SiteNew/Regular_Page_collections-10         17.1MB ± 0%    16.5MB ± 0%   -3.91%  (p=0.029 n=4+4)
SiteNew/Regular_List_terms-10               3.92MB ± 0%    3.72MB ± 0%   -5.03%  (p=0.029 n=4+4)

name                                      old allocs/op  new allocs/op  delta
SiteNew/Regular_Bundle_with_image-10         25.8k ± 0%     24.9k ± 0%   -3.49%  (p=0.029 n=4+4)
SiteNew/Regular_Bundle_with_JSON_file-10     25.8k ± 0%     24.9k ± 0%   -3.49%  (p=0.029 n=4+4)
SiteNew/Regular_Tags_and_categories-10        288k ± 0%      233k ± 0%  -18.90%  (p=0.029 n=4+4)
SiteNew/Regular_Canonify_URLs-10              375k ± 0%      364k ± 0%   -2.80%  (p=0.029 n=4+4)
SiteNew/Regular_Deep_content_tree-10          314k ± 0%      283k ± 0%   -9.77%  (p=0.029 n=4+4)
SiteNew/Regular_TOML_front_matter-10          302k ± 0%      252k ± 0%  -16.55%  (p=0.029 n=4+4)
SiteNew/Regular_Many_HTML_templates-10        133k ± 0%      117k ± 0%  -11.81%  (p=0.029 n=4+4)
SiteNew/Regular_Page_collections-10           202k ± 0%      183k ± 0%   -9.55%  (p=0.029 n=4+4)
SiteNew/Regular_List_terms-10                55.6k ± 0%     49.8k ± 0%  -10.40%  (p=0.029 n=4+4)
```

Thanks to @quasilyte for the suggestion.

Fixes 9386
2022-03-08 19:36:55 +01:00
Bjørn Erik Pedersen
ff02d41721
releaser: Remove the GitHub link syntax around release contributors
Fixes #9581
2022-03-08 19:36:31 +01:00
Bjørn Erik Pedersen
63bb2a5b18 Some minor adjustments to the new static filesystem logic
Closes #9625
2022-03-08 19:27:54 +01:00
SatowTakeshi
7d8011ed63 Allow rendering static files to disk and dynamic to memory in server mode
Updates #9625
2022-03-08 19:27:54 +01:00
dependabot[bot]
b9a1be2f99 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.8 to 2.2.9
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.8 to 2.2.9.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.8...v2.2.9)

---
updated-dependencies:
- dependency-name: github.com/kyokomi/emoji/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-08 16:10:04 +01:00
dependabot[bot]
0978245039 build(deps): bump github.com/evanw/esbuild from 0.14.23 to 0.14.25
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.23 to 0.14.25.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.23...v0.14.25)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-08 16:09:17 +01:00
dependabot[bot]
ff37df830c build(deps): bump github.com/niklasfasching/go-org from 1.6.0 to 1.6.2
Bumps [github.com/niklasfasching/go-org](https://github.com/niklasfasching/go-org) from 1.6.0 to 1.6.2.
- [Release notes](https://github.com/niklasfasching/go-org/releases)
- [Commits](https://github.com/niklasfasching/go-org/compare/v1.6.0...v1.6.2)

---
updated-dependencies:
- dependency-name: github.com/niklasfasching/go-org
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-08 16:08:32 +01:00
dependabot[bot]
5857d5524a build(deps): bump github.com/getkin/kin-openapi from 0.90.0 to 0.91.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.90.0 to 0.91.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.90.0...v0.91.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-08 16:05:40 +01:00
hugoreleaser
d86eca5bb2 releaser: Prepare repository for 0.94.0-DEV
[ci skip]
2022-03-08 10:50:30 +00:00
hugoreleaser
44e3c002a8 releaser: Bump versions for release of 0.93.3
[ci skip]
2022-03-08 10:15:27 +00:00
hugoreleaser
9177849f9b releaser: Add release notes for 0.93.3
[ci skip]
2022-03-08 10:15:27 +00:00
Bjørn Erik Pedersen
0e0d672bcb Remove the decorator from the fs used in ReadDir
There have been a site breakage reported in the wild after 0.93.1. With this commit we shoudl be back to how it behaved in 0.92.2.

Closes #9609
2022-03-08 09:51:59 +01:00
Bjørn Erik Pedersen
19f816f77e
Update stale.yml
operations-per-run: 999

We need to get this done so the notification gets back to normal.
2022-03-08 09:09:38 +01:00
dependabot[bot]
970f385c48 build(deps): bump github.com/yuin/goldmark from 1.4.7 to 1.4.8
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.7 to 1.4.8.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.7...v1.4.8)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 09:59:16 +01:00
Bjørn Erik Pedersen
76c1248f70 Remove the examples/ folder
These are not maintained and do not belong in this repository.
2022-03-06 11:09:41 +01:00
hugoreleaser
9e76507da2 releaser: Prepare repository for 0.94.0-DEV
[ci skip]
2022-03-04 12:57:53 +00:00
hugoreleaser
643b5ae9cf releaser: Bump versions for release of 0.93.2
[ci skip]
2022-03-04 12:21:48 +00:00
hugoreleaser
2f7feca9a1 releaser: Add release notes for 0.93.2
[ci skip]
2022-03-04 12:21:48 +00:00
Bjørn Erik Pedersen
673cde1eb1 tpl/os: Revert readDir in theme behaviour
Fixes #9599
2022-03-04 08:43:47 +01:00
Joe Mooring
e46e9ceb29 markup/goldmark: Escape image alt attribute
Fixes #9594
2022-03-02 21:05:33 +01:00
hugoreleaser
883e71c96a releaser: Prepare repository for 0.94.0-DEV
[ci skip]
2022-03-02 12:52:43 +00:00
hugoreleaser
e9669fed14 releaser: Bump versions for release of 0.93.1
[ci skip]
2022-03-02 12:16:06 +00:00
hugoreleaser
fefb1caacf releaser: Add release notes for 0.93.1
[ci skip]
2022-03-02 12:16:06 +00:00
Bjørn Erik Pedersen
0327da050f tpl/transform: Fix it when template.HTML is passes as option to Hightlight
Fixes #9591
2022-03-02 12:30:35 +01:00
Bjørn Erik Pedersen
9b8b6d34e2 tpl/partials: Fix partialCached deadlock regression
This is a rollback of  0927cf739f

We cannot do that change until we either completes #9570 or possibly also use the new TryLock in GO 1.18.

Fixes #9588
Opens #4086
2022-03-02 11:16:21 +01:00
Bjørn Erik Pedersen
376704d382 tpl/collections: Fix apply when function have Context as first arg
As introduced in `partial` and `partialCached` in Hugo 0.93.0.

Fixes #9585
2022-03-01 13:18:02 +01:00
Bjørn Erik Pedersen
c1398b91a9 Squashed 'docs/' changes from 93f7baf80..3f95a2ace
3f95a2ace Update merge function examples (#1662)
e8d518011 requires -> require typo fix (#1666)
e714066cb Update GitLab deployment instructions (#1661)
11946a218 update GitLab CI/CD yaml syntax (#1649)
3568ddc03 Add explicit `contentDir` to module-config-mounts (#1658)
798ac8f68 Add default value to isHTML
d376565ce Create extensions.json

git-subtree-dir: docs
git-subtree-split: 3f95a2ace37b04851905d72e4444020e30996787
2022-02-28 10:37:27 +01:00
Bjørn Erik Pedersen
41b5bc9637
Merge commit 'c1398b91a9' 2022-02-28 10:37:27 +01:00
hugoreleaser
5a1b394f2a releaser: Prepare repository for 0.94.0-DEV
[ci skip]
2022-02-28 09:05:08 +00:00
hugoreleaser
0746908247 releaser: Bump versions for release of 0.93.0
[ci skip]
2022-02-28 08:30:42 +00:00
hugoreleaser
75084bfc72 releaser: Add release notes for 0.93.0
[ci skip]
2022-02-28 08:30:42 +00:00
Bjørn Erik Pedersen
12d00d288c
docs: Regenerate docs helper 2022-02-28 08:59:57 +01:00
Bjørn Erik Pedersen
260ff1374d
markup/highlight: Ignore HL_lines_parsed in the gen docs 2022-02-28 08:33:34 +01:00
Bjørn Erik Pedersen
14915a0c32
cod: Regen CLI docs 2022-02-28 08:12:35 +01:00
Bjørn Erik Pedersen
fd0c1a5e9b tpl/diagrams: Rename the SVG accessor to Wrapped
Not perfect, but it gets it in line with the other .Inner/.Wrapped combos.
2022-02-27 19:51:40 +01:00
Bjørn Erik Pedersen
3ad39001df markup/highlight: Rework the return value from HighlightCodeblock
To make it possible to render it with a custom HTML ("<div>")  wrapper.

Updates #9573
2022-02-27 19:51:40 +01:00
Bjørn Erik Pedersen
39261b689e tpl/transform: Add CanHighlight
Closes #9573
2022-02-27 19:51:40 +01:00
Bjørn Erik Pedersen
cff14144a6
Rename Codeowners() to CodeOwners() 2022-02-27 19:40:07 +01:00
Bjørn Erik Pedersen
5f67151550 tpl/diagrams: Rename Body to Inner
This relates to #9577 – there's no concept a body element in SVG, so we might as well use an exsisting "Hugo term".
2022-02-27 17:59:36 +01:00
Bjørn Erik Pedersen
f7109771a0 CodeblockContext method renames
Fixes #9577
2022-02-27 17:59:36 +01:00
dependabot[bot]
e1f696911e build(deps): bump github.com/tdewolff/minify/v2 from 2.9.29 to 2.10.0
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.29 to 2.10.0.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.29...v2.10.0)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-27 14:04:08 +01:00
Bjørn Erik Pedersen
5f65c17a12 markup/goldmark: Adjust test for Windows 2022-02-26 21:54:36 +01:00
Bjørn Erik Pedersen
579ff9b652 markup/goldmark: Improve attributes vs options
Fixes #9571
2022-02-26 21:54:36 +01:00
Bjørn Erik Pedersen
928a896962 markup/goldmark: Add Position to CodeblockContext
But note that this is not particulary fast and the recommendad usage is error logging only.

Updates #9574
2022-02-26 21:54:36 +01:00
Bjørn Erik Pedersen
2e54c00933 markup/goldmark: Unify some code block tests 2022-02-26 21:54:36 +01:00
Bjørn Erik Pedersen
10928a4f78 Remove the trailing new line in .Code
Fixes #9572
2022-02-26 21:54:36 +01:00
Bjørn Erik Pedersen
afd63bf7d5 markup/goldmark: Rename extension struct 2022-02-26 21:54:36 +01:00
dependabot[bot]
228126b7f5 build(deps): bump github.com/gobuffalo/flect from 0.2.3 to 0.2.4
Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/gobuffalo/flect/releases)
- [Commits](https://github.com/gobuffalo/flect/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: github.com/gobuffalo/flect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-26 10:24:59 +01:00
Bjørn Erik Pedersen
0f80be341f markup/goldmark: Use Ordinal to create default lineanchors
The `Ordinal` starts at 0, so with a `hl-` prefix, this gives `hl-0-1` as a starting point.

Fixes #9567
2022-02-25 17:22:43 +01:00
dependabot[bot]
78afdb88ab build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 08:18:20 +01:00
dependabot[bot]
3ed83227ba build(deps): bump github.com/sanity-io/litter from 1.5.1 to 1.5.2
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 08:17:48 +01:00
Bjørn Erik Pedersen
1a257bb2ba
Move the Goat template to the correct place
Updates #7765
2022-02-25 00:09:07 +01:00
dependabot[bot]
97514f17d6 build(deps): bump google.golang.org/api from 0.63.0 to 0.70.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.63.0 to 0.70.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.63.0...v0.70.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 23:05:09 +01:00
RheingoldRiver
0df096b868 Update error message about failed menus in config.toml 2022-02-24 23:04:06 +01:00
dependabot[bot]
308ad611b6 build(deps): bump github.com/getkin/kin-openapi from 0.85.0 to 0.90.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.85.0 to 0.90.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.85.0...v0.90.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 22:59:41 +01:00
Kaushal Modi
6bffcdbd26 Add test for line anchor attributes with code fences
Fixes https://github.com/gohugoio/hugo/issues/9385.
2022-02-24 22:54:49 +01:00
dependabot[bot]
7248f43188 build(deps): bump github.com/evanw/esbuild from 0.14.22 to 0.14.23
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.14.22 to 0.14.23.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.14.22...v0.14.23)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 21:30:30 +01:00
Bjørn Erik Pedersen
08fdca9d93 Add Markdown diagrams and render hooks for code blocks
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates #7765
Closes #9538
Fixes #9553
Fixes #8520
Fixes #6702
Fixes #9558
2022-02-24 18:59:50 +01:00
dependabot[bot]
2c20f5bc00 build(deps): bump github.com/aws/aws-sdk-go from 1.41.14 to 1.43.5
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.41.14 to 1.43.5.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.41.14...v1.43.5)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 17:25:24 +01:00
dependabot[bot]
723b2c485b build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.7
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.6...v0.5.7)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 17:24:46 +01:00
Marshall Cottrell
06bac57ab0 Add support for CODEOWNERS
Fixes #9474
2022-02-23 22:43:19 +01:00
Bjørn Erik Pedersen
ec8b767fa6 Remove Viper as a dependency 2022-02-23 22:40:23 +01:00
Cameron Moore
6407b2cd01 helpers: Allow hyphens in UnicodeSanitize
Improve handling of existing hyphens in input to UnicodeSanitize.
This commit accomplishes three things:

1. Explicitly allow hyphens
2. Avoid appending a hyphen if a preceeding hyphen is found
3. Avoid prepending a hyphen if a trailing hyphen is found

Fixes #7288
2022-02-23 21:21:46 +01:00
Akimo
6ff39fd908 Change disqus_config to window.disqus_config 2022-02-23 21:19:30 +01:00
Anthony Fok
96c0bdf3aa deps: Update github.com/spf13/cobra v1.2.1 => v1.3.0 2022-02-23 20:53:51 +01:00
Bjørn Erik Pedersen
e97d3c640f Add page.Store
Fixes #9546
2022-02-23 10:02:16 +01:00
John Elliott
7732da9f93 Allow images to be cropped without being resized
Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation.

Fixes #9499
2022-02-23 10:01:50 +01:00
Bjørn Erik Pedersen
aebde49b88 commands: Fix server panic regression
And now with a proper server test.

Fixes #9518
Fixes #9530
Fixes #9539
2022-02-21 21:43:26 +01:00
Bjørn Erik Pedersen
4ada09415d
markup/goldmark: Add BenchmarkCodeblocks 2022-02-21 20:53:52 +01:00
Joe Mooring
bddcfd911c deps: Update github.com/gohugoio/localescompressed v0.14.0 => v0.15.0
Fixes #9446
2022-02-19 11:34:00 +01:00
Bjørn Erik Pedersen
d485f95431 deps: Update github.com/yuin/goldmark v1.4.4 => v1.4.7
Closes #9397
2022-02-19 11:30:16 +01:00
Bjørn Erik Pedersen
a87be597af modules: Add modules.Workspace config for Go 1.18
Sets `GOWORK` env var for Go 1.18.

Fixes #9525
2022-02-18 15:06:58 +01:00
Bjørn Erik Pedersen
b0eea00756
Update stale.yml
Updates #9522
2022-02-18 11:43:35 +01:00
Bjørn Erik Pedersen
ef8b781b14
Update stale.yml
Updates #9522
2022-02-18 11:38:24 +01:00
Bjørn Erik Pedersen
3136ff67d8
github: Configure stale to be run manually
Updates #9522
2022-02-18 11:31:57 +01:00
Bjørn Erik Pedersen
929808190f tpl/partials: Fix recently introduced deadlock in partials cache
The change in lock logic for `partialCached` in  0927cf739f was naive as it didn't consider cached partials calling other cached partials.

This changeset may look on the large side for this particular issue, but it pulls in part of a working branch, introducing `context.Context` in the template execution.

Note that the context is only partially implemented in this PR, but the upcoming use cases will, as one example, include having access to the top "dot" (e.g. `Page`) all the way down into partials and shortcodes etc.

The earlier benchmarks rerun against master:

```bash
name              old time/op    new time/op    delta
IncludeCached-10    13.6ms ± 2%    13.8ms ± 1%    ~     (p=0.343 n=4+4)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    5.30MB ± 0%    5.35MB ± 0%  +0.96%  (p=0.029 n=4+4)

name              old allocs/op  new allocs/op  delta
IncludeCached-10     74.7k ± 0%     75.3k ± 0%  +0.77%  (p=0.029 n=4+4)
```

Fixes #9519
2022-02-17 18:47:36 +01:00
Bjørn Erik Pedersen
667f3a4ba8
tpl/partials: Add some more partials to BenchmarkIncludeCached 2022-02-17 16:45:59 +01:00
Bjørn Erik Pedersen
c061b253a4 deps: Update github.com/evanw/esbuild v0.14.11 => v0.14.22 2022-02-17 12:34:13 +01:00
Bjørn Erik Pedersen
0927cf739f tpl/partials: Make sure a cached partial is invoked only once
This commit revises the locking strategy for `partialCached`. We have added a benchmark that may be a little artificial, but it should at least show that we're not losing any performance over this:

```bash
name              old time/op    new time/op    delta
IncludeCached-10    12.2ms ± 2%    11.3ms ± 1%   -7.36%  (p=0.029 n=4+4)

name              old alloc/op   new alloc/op   delta
IncludeCached-10    7.17MB ± 0%    5.09MB ± 0%  -29.00%  (p=0.029 n=4+4)

name              old allocs/op  new allocs/op  delta
IncludeCached-10      128k ± 1%       70k ± 0%  -45.42%  (p=0.029 n=4+4)
```

This commit also revises the template metrics hints logic a little, and add a test for it, which output is currently this:

```bash
 cumulative       average       maximum      cache  percent  cached  total
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
      163.334µs     163.334µs     163.334µs          0        0       0      1  index.html
       23.749µs       5.937µs      19.916µs         25       50       2      4  partials/dynamic1.html
        9.625µs       4.812µs        6.75µs        100       50       1      2  partials/static1.html
        7.625µs       7.625µs       7.625µs        100        0       0      1  partials/static2.html
```

Some notes:

* The duration now includes the cached invocations (which should be very short)
* A cached template gets executed once before it gets cached, so the "percent cached" will never be 100.

Fixes #4086
Fixes #9506
2022-02-17 11:53:24 +01:00
dependabot[bot]
26a5e89faa build(deps): bump github.com/rogpeppe/go-internal from 1.8.0 to 1.8.1
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 09:55:06 +01:00
dependabot[bot]
e9fa7e81b3 build(deps): bump github.com/magefile/mage from 1.11.0 to 1.12.1
Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.11.0 to 1.12.1.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.11.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/magefile/mage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 09:54:29 +01:00
Joe Mooring
ff545f4276
markup/goldmark: Exclude event attributes from markdown render hook
Fixes #9511
2022-02-16 19:56:23 +01:00
Bjørn Erik Pedersen
b2a827c52c markup/goldmark: Fix mangling of headers/links in render hooks
```bash

name                    old time/op    new time/op    delta
SiteWithRenderHooks-10    11.9ms ± 1%    11.9ms ± 1%    ~     (p=0.486 n=4+4)

name                    old alloc/op   new alloc/op   delta
SiteWithRenderHooks-10    11.2MB ± 0%    11.3MB ± 0%  +0.16%  (p=0.029 n=4+4)

name                    old allocs/op  new allocs/op  delta
SiteWithRenderHooks-10      145k ± 0%      145k ± 0%  +0.14%  (p=0.029 n=4+4)
```

Fixes #9504
2022-02-16 17:46:30 +01:00
Bjørn Erik Pedersen
77c7059ff8
markup/goldmark: Add a render hook benchmark
Updates #9504
2022-02-16 13:30:53 +01:00
Bjørn Erik Pedersen
f4c90bd6ba
Fix BenchmarkCascadeTarget 2022-02-16 13:23:43 +01:00
Cameron Moore
d16228334d metrics: Add cached count tracking
Track cached partial executions and display more useful info when
showing the hints output. Also group cache hints and counters together
to the right of the timing measurements.

Sample output:

     cumulative       average       maximum      cache  percent  cached  total
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
       2.6973ms     674.325µs       857.3µs          0        0       0      4  _internal/_default/rss.xml
       2.6295ms     657.375µs       861.3µs          0        0       0      4  _default/single.html
       1.2563ms     314.075µs       381.5µs          0        0       0      4  news/single.html
        799.2µs       399.6µs       573.3µs          0        0       0      2  _internal/_default/sitemap.xml
        667.3µs       66.73µs       238.6µs         84        0       0     10  partials/header.html
        656.7µs      328.35µs       459.4µs          0        0       0      2  _default/list.html
        479.7µs       47.97µs         158µs         92        0       0     10  partials/head.html
        323.3µs       323.3µs       323.3µs          0        0       0      1  _internal/alias.html
        200.7µs       200.7µs       200.7µs          0        0       0      1  _internal/_default/sitemapindex.xml
         36.1µs       6.016µs        32.6µs        100       33       2      6  partials/footer.html
         27.4µs        13.7µs        26.7µs          0        0       0      2  index.html

Fixes #8375
2022-02-16 10:05:17 +01:00
Bjørn Erik Pedersen
ea6bcd6944
tpl: Remove TODO comment 2022-02-15 23:39:54 +01:00
Bjørn Erik Pedersen
f2e7b49acf Add --printUnusedTemplates
Fixes #9502
2022-02-15 20:01:57 +01:00
Joe Mooring
923419d7fd deps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29
Fixes #9244
Fixes #9132
Fixes https://discourse.gohugo.io/t/36523
2022-02-15 17:36:29 +01:00
Bjørn Erik Pedersen
837fdfdf45
commands: Rename --i18n-warnings to printI18nWarnings
To get it in line with the others.
2022-02-15 13:03:36 +01:00
Bjørn Erik Pedersen
6819feab6c
commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage
To get it in line with the others.
2022-02-15 13:00:06 +01:00
Bjørn Erik Pedersen
ea54a99ca5 deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0 2022-02-15 10:37:14 +01:00
Bjørn Erik Pedersen
9563c7d13b Finally remove deprecated Page methods
They have been deprecated for a very long time, first with a warning, then with an ERROR. Now they are removed.

Closes #4117
2022-02-14 13:24:36 +01:00
Bjørn Erik Pedersen
230a495941 Squashed 'docs/' changes from b8b20e9a2..93f7baf80
93f7baf80 netlify: Hugo 0.92.2
ecd8a6b6b Merge branch 'tempv0.92.2'
ee04caf9f Fix validation of Page Kind in cascade target map
3fce03ed2 Remove the "check" command
70ad71b25 Fix typo (#1651)
dfd1dc570 Fix internal link (#1650)
b5e0e0d38 Update rotten Fedora package link
78276390a Add missing word in types.md (#1645)
45eb945f8 Remove hugo gen autocomplete
2f84d0896 netlify: Hugo 0.92.1
b55f5773b Update complement.md
7013ee43e Remove deprecated RSSLink from page variables
1c3fb6ed3 Remove deprecated page vars (#1638)
9bd0af3ab Update union.md
4576487a0 Update symdiff.md
58f1b26c7 Update starter-kits.md (#1521)
285356c1d Move inline partials section (#1635)
4d08625d2 Improve directions for editing Win 10 path env var (#1632)
41d9c7804 Update page content (#1629)
d05536cad Removed unpaired quote character (#1630)
3b0fdcd88 netlify: Bump to Hugo 0.92.0
cdb068346 docs: Regenerate docshelper
778503ca8 Merge commit 'a8e9fc699a'
2d2401c91 docs: Add dependency table to maintainance page
6bc95c386 Add hugo.Deps
19d0b5e23 docs. Regen CLI docs
76a750d96 docs: Regenerate CLI docs
70156962a docs: Regenerate docshelper

git-subtree-dir: docs
git-subtree-split: 93f7baf80bd03176ad44701cd2452433d492ea0b
2022-02-14 12:58:42 +01:00
Bjørn Erik Pedersen
c707b71cdf
Merge commit '230a495941' 2022-02-14 12:58:42 +01:00
Bjørn Erik Pedersen
b0a9cf0a75 tpl: Use go:embed to load internal templates
Fixes #8297
2022-02-14 09:39:46 +01:00
hugoreleaser
9433cc2562 releaser: Prepare repository for 0.93.0-DEV
[ci skip]
2022-02-11 14:54:18 +00:00
hugoreleaser
cdf6a0d622 releaser: Bump versions for release of 0.92.2
[ci skip]
2022-02-11 14:17:39 +00:00
hugoreleaser
bf1fa71379 releaser: Add release notes for 0.92.2
[ci skip]
2022-02-11 14:17:38 +00:00
Joe Mooring
4f4cec73be Add HUGO_ENV to the os/exec environment
Closes #9490
2022-02-11 08:30:26 +01:00
Bjørn Erik Pedersen
da4866c2be Simplify some integration tests 2022-02-10 20:43:19 +01:00
Joe Mooring
d1109f590a Fix validation of Page Kind in cascade target map
Fixes #8888
2022-02-10 20:42:31 +01:00
Bjørn Erik Pedersen
a7d182cea1
Add another cascade benchmark 2022-02-10 20:40:49 +01:00
Bjørn Erik Pedersen
a2a660ed12 commands: Fix server deadlock on config error
Fixes #9486
2022-02-10 19:43:47 +01:00
Joe Mooring
f7bc4cc505 Exclude event attributes when rendering markdown
Closes #9463
2022-02-10 18:25:19 +01:00
Joe Mooring
54f8d8a70a Remove the "check" command
Closes #9454
2022-02-10 16:25:23 +01:00
Joe Mooring
3036d0ac9a Update the application/javascript media type
Add jsm and mjs extensions.
Closes #9483
2022-02-10 11:51:28 +01:00
Bjørn Erik Pedersen
6a238a7276 tpl/templates: Fix templates.Exist issue with base templates
Fixes #9477
2022-02-09 22:33:07 +01:00
Bjørn Erik Pedersen
f60714b5a1
Add a migration test helper 2022-02-09 16:38:12 +01:00
Bjørn Erik Pedersen
215a715ddd babel: Port integration tests to their own package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
d128d260b5 js: Port integration tests to its own package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
c4aaf1d516 postcss: Move integration test to its own package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
94f10cf4f9 minifier: Port integration tests to its package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
b06c2103b8 templates: Port integration test to its package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
d22f7795c7 tocss: Port integration tests to their package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
39f69ca7f0 openapi3: Port integration test into correct package 2022-02-09 15:41:32 +01:00
Bjørn Erik Pedersen
64f75adcf6 Add a new integration test framework
I have had this living in a separate branch for now, but we need this in the main branch sooner rather than later.

One big advantage of this is that integration tests can live in any package, not just hugolib.
2022-02-09 15:41:32 +01:00
Joe Mooring
9262719092 Validate comparison operator argument count
Fixes #9462
2022-02-05 17:41:43 +01:00
Joe Mooring
3336762939 Remove hugo gen autocomplete
Closes #8862
2022-02-01 23:23:30 +01:00
Bjørn Erik Pedersen
5ca40c8f7c
deps: Update github.com/pelletier/go-toml/v2 to v2.0.0-beta.6
Closes #9439
Closes #9417
2022-01-29 13:55:23 +01:00
Bjørn Erik Pedersen
ef7d14a241 Fix erroneous warning with .Page.RenderString on a page without a backing file
Fixes #9433
2022-01-28 17:35:49 +01:00
Joe Mooring
c05c99f0c5 Fix typo in panicOnWarning message 2022-01-27 17:50:34 +01:00
hugoreleaser
ff7689ce02 releaser: Prepare repository for 0.93.0-DEV
[ci skip]
2022-01-27 12:22:31 +00:00
hugoreleaser
85e2e86266 releaser: Bump versions for release of 0.92.1
[ci skip]
2022-01-27 11:44:40 +00:00
hugoreleaser
515f8a6d8e releaser: Add release notes for 0.92.1
[ci skip]
2022-01-27 11:44:40 +00:00
Bjørn Erik Pedersen
f22c4aba04 Make the RenderString content provider fix more general
Updates #9383
2022-01-27 11:51:13 +01:00
Paul Gottschling
85d31f7bfb Fix .RenderString issue in .Translations
Fixes #9383
2022-01-27 11:51:13 +01:00
Ephex2
22055176d2 general: Fix issue causing log threads to hang indefinitely when print() panics
The function printIfNotPrinted() defined for DistinctLogger unlocked the mutex within
the logger only after the print() function ran. If print panics, the mutex would stay
locked and future attempts to read or write from the logger mutex would cause the goroutine
to hang indefinitely.

Deferred the unlocking of the mutex to prevent this. Also, put l.m[key] before the print()
call since this will prevent another bug where the same warning potentially gets logged
multiple times if the print() call panics.

Fixes #9380
2022-01-27 10:38:50 +01:00
Bjørn Erik Pedersen
7a080b624e Fix duplicate mount sources
Fixes #9426
2022-01-26 20:32:13 +01:00
Bjørn Erik Pedersen
2655739940 tpl/collections: Fix apply with namespaced template funcs
We changed the signature to `func(...interface{}) (interface{}, error)` some time ago, but sadly we had no test for this for `apply`. Now we do.

Fixes #9393
2022-01-17 09:50:48 +01:00
Bjørn Erik Pedersen
348d300a71 common: Remove unused code 2022-01-16 17:12:56 +01:00
Bjørn Erik Pedersen
6f07bdb152 common/paths: Remove unused code 2022-01-16 17:12:56 +01:00
Bjørn Erik Pedersen
55a9bc1e70 helpers: Remove unused code 2022-01-16 17:12:56 +01:00
Joe Mooring
20a7ce7c1b Do not render hl_style as an HTML attribute
Fixes #9390
2022-01-16 17:09:18 +01:00
dependabot[bot]
8cd4492407 build(deps): bump github.com/spf13/viper from 1.8.1 to 1.10.1
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.8.1 to 1.10.1.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.8.1...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-14 19:04:32 -07:00
Andreas Deininger
9d8f318aab
Fixing typos (#9387) 2022-01-14 16:07:17 -08:00
Andreas Deininger
fcbbbef22d
Fix typo in warning message 2022-01-13 12:21:13 +01:00
Bjørn Erik Pedersen
6041adc164
github: Clean up the issue templates a little 2022-01-13 09:44:55 +01:00
Bjørn Erik Pedersen
408da43657
github: Add lock-threads step 2022-01-12 19:55:53 +01:00
hugoreleaser
ed04ed5745 releaser: Prepare repository for 0.93.0-DEV
[ci skip]
2022-01-12 08:58:07 +00:00
hugoreleaser
b354940369 releaser: Bump versions for release of 0.92.0
[ci skip]
2022-01-12 08:23:17 +00:00
hugoreleaser
bd89aef8ba releaser: Add release notes for 0.92.0
[ci skip]
2022-01-12 08:23:17 +00:00
Bjørn Erik Pedersen
f2bc13dd9e
docs: Regenerate docshelper 2022-01-12 08:17:03 +01:00
Bjørn Erik Pedersen
098254f175
Merge commit 'a8e9fc699a' 2022-01-12 08:16:35 +01:00
Bjørn Erik Pedersen
a8e9fc699a Squashed 'docs/' changes from 4eb10c1a9..b8b20e9a2
b8b20e9a2 Update index.md
f33994fe6 Remove files.Extension (duplicate of files.Ext)
948d6d69d layouts: Use .File.Path
d3050b78c Document .Page.BundleType (#1620)
8a033918f Image filters: ensure Grayscale is a level-2 heading
98537018f Document .Publish method for global resources
963ddc994 docs: add a link to the mailmap documentation
915f858dc Fix release notes version
58093dafe Update index.md
8008ba1e1 Release 0.91.2
d1788dae8 Merge branch 'tempv0.91.2'
af2970180 Revert "config/security: Add HOME to default exec env var whitelist"
2648d3088 netlify: Hugo 0.91.1
d0801599c Merge branch 'tempv0.91.1'
b343bfd7a config/security: Add HOME to default exec env var whitelist
03fbb403f Update data-templates.md
2f608055f Correct GetRemote docs and examples
4e942166a Update 2021-12-17-no-more-releasenotes.md
dbf9514fd Update security.toml
2c38aa356 Update index.md
562ad8e96 Add timeZone
4bc482152 Update introduction.md
1eb66c758 news: Add a note about the placement of release notes
b2a293abb Remove the default archetype template
f9837793c netlify: Hugo 0.91.0
467256ad5 docs: Regen docs helper
68554cf77 Add some basic security policies with sensible defaults

git-subtree-dir: docs
git-subtree-split: b8b20e9a257dca8e53ca9e5f314cf54b18702a37
2022-01-12 08:15:10 +01:00
Bjørn Erik Pedersen
cdcd15b6c2
Only create LazyContentProvider for the non-rendering Site
Which saves a fair amound of allocations:

```
gobench --package ./hugolib --bench "SiteNew/Regular_D" --base master
```

Before:

```
name                                  old time/op    new time/op    delta
SiteNew/Regular_Deep_content_tree-10    40.7ms ± 3%    41.2ms ± 1%    ~     (p=0.343 n=4+4)

name                                  old alloc/op   new alloc/op   delta
SiteNew/Regular_Deep_content_tree-10    27.7MB ± 0%    28.8MB ± 0%  +3.76%  (p=0.029 n=4+4)

name                                  old allocs/op  new allocs/op  delta
SiteNew/Regular_Deep_content_tree-10      304k ± 0%      329k ± 0%  +8.07%  (p=0.029 n=4+4)
```

After:

```
name                                  old time/op    new time/op    delta
SiteNew/Regular_Deep_content_tree-10    34.2ms ± 1%    34.7ms ± 1%    ~     (p=0.114 n=4+4)

name                                  old alloc/op   new alloc/op   delta
SiteNew/Regular_Deep_content_tree-10    27.7MB ± 0%    28.1MB ± 0%  +1.38%  (p=0.029 n=4+4)

name                                  old allocs/op  new allocs/op  delta
SiteNew/Regular_Deep_content_tree-10      304k ± 0%      314k ± 0%  +3.03%  (p=0.029 n=4+4)
```

Updates #8919
2022-01-12 07:45:53 +01:00
Paul Gottschling
25d645f47a
Fix missing page data for alternative formats
When a template calls the .Translations function and a
Hugo environment is using multiple output formats,
a template that calls methods like .Summary and .Len on
each translation will unexpectedly show empty return
values for these methods.

This is because each pageOutput's ContentProvider is
assigned to a page.NopPage in newPageOutput. When
*HugoSites.render assigns pageContentOutputs to
pageOutputs in *pageState.shiftToOutputFormat, it
reuses pageContentOutputs from other pageOutputs,
leaving some pageContentOutputs as NopPages. While this
approach conserves resources, sometimes it means that
a template will unexpectedly call a method on a
pageContentOutput that is actually a NopPage.

In the case of ContentProvider methods called on
translations for alternative output formats, the methods
were called on NopPages.

This change introduces LazyContentProvider, which
performs late initialization when one of its methods is
called. This way, we can reuse content in "normal" cases
but ensure that ContentProvider methods work as expected
when a pageOutput is not assigned a pageContentOutput
during the initial pre-render phase.

Fixes #8919
2022-01-12 07:45:53 +01:00
Bjørn Erik Pedersen
fbb3c181cb
docs: Add dependency table to maintainance page
See #8949
2022-01-11 21:57:37 +01:00
Bjørn Erik Pedersen
9af4ca3861 deps: Upgrade github.com/evanw/esbuild v0.14.8 => v0.14.11 2022-01-11 20:31:50 +01:00
Bjørn Erik Pedersen
7396aa945a Add hugo.Deps
Fixes #8949
2022-01-11 18:06:23 +01:00
roointan
d82cef5c53
hugolib: Fix livereload problem with files including NFC characters in MacOs
Fixes #8429
2022-01-08 11:35:30 +01:00
Bjørn Erik Pedersen
74f0777c5f
docs. Regen CLI docs
Closes #9363
2022-01-07 12:37:07 +01:00
Bjørn Erik Pedersen
e334a40661
commands: Fix CLI help text for hugo new
Updates #9363
2022-01-07 12:36:12 +01:00
Bjørn Erik Pedersen
5bd3c8df40
Update to Go 1.17.6
Fixes #9361
2022-01-07 11:07:42 +01:00
Joe Mooring
0aca99fe01 create: Correctly pass newContentEditor flags
Fixes #9356
2022-01-07 10:46:32 +01:00
Bjørn Erik Pedersen
c8b5ab75b7 Add --panicOnWarning flag
Fixes #9357
Fixes #9359
2022-01-06 12:27:04 +01:00
Bjørn Erik Pedersen
85c5b89593
github: Increase stale days 2022-01-05 15:48:00 +01:00
Bjørn Erik Pedersen
965760835d
docs: Regenerate CLI docs 2022-01-04 17:12:09 +01:00
Bjørn Erik Pedersen
4a0b55330c
docs: Regenerate docshelper 2022-01-04 17:11:17 +01:00
Bjørn Erik Pedersen
1651beb2c1 Remove mmark
Closes #9350
2022-01-04 17:10:39 +01:00
Bjørn Erik Pedersen
2b6063c3e3 Misc depreation updates
* Deprecate .Page.Path when backed by a file
* site.Permalinks
* --ignoreVendor (use --ignoreVendorPaths)

Closes #9348
Closes #9349
2022-01-04 17:10:39 +01:00
Bjørn Erik Pedersen
56ab83a597 Make the deprecated Page/File methods (from Hugo 0.55) ERROR
Closes #9346
2022-01-04 17:10:39 +01:00
Bjørn Erik Pedersen
dad0dc8d86
github: Add add stale GitHub action 2022-01-04 17:08:10 +01:00
Paul Gottschling
d3c4fdb8ff Fix surprise OutputFormat.Rel overwriting
In page.NewOutputFormat, we take an output.Format f and use it to
create a page.OutputFormat. If the format is canonical, we assign
the final OutputFormat's Rel to "canonical" rather than using
f.Rel. However, this leads to unexpected behavior for custom
output formats, where a user can define a "rel" for a format
via the config file.

For example, the standard for "humans.txt" files requires using
rel="author" in HTML "link" elements. Meanwhile, humans.txt is
usually the only format used for its content. As a result, for
Hugo configurations that define a humans.txt custom output format,
Hugo will render "link" elements to content in this format with
rel="canonical," rather than "author" as required by the standard.

This commit changes page.NewOutputFormat to check whether a given
format is user defined and, if so, skips assigning Rel to
"canonical," even if isCanonical is true.

Fixes #8030
2022-01-04 10:38:38 +01:00
Bjørn Erik Pedersen
d632dd7d74
hugolib: Make an RST test optional
If no RST installed.
2022-01-01 12:20:07 +01:00
Joe Mooring
0671ef5593 deps: Upgrade github.com/niklasfasching/go-org v1.5.0 => v1.6.0
Fixes #8921
2021-12-30 22:40:43 +01:00
Bjørn Erik Pedersen
672481f1f0
Update stale.yml 2021-12-30 20:13:08 +01:00
hugoreleaser
1dbfc0f930 releaser: Prepare repository for 0.92.0-DEV
[ci skip]
2021-12-23 16:10:18 +00:00
hugoreleaser
1798bd3fd1 releaser: Bump versions for release of 0.91.2
[ci skip]
2021-12-23 15:33:33 +00:00
hugoreleaser
f0b55a68ee releaser: Add release notes for 0.91.2
[ci skip]
2021-12-23 15:33:33 +00: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
aee9e11a40 Make sure we always create the /public folder
* Before this commit, when you had static files in the root of /content and no /public folder, that folder would not be created unless the /static syncer had already run.
* So, with a common pattern doing `rm -rf public && hugo` would the fail now and then because /static and /content are processed in parallel (unless you have cleanDestinationDir=true)
* This was even worse before commit 0b918e131f – a frozen build.

Closes #8166
2021-12-23 15:09:27 +01:00
Bjørn Erik Pedersen
bd63c1aa56 Fix "stuck on build" in error situations in content processing
Updates #8166
2021-12-23 15:09:27 +01:00
Bjørn Erik Pedersen
9eb05807c6 deps: Run "go mod tidy" 2021-12-23 10:19:10 +01:00
Bjørn Erik Pedersen
654f513a4c deps: Upgrade github.com/evanw/esbuild v0.14.7 => v0.14.8 2021-12-23 10:19:10 +01:00
hugoreleaser
759cdf3fc8 releaser: Prepare repository for 0.92.0-DEV
[ci skip]
2021-12-22 16:07:34 +00:00
hugoreleaser
f423505746 releaser: Bump versions for release of 0.91.1
[ci skip]
2021-12-22 15:31:05 +00:00
hugoreleaser
af165d5b6d releaser: Add release notes for 0.91.1
[ci skip]
2021-12-22 15:31:05 +00:00
Bjørn Erik Pedersen
6779117f72 media: Also consider extension in FromContent
As used in `resources.GetRemote`.

This will now reject image files with text and text files with images.
2021-12-22 11:35:53 +01:00
Bjørn Erik Pedersen
ce04011096 media: Add missing BMP and GIF to the default MediaTypes list 2021-12-22 11:35:53 +01:00
Bjørn Erik Pedersen
cdc73526a8 media: Add PDF MIME type 2021-12-22 11:35:53 +01:00
Bjørn Erik Pedersen
425c7d90f0 deps: Update github.com/evanw/esbuild v0.14.5 => v0.14.7 2021-12-22 11:34:21 +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
0016e21cd6 modules: Set GOCACHE env var
This was introduced in Go 1.15. We do set the GOPATH, which should be enough, but #9309 indicate that's not the case on every platform (GitHub Actions).

Closes #9309
2021-12-22 11:33:59 +01:00
hugoreleaser
728feaecf0 releaser: Prepare repository for 0.92.0-DEV
[ci skip]
2021-12-17 10:31:22 +00:00
hugoreleaser
d1dc0e9a54 releaser: Bump versions for release of 0.91.0
[ci skip]
2021-12-17 09:50:19 +00:00
hugoreleaser
072bca69d8 releaser: Add release notes for 0.91.0
[ci skip]
2021-12-17 09:50:19 +00:00
Bjørn Erik Pedersen
e26e13fbb7
releaser: Drop running tests as part of the release 2021-12-17 10:44:10 +01:00
Bjørn Erik Pedersen
6df2f080c9
docs: Regen docs helper 2021-12-17 10:31:08 +01:00
Bjørn Erik Pedersen
b84745d497
tpl/resources: Add empty method mapping for GetRemote
To get auto generated documentation for it.
2021-12-17 10:30:10 +01:00
Bjørn Erik Pedersen
44954497bc
Always use content to resolve content type in resources.GetRemote
This is a security hardening measure; don't trust the URL extension or any `Content-Type`/`Content-Disposition` header on its own, always look at the file content using Go's `http.DetectContentType`.

This commit also adds ttf and otf media type definitions to Hugo.

Fixes #9302
Fixes #9301
2021-12-17 09:50:28 +01:00
Bjørn Erik Pedersen
22ef5da20d
Add resources.GetRemote
In Hugo 0.89 we added remote support to `resources.Get`.

In hindsight that was not a great idea, as a poll from many Hugo users showed. See Issue #9285 for more details.

After this commit `resources.Get` only supports local resource lookups. If you want to support both, you need to use a construct similar to:

Also improve some option case handling.

```
{{ resource := "" }}
{{ if (urls.Parse $url).IsAbs }}
{{ $resource = resources.GetRemote $url }}
{{ else }}
{{ $resource = resources.Get $url }}
{{ end }}
```

Fixes #9285
Fixes #9296
2021-12-17 09:33:51 +01:00
Paul Gottschling
5758c370ea
Allow for return partials with falsy arguments (#9298)
Partials with returns values are parsed, then inserted into a
partial return wrapper via wrapInPartialReturnWrapper in order
to assign the return value via *contextWrapper.Set. The
predefined wrapper template for partials inserts a partial's nodes
into a "with" template action in order to set dot to a
*contextWrapper within the partial. However, because "with" is
skipped if its argument is falsy, partials with falsy arguments
were not being evaluated.

This replaces the "with" action in the partial wrapper with a
"range" action that isn't skipped if .Arg is falsy.

Fixes #7528
2021-12-17 08:35:21 +01:00
Bjørn Erik Pedersen
8ee6de6d96 deps: Upgrade github.com/evanw/esbuild v0.14.2 => v0.14.5 2021-12-17 08:26:45 +01:00
Joachim Ansorg
a4b9f1a92c don't use path.Join, because it cleans the final path 2021-12-16 21:14:33 +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
803f572e66
Simplify Babel test assertions
To make the tests pass on my grand old Windows 8 VM.
2021-12-14 07:26:53 +01:00
Bjørn Erik Pedersen
6183184b96
Merge commit '45e6fdb315' 2021-12-13 21:05:10 +01:00
Bjørn Erik Pedersen
45e6fdb315 Squashed 'docs/' changes from 316cec249..4eb10c1a9
4eb10c1a9 Set a sensible maxAge on the image cache
2c37f4f89 Update lists.md
8690c018f Update introduction.md
0458c3d88 Update index.md
150982f5e Update index.md
50dc0b6b9 Update multilingual.md
648598090 Configure image cache to use :cacheDir/images
4dfb523c3 Update introduction.md
b94d42e6f Add text to social images
d3253d2aa Add resources/_gen/images/ to .gitignore
8a56e1dfd Delete resources/_gen/images
1521e79b6 Update introduction.md
c7110a597 Update introduction.md
f7c4d220f Update introduction.md
c14ecf1ff Update introduction.md
c4b388c20 Fix shortcode in hugo-pipes/introduction (#1605)
d9876bd68 Update introduction.md
a39a532d5 Update introduction.md
fa8758122 netlify: Hugo 0.90.1
50cc40570 Update Contribute to Hugo Development
fc98fc82c Add .vscode dir to .gitignore (#1602)
8f8bcdefc Add frontmatter param to code-toggle shortcode (#1601)
f3b432c7c Add markdownlint configuration file (#1597)
7ea3aea92 netlify: Bump to 0.90.0
e2b6f990b docs: Regenerate docs helper
c02259e33 Merge commit '8d9511a08f'
2e3573899 Add custom font support to images.Text
3186e6458 images: Text filter that draws text with the given options (#9239)
424f219eb tpl/transform: Optional options for highlight func
7993f17d0 Implement XML data support
1eb9d34cf Make resources.Get use a file cache for remote resources
8a0fffd56 Add remote support to resources.Get

git-subtree-dir: docs
git-subtree-split: 4eb10c1a9689aebf652011a6260a14bf8a3dcef4
2021-12-13 21:04:12 +01:00
Joe Mooring
a037be774d
Improve handling of remote image/jpeg resources (#9278)
Add jpe, jif, and jfif to image/jpeg extensions.
For remote image/jpeg without extension, always use jpg extension.

Closes #9275
2021-12-13 08:55:15 +01:00
hitzhangjie
8a005538db
Fix Dockerfile
Mage uses git, so we should install git before run mage.

Closes #9261
2021-12-12 14:45:08 +01:00
Joe Mooring
657d0272e3 Remove debug statement 2021-12-11 22:59:36 +01:00
Bjørn Erik Pedersen
159120cddd
Fix deprecation notice
Asterisks needs to be quoted on command line.
2021-12-11 11:54:28 +01:00
hugoreleaser
3f0d49e502 releaser: Prepare repository for 0.91.0-DEV
[ci skip]
2021-12-10 11:42:18 +00:00
hugoreleaser
4890788974 releaser: Bump versions for release of 0.90.1
[ci skip]
2021-12-10 10:56:40 +00:00
hugoreleaser
3075eaa3b0 releaser: Add release notes for 0.90.1
[ci skip]
2021-12-10 10:56:40 +00:00
Bjørn Erik Pedersen
3bc6830411 Remove the retries on error in remote resources.Get
Fixes #9271
See  #9259
2021-12-10 11:10:41 +01:00
Bjørn Erik Pedersen
e4d6ec94b5 Allow user to handle/ignore errors in resources.Get
In Hugo 0.90.0 we introduced remote support in `resources.Get`.

But with remote resources comes with a higher chance of failing a build (network issues, remote server down etc.).

Before this commit we always failed the build on any unexpected error.

This commit allows the user to check for any error (and potentially fall back to a default local resource):

```htmlbars
{{ $result := resources.Get "https://gohugo.io/img/hugo-logo.png" }}
{{ with $result }}
        {{ if .Err }}
        {{/* log the error, insert a default image etc. *}}
        {{ else }}
        <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
        {{ end }}
{{ end }}
```

Note that the default behaviour is still to fail the build, but we will delay that error until you start using the `Resource`.

Fixes #9529
2021-12-10 11:10:41 +01:00
Bjørn Erik Pedersen
6260455ba7 Make resource.Get return nil on 404 not found
This is in line with the interface declaration and also how local lookups work.

Fixes #9267
2021-12-10 11:10:41 +01:00
Bjørn Erik Pedersen
c397975af8
Update to Go 1.17.5
Fixes #9269
2021-12-10 10:36:02 +01:00
Bjørn Erik Pedersen
965a6cbff9 Update to Go 1.17.4 and remove timeout in resources.Get
Fixes #9265
2021-12-09 13:33:30 +01:00
hugoreleaser
34a96290fa releaser: Prepare repository for 0.91.0-DEV
[ci skip]
2021-12-08 10:11:31 +00:00
hugoreleaser
dd0d3fdbbe releaser: Bump versions for release of 0.90.0
[ci skip]
2021-12-08 09:33:46 +00:00
hugoreleaser
b921752331 releaser: Add release notes for 0.90.0
[ci skip]
2021-12-08 09:33:46 +00:00
Bjørn Erik Pedersen
0fa40ce58f
releaser: Simplify the release process
Make it into a one step even for major releases.
2021-12-08 09:38:15 +01:00
Bjørn Erik Pedersen
bf537f1c6d
releaser: Remove unused code 2021-12-08 09:02:45 +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 '8d9511a08f' 2021-12-08 08:54:25 +01:00
Bjørn Erik Pedersen
8d9511a08f Squashed 'docs/' changes from 39a7fac34..316cec249
316cec249 Update future events template example (#1595)
3bde7d489 Install mage outside module (#1592)
762e27eff Clarify ignoreFiles regex matching
4d0032051 Add id attribute to h2 elements (#1590)
8262b077c Improve inline resource examples (#1587)
2eae7c7ec fix disqus example name (#1588)
a772f4804 Added install instructions for openSUSE Tumbleweed (#1459)
7ad1c301b Remove screen capture from Hosting on GitHub page (#1586)
a58541f49 add more details on about gh-pages and baseURL on hosting-on-github.md (#1346)
3bd0b46dc Update configuration page (#1585)
4cf1f013e Update OS functions
2c45a95c2 Remove getting-started/code-toggle/
40fdff598 Describe artificial language private use subtags (#1577)
91011d210 Remove google_news from list of internal templates (#1576)
36c7879e4 Update the .Unix function
731063488 Remove a showcase
818c371a0 Update index.md
3136d39d9 netlify: Hugo 0.89.4
092bc9278 Merge branch 'tempv0.89.4'
18e01f105 releaser: Add release notes to /docs for release of 0.89.4
79135281f Correct and sort list of target image formats (#1574)
af4170c7e netlify: Hugo 0.89.3
7f5444251 Merge branch 'tempv0.89.3'
a32e4a6c2 releaser: Add release notes to /docs for release of 0.89.3
6dd3dc3f9 Update configuration.md
5fbe741d7 Update index.md (#1570)
37a69496f netlify: Bump to Hugo 0.89.2
3b293f1f4 Merge branch 'tempv0.89.2'
64c934e7a releaser: Add release notes to /docs for release of 0.89.2
919c51c7d Update index.md
13dd463b1 netlify: Hugo 0.89.1
d8cda1474 releaser: Add release notes to /docs for release of 0.89.1
a2adf7742 releaser: Add release notes to /docs for release of 0.89.1
c3088c4fc Add code toggle to menus page (#1568)
2d0f38978 Remove blank lines from code-toggle output (#1564)
7cf058bfd Add localization examples (#1563)
cf8627c2e Fixing typos, fixing incomplete link (#1561)
c78cc014b Document the removePathAccents setting
70beddaf4 Make corrections to 0.89.0 release notes (#1560)
1917195f0 Update index.md
7fb8e070c Run hugo --gc
1772d45fb Release 0.89.0
d9006179b Merge branch 'tempv0.89.0'
8db86b61e releaser: Add release notes to /docs for release of 0.89.0
abf268571 docs: Regen CLI docs
fbbdb0ab1 Update the timeout default
9cbd1c15a Fix description of lang.FormatNumberCustom
6043b54cc Remove "render" keyword from Host on Render page
f8ea8e84f Clarify description of front matter url (#1557)
91a0c9954 Update Twitter shortcode oEmbed endpoint
79a7405b8 Merge commit 'aa5ac36a3e'
57667bae6 hugofs: Add includeFiles and excludeFiles to mount configuration
0c9ee0a04 Allow multiple plugins in the PostCSS options map
155799e6b docs: Create path.Clean documentation

git-subtree-dir: docs
git-subtree-split: 316cec2494dc5f908283289371d74f36a73d3d8d
2021-12-08 08:42:31 +01:00
Bjørn Erik Pedersen
e71d715b9b Add custom font support to images.Text
Fixes #9253
2021-12-07 16:53:02 +01:00
Bjørn Erik Pedersen
e61cdf335f images: Fix cache busting of image text filter
See #9238
2021-12-07 16:53:02 +01:00
dependabot[bot]
6c3bc5ebad build(deps): bump github.com/getkin/kin-openapi from 0.80.0 to 0.85.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.80.0 to 0.85.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.80.0...v0.85.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-07 13:12:42 +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
Bjørn Erik Pedersen
b4f27ef8e7
deps: Upgrade github.com/evanw/esbuild v0.13.12 => v0.14.2 (note)
Note: ESBuild v0.14.0 contains backwards-incompatible changes, see https://github.com/evanw/esbuild/releases/tag/v0.14.0

Fixes #9244
2021-12-04 16:28:50 +01:00
Bjørn Erik Pedersen
3473e31eb1
releaser: Add "note" to Note regexp 2021-12-04 16:27:56 +01:00
dependabot[bot]
fa0da004a9 build(deps): bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.3
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.2...v1.4.3)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/mapstructure
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-03 18:16:50 +01:00
Bjørn Erik Pedersen
24a893cf83 releaser: Rework and simplify to use GitHub only for release notes 2021-12-03 17:02:20 +01:00
dependabot[bot]
bf1564bd2c build(deps): bump google.golang.org/api from 0.51.0 to 0.61.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.51.0 to 0.61.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.51.0...v0.61.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-03 17:01:37 +01:00
Paul van Brouwershaven
cd44d409ba
media: Add rss suffix for application/rss+xml
Closes #9233
2021-12-03 12:45:49 +01:00
Bjørn Erik Pedersen
9a326d5636
parser: Add a test case in format resolution
See #9233
2021-12-03 10:34:34 +01:00
Bjørn Erik Pedersen
b10381fbe0 lazy: Reset error in Reset
To prevent sticky errors on server rebuilds.

Fixes #7043
Closes #9194
2021-12-02 18:06:19 +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
Joe Mooring
58adbeef88 Validate private use language tags
Fixes #9119
2021-12-02 16:30:53 +01:00
Bjørn Erik Pedersen
93572e5318 resources: Add timeout to the HTTP request in Get
Workaround for https://github.com/golang/go/issues/49366
2021-12-02 16:11:14 +01:00
Bjørn Erik Pedersen
94f149b21e Add a remote retry for resources.Get 2021-12-02 16:11:14 +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
Joe Mooring
133e4bfbee Remove empty href element from pagination template
Closes #9149
2021-12-02 09:14:30 +01:00
Joe Mooring
f122771fb1 Check for empty deployment targets and matchers
Fixes #9220
2021-12-01 10:17:42 +01:00
Bjørn Erik Pedersen
08a863e1e8
resources: Adjust the remote Get cache so it does not get evicted on restarts
We fill improve this, soon.
2021-11-30 16:54:01 +01:00
Paul van Brouwershaven
8aa7257f65
Add remote support to resources.Get
Closes #5255
Supports #9044
2021-11-30 11:49:51 +01:00
Joe Mooring
75a823a36a Add deprecation warning to google_news template
Closes #9172
2021-11-21 11:25:17 +01:00
Bjørn Erik Pedersen
5e0947c5b5 helpers: Make UniqueStringsReuse allocation free
This should be faster for all of our use cases (small string slices), but more important, it makes UniqueStringsReuse allocation free.

```bash
name                                 old time/op    new time/op    delta
UniqueStrings/Safe-16                   776ns ± 0%     305ns ± 0%   -60.68%  (p=0.029 n=4+4)
UniqueStrings/Reuse_slice-16            621ns ± 3%     174ns ± 0%   -72.01%  (p=0.029 n=4+4)
UniqueStrings/Reuse_slice_sorted-16     319ns ± 4%     313ns ± 0%    -2.01%  (p=0.029 n=4+4)

name                                 old alloc/op   new alloc/op   delta
UniqueStrings/Safe-16                    224B ± 0%      128B ± 0%   -42.86%  (p=0.029 n=4+4)
UniqueStrings/Reuse_slice-16            96.0B ± 0%      0.0B       -100.00%  (p=0.029 n=4+4)
UniqueStrings/Reuse_slice_sorted-16     24.0B ± 0%     24.0B ± 0%      ~     (all equal)

name                                 old allocs/op  new allocs/op  delta
UniqueStrings/Safe-16                    7.00 ± 0%      1.00 ± 0%   -85.71%  (p=0.029 n=4+4)
UniqueStrings/Reuse_slice-16             6.00 ± 0%      0.00       -100.00%  (p=0.029 n=4+4)
UniqueStrings/Reuse_slice_sorted-16      1.00 ± 0%      1.00 ± 0%      ~     (all equal)
```
2021-11-17 10:44:03 +01:00
hugoreleaser
0b70b46aad releaser: Prepare repository for 0.90.0-DEV
[ci skip]
2021-11-17 09:05:38 +00: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
cc08c09592 releaser: Bump versions for release of 0.89.4
[ci skip]
2021-11-17 08:24:08 +00:00
hugoreleaser
f97da9eca9 releaser: Add release notes for 0.89.4
[ci skip]
2021-11-17 08:24:08 +00:00
Bjørn Erik Pedersen
2e70f61fb0 Fix content dir resolution when main project is a Hugo Module
Fixes #9177
2021-11-16 20:42:34 +01:00
hugoreleaser
1ed8069a3a releaser: Prepare repository for 0.90.0-DEV
[ci skip]
2021-11-15 12:56:41 +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
e1064d2195 releaser: Bump versions for release of 0.89.3
[ci skip]
2021-11-15 12:17:45 +00:00
hugoreleaser
bf489b96d3 releaser: Add release notes for 0.89.3
[ci skip]
2021-11-15 12:17:45 +00:00
Bjørn Erik Pedersen
b8155452ac Improve error when we cannot determine content directory in "hugo new"
See #9166
2021-11-15 11:21:39 +01:00
Joe Mooring
08552a7a4c deps: Upgrade github.com/yuin/goldmark v1.4.3 => v1.4.4
Fixes #9159
2021-11-15 09:43:24 +01:00
Bjørn Erik Pedersen
fdad91fd96
commands: Make sure pollInterval is always set
Fixes #9165
2021-11-13 21:45:51 +01:00
Bjørn Erik Pedersen
5f3f60898c create: Improve archetype directory discovery and tests
Updates #9146
2021-11-12 12:05:31 +01:00
Bjørn Erik Pedersen
057d02de25 create: Add a log statement when archetype is a directory
See #9157
2021-11-12 12:05:31 +01:00
Bjørn Erik Pedersen
43ac59da85 create: Always print "Content ... created"
This indeliberately changed to INFO level in Hugo 0.89.0.

Fixes #9157
2021-11-12 12:05:31 +01:00
Bjørn Erik Pedersen
ab5c6990a5
commands: Fix missing file locking in server partial render
Fixes #9162
2021-11-12 09:29:04 +01:00
Patrick Kollitsch
9369d13e59
modules: Improve error message 2021-11-10 09:32:17 +01:00
hugoreleaser
805c24c32c releaser: Prepare repository for 0.90.0-DEV
[ci skip]
2021-11-08 15:56:14 +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
eaa6c96a79 releaser: Bump versions for release of 0.89.2
[ci skip]
2021-11-08 15:22:23 +00:00
hugoreleaser
cf3eb580bf releaser: Add release notes for 0.89.2
[ci skip]
2021-11-08 15:22:23 +00:00
Bjørn Erik Pedersen
2b01c85d14 Fix path resolution in hugo new
With theme and project with content directories and command on the form `hugo new posts/test.md`.

Fixes #9129
2021-11-08 14:10:46 +01:00
Bjørn Erik Pedersen
c09f5c5fd3 deps: Upgrade github.com/yuin/goldmark v1.4.2 => v1.4.3
Fixes #9137
2021-11-08 11:54:51 +01:00
hugoreleaser
9232e28446 releaser: Prepare repository for 0.90.0-DEV
[ci skip]
2021-11-05 16:24:06 +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
84de0c3255 releaser: Bump versions for release of 0.89.1
[ci skip]
2021-11-05 15:44:32 +00:00
hugoreleaser
a074102262 releaser: Add release notes for 0.89.1
[ci skip]
2021-11-05 15:44:32 +00:00
Bjørn Erik Pedersen
da4406ea50
Revert "releaser: Fat MacOS binaries"
This had some side effect that I'm not prepared to fix today ...

This reverts commit 3a977485eb.

Updates #9131
Updates #9128
2021-11-05 16:31:19 +01:00
Bjørn Erik Pedersen
166862a096 create: Make sure the build lock is released before we open editor
Fixes #9121
2021-11-04 15:40:02 +01:00
Andreas Deininger
82c33c7105
readme: Update dependency list 2021-11-03 17:15:33 +01:00
hugoreleaser
41e9e9fe14 releaser: Prepare repository for 0.90.0-DEV
[ci skip]
2021-11-02 10:40:00 +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
hugoreleaser
a93d4ba64e releaser: Bump versions for release of 0.89.0
[ci skip]
2021-11-02 10:00:17 +00:00
hugoreleaser
110512a65c
releaser: Add release notes for 0.89.0 2021-11-02 10:47:54 +01:00
Bjørn Erik Pedersen
f503b63957
docs: Regen CLI docs 2021-11-02 09:01:26 +01:00
Bjørn Erik Pedersen
30aba7fb09 source: Make ContentBaseName() return the directory for branch bundles
Fixes #9112
2021-11-01 21:06:39 +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
ed6fd26ce8 common/htime: Fix time.Format with Go layouts
Fixes #9107
2021-11-01 15:45:59 +01:00
dependabot[bot]
7fa66425aa build(deps): bump github.com/evanw/esbuild from 0.13.10 to 0.13.12
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.13.10 to 0.13.12.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.13.10...v0.13.12)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 15:44:19 +01:00
dependabot[bot]
69210cfdf3 build(deps): bump github.com/yuin/goldmark from 1.4.1 to 1.4.2
Bumps [github.com/yuin/goldmark](https://github.com/yuin/goldmark) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/yuin/goldmark/releases)
- [Commits](https://github.com/yuin/goldmark/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/yuin/goldmark
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 15:43:42 +01:00
Bjørn Erik Pedersen
4b36498a85
Merge commit 'aa5ac36a3e' 2021-10-31 13:53:55 +01:00
Bjørn Erik Pedersen
aa5ac36a3e Squashed 'docs/' changes from 327003421..39a7fac34
39a7fac34 Add .hugo_build.lock to .gitignore
920c716a4 fix a typo: to -> two (#1545)
6f0ba9593 Remove godocref from front matter (#1543)
8ec3d5948 remove link to wercker (#1544)
b56008719 Delete deployment-with-wercker.md (#1542)
e33d29b02 Fix broken links (#1538)
29e9d4c21 Sort commenting systems (#1541)
0b7ea60a7 Delete the news page "HTTP/2 Server Push in Hugo"
6e1515857 Fix quick-start.md (#1525)
62168ab35 Update comments.md (#1535)
d92191512 Small typo (#1539)
129c8834a Correct the PostCSS noMap default value (#1534)
6a5b29fcc Add example to index function (#1536)
e3dd8c507 Update output-formats.md
0c9321ca0 Remove reference to using LiveReload in production environment
4072d6776 Mod testing
09fabf7d6 Fix typo (#1524)
2fce813c8 Fix grammatical error in quick-start.md (#1523)
45230ab4a Hugo Mod testing
2dd4cd9e7 Update index.md
2c3ed62fd netlify: Bump to 0.88.1
648e2a007 Merge branch 'tempv0.88.1'
f216eade1 releaser: Add release notes to /docs for release of 0.88.1
8a7b64d4b Fix typographical errors in 0.88.0 release notes
a4bf86300 Release 0.88
738bb8f38 releaser: Add release notes to /docs for release of 0.88.0
8fcf2c55d highlight: Remove some pygments references
f2b173de2 HTTPS link
c88881c8e Adding link to nginx documentation
6b0a74fe0 Fix typos in docs (#1516)
498b8f0f1 Fix typos in time.Format (#1515)
28723fad6 Fix taxonomy and term examples (#1514)
3ffd00e12 Update front-matter.md
7cc1da82e Fix grammar in 0.86.1 release notes (#1510)
0009c51c3 Update docs helper
7e2f430f4 Update index.md
7857eae7e releaser: Add release notes to /docs for release of 0.87.0
1f08b684b releaser: Add release notes to /docs for release of 0.87.0
36a9e701c docs: Adjust config docs
0f588438e docs: Regen CLI docs
1b4682cd8 docs: Regen docs helper
bc8bbaae9 Merge commit 'bd77f6e1c9' into release-0.87.0
6f2480643 docs: Adjust time zone docs

git-subtree-dir: docs
git-subtree-split: 39a7fac343c289906db644c96079fdcc0298582f
2021-10-31 13:51:51 +01:00
Bjørn Erik Pedersen
3a977485eb
releaser: Fat MacOS binaries
Fixes #9035
2021-10-31 11:30:12 +01:00
Bjørn Erik Pedersen
0f248606d5
releaser: Only build amd64 binary for freebsd, netbsd, openbsd, dragonfly
Fixes #9102
2021-10-31 10:04:01 +01:00
Bjørn Erik Pedersen
e82cbd746f
tpl/time: Use configured location when date passed to Format is string
Updates #9084
2021-10-30 16:09:38 +02:00
dependabot[bot]
3339c2bb61 build(deps): bump github.com/aws/aws-sdk-go from 1.40.8 to 1.41.14
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.8 to 1.41.14.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.8...v1.41.14)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-30 11:17:12 +02:00
dependabot[bot]
03bbdba8be build(deps): bump github.com/getkin/kin-openapi from 0.79.0 to 0.80.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.79.0 to 0.80.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.79.0...v0.80.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-30 11:16:46 +02:00
dependabot[bot]
a772b8fc38 build(deps): bump github.com/evanw/esbuild from 0.13.8 to 0.13.10
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.13.8 to 0.13.10.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.13.8...v0.13.10)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-30 09:35:06 +02:00
Anthony Fok
dce49d1333 resources: Rename excepted filenames for image golden testdata
As documented in commit 30eea3915b,
some filenames have changed due to cache busting of PNG and Webp images.

This resolves recent TestImageOperationsGolden failure on arm64, ppc64le
and s390x.

See #6387 and #8729
2021-10-30 08:47:22 +02:00
dependabot[bot]
61c5b7a2e6 build(deps): bump github.com/frankban/quicktest from 1.13.1 to 1.14.0
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.13.1 to 1.14.0.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.13.1...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-27 14:30:23 +02:00
Joe Mooring
1d60bd1efa Fix typo in error message 2021-10-26 12:59:15 +02:00
Bjørn Erik Pedersen
75c9b893d9 create: Validate the target path in hugo new
Fixes #9072
2021-10-25 19:50:18 +02:00
Bjørn Erik Pedersen
64e1613fb3 Fix panic when specifying multiple excludeFiles directives
Fixes #9076
2021-10-25 19:50:18 +02:00
satotake
b959ecbc81
htime: Set zone of datetime from from go-toml
`go-toml/v2`'s unmarshaler does not specify zone name even if value has
offset explicitly.
To make time-formatting behaviour consistent, convert them into string
in hugo.

Close #8895
2021-10-25 19:49:44 +02:00
Sergio Garcia
70e454812e Added nodesource apt repository to snap package 2021-10-22 16:26:07 -06:00
Anthony Fok
355ff83e74 config: Set HUGO_ENABLEGITINFO=false override in Set_in_string
This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.
2021-10-22 19:40:18 +02:00
Bjørn Erik Pedersen
471ed91c60 hugofs: Add includeFiles and excludeFiles to mount configuration
Fixes #9042
2021-10-20 05:00:17 +02:00
dependabot[bot]
94a5bac5b2 build(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/mapstructure
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-20 04:17:44 +02:00
Bjørn Erik Pedersen
9830ca9e31
resources: Always preserve the original transform error 2021-10-19 20:38:38 +02:00
itsAftabAlam
b64fd0577b
readme: Add hyperlink to the banner 2021-10-19 15:59:12 +02:00
dependabot[bot]
2706437a7d build(deps): bump github.com/getkin/kin-openapi from 0.78.0 to 0.79.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.78.0 to 0.79.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.78.0...v0.79.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-19 15:35:31 +02:00
Bjørn Erik Pedersen
ec7c993cfe deps: github.com/evanw/esbuild v0.13.5 => v0.13.8 2021-10-19 15:33:29 +02:00
Bjørn Erik Pedersen
32c6f656d9
create: Return error on no content dirs
Closes #9056
2021-10-19 08:08:21 +02:00
Bjørn Erik Pedersen
e02e0727e5
Fix file permissions in new archetype implementation
Closes #9057
2021-10-18 19:08:19 +02:00
Bjørn Erik Pedersen
096f5e1921 Fix the "page picker" logic in --navigateToChanged
Fixes #9051
2021-10-18 12:13:13 +02:00
Bjørn Erik Pedersen
ba35e69856 Add a cross process build lock and use it in the archetype content builder
Fixes #9048
2021-10-18 12:13:13 +02:00
nabbisen
c7957c90e8
readme: Fix a typo on OpenBSD 2021-10-17 21:23:01 +02:00
Bjørn Erik Pedersen
bb05377033 deps: github.com/alecthomas/chroma v0.9.2 => v0.9.4
Fixes #8532
2021-10-17 17:14:03 +02:00
Bjørn Erik Pedersen
9185e11eff Reimplement archetypes
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template.

This new implementation is using the exact same code path for evaluating the pages as in a regular build.

This also makes it more robust and easier to reason about in a multilingual setup.

Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language:

```bash
hugo new content/en/posts/my-first-post.md
```

Fixes #9032
Fixes #7589
Fixes #9043
Fixes #9046
Fixes #9047
2021-10-16 15:22:03 +02:00
dependabot[bot]
168a3aab46 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.21 to 2.9.22
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.21 to 2.9.22.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.21...v2.9.22)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-14 10:40:23 +02:00
Bjørn Erik Pedersen
8bcfa3bdf6 deps: Update github.com/evanw/esbuild v0.13.5 2021-10-14 10:25:42 +02:00
Iskander (Alex) Sharipov
d7331aaa7e
releaser: Fix regexp
Original regexp used a char class which caused the regexp to only
check 1 symbol instead of a substring like "See" and "Closes".
So it would match `e #x` instead of `See #x` and many other
weird combinations.

Tests were passing as they never checked against an input that
would confuse that regexp.

Found with go-critic static analyzer, `badRegexp` checker.
2021-10-12 11:32:09 +02:00
dependabot[bot]
cd4e67af18 build(deps): bump github.com/mattn/go-isatty from 0.0.13 to 0.0.14
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.13 to 0.0.14.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.13...v0.0.14)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-10 20:45:38 +02:00
dependabot[bot]
e6ad1f0e76 build(deps): bump github.com/getkin/kin-openapi from 0.75.0 to 0.78.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.75.0 to 0.78.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.75.0...v0.78.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-10 20:30:52 +02:00
Bjørn Erik Pedersen
625d2c257a
releaser: Update to Go go1.17.2
* This now uses the `golang:1.17.2-buster` Docker image which runs GLIBC 2.28-10.
* Also added a build hook to warn us if this happens again in the future.

Fixes #8955
2021-10-10 16:53:44 +02:00
Joe Mooring
e6e44b7c41 Fix value of useResourceCacheWhen in TestResourceChainPostCSS 2021-10-10 11:12:01 +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
Bjørn Erik Pedersen
26f1919ae0 Skip a test assertion on CI
Need to investigate later, but got to get the tests green.
2021-10-09 20:36:32 +02:00
Brad
e55466ce70
tpl/path: Add path.Clean
Fixes #8885
2021-10-05 16:15:10 +02:00
Shalabh Kamboj
ecf025f006
readme: Remove tracking image
The server for the tracking image for analytics is currently down,
therefore I found it convenient to remove the link in order to maintain our readme
2021-10-05 15:09:11 +02:00
digitalcraftsman
fab1e43de5
Revert "Remove credit from release notes"
See b2eaf4c8c2
2021-09-23 14:02:00 +02:00
Paul Gottschling
e03f82eef2
Pass minification errors to the user
Previously, *minifyTransformation.Transform suppressed the
error returned by t.m.Minify. This meant that when minification
returned an error, the error would not reach the user. Instead,
minification would silently fail. For example, if a JavaScript
file included a call to the Date constructor with:

new Date(2020, 04, 02)

The package that the minification library uses to parse JS files,
github.com/tdewolff/parse would return an error, since "04" would
be parsed as a legacy octal. However, the JS file would remain
un-minified with no error.

Fixing this is not as simple as replacing "_" with an "err" in
*minifyTransformation.Transform, however (though this is
necessary). If we only returned this error from Transform,
then hugolib.TestResourceMinifyDisabled would fail. Instead of
being a no-op, as TestResourceMinifyDisabled expects, using the
"minify" template function with a "disableXML=true" config
setting instead returns the error, "minifier does not exist for
mimetype."

The "minifier does not exist" error is returned because of the
way minifiers.New works. If the user's config disables
minification for a particular MIME type, minifiers.New does
not add it to the resulting Client's *minify.M. However, this
also means that when the "minify" template function is executed,
 a *resourceAdapter's transformations still add a minification.
When it comes time to call the minify.Minifier for a specific
MIME type via *M.MinifyMimetype, the github.com/tdewolff/minify
library throws the "does not exist" error for the missing MIME
type.

The solution was to change minifiers.New so, instead of skipping
a minifier for each disabled MIME type, it adds  a NoOpMinifier,
which simply copies the source to the destination without
minification. This means that when the "minify" template
function is used for a particular resource, and that resource's
MIME type has minification disabled, minification is genuinely
skipped, and does not result in an error.

In order to add this, I've fixed a possibly unwanted interaction
between minifiers.TestConfigureMinify and
hugolib.TestResourceMinifyDisabled. The latter disables
minification and expects minification to be a no-op. The former
disables minification and expects it to result in an error. The
only reason hugolib.TestResourceMinifyDisabled passes in the
original code is that the "does not exist" error is suppressed.
However, we shouldn't suppress minification errors, since they
can leave users perplexed. I've changed the test assertion in
minifiers.TestConfigureMinify to expect no errors and a no-op
if minification is disabled for a particular MIME type.

Fixes #8954
2021-09-22 20:54:40 +02:00
Paul Gottschling
a864ffe9ac Clarify "precision" in currency format functions
The documentation of the FormatAccounting and FormatCurrency
functions could be clearer in terms of how the precision param
works. This commit makes it more explicit that adding a precision
of < 2 will not format the return values to include fewer decimals.

Resolves #8858
2021-09-22 20:00:30 +02:00
dependabot[bot]
b49da33280 build(deps): bump github.com/evanw/esbuild from 0.12.24 to 0.12.29
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.24 to 0.12.29.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.12.24...v0.12.29)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-22 20:00:05 +02:00
Emmanuel T Odeke
7c21eca74f
resources: Use default math/rand.Source for concurrency safety
The source from NewSource is documented not to be safe for
concurrency, and instead use the eefault source which is documented
as safe.

Fixes #8981
2021-09-19 12:18:30 +02:00
Bjørn Erik Pedersen
13ad8408fc
commands: Make the error handling for the mod commands more lenient
So it at least is possible to do a `hugo mod clean --all` if the cache is in a funky state.
2021-09-17 17:16:34 +02:00
Bjørn Erik Pedersen
1cabf61ddf
modules: Add some help text to the 'unknown revision' error
I had a head scratching moment with this myself, so it's safe to say that others will.

See #6825
2021-09-17 09:34:35 +02:00
Joe Mooring
268e3069f3 deps: Update github.com/yuin/goldmark v1.4.0 => v1.4.1
Fixes #8855
2021-09-12 21:55:37 +02:00
hugoreleaser
3efc2e2af8 releaser: Prepare repository for 0.89.0-DEV
[ci skip]
2021-09-04 10:33:09 +00: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
bb3254385a releaser: Bump versions for release of 0.88.1
[ci skip]
2021-09-04 09:39:19 +00:00
hugoreleaser
9b1d6d7e30 releaser: Add release notes for 0.88.1
[ci skip]
2021-09-04 09:39:19 +00:00
Bjørn Erik Pedersen
e1ead4dbca
Bump down again to Go 1.16.7 for the release builds
Note that this commit has nothing to do with "Hugo not working with Go 1.17", but this is the simplest fix of some build related issues in Hugo 0.88.0.

Updates #8952
Updates #8955
2021-09-04 11:22:51 +02:00
hugoreleaser
5b59b9c171 releaser: Prepare repository for 0.89.0-DEV
[ci skip]
2021-09-02 09:57:36 +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
hugoreleaser
6cacfa329c releaser: Bump versions for release of 0.88.0
[ci skip]
2021-09-02 09:27:27 +00:00
Bjørn Erik Pedersen
4d03cd780e
Release 0.88.0 2021-09-02 11:11:08 +02:00
Bjørn Erik Pedersen
8b14fdbf89
Update 0.88.0-relnotes.md
[ci skip]
2021-09-02 11:10:40 +02:00
hugoreleaser
fc21b63b46 releaser: Add release notes for 0.88.0
Rename to *-ready.md to continue.
[ci skip]
2021-09-02 08:09:25 +00:00
Bjørn Erik Pedersen
6631c9c7e0
Run go mod tidy 2021-09-01 10:48:13 +02:00
Bjørn Erik Pedersen
cf73cc2ece js: Fix import order for ./foo when both ./foo.js and ./foo/index.js exists
This is in line with how both Node and ESBuild's native import resolver does it.

The ambiguous situations above were discovered trying to build AlpineJS v3.

Note that the above was never an issue if you used `./foo.js` and similar to import the component.

Fixes #8945
2021-09-01 10:47:41 +02:00
Bjørn Erik Pedersen
7d1f806ecb commands: Don't fail on template errors on go mod graph etc.
Fixes #8942
2021-08-31 22:16:12 +02:00
dependabot[bot]
04b5959961 build(deps): bump github.com/getkin/kin-openapi from 0.74.0 to 0.75.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.74.0 to 0.75.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.74.0...v0.75.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 12:11:39 +02:00
dependabot[bot]
c278b6e45d build(deps): bump github.com/frankban/quicktest from 1.13.0 to 1.13.1
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/frankban/quicktest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 12:11:08 +02:00
dependabot[bot]
107c86febb build(deps): bump github.com/evanw/esbuild from 0.12.22 to 0.12.24
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.22 to 0.12.24.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.12.22...v0.12.24)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-31 12:10:32 +02:00
Bjørn Erik Pedersen
a0489c2dfd
Avoid failing with "module not found" for hugo mod init and similar
Fixes #8940
2021-08-31 12:08:11 +02:00
Bjørn Erik Pedersen
0fc2ce9e4b
Update to Go 1.17
Go 1.17 now lazy-loads dependencies when `go.mod` is version `go17`. This does not work for us for new projects started with `hugo mod init`.

Before this commit, starting a project with Go 1.17 with `hugo mod init` and then start adding dependencies with transitive dependenies to `config.toml` would treat the transitive dependencies as new, and you would potentially get a too recent version of those.

Note that this does not effect existing projects, where all dependencies are already recorded in `go.mod`.

Fixes #8930
2021-08-31 11:19:51 +02:00
Anthony Fok
32569285c1
Remove Pygments from snapcraft.yml
Pygments support was removed in Hugo v0.60.0
2021-08-25 10:43:32 -06:00
Bjørn Erik Pedersen
5a46eefbc6
Revert "build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0"
This reverts commit f70165242b.

Closes #8920
2021-08-23 18:20:29 +02:00
Helder Pereira
7a15edafe2 highlight: Add tabindex when code is not highlighted 2021-08-23 12:28:45 +02:00
dependabot[bot]
2f0945bafe build(deps): bump github.com/evanw/esbuild from 0.12.17 to 0.12.22
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.17 to 0.12.22.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.12.17...v0.12.22)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-22 13:58:10 +02:00
Bjørn Erik Pedersen
f4ffeea71d Fix it so disableKinds etc. does not get merged in from theme
Unless the merge strategy is set up to do so.

For `disableKinds` the current workaround is to make sure the project config has an entry, even if is empty:

```
disableKinds = []
```

Note that this issue only touches root, non-map config-values that either is not set in project config or in Hugo's defaults.

Fixes #8866
2021-08-22 13:25:20 +02:00
dependabot[bot]
7ba3f3d201 build(deps): bump golang.org/x/text from 0.3.6 to 0.3.7
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.6...v0.3.7)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-22 12:52:31 +02:00
dependabot[bot]
f70165242b build(deps): bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.4.9 to 1.5.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.4.9...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-22 12:52:04 +02:00
Bjørn Erik Pedersen
bc0743ed8e Prevent minifier from removing quoutes around post-processed attributes
Fixes #8884
2021-08-22 12:47:47 +02:00
Bjørn Erik Pedersen
ffa2fe6117
Revert "commands: Avoid too many watch file handles causing the server to fail to start"
This reverts commit 3f38c785b7.
2021-08-21 16:32:20 +02:00
Helder Pereira
d966f5d08d highlight: Remove some pygments references 2021-08-21 15:50:49 +02:00
Shiming Zhang
3f38c785b7
commands: Avoid too many watch file handles causing the server to fail to start
Fixes #8904
2021-08-19 11:04:09 +02:00
dependabot[bot]
24589c0814 build(deps): bump github.com/getkin/kin-openapi from 0.68.0 to 0.74.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.68.0 to 0.74.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.68.0...v0.74.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-17 10:50:10 +02:00
Bjørn Erik Pedersen
efebd756eb
deps: Update github.com/spf13/cast v1.4.0 => v1.4.1
Closes #8891
2021-08-16 09:16:41 +02:00
Bjørn Erik Pedersen
58b6742cfe
Import time/tzdata on Windows
Updates #8892
2021-08-14 12:09:41 +02:00
Bjørn Erik Pedersen
32ead4b1e7
releaser: Bump to Go 1.16.7 2021-08-10 14:00:49 +02:00
Bjørn Erik Pedersen
abd969a670
Revert "tpl/time: Handle nil values in time.AsTime"
This reverts commit 3e11072892.
2021-08-10 13:21:49 +02:00
Bjørn Erik Pedersen
3e11072892
tpl/time: Handle nil values in time.AsTime
Closes #8865
2021-08-09 18:44:35 +02:00
Bjørn Erik Pedersen
9bba9a3a98
parser: Indent TOML tables
Fixes #8850
2021-08-04 11:39:16 +02:00
Salim B
d6c8cd7718 Fix lang.FormatPercent description
Successor PR for https://github.com/gohugoio/hugoDocs/pull/1504
2021-08-03 16:56:06 +02:00
hugoreleaser
dfe54d3216 releaser: Prepare repository for 0.88.0-DEV
[ci skip]
2021-08-03 12:11:56 +00: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
hugoreleaser
2ed7be295c releaser: Bump versions for release of 0.87.0
[ci skip]
2021-08-03 10:57:26 +00:00
Bjørn Erik Pedersen
d9d1ef8b07
Release 0.87 2021-08-03 12:42:22 +02:00
Bjørn Erik Pedersen
ec1c1c3459
Merge branch 'b087' into release-0.87.0 2021-08-03 12:38:58 +02:00
Bjørn Erik Pedersen
c7fd134625
Update 0.87.0-relnotes.md
[ci skip]
2021-08-03 12:31:41 +02:00
Bjørn Erik Pedersen
a5d2632ebb
Update 0.87.0-relnotes.md
[ci skip]
2021-08-03 12:30:42 +02: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 'bd77f6e1c9' into release-0.87.0 2021-08-03 11:52:57 +02:00
Bjørn Erik Pedersen
bd77f6e1c9 Squashed 'docs/' changes from 60a58d123..327003421
327003421 Update index.md
cafdccc13 Hugo 0.86.1
467a89a02 Merge branch 'v0861'
a22c37bc9 Merge branch 'release-0.86.1'
276da91a8 releaser: Add release notes to /docs for release of 0.86.1
198cdf8f0 tpl/lang: Add new localized versions of lang.FormatNumber etc.
93f986ecc Add timezone support for front matter dates without one
b30b876bb Localize time.Format
950fdab90 Fix AddDate documentation
78d7b52b6 Document config.cascade
fd1e1e4b7 Fix grammar and spelling (#1497)
05bf3aa32 Fix grammar / typos in news
32060a3b4 One more try
f6e24ddfa PNG to JPG for the rel notes image
9ec5bdfad Update index.md
5f5d7f69d Release Hugo 0.86.0
2dd60bb71 releaser: Add release notes to /docs for release of 0.86.0
6445fb36c Merge commit '53a352795a'
cb57ca73a Simplify "active menu" logic for section menus

git-subtree-dir: docs
git-subtree-split: 327003421d8c07f9764aaaf644626805287fd30c
2021-08-03 11:51:36 +02:00
Bjørn Erik Pedersen
1c5b025dd0
docs: Adjust time zone docs 2021-08-03 11:51:28 +02:00
hugoreleaser
c13d33dd5e releaser: Add release notes for 0.87.0
Rename to *-ready.md to continue.
[ci skip]
2021-08-03 08:45:16 +00:00
Bjørn Erik Pedersen
d70c485707
Make sure module config loading errors have file positioning info
Fixes #8845
2021-08-03 09:57:14 +02:00
Bjørn Erik Pedersen
9ff17c3324
tpl/time: Adjust tests to handle matching local time zones
Closes #8843
2021-08-03 08:54:45 +02:00
Bjørn Erik Pedersen
7aaaf7e33a
mod: Remove superflous replace statement 2021-08-02 20:33:13 +02:00
Bjørn Erik Pedersen
3a96655592 Reduce binary size vs locale, update to CLDR v36.1
Test building with `go build -ldflags="-s -w"`

Hugo 0.86.2: 46MB
Before this commit: 77MB
After this commit: 54MB

Fixes #8839
Fixes #8841
2021-08-02 19:40:32 +02:00
Joe Mooring
9a7383caf3 deps: Update github.com/tdewolff/minify/v2 v2.9.20 => v2.9.21
Closes #8831
2021-08-02 17:27:07 +02:00
Bjørn Erik Pedersen
6c70e1f22f Fix error handling for the time func alias
Fixes #8835
2021-08-01 13:39:30 +02:00
Bjørn Erik Pedersen
4d221ce468 Fail on invalid time zone
Fixes #8832
2021-08-01 13:39:30 +02:00
Bjørn Erik Pedersen
e3dc5240f0 Improve handling of <nil> Params
Fixes #8825
2021-07-30 21:07:52 +02:00
Bjørn Erik Pedersen
268065cb2d
Merge branch 'release-0.86.1' 2021-07-30 12:58:26 +02:00
hugoreleaser
e0304c06ed
releaser: Add release notes for 0.86.1
[ci skip]
2021-07-30 12:58:03 +02:00
hugoreleaser
7aa8b1cd7d releaser: Prepare repository for 0.87.0-DEV
[ci skip]
2021-07-30 10:54:50 +00: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
hugoreleaser
580d320a66 releaser: Bump versions for release of 0.86.1
[ci skip]
2021-07-30 10:13:32 +00:00
hugoreleaser
b75d4526e4 releaser: Add release notes for 0.86.1
[ci skip]
2021-07-30 10:13:32 +00:00
Bjørn Erik Pedersen
94b616bdfa
config: Fix a potential deadlock in config reading
Note that the deadlock has not been seen earlier, in tests on in real Hugo sites.

Fixes #8791
2021-07-30 11:53:27 +02:00
dependabot[bot]
e90b3591a1 build(deps): bump github.com/evanw/esbuild from 0.12.16 to 0.12.17
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.12.16 to 0.12.17.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.12.16...v0.12.17)

---
updated-dependencies:
- dependency-name: github.com/evanw/esbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-30 11:11:10 +02:00
dependabot[bot]
4b7da6a9d7 build(deps): bump github.com/getkin/kin-openapi from 0.67.0 to 0.68.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.67.0 to 0.68.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.67.0...v0.68.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-30 11:10:45 +02: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
726fe9c3c9
Go back to WARNING for Page deprecations
Do that in the next release, let's reduce the noise, we have enough changes as it is.
2021-07-29 16:18:38 +02:00
Bjørn Erik Pedersen
b5de37ee79
Handle toml.LocalDate and toml.LocalDateTime in front matter
See #8801
2021-07-28 18:02:42 +02:00
Bjørn Erik Pedersen
bf301daf15
deps: Upgrade github.com/pelletier/go-toml/v2 v2.0.0-beta.3 => v2.0.0-beta.3.0.20210727221244-fa0796069526 2021-07-28 17:27:31 +02:00
Bjørn Erik Pedersen
a3701e0931 Switch to go-toml v2
We have been using `go-toml` for language files only. This commit makes it the only TOML library.

It's spec compliant and very fast.

A benchark building a site with 200 pages with TOML front matter:

```bash
name                                  old time/op    new time/op    delta
SiteNew/Regular_TOML_front_matter-16    48.5ms ± 1%    47.1ms ± 1%  -2.85%  (p=0.029 n=4+4)

name                                  old alloc/op   new alloc/op   delta
SiteNew/Regular_TOML_front_matter-16    16.9MB ± 0%    16.7MB ± 0%  -1.56%  (p=0.029 n=4+4)

name                                  old allocs/op  new allocs/op  delta
SiteNew/Regular_TOML_front_matter-16      302k ± 0%      296k ± 0%  -2.20%  (p=0.029 n=4+4)
```

Note that the front matter unmarshaling is only a small part of building a site, so the above is very good.

Fixes #8801
2021-07-28 11:51:13 +02:00
dependabot[bot]
40b6016cf3 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.19 to 2.9.20
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.19 to 2.9.20.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.19...v2.9.20)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 11:21:50 +02:00
Bjørn Erik Pedersen
7e1305710f
Add a TOML front matter benchmark 2021-07-27 19:27:54 +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
dependabot[bot]
f9afba9335 build(deps): bump github.com/getkin/kin-openapi from 0.61.0 to 0.67.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.61.0 to 0.67.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.61.0...v0.67.0)

---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 16:25:09 +02:00
dependabot[bot]
a5d2ba429d build(deps): bump github.com/spf13/cast from 1.3.1 to 1.4.0
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 15:37:30 +02:00
dependabot[bot]
31972f3647 build(deps): bump google.golang.org/api from 0.45.0 to 0.51.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.45.0 to 0.51.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.45.0...v0.51.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 15:04:20 +02:00
dependabot[bot]
2e58782f96 build(deps): bump github.com/sanity-io/litter from 1.5.0 to 1.5.1
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 15:01:24 +02:00
dependabot[bot]
7b68f6524d build(deps): bump github.com/mattn/go-isatty from 0.0.12 to 0.0.13
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.12 to 0.0.13.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.12...v0.0.13)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 14:58:39 +02:00
dependabot[bot]
81265af2cc build(deps): bump github.com/spf13/cobra from 1.1.3 to 1.2.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.3 to 1.2.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.3...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 14:05:28 +02:00
dependabot[bot]
c102c9719b build(deps): bump github.com/mitchellh/mapstructure from 1.3.3 to 1.4.1
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.3.3 to 1.4.1.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.3.3...v1.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 13:16:44 +02:00
dependabot[bot]
7c0f904f29 build(deps): bump github.com/google/go-cmp from 0.5.5 to 0.5.6
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.5...v0.5.6)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 12:42:16 +02:00
dependabot[bot]
b2fbd4d13a build(deps): bump github.com/mitchellh/hashstructure from 1.0.0 to 1.1.0
Bumps [github.com/mitchellh/hashstructure](https://github.com/mitchellh/hashstructure) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/mitchellh/hashstructure/releases)
- [Commits](https://github.com/mitchellh/hashstructure/compare/v1.0.0...v1.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 12:36:11 +02:00
dependabot[bot]
90041d1b6d build(deps): bump github.com/gobuffalo/flect from 0.2.2 to 0.2.3
Bumps [github.com/gobuffalo/flect](https://github.com/gobuffalo/flect) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/gobuffalo/flect/releases)
- [Commits](https://github.com/gobuffalo/flect/compare/v0.2.2...v0.2.3)

---
updated-dependencies:
- dependency-name: github.com/gobuffalo/flect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 10:07:34 +02:00
dependabot[bot]
05047096f5 build(deps): bump github.com/pelletier/go-toml from 1.9.0 to 1.9.3
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.9.0 to 1.9.3.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v1.9.0...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-27 09:37:05 +02:00
dependabot[bot]
a469156ea4 build(deps): bump github.com/aws/aws-sdk-go from 1.38.23 to 1.40.8
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.23 to 1.40.8.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.23...v1.40.8)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 21:21:26 +02:00
dependabot[bot]
18fdd85bcc build(deps): bump github.com/tdewolff/minify/v2 from 2.9.18 to 2.9.19
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.18 to 2.9.19.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.18...v2.9.19)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 20:23:32 +02:00
Bjørn Erik Pedersen
aeb1935d44 deps: Update github.com/evanw/esbuild v0.11.16 => v0.12.16 2021-07-26 20:23:00 +02:00
Bjørn Erik Pedersen
c7252224c4 Deprecate Blackfriday and fix a potential deadlock in config
Note that the deadlock has not been seen earlier, in tests on in real Hugo sites.

Fixes #8792
Fixes #8791
2021-07-26 16:28:16 +02:00
Bjørn Erik Pedersen
e09d7882c8 deps: Update github.com/yuin/goldmark v1.3.9 => v1.4.0 2021-07-26 14:54:56 +02:00
dependabot[bot]
15c0eed048 build(deps): bump github.com/frankban/quicktest from 1.12.0 to 1.13.0
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.12.0...v1.13.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-26 11:31:33 +02:00
Bjørn Erik Pedersen
91cbb96302 Bump all long-living deprecations to ERRORs 2021-07-25 17:17:21 +02:00
Digitalcraftsman
a352d19d88 Fix theme count in release notes 2021-07-21 16:35:38 +02:00
hugoreleaser
11bb67dcfd releaser: Prepare repository for 0.87.0-DEV
[ci skip]
2021-07-21 11:13:04 +00: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
hugoreleaser
d270eaf4fc releaser: Bump versions for release of 0.86.0
[ci skip]
2021-07-21 09:53:11 +00:00
Bjørn Erik Pedersen
b2e67505f8
Release 0.86.0 2021-07-21 11:37:16 +02:00
Bjørn Erik Pedersen
32508045d3
navigation: Check Page first in URL()
In Hugo #8776 we added `pageRef`, a way to connect menu items in site config to pages.

This means that you now can have both a Page and a configured URL.

Having the configured URL as a fallback if the Page isn't found is obviously more useful, especially in multilingual sites.

See #8776
2021-07-21 11:36:15 +02:00
Bjørn Erik Pedersen
e521c9a36d
Update 0.86.0-relnotes.md
[ci skip]
2021-07-21 11:28:32 +02:00
hugoreleaser
dfb1cc4315 releaser: Add release notes for 0.86.0
Rename to *-ready.md to continue.
[ci skip]
2021-07-21 09:04:02 +00:00
Bjørn Erik Pedersen
0294a4a4f8
Merge commit '53a352795a' 2021-07-21 10:45:53 +02:00
Bjørn Erik Pedersen
53a352795a Squashed 'docs/' changes from 6ebb5dad9..60a58d123
60a58d123 Remove outdated references in scss-sass.md
225a03834 Revert "Update menus.md"
7d149dd1e Update menus.md
3694ecafc Fix theme submission process/repository
0277c202c Update index.md - fix typo (#1490)
8921f0462 Fix link to theme components in 0.42 release notes (#1489)
c948bd519 Release 0.85.0
ee5bc5be9 releaser: Add release notes to /docs for release of 0.85.0
f2f692c32 commands: Make the --poll flag a duration
13070337a docs: Regen CLI docs

git-subtree-dir: docs
git-subtree-split: 60a58d123d9f9d20ee7d09373812ce4428dffcdf
2021-07-21 10:45:05 +02:00
Bjørn Erik Pedersen
351ed0f569
commands: Fix panic on invalid config in "hugo mod get" and similar
Fixes #8773
2021-07-20 18:23:09 +02:00
Bjørn Erik Pedersen
d831d2fce8 Simplify "active menu" logic for section menus
Fixes #8776
2021-07-20 17:50:59 +02:00
Bjørn Erik Pedersen
634481ba8c Fix Params case handling for menu items defined in site config
Fixes #8775
2021-07-20 17:50:59 +02:00
Bjørn Erik Pedersen
c19f65f956 minifiers: Make keepWhitespace = true default for HTML
Fixes #8771
2021-07-19 23:35:20 +02:00
Bjørn Erik Pedersen
022c479551
hugofs: Make FileMeta a struct
This commit started out investigating a `concurrent map read write` issue, ending by replacing the map with a struct.

This is easier to reason about, and it's more effective:

```
name                                  old time/op    new time/op    delta
SiteNew/Regular_Deep_content_tree-16    71.5ms ± 3%    69.4ms ± 5%    ~     (p=0.200 n=4+4)

name                                  old alloc/op   new alloc/op   delta
SiteNew/Regular_Deep_content_tree-16    29.7MB ± 0%    27.9MB ± 0%  -5.82%  (p=0.029 n=4+4)

name                                  old allocs/op  new allocs/op  delta
SiteNew/Regular_Deep_content_tree-16      313k ± 0%      303k ± 0%  -3.35%  (p=0.029 n=4+4)
```

See #8749
2021-07-15 17:14:26 +02:00
rhymes
f27e542442
markup: Add tabindex="0" to default <pre> wrapper
Currently the generated `<pre>` element isn't fully accessible as it can't be focused by keyboard users.
To make this fully accessible, the attribute `tabindex="0"` should be added to the `<pre>` tag.

Closes #7194
2021-07-15 16:48:39 +02:00
Bjørn Erik Pedersen
ae6cf93c84 Fix default values when loading from config dir
By waiting until we've loaded the config dir config before applying the default values.

Fixes #8763
2021-07-15 16:15:32 +02:00
Bjørn Erik Pedersen
a70da2b74a
Fix the deprecation error/warn log levels 2021-07-15 12:24:20 +02:00
Bjørn Erik Pedersen
805664818d markup/goldmark: Rename/reorder the hook methods
To make them easier to follow.

See #8755
2021-07-15 10:14:52 +02:00
Bjørn Erik Pedersen
ee3d2bb1d3 markup/goldmark: Support auto links in render hook
Fixes #8755
2021-07-15 10:14:52 +02:00
Bjørn Erik Pedersen
eb2a500367
Adjust a test helper 2021-07-14 21:47:26 +02:00
Bjørn Erik Pedersen
5cb52c2315 Add config.cascade
This commit adds support for using the `cascade` keyword in your configuration file(s), e.g. `config.toml`.

Note that

* Every feature of `cascade` is available, e.g. `_target` to target specific page sets.
* Pages, e.g. the home page, can overwrite the cascade defined in config.

Fixes #8741
2021-07-10 11:13:41 +02:00
Bjørn Erik Pedersen
30eea3915b resources: Regenerate image golden testdata
Keep this as a separate commit as this isn't because the files have changed. The filenames have changed due to cache busting of PNG and Webp images.

See #8729
2021-07-07 17:25:14 +02:00
Bjørn Erik Pedersen
8f40f34cd1 Fix transparency problem when converting 32-bit images to WebP
Fixes #8729
2021-07-07 17:25:14 +02:00
hugoreleaser
8ddbc95466 releaser: Prepare repository for 0.86.0-DEV
[ci skip]
2021-07-05 11:37:38 +00: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
hugoreleaser
875fe4050c releaser: Bump versions for release of 0.85.0
[ci skip]
2021-07-05 10:46:25 +00:00
Bjørn Erik Pedersen
56362e4bc7
Update 0.85.0-relnotes.md 2021-07-05 12:38:14 +02:00
hugoreleaser
f5cfb9e251 releaser: Add release notes for 0.85.0
Rename to *-ready.md to continue.
[ci skip]
2021-07-05 10:27:32 +00:00
John Hollowell
04dc469fbd
commands: Move time notification to after any build errors
This allows error parsers (VSCode problemMatchers) to use the time notification as bounds for detecting errors.

Closes #8403
2021-07-05 10:38:54 +02:00
Brandon Woodford
07919d1ccb exif: Log warning for metadata decode error
see #8519
2021-07-05 10:31:35 +02:00
Raoul
f75f90079a Fix tab selection of disabled items in internal pagination template 2021-07-05 10:30:59 +02: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 '7eb0e10a80' 2021-07-04 16:34:53 +02:00
Bjørn Erik Pedersen
7eb0e10a80 Squashed 'docs/' changes from 710856e5a..6ebb5dad9
6ebb5dad9 Remove file
27cc23ef4 Hugo 0.84.4
94dccbfa4 Merge branch 'tempv0.84.4'
e9d8b61fb releaser: Add release notes to /docs for release of 0.84.4
51e472005 Improve readability of examples on shortcode templates page
0aef26479 Fix lookup order typos (#1484)
534a527fe Fix two typos (#1483)
394aabd5a Higo "0.84.3
03ee92c1c Merge branch 'tempv0.84.3'
96a8be0f1 releaser: Add release notes to /docs for release of 0.84.3
9a770323f Update index.md
7f65cfcbe Hugo 0.84.2
444422515 releaser: Add release notes to /docs for release of 0.84.2
a2f29c5d8 modules: Add module.import.noMounts config
e00e4a7e7 releaser: Add release notes to /docs for release of 0.84.2
af04b53b3 modules: Add module.import.noMounts config
f7d5669c7 Remove Appernetic (#1481)
14f8d4029 Clarify interaction of sections and top-level leaf bundles
d140b6a62 Update lookup-order.md
399904959 Update shortcode-templates.md
e78aa4865 Hugo 0.84.1
35d7c1c22 Merge branch 'tempv0.84.1'
a6be65b0d releaser: Add release notes to /docs for release of 0.84.1
7b3b3ca45 Hugo 0.84.0 News Grammar fixes
cbc23bf5a Remove trailing newlines
69349198d Fix erroridf docs
dbc1157c1 Fix missing deep

git-subtree-dir: docs
git-subtree-split: 6ebb5dad9a87655196c0990d88d50a2248df5c54
2021-07-04 16:34:26 +02:00
Bjørn Erik Pedersen
24ce98b6d1
Add polling as a fallback to native filesystem events in server watch
Fixes #8720
Fixes #6849
Fixes #7930
2021-07-04 16:12:28 +02:00
Bjørn Erik Pedersen
0019d60f67
deps: Bump github.com/yuin/goldmark v1.3.9
Closes #8727
2021-07-04 15:48:33 +02:00
Bjørn Erik Pedersen
e451b984cf Fix panic when theme has permalinks config
Fixes #8724
2021-07-03 15:53:21 +02:00
hugoreleaser
b4d60b3db1 releaser: Prepare repository for 0.85.0-DEV
[ci skip]
2021-07-01 12:59:47 +00: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
4c34faf426 releaser: Bump versions for release of 0.84.4
[ci skip]
2021-07-01 11:51:53 +00:00
hugoreleaser
a339f62664 releaser: Add release notes for 0.84.4
[ci skip]
2021-07-01 11:51:53 +00:00
Bjørn Erik Pedersen
4c8552b114
Fix Cloudflare vs Netlify cache dir issue
Re-add the additional environment checks to determine if its Netlify. Seems that Cloudflare also sets `NETLIFY=true`.

This makes it look, basically, like a variant of the conditional we had before we started fixing this, but I have checked this logic on Netlify now and it should work.

Fixes #8714
2021-06-30 12:58:43 +02:00
Joe Mooring
34e4742f0c Fix date format in schema and opengraph templates
Fixes #8671
2021-06-29 20:20:38 +02:00
hugoreleaser
bffa2a2a98 releaser: Prepare repository for 0.85.0-DEV
[ci skip]
2021-06-29 12:27:15 +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
bc6f84c581 releaser: Bump versions for release of 0.84.3
[ci skip]
2021-06-29 11:40:19 +00:00
hugoreleaser
80410257e3 releaser: Add release notes for 0.84.3
[ci skip]
2021-06-29 11:40:19 +00:00
Bjørn Erik Pedersen
6c8c0c8b6a
config: Fix Netlify default cache dir logic
Fixes #8710
2021-06-29 09:51:09 +02:00
Bjørn Erik Pedersen
49fedbc51c
config: Fix handling of invalid OS env config overrides
Fixes #8709
2021-06-29 09:38:05 +02:00
hugoreleaser
8290720107 releaser: Prepare repository for 0.85.0-DEV
[ci skip]
2021-06-28 11:41:38 +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
hugoreleaser
f6b9ce6ebd releaser: Bump versions for release of 0.84.2
[ci skip]
2021-06-28 10:59:18 +00:00
hugoreleaser
4b03399b78 releaser: Add release notes for 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
Bjørn Erik Pedersen
3a6dc6d3f4
modules: Use value type for module.Time
Which is in line with how we do it elsewhere.
2021-06-27 18:06:52 +02:00
Bjørn Erik Pedersen
6cd2110ab2
commands: Add version time to "hugo config mounts" 2021-06-27 18:00:20 +02:00
Bjørn Erik Pedersen
6a365c2712
commands: Add some more info to "hugo config mounts"
* Add owner path and version.
* Also add thme meta info and Hugo version when run with -v flag
2021-06-27 16:08:28 +02:00
Bjørn Erik Pedersen
19aa95fc7f Fix config handling with empty config entries after merge
Fixes #8701
2021-06-27 15:01:56 +02:00
Bjørn Erik Pedersen
923dd9d1c1
Fix config loading for "hugo mod init"
We have some commands that will continue even if the config loading fails (e.g. because a module can not be found). In Hugo 0.84.0 we introduced a new `_merge` flag that we removed once the configuration was loaded. But we did not do that in error situations, leading to failures in some situations.

This commit fixes that by making sure the configuration is always cleaned before return, even in error situations.

Fixes #8697
2021-06-27 12:03:43 +02:00
Bjørn Erik Pedersen
d9bdd37d35
deps: Update to Minify v2.9.18
Closes #8693
2021-06-26 17:15:55 +02:00
digitalcraftsman
b2eaf4c8c2
Remove credit from release notes 2021-06-25 21:14:11 +02:00
hugoreleaser
efb6ee6c1c releaser: Prepare repository for 0.85.0-DEV
[ci skip]
2021-06-24 12:33:45 +00: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
hugoreleaser
ff2266300a releaser: Bump versions for release of 0.84.1
[ci skip]
2021-06-24 11:44:21 +00:00
hugoreleaser
8677cfb04f releaser: Add release notes for 0.84.1
[ci skip]
2021-06-24 11:44:21 +00:00
Bjørn Erik Pedersen
093dacab29 Fix language menu config regression
Fixes #8672
2021-06-24 13:03:09 +02:00
Bjørn Erik Pedersen
4a9d408fe0 config: Fix merge of config with map[string]string values.
Fixes #8679
2021-06-22 21:38:28 +02:00
Bjørn Erik Pedersen
9312059888
releaser: Bump to Goreleaser v0.171.0
Closes #8665
2021-06-21 16:12:18 +02:00
Bjørn Erik Pedersen
a7e3da242f
markup: Rename Header(s) to Heading(s) in ToC struct
Because that is what it is.
2021-06-19 18:19:46 +02:00
Bjørn Erik Pedersen
b70a12ec45
Merge commit '4dd90050f1' 2021-06-18 17:50:27 +02:00
Bjørn Erik Pedersen
4dd90050f1 Squashed 'docs/' changes from 3a923e155..710856e5a
710856e5a Release 0.84.0
362f4ea7b releaser: Add release notes to /docs for release of 0.84.0
6bb8800f7 docs: Regenerate docs helper
00a522e6a docs: Regenerate docshelper
bc171954b Merge commit '92405e5b0a'
ef73ffc3b Misc config loading fixes
0b4117f7f docs: Regenerate docs helper
9b9452b9c Merge commit '32ba623541'
9c4413dd9 tpl/fmt: Add erroridf template func
e1875742e tpl/data: Misc header improvements, tests, allow multiple headers of same key
e4560893c Add math.Max and math.Min
7dc282eaf common/maps: Add Scratch.DeleteInMap
b9cd77171 docs: Update querify function description and examples

git-subtree-dir: docs
git-subtree-split: 710856e5a6c683ce26d385960423303cc109c09e
2021-06-18 17:49:54 +02:00
hugoreleaser
3d544c9ae4 releaser: Prepare repository for 0.85.0-DEV
[ci skip]
2021-06-18 15:36:43 +00: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
hugoreleaser
9c0860f749 releaser: Bump versions for release of 0.84.0
[ci skip]
2021-06-18 14:55:51 +00:00
Bjørn Erik Pedersen
a1694b06af
releaser: Increase timeout 2021-06-18 16:44:12 +02:00
hugoreleaser
219ec38007
releaser: Add release notes for 0.84.0 2021-06-18 14:42:14 +02:00
Bjørn Erik Pedersen
be6b901cf7
docs: Regenerate docs helper 2021-06-18 13:21:10 +02:00
Bjørn Erik Pedersen
643b671931
output: Make WebAppManifestFormat NotAlternative=true
Updates #8624
2021-06-18 13:19:37 +02:00
Bjørn Erik Pedersen
ab4e1dfa4e
media: Adjust test assertion
Closes #8625
2021-06-18 13:15:00 +02:00
Rohan Kumar
02f31897b4
media: support application/manifest+json
The standard file extension for Web App Manifest files is
".webmanifest". This commit allows Hugo to recognize .webmanifest files
as "application/manifest+json" files and to minify them using its
JSON minifier.

The .webmanifest file extension is recommended in the w3c spec to
simplify media type registration:
https://www.w3.org/TR/appmanifest/#media-type-registration

Webhint docs are also relevant:
https://webhint.io/docs/user-guide/hints/hint-manifest-file-extension/

Closes #8624
2021-06-18 13:11:44 +02:00
Bjørn Erik Pedersen
402da3f8f3
docs: Regenerate docshelper 2021-06-18 12:58:07 +02:00
Bjørn Erik Pedersen
92405e5b0a Squashed 'docs/' changes from 4c81c6c2a..3a923e155
3a923e155 Update configuration.md

git-subtree-dir: docs
git-subtree-split: 3a923e15502520d1c4aa0481bcc528b2831d4c81
2021-06-18 12:57:19 +02:00
Bjørn Erik Pedersen
a074f758b0
Merge commit '92405e5b0a' 2021-06-18 12:57:19 +02:00
Bjørn Erik Pedersen
bb2aa08709 Implement configuration in a directory for modules
Fixes #8654
2021-06-18 12:54:30 +02:00
Bjørn Erik Pedersen
9096842b04
tpl: Rename err-missing-instagram-accesstoken => error-missing-instagram-accesstoken
To get it in line with the other.
2021-06-18 12:27:37 +02:00
Bjørn Erik Pedersen
3aa7f0b27f
deps: Update github.com/alecthomas/chroma v0.9.1 => v0.9.2
Closes #8658
2021-06-18 12:14:52 +02:00
Bjørn Erik Pedersen
9b870aa788
deps: Run go mod tidy 2021-06-18 12:13:17 +02:00
Bjørn Erik Pedersen
93aad3c543
Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles.

Updates #8654
2021-06-18 10:55:00 +02:00
Bjørn Erik Pedersen
5af045ebab resources/image: Fix fill with smartcrop sometimes returning 0 bytes images
Fixes #7955
2021-06-17 23:52:27 +02:00
Joe Mooring
8eafe0845d
deps: Update to Goldmark v1.3.8
Fixes #8648
2021-06-17 19:34:26 +02:00
Bjørn Erik Pedersen
31fb29fb3f
Do not read config from os.Environ when running tests
Fixes #8655
2021-06-16 18:58:40 +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
a886dd53b8
github: Set a dummy Instagram token
For now, need to debug why this fails.
2021-06-13 11:09:50 +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 '32ba623541' 2021-06-08 18:47:53 +02:00
Bjørn Erik Pedersen
32ba623541 Squashed 'docs/' changes from bcc4f9324..4c81c6c2a
4c81c6c2a live reload: add section about `--navigateToChanged`
271014257 Update netify hugo version to 0.83.1
14199cff1 Add pull_request event
0c33b05de Hosting on GitHub: Little wording fixes and update Ubuntu runner in example workflow to 20.04 (#1457)
e47b6c33a Hugo Modules plural typo (#1266)
0f2bbacdd Add node_modules to .gitignore
1d645d79f Overhaul scratch.md (#1451)
572766889 Add link to golang regex syntax, change modified date
21b0c7459 Add info about contentType config
de7d96fa2 Document Go template's multiline support
0c8f2dcb1 Avoid scratch usage
696fa92e1 Rename scratch var
44193f267 Update usage instructions
4230f8fa5 Rename and refactor shortcode
e9953751e Strip leading whitespaces
d61a58010 Add `insertpages` shortcode
04d30677d Mention WebP under 'Target Format' (#1431)
946784508 Update lookup-order.md (#1443)
a7b587988 Update index.md
27907f7ea netlify: Hugo 0.83.1
044d37e57 Merge branch 'tempv0.83.1'
b81aedb03 Fix page `.Kind`
fcf7775ad releaser: Add release notes to /docs for release of 0.83.1
9b39c77c8 fix typo in 0.83 release notes
1c38993ce Update index.md
45b8aefa6 Update index.md
43902dfaa Update index.md
3d959c7ae Merge branch 'tempv0.83.0'
6c22dc327 Fix URL
497ea3224 Use Hugo version badge shortcode
a182d10dd releaser: Add release notes to /docs for release of 0.83.0
287fd9ac0 docs: Fix shortcode
e789c879a docs: Regenerate docs helper
1666c7f31 docs: Regenerate CLI docs
117de1d12 Merge commit 'c239c643fe'
a6bf3f7d9 docs: Regen docs helper

git-subtree-dir: docs
git-subtree-split: 4c81c6c2ace6c23d0d5d24ee37e6a2f30acba01e
2021-06-08 18:46:58 +02:00
Bjørn Erik Pedersen
552cef5c57 Update to Go 1.16.5, Goreleaser 0.169.0
Fixes #8619
Fixes #8263
2021-06-08 18:46:35 +02:00
Joe Mooring
73483d0f9e
tpl: Add a terse pagination template variant to improve performance
These calls are equivalent:

{{ template "_internal/pagination.html" . }}
{{ template "_internal/pagination.html" (dict "page" .) }}
{{ template "_internal/pagination.html" (dict "page" . "format" "default") }}

To use an alternate format:

{{ template "_internal/pagination.html" (dict "page" . "format" "terse") }}

Fixes #8599
2021-06-08 10:41:21 +02:00
Bjørn Erik Pedersen
9b5debe4b8 Upgrade Instagram shortcode
Fixes #7879
2021-06-08 10:30:45 +02:00
Bjørn Erik Pedersen
12530519d8
Fix nested OS env config override when parent does not exist
Fixes #8618
2021-06-08 09:57:18 +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
282f1aa3db
tpl/data: Print response body on HTTP errors
Which makes it easier to debug.
2021-06-07 12:06:27 +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
Paul Chamberlain
150d75738b tpl/data: Allows user-defined HTTP headers with getJSON and getCSV
Updates #5617
2021-06-06 13:32:12 +02:00
Bjørn Erik Pedersen
06d295427f
hugofs: Set modTime at creation time
As `ModTime()` should return the same value on each invocation.

See #6161
2021-06-05 11:45:56 +02:00
Anthony Fok
26ae12c0c6 Fix invalid timestamp of the "public" folder
Special thanks to both Richard Mortimer (@oldelvet) and
Joshua M. Clulow (@jclulow) for their analysis and suggested fix:

 * https://github.com/gohugoio/hugo/issues/6161#issuecomment-574336088
 * https://github.com/gohugoio/hugo/issues/6161#issuecomment-596805273

Fixes #6161
2021-06-04 14:50:30 -06:00
卜木
ee733085b7
config: Fix env split to allow = character in values
Fixes #8589
2021-05-30 20:25:37 +02:00
Joe Mooring
01758f99b9 Add math.Max and math.Min
Closes #8583
2021-05-28 20:38:45 +02:00
satotake
845a7ba4fc
Catch incomplete shortcode error
Currently, no name shortcodes (`{{< >}}`) enter unexpected branch and
throw `BUG: template info not set`. This patch checks if shortcode has
name or not earlier and throws specific error.

Closes #6866
2021-05-24 14:59:02 +02:00
Joe Mooring
10f60de89a Use SPDX license identifier
See <https://spdx.org/licenses/>
Fixes #8555
2021-05-24 11:54:46 +02:00
satotake
785a31b5b8
navigation: Cache and copy Menu for sorting
.Site.Menus is mutated when it is sorted for now and this causes concurrency problem (#7594)
In this patch, each related sort function copies Menu before sorting to prevent
race condition.

Pages already have such a sort and cache logic and this patch is identical to it.

Closes #7594
2021-05-23 10:42:01 +02:00
Bjørn Erik Pedersen
bc1e05286a deps: Update to LibSASS 3.6.5
See https://github.com/sass/libsass/releases/tag/3.6.5
2021-05-23 10:33:56 +02:00
Bjørn Erik Pedersen
f518b4f71e publisher: Make the HTML element collector more robust
Fixes #8530
2021-05-19 20:43:49 +02:00
Bjørn Erik Pedersen
dc6b7a75ff
Revert "publisher: Make the HTML element collector more robust"
This reverts commit ef0f1a7269.
2021-05-19 03:45:36 +02:00
Bjørn Erik Pedersen
3f515f0e33
Revert "publisher: Get the collector in line with the io.Writer interface"
This reverts commit a9bcd38181.
2021-05-19 03:45:30 +02:00
Bjørn Erik Pedersen
a9bcd38181
publisher: Get the collector in line with the io.Writer interface
As in: Do not retain the input slice.
2021-05-17 19:39:40 +02:00
Bjørn Erik Pedersen
ef0f1a7269 publisher: Make the HTML element collector more robust
Fixes #8530
2021-05-17 17:15:32 +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
76c95f55a5
Display version when building site (#8533)
Closes #8531
2021-05-14 16:45:13 +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
Ujjwal Goyal
c46fc838a9 tpl: Allow 'Querify' to take lone slice/interface argument
Querify can now take a lone string/interface slice (with string
keys) as a parameter, or multiple string parameters, to build
URL queries.

Querify earlier used 'Dictionary' to add key/value pairs to a
map to build URL queries. Changed to dynamically generate ordered
key/value pairs. Cannot take string slice as key (earlier
possible due to Dictionary).

Added tests and benchmarks for querify.

Closes #6735
2021-05-09 13:14:14 +02:00
Shohei Ueda
504c78da4b
modules/npm: Change SetEscapeHTML to false
Closes #8512
2021-05-09 00:20:28 +02:00
Bjørn Erik Pedersen
b660ea8d54
Add a benchmark 2021-05-04 17:59:04 +02:00
Bjørn Erik Pedersen
64f88f3011
readme: Update dependency list 2021-05-03 15:55:28 +02:00
Julien Midedji
7a2c10ae60
tpl: Fix countwords to handle special chars
Fixes #8479
2021-05-03 09:10:06 +02:00
hugoreleaser
e1c328df25 releaser: Prepare repository for 0.84.0-DEV
[ci skip]
2021-05-02 15:28:40 +00: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
8900e33918 releaser: Bump versions for release of 0.83.1
[ci skip]
2021-05-02 14:38:02 +00:00
hugoreleaser
9753e1b9c5 releaser: Add release notes for 0.83.1
[ci skip]
2021-05-02 14:38:02 +00:00
Bjørn Erik Pedersen
ececd1b122 langs/i18n: Fix warning regression in i18n
Fix this by

1. Making sure that only numerical values are treated as plural counts
2. Making sure that `i18n.pluralFormNotFoundError` is not logged as a warning if `other` resolved.

Note that 2. isn't a new problem, but became visible because of the plural improvements in Hugo `0.83.0`.

Fixes #8492
2021-05-02 16:27:22 +02:00
hugoreleaser
b0ca723eb2 releaser: Prepare repository for 0.84.0-DEV
[ci skip]
2021-05-01 12:56:59 +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
hugoreleaser
57a471a0db releaser: Bump versions for release of 0.83.0
[ci skip]
2021-05-01 12:10:05 +00:00
Bjørn Erik Pedersen
9b63af55bd
Update 0.83.0-relnotes.md 2021-05-01 13:53:25 +02:00
Bjørn Erik Pedersen
23fc65832c
docs: Fix shortcode 2021-05-01 13:01:23 +02:00
hugoreleaser
e7b5e36e04 releaser: Add release notes for 0.83.0
Rename to *-ready.md to continue.
[ci skip]
2021-05-01 10:23:21 +00: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
4227cc1bd3
commands: Remove all dates from gendoc
It creates lots of diffs even if there are no changes.
2021-05-01 12:03:56 +02:00
Bjørn Erik Pedersen
c239c643fe Squashed 'docs/' changes from fb551cc75..bcc4f9324
bcc4f9324 Add transparent background in rgba for search field
fce835fea Trim newlines from .Inner in the 'code' shortcode
9117f54b3 Remove code toggle from netlify.toml
babbb9090 fix version number - 404 error
d28cf15e1 The input search is not displayed correctly in Safari because of the one declaration CSS background property. Safari needs the no-repeat to be after position and size property. Adjusting the search icon to be vertically on center.
f4ef4c146 Repairing link from issue 131 using jamesrhea's comment https://github.com/gohugoio/hugoDocs/issues/131#issuecomment-324083739
7f73f5685 Update related.md (#1436)
41d24297c Mention `not` (#1432)

git-subtree-dir: docs
git-subtree-split: bcc4f93242334f03c6699e2c4226ee178317ec4b
2021-05-01 11:45:45 +02:00
Bjørn Erik Pedersen
d7b22aee46
Merge commit 'c239c643fe' 2021-05-01 11:45:45 +02:00
Bjørn Erik Pedersen
3cc4fdd6f3 deps: Update getkin/kin-openapi v0.60.0 => v0.61. 2021-04-30 14:27:21 +02:00
Bjørn Erik Pedersen
7eb80a9e6f langs/i18n: Fix multiple unknown language codes
This fixes a bug upstream by temporarily using a patched version of go-i18n.

Closes #7838
2021-04-30 14:26:49 +02:00
Bjørn Erik Pedersen
78c1a6a7c6
deps: Update github.com/evanw/esbuild v0.11.14 => v0.11.16 2021-04-30 12:43:39 +02:00
Joe Mooring
f6745ad358 Remove .Site.Authors from embedded templates
Closes #4458
2021-04-29 17:07:05 +02:00
Robert van Gent
f523e9f0fd deploy: Don't treat a NotFound response for Delete as a fatal error. 2021-04-29 07:07:01 +02:00
Anthony Fok
63cd05ce5a
snap: Switch to deb packages of nodejs and python3-pygments
node/14/stable snap package is not available on ppc64el and s390x.

nodejs deb package currently at 10.19.0~dfsg-3ubuntu1
in Ubuntu 20.04 LTS (base: core20)
2021-04-27 09:04:24 -06:00
Anthony Fok
902535ef11
snapcraft.yaml: Install bin/node from node/14/stable
Resolves regression introduced in my previous commit 243951e.
Special thanks to @jmooring for reporting the issue!

TODO: Strip the bin/node binary?
2021-04-26 10:17:44 -06:00
dependabot[bot]
70aebba04d build(deps): bump github.com/getkin/kin-openapi from 0.55.0 to 0.60.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.55.0 to 0.60.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.55.0...v0.60.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 10:56:48 +02:00
dependabot[bot]
3e3b7d4474 build(deps): bump github.com/evanw/esbuild from 0.11.13 to 0.11.14
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.11.13 to 0.11.14.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.11.13...v0.11.14)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-26 10:56:03 +02:00
Bjørn Erik Pedersen
c13d368746
resources/page: Fix permalinks pattern detection for some of the sections variants
See #8363
2021-04-25 16:57:09 +02:00
Carlos Alexandro Becker
048418ba74
deps: Update to Chroma v0.9.1 2021-04-25 11:14:25 +02:00
Bjørn Erik Pedersen
eebde0c2ac langs/i18n: Improve plural handling of floats
The go-i18n library expects plural counts with floats to be represented as strings.

Fixes #8464
2021-04-25 11:12:30 +02:00
Bjørn Erik Pedersen
e4dc9a82b5 tpl/collections: Fix where on type mismatches
Fixes #8353
2021-04-23 18:06:49 +02:00
Bjørn Erik Pedersen
0d86a32d8f Make the shortcode template lookup for output formats stable
Fixes #7774
2021-04-23 15:04:35 +02:00
dependabot[bot]
65c502cc81 build(deps): bump github.com/evanw/esbuild from 0.11.12 to 0.11.13
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.11.12 to 0.11.13.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.11.12...v0.11.13)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-23 09:03:16 +02:00
Bjørn Erik Pedersen
537c905ec1 langs/i18n: Revise the plural implementation
There were some issues introduced with the plural counting when we upgraded from v1 to v2 of go-i18n.

This commit improves that situation given the following rules:

* A single integer argument is used as plural count and passed to the i18n template as a int type with a `.Count` method. The latter is to preserve compability with v1.
* Else the plural count is either fetched from the `Count`/`count` field/method/map or from the value itself.
* Any data type is accepted, if it can be converted to an integer, that value is used.

The above means that you can now do pass a single integer and both of the below will work:

```
{{ . }} minutes to read
{{ .Count }} minutes to read
```

Fixes #8454
Closes #7822
See https://github.com/gohugoio/hugoDocs/issues/1410
2021-04-23 07:39:59 +02:00
Anthony Fok
243951ebe9
snapcraft.yaml: Update to "base: core20"
That is, switch to using Ubuntu 20.04 LTS as base,
leveraging new features in Snapcraft 4.x, etc.

It is far from complete, with npm temporarily disabled (hence no PostCSS)
and with Pandoc probably not working yet, but would hopefully get our
Hugo Snap build, which stopped working shortly after v0.80.0, working again.
2021-04-22 09:57:40 -06:00
dependabot[bot]
fe2ee02802 build(deps): bump github.com/frankban/quicktest from 1.11.3 to 1.12.0
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.11.3 to 1.12.0.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.11.3...v1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 15:24:15 +02:00
dependabot[bot]
316d65cd70 build(deps): bump google.golang.org/api from 0.44.0 to 0.45.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.44.0...v0.45.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 13:43:11 +02:00
dependabot[bot]
b95229ab49 build(deps): bump github.com/aws/aws-sdk-go from 1.37.11 to 1.38.23
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.37.11 to 1.38.23.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.37.11...v1.38.23)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 13:42:15 +02:00
Santiago De la Cruz
0551df090e Correct function name in comment
IsInt to IsNumber
2021-04-22 12:24:12 +02:00
Bjørn Erik Pedersen
bca40cf0c9 Fix Params case handling in where with slices of structs (e.g. Pages)
Fixes #7009
2021-04-21 19:28:18 +02:00
Bjørn Erik Pedersen
057e5a22af deps: Upgraded github.com/evanw/esbuild v0.11.0 => v0.11.12 2021-04-21 13:07:16 +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 '07b8d9466d' 2021-04-20 20:22:53 +02:00
Bjørn Erik Pedersen
07b8d9466d Squashed 'docs/' changes from 9cece6640..fb551cc75
fb551cc75 Update index.md
7af894857 Update index.md
d235753ea Hugo 0.82.1
e03e72deb Merge branch 'temp0821'
e62648961 Merge branch 'release-0.82.1'
e1ab0f6eb releaser: Add release notes to /docs for release of 0.82.1
5d354c38d Replaced ``` code blocks with Code Toggler
c9d065c20 Remove duplicate YAML keys (#1420)
8ae31e701 Add webp image encoding support
848f2af26 Update internal.md (#1407)
c103a86a4 Fix `ref` shortcode example output (#1409)
9f8ba56dc Remove leading dot from where function KEY (#1419)
363251a51 Improve presentation of template lookup order (#1382)
b73da986d Improve description of Page Resources (#1381)
4e0bb96d5 Rework robots.txt page (#1405)
edf893e6f Update migrations.md (#1412)
450f1580b Add link to `site` function doc (#1417)
cfffa6e6f Added one extension to the list (#1414)
05f1665a0 Update theme
5de0b1c6a Update theme
250e20552 Add hugo.IsExtended
dea5e1fd7 Fix typo on merge function page (#1408)
1bbed2cf3 Update configuration.md
be0b64a46 Omit ISO
cbb5b8367 Fix `dateFormat` documentation
698f15466 Regenerate the docshelper
f9a8a7cb6 Update multilingual.md
a22dc6267 Fix grammar (#1398)
eb98b0997 Fix pretty URL example (#1397)
f4c4153dc Mention date var complementation in post scheduling (#1396)
17fae284c Fix resources.ExecuteAsTemplate argument order (#1394)
97e2c2abb Use code-toggle shortcode in `multilingual.md` (#1388)
3a84929bb Harmonize capitalization (#1393)
17f15daa6 fix file naming used in example (#1392)
5d97b6a18 Add slice syntax to sections permalinks config
00665b97b Improve description of `site.md`
edcf5e3fc Fix example in `merge.md`
f275ab778 Update postprocess.md
9593e3991 Fix file name
59bd9656f Update postprocess.md
1172fb6d0 Update to theNewDynamic repository (#1263)
f5b5c1d2c Update Hugo container image
4f2e92f2a Adapt anchorize.md to Goldmark
98aa19073 Directly link to `highlight` shortcode (#1384)
4c75c2422 Fix header level
f15c06f23 markdownify: add note about render-hooks and .RenderString (#1281)
69c82eb68 Remove Blackfriday reference from shortcode desc (#1380)
36de478df Update description of ignoreFiles config setting (#1377)
6337699d8 Remove "Authors" page from documentation (#1371)
35e73ca90 fix indent in example (#1372)
d3f01f19a Remove opening body tag from header example (#1376)
341a5a7d8 Update index.md
c9bfdbee6 Release 0.82.0
119644949 releaser: Add release notes to /docs for release of 0.82.0
32efaed78 docs: Regenerate docs helper
dea5449a2 docs: Regen CLI docs
eeab18fce Merge commit '81689af799'
d508a1259 Attributes for code fences should be placed after the lang indicator only
c80905cef deps: Update to esbuild v0.9.0
95350eb79 Add support for Google Analytics v4
02d36f9bc Allow markdown attribute lists to be used in title render hooks
7df220a64 Merge commit '9d31f650da'
d80bf61b7 Fixes #7698.

git-subtree-dir: docs
git-subtree-split: fb551cc750faa83a1493b0e0d0898cd98ab74465
2021-04-20 20:21:45 +02:00
dependabot[bot]
d3a64708f4 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.15 to 2.9.16
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.15 to 2.9.16.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.15...v2.9.16)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 19:19:07 +02:00
dependabot[bot]
3b56244f42 build(deps): bump golang.org/x/text from 0.3.5 to 0.3.6
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.5 to 0.3.6.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.5...v0.3.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 18:06:30 +02:00
Bjørn Erik Pedersen
f5d3d635e6
publisher: Remove some unreachable code 2021-04-20 17:47:09 +02:00
dependabot[bot]
0d3c42da56 build(deps): bump github.com/getkin/kin-openapi from 0.39.0 to 0.55.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.39.0 to 0.55.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.39.0...v0.55.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 17:34:05 +02:00
Bjørn Erik Pedersen
ef34dd8f0e
publisher: Some performance tweaks for the HTML elements collector 2021-04-20 17:24:17 +02:00
Dirk Olbrich
bc80022e03
publisher: Exclude comment and doctype elements from writeStats
- Reorder code blocks
- Rename cssClassCollectorWriter to htmlElementCollectorWriter, as it just collect html element information
- Expand benchmark to test for minified and unminified content

Fixes #8396
Fixes #8417
2021-04-20 17:24:17 +02:00
Bjørn Erik Pedersen
2bb9496ce2
Merge branch 'release-0.82.1' 2021-04-20 13:48:04 +02:00
hugoreleaser
fda3c4d1ed releaser: Prepare repository for 0.83.0-DEV
[ci skip]
2021-04-20 11:44:34 +00: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
hugoreleaser
f8b064f3c0 releaser: Bump versions for release of 0.82.1
[ci skip]
2021-04-20 11:02:48 +00:00
hugoreleaser
4713e509b6 releaser: Add release notes for 0.82.1
[ci skip]
2021-04-20 11:02:48 +00:00
Bjørn Erik Pedersen
6e9d2bf0c9
Regression in media type suffix lookup
Introduced in Hugo 0.82.0.

Fixes #8406
2021-04-20 12:52:30 +02:00
Bjørn Erik Pedersen
e73f7a770d Regression in media type suffix lookup
Introduced in Hugo 0.82.0.

Fixes #8406
2021-04-20 12:51:11 +02:00
Joe Mooring
3ddffd064d build(deps): bump github.com/yuin/goldmark from 1.3.2 to 1.3.5
Updated test per <https://github.com/yuin/goldmark/pull/205>.

Fixes #8377
2021-04-16 09:12:28 +02:00
Joe Mooring
6fc52d185a Remove duplicate references from release notes
Closes #8360
2021-04-15 21:15:20 +02:00
dependabot[bot]
73c3ae818a build(deps): bump github.com/spf13/afero from 1.5.1 to 1.6.0
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-15 21:08:33 +02:00
dependabot[bot]
7ca118fdfd build(deps): bump github.com/pelletier/go-toml from 1.8.1 to 1.9.0
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v1.8.1...v1.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-15 21:05:43 +02:00
Bjørn Erik Pedersen
33d5f80592
Add webp image encoding support
Fixes #5924
2021-04-15 17:22:55 +02:00
dependabot[bot]
509d39fa6d build(deps): bump google.golang.org/api from 0.40.0 to 0.44.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.40.0 to 0.44.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.40.0...v0.44.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-15 16:13:49 +02:00
dependabot[bot]
7725c41d40 build(deps): bump github.com/nicksnyder/go-i18n/v2 from 2.1.1 to 2.1.2
Bumps [github.com/nicksnyder/go-i18n/v2](https://github.com/nicksnyder/go-i18n) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/nicksnyder/go-i18n/releases)
- [Changelog](https://github.com/nicksnyder/go-i18n/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nicksnyder/go-i18n/compare/v2.1.1...v2.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-15 16:13:26 +02:00
dependabot[bot]
5d36d80153 build(deps): bump github.com/rogpeppe/go-internal from 1.6.2 to 1.8.0
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.6.2 to 1.8.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.6.2...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-15 14:44:37 +02:00
Joe Mooring
9b34d42bb2 Remove extraneous space from figure shortcode
Fixes #8401
2021-04-15 14:43:32 +02:00
dependabot[bot]
c2d8f87cfc build(deps): bump github.com/magefile/mage from 1.10.0 to 1.11.0
Bumps [github.com/magefile/mage](https://github.com/magefile/mage) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/magefile/mage/releases)
- [Changelog](https://github.com/magefile/mage/blob/master/.goreleaser.yml)
- [Commits](https://github.com/magefile/mage/compare/v1.10.0...v1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 11:55:38 +02:00
dependabot[bot]
cbc246616e build(deps): bump github.com/google/go-cmp from 0.5.4 to 0.5.5
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-14 11:55:18 +02:00
Niklas Fasching
fa432b17b3 org: Disable broken pretty relative links feature
go-org PrettyRelativeLinks rewrites relative org links by
- adding `../` in front
- removing any `.org` suffix

This was meant to play well with hugo pretty urls (which pretty much renders
posts in a subdirectory without the file suffix) and allow use of normal org
file links to reference other posts.

There's a lot of edge cases I didn't consider and multiple bug reports in
go-org [1] later I don't think the complexity of handling those edge cases is
worth it - so let's disable it.

[1]
- https://github.com/niklasfasching/go-org/issues/53
- 5dadf8c4c2 (comment)
- https://github.com/niklasfasching/go-org/issues/51
2021-04-12 08:08:53 +02:00
Niklas Fasching
0cd55c66d3 deps: Update go-org to v1.5.0 2021-04-12 08:08:53 +02:00
dependabot[bot]
0d5cf256e4 build(deps): bump github.com/jdkato/prose from 1.2.0 to 1.2.1
Bumps [github.com/jdkato/prose](https://github.com/jdkato/prose) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/jdkato/prose/releases)
- [Commits](https://github.com/jdkato/prose/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-11 13:54:16 +02:00
dependabot[bot]
36527576b3 build(deps): bump github.com/spf13/cobra from 1.1.1 to 1.1.3
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.1...v1.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-11 13:53:45 +02:00
Bjørn Erik Pedersen
9b83f45b6d
Add complete dependency list in "hugo env -v"
Fixes #8400
2021-04-09 08:07:22 +02:00
Bjørn Erik Pedersen
7fdd2b95e2
Add hugo.IsExtended
Fixes #8399
2021-04-09 07:28:27 +02:00
Bjørn Erik Pedersen
3d5dbdcb1a publisher: Also test minified HTML in the element collector
Updates #7567
2021-04-07 16:40:15 +02:00
Bjørn Erik Pedersen
8a308944e4 publisher: Skip script, pre and textarea content when looking for HTML elements
Updates #7567
2021-04-07 00:26:02 +02:00
Bjørn Erik Pedersen
7b4ade56dd
output: Only output mediaType once in docshelper JSON
Fixes #8379
2021-04-01 19:05:33 +02:00
Joe Mooring
7c7974b711 Fix typo in docshelper.go
Fixes #8380
2021-04-01 18:44:39 +02:00
Bjørn Erik Pedersen
5656a908d8
tpl: Remove the FuzzMarkdownify func for now
It has gotten us nothing but "build fails" mail and work we don't have time to follow up on.
2021-03-30 20:57:31 +02:00
Bjørn Erik Pedersen
2dc222cec4
Add slice syntax to sections permalinks config
Fixes #8363
2021-03-30 07:55:24 +02:00
Bjørn Erik Pedersen
4d22ad580e deps: Upgrade github.com/evanw/esbuild v0.9.6 => v0.11.0 2021-03-29 12:00:47 +02:00
Bjørn Erik Pedersen
5e2f128911
Try to fix the fuzz build 2021-03-28 21:42:44 +02:00
hugoreleaser
97934779ed releaser: Prepare repository for 0.83.0-DEV
[ci skip]
2021-03-21 18:12:42 +00: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
hugoreleaser
1efd93c097 releaser: Bump versions for release of 0.82.0
[ci skip]
2021-03-21 17:28:02 +00:00
hugoreleaser
584a9b3e2e
releaser: Add release notes for 0.82.0 2021-03-21 18:16:55 +01: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
81689af799 Squashed 'docs/' changes from bb15e9804..9cece6640
9cece6640 Function sort: fix example labels (#1344)
84444120f Revert "Fix sample data for sort function (#1363)" (#1364)
05c8619f4 Fix sample data for sort function (#1363)
2beb1c0ed Fix "Configure taxonomies" title (#1361)
cd777b9fb Fix sitemap configuration link (#1360)
52251fb42 Update the 'Customize Dates' example to not error (#1357)
1a14cc08a Update quick-start.md
17bb98a94 Add note about image metadata removal
ec4f7bfff Update 404.md
cebfb7a90 explaination that `weight` key is used for sorting
83190ff12 fix typo: "advance settings" → "advanced settings"
75743968c Update quick-start.md
f1c64cd5a Improved documentation.
8af3b236c Update theme

git-subtree-dir: docs
git-subtree-split: 9cece6640095a21673a730201466ea636d2f8ded
2021-03-21 13:31:17 +01:00
Bjørn Erik Pedersen
c94aa5cf46
Merge commit '81689af799' 2021-03-21 13:31:17 +01:00
Bjørn Erik Pedersen
df8bb8812f
Simplify some config loading code 2021-03-21 13:29:11 +01:00
Bjørn Erik Pedersen
57d8d208ed deps: Update github.com/evanw/esbuild v0.9.0 => v0.9.6 2021-03-21 11:24:43 +01:00
Bjørn Erik Pedersen
fc06e85082
Apply OS env overrides twice
The recent fix for #8346 had an unfortunate side-effect, as it prevented overrides of config options used in the module collector, e.g. `HUGO_MODULE_REPLACEMENTS`.

This commit fixes that by applying the overrides twice.
2021-03-21 10:54:30 +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
35dedf15c0 deps: Bump github.com/tdewolff/minify/v2 v2.9.15
Fixes #8332
2021-03-20 15:51:20 +01:00
Bjørn Erik Pedersen
7ed56c6941 Fix OS env override for nested config param only available in theme
Fixes #8346
2021-03-20 13:34:51 +01:00
Avinash Sonawane
24c716cac3 Fix new theme command description
`hugo new theme foo` creates theme `foo` in `./themes` and not in current directory.
2021-03-14 18:47:23 +01:00
Patrick Kollitsch
137d2dab32
github: More explicit support link to discourse 2021-03-14 18:27:15 +01:00
Bjørn Erik Pedersen
ba1d0051b4 media: Make Type comparable
So we can use it and output.Format as map key etc.

This commit also fixes the media.Type implementation so it does not need to mutate itself to handle different suffixes for the same MIME type, e.g. jpg vs. jpeg.

This means that there are no Suffix or FullSuffix on media.Type anymore.

Fixes #8317
Fixes #8324
2021-03-14 15:21:54 +01:00
Bjørn Erik Pedersen
1b1dcf586e deps: Update to esbuild v0.9.0 2021-03-14 11:51:25 +01:00
Cameron Moore
f6612d8bd8 exif: Fix handling of utf8 runes in nullString() 2021-03-13 21:20:10 +01:00
Cameron Moore
0a2ab3f8fe exif: Allow more spacing characters in strings
The root cause of issue #8079 was a non-breaking space (U+0160).
`unicode.IsPrint` only allows the ASCII space (U+0020).  Be more lenient
by using `unicode.IsGraphic` instead.

Fixes #8079
2021-03-13 21:20:10 +01:00
Bjørn Erik Pedersen
4d24e2a326
media: Add a basic benchmark 2021-03-11 10:08:51 +01:00
Bjørn Erik Pedersen
18074d0c23 Fix output format handling for render hooks
Fixes #8176
2021-03-09 13:26:39 +01:00
Bjørn Erik Pedersen
35bfb66222
Rename a test 2021-03-04 13:46:31 +01:00
Bjørn Erik Pedersen
6d21559fb5
Add a debug helper 2021-03-03 20:16:58 +01:00
Daniel Atwood
ba16a14c6e
Add support for Google Analytics v4 2021-03-03 13:30:06 +01:00
Bjørn Erik Pedersen
782c79ae61
Bump go.mod to Go 1.16
Fixes #8294
2021-03-03 09:17:57 +01:00
Systemkern
5afcae7e0b #8210 Upgrade golang version for Dockerfile
https://github.com/gohugoio/hugo/issues/8210
relates to: #8210
2021-02-28 14:14:06 +01:00
Bjørn Erik Pedersen
60469f429e
Update CONTRIBUTING.md 2021-02-25 11:50:08 +01:00
Bjørn Erik Pedersen
aed7df62a8 markup: Handle attribute lists in code fences
Fixes #8278
2021-02-24 11:16: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 '9d31f650da' 2021-02-23 17:41:05 +01:00
Bjørn Erik Pedersen
9d31f650da Squashed 'docs/' changes from d343ebf71..bb15e9804
bb15e9804 Update index.md (#1339)
ffb2f21d1 Update index.md
fc154ac02 Regenerate CLI docs
a0a687738 Update index.md
d0e35a844 Update index.md
86d0cc042 Update index.md
bdaf7e022 Release 0.81.0
b51017445 releaser: Add release notes to /docs for release of 0.81.0
888dd8fcc docs: Regen CLI docs
8c3e8b270 docs: Regen docs helper
79e3e1ebc Merge commit 'acb9109df7'
31f70af7e modules: Add config option modules.vendorClosest
2631df94e markup/goldmark: Add attributes support for blocks (tables etc.)
19dee04ad Update to Dart Sass Protocol beta6
e507721fe Refactor: Write to stdout by default
d204bf160 Refactor: Remove powershell support
91bea48f5 Feat: Add zsh, fish and powershell completion support
9c915ea27 docs: Remove mention of a file size limit for readFile
5acc8b6c7 js: Add Inject config option
45321989e js: Add Shims option

git-subtree-dir: docs
git-subtree-split: bb15e9804ae56da41f3bdb361adc14f8711fc19d
2021-02-23 17:39:59 +01:00
dependabot[bot]
88a85dcea9 build(deps): bump github.com/kyokomi/emoji/v2 from 2.2.7 to 2.2.8
Bumps [github.com/kyokomi/emoji/v2](https://github.com/kyokomi/emoji) from 2.2.7 to 2.2.8.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.7...v2.2.8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-23 10:55:29 +01:00
Bjørn Erik Pedersen
7f8530039a
tpl: Add method mappings for strings.Contains, strings.ContainsAny
Just to confirm/document the function signature.
2021-02-23 09:36:43 +01:00
gzagatti
01dd7c16af Fixes #7698.
markup: Allow installed arbitrary Asciidoc extension via path validation.
2021-02-22 13:52:04 +01:00
Bjørn Erik Pedersen
c8f45d1d86
commands: Fix autocomplete docs 2021-02-20 14:08:51 +01:00
hugoreleaser
b3504a0ee8 releaser: Prepare repository for 0.82.0-DEV
[ci skip]
2021-02-19 17:55:53 +00: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
hugoreleaser
9e2d086ca7 releaser: Bump versions for release of 0.81.0
[ci skip]
2021-02-19 17:07:09 +00:00
Bjørn Erik Pedersen
b65518ac63
releaser: Increase build timeout 2021-02-19 17:57:24 +01:00
hugoreleaser
0e9cd8128d
releaser: Add release notes for 0.81.0 2021-02-19 16:52:22 +01:00
Bjørn Erik Pedersen
fe77f7434b
tpl: Make the build green again 2021-02-18 18:17:43 +01: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
acb9109df7 Squashed 'docs/' changes from ef9c4913c..d343ebf71
d343ebf71 Document ignoreImports
f912ea1cc Fix the github workflow (#1332)
617894052 Add site function
f3be651f9 Minor typo/markdown fixes (#1328)
7a95e9db5 Fix a formatting error for Github Actions (#1323)
260106669 Fix #1120 Use Github Action
d8847a144 docs: Fix HTML code in .RenderString description being stripped out (#1320)
7a67c38c4 Correct sitemap version (#1318)
6a163f53a Removed noise. (#1317)
b02902121 Fix a minor typo (#1314)
399c74acd Revert "js: Update shims setup"
77def8a8c Revert "Update js.md"
13aeb2c73 Update js.md
704987dc1 js: Update shims setup

git-subtree-dir: docs
git-subtree-split: d343ebf718393ea704da132de508db712f7bcb44
2021-02-18 17:52:49 +01:00
Bjørn Erik Pedersen
7d0a261981
Merge commit 'acb9109df7' 2021-02-18 17:52:49 +01:00
Bjørn Erik Pedersen
c60806550a
tpl: Regenerate internal templates 2021-02-18 17:52:32 +01:00
Daniel Atwood
ffd9dac421
tpl: Update date logic of opengraph and schema internal templates
* Fix: updated date logic in opengraph template

* Updated date logic in schema template

* Reformatted opengraph and schema

* Wrapped PublishDate and Lastmod in with
2021-02-18 17:51:32 +01:00
Bjørn Erik Pedersen
88b93a09dc
Run go mod tidy 2021-02-18 14:22:25 +01:00
Bjørn Erik Pedersen
29fb456c9e build: Add arm64 to Darwinextended build and add vendorInfo
Closes #8003
2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
718fba7d63 Update Travis, GitHub, CircleCI and Snap to Go 1.16 (only) 2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
9650e56841 tpl: Add temporary patch to fix template data race
Keep this as a separate commit so we can reapply it if needed.

Fixes #7293
2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
e77b2e3aa0 Pull in latest Go 1.16 template source 2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
b5485aeae7 Add breaking tests for "map read and map write in templates"
The fix upstream in Go was reverted, so we apply a temporary patch for this in Hugo.

Updates #7293
2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
ccb822eb5a Pull in latest Go template source 2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
21e9eb18ac Expand template newline testcase to commands 2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
ae57ba6a9d Add a test case for Go 1.16 template action newlines 2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
cf3e077da3 tpl/internal: Synch Go templates fork with Go 1.16dev 2021-02-18 14:11:48 +01:00
Bjørn Erik Pedersen
66beac99c6 deps: Update github.com/tdewolff/minify/v2 v2.6.2 => v2.9.13
Fixes #8258
2021-02-18 10:19:22 +01:00
dependabot[bot]
968dd7a711 build(deps): bump github.com/frankban/quicktest from 1.11.2 to 1.11.3
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.11.2 to 1.11.3.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.11.2...v1.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-16 22:10:33 +01:00
dependabot[bot]
38f29e817f build(deps): bump github.com/getkin/kin-openapi from 0.32.0 to 0.39.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.32.0 to 0.39.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.32.0...v0.39.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-16 21:18:35 +01:00
dependabot[bot]
cd87813aa0 build(deps): bump github.com/aws/aws-sdk-go from 1.36.33 to 1.37.11
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.36.33 to 1.37.11.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.36.33...v1.37.11)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-16 18:43:30 +01:00
dependabot[bot]
4e815b063e build(deps): bump github.com/sanity-io/litter from 1.3.0 to 1.5.0
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.3.0 to 1.5.0.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.3.0...v1.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-16 18:42:55 +01:00
dependabot[bot]
652a59d385 build(deps): bump github.com/olekukonko/tablewriter from 0.0.4 to 0.0.5
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.4...v0.0.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-16 18:39:44 +01:00
Bjørn Erik Pedersen
84f0ec7f80 deps: Update to esbuild v0.8.46 2021-02-16 18:37:30 +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
b60e9279ab js: Fix potential path issue on Windows 2021-02-16 16:10:46 +01:00
dependabot[bot]
a9b0fea6a3 build(deps): bump google.golang.org/api from 0.26.0 to 0.40.0
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.26.0 to 0.40.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.26.0...v0.40.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-16 16:10:12 +01:00
Anthony Fok
e8df097745
Change version string format and add VendorInfo to help with issue triaging
* Change version string format as proposed by @moorereason

 1. shorten program name
 2. make version string semver compliant with +extended.
    The slash is not allowed in semver.
 3. Use key=value pairs for BuildDate etc.

* Add optional vendorInfo to version string

to help with issue triaging, e.g. VendorInfo=debian:0.80.0-7
2021-02-16 16:08:24 +01:00
Bjørn Erik Pedersen
3a5ee0d2d6
modules: Allow absolute paths for any modules resolved via project replacement
Fixes #8240
2021-02-15 11:11:34 +01:00
Bjørn Erik Pedersen
4ffaeaf155
modules: Throw an error running hugo mod vendor on mountless module 2021-02-15 10:47:32 +01:00
susiwen8
bf55afd71f
Fix some humanize issues
Fixes #7912
2021-02-14 18:30:59 +01:00
Anthony Fok
5f621df257
commands: Add PowerShell completion support
Revert "Refactor: Remove powershell support" with fixes

Thanks to Ben Mezger (@benmezger) for the original code.
See #8122

This reverts commit a7c515e1b5.
2021-02-09 13:37:36 -07:00
Anthony Fok
7118f89cf3
Refer to mage instead of make in comment regarding commitHash 2021-02-09 09:57:18 -07:00
Bjørn Erik Pedersen
e6dd312812
markup/goldmark: Fix handling of legacy attribute config
See #7548
2021-02-09 09:23:18 +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
1b24728256 deps: Update to Goldmark v1.3.2
Closes #8143
2021-02-08 12:16:21 +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
Jeremy Epstein
4867cd1dea
tpl/embedded: Exclude pages without Permalink from sitemap 2021-02-06 18:30:09 +01:00
Bjørn Erik Pedersen
92c6c40419
langs/i18n: Support translation files with suffix *.yml
Fixes #8212
2021-02-06 18:12:54 +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
Bjørn Erik Pedersen
144943798c github: Enable NPM tests on Windows
Fixes #8196
2021-02-01 11:32:17 +01:00
Bjørn Erik Pedersen
440fdb0eb9 deps: Update to esbuild v0.8.39
Fixes #8189
2021-02-01 11:28:12 +01:00
Pavlo Matiash
b2a48dce58
Trim whitespace in elements written to hugo_stats.json
Fixes #7958
2021-02-01 09:32:39 +01:00
Baris Ceviz
35def0ae45
tpl/data: Add default user-agent header for getJSON requests 2021-02-01 09:31:02 +01:00
dependabot[bot]
2f9dadae40 build(deps): bump github.com/aws/aws-sdk-go from 1.35.0 to 1.36.33
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.0 to 1.36.33.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.0...v1.36.33)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-28 22:20:00 +01: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
Aleksandr Demakin
ee9c136763 tpl/os: remove 1mb limit for readFile. 2021-01-23 00:39:14 +01:00
Bjørn Erik Pedersen
32b86076ee js: Add Inject config option
Fixes #8164
2021-01-22 23:43:44 +01:00
Cameron Moore
241b7483ea tpl: Fix race condition in text template baseof
Copy most of the htmltemplate cloning to the textemplate implementation
in the same function.
2021-01-22 19:25:45 +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
a1fe552fc9
Fix nilpointer in js.Build error handling
Fixes #8162
2021-01-21 10:09:33 +01:00
Bjørn Erik Pedersen
a1a9f088b1
Merge commit 'e48ffb7635' 2021-01-20 12:48:39 +01:00
Bjørn Erik Pedersen
e48ffb7635 Squashed 'docs/' changes from 1de7a358c..ef9c4913c
ef9c4913c Clean up and removal of outdated examples
46122c9aa add godot tutorials to showcase
06d1d1ea2 Update scss-sass.md
1fc63c100 Spelling fix in 0.79.1 release notes
ad2f50e3d Update plainwords description (#1296)
33021d451 Update substr examples (#1304)
6b1cc59bb Release 0.80.0
521db8c6d Merge branch 'tempv0.80.0'
58626c2b3 releaser: Add release notes to /docs for release of 0.80.0
f81d118af dartsass: Dart Sass only supports `expanded` and `compressed`
7da6f54be Add Dart Sass support
b1f2661bb Replace jsconfig.js with jsconfig.json
38de0c1a4 Update index.md
223ceae80 Update index.md
f7ac0e59d Release v0.79.1
2d4583d43 Merge branch 'temp791-2'
1d34e609b releaser: Add release notes to /docs for release of 0.79.1
e26769988 Merge branch 'temp791'
75694d904 Fix Resource.ResourceType so it always returns MIME's main type
0f65d7783 Typo s/adds/add (#1298)
0b896b2c0 images: Add images.Overlay filter
0d4257dcd Clarify documentation on shimming
fcf601ddf Update index.html
6bf9bc1c1 Update index.html
1ce76bf3a Update index.html
e7d976eec Update index.html
db2996e64 Update index.html
245e5bfc9 news: Add post about Apple M1
3ad4115ed tpl: Add title parameter to YouTube shortcode
76ed976f8 Added two useful extensions to the list (#1243)
e5a30dd11 Update related.md
25cf8f48b Improve substr examples
e16e57e9a Update path.Split.md
2749b88fd Update path.Split.md
d76cad3ff Release 0.79.0
f5ccfbe98 releaser: Add release notes to /docs for release of 0.79.0
ebf1b87b0 Merge commit '9f1265fde4'
1f1e8f39c Allow setting the delimiter used for setting config via OS env, e.g. HUGO_
e9b1414dd deps: Update to github.com/evanw/esbuild 0.8.11 to 0.8.14
0f76cf66c docs: Regen docshelper
1ada5d47e Add menu params
1c120aef0 Revert "docs: Regenerate docshelper"
7b60b5624 docs: Regenerate docshelper

git-subtree-dir: docs
git-subtree-split: ef9c4913cdcf95d62ec12d872f412f97e55a55ad
2021-01-20 12:47:49 +01:00
Robert-André Mauchin
07ad283f68 build(deps): bump github.com/spf13/afero from 1.4.1 to 1.5.1
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2021-01-19 17:25:20 +01:00
Andreas Richter
2c8b5d9165
pipes: Add external source map support to js.Build and Babel
Fixes #8132
2021-01-18 10:38:09 +01:00
Cameron Moore
0004a733c8 tpl: Fix metrics hint tracking
When tracking for cache hints, track the same template name as the call
to MeasureSince in Execute.  When referencing a partial "foo", the value
of `n` does not match `templ.Name()` (`partials/foo` versus
`partials/foo.html`).  This was causing hints to go untracked since
there was no existing metric to append the hint to.

Fixes #8125
2021-01-08 20:01:11 +01:00
Cameron Moore
8a26ab0bc5 tpl: Do not return errors in substr for out-of-bounds cases
Most other substr implementations don't error out in out-of-bounds cases
but simply return an empty string (or a value that's printed as an empty
string). We'll follow their lead and not exit template execution.  Allow
the user decide what to do with the empty result.

Fixes #8113
2021-01-08 10:13:10 +01:00
Cameron Moore
788e50ad3a tpl: Add missing test scenario for strings.Substr 2021-01-08 10:13:10 +01:00
Bjørn Erik Pedersen
4d2b6fc4c0
Run go mod tidy 2021-01-03 18:48:35 +01:00
Niklas Fasching
212e5e5542 deps: Update go-org to v1.4.0
- Add support for pretty urls [1]. Rewrite file links:
  1. replace the `.org` extension with `/` (`/foo.org` -> `/foo/`)
  2. prefix unrooted links with `../` as relative links start in the fake
  subdirectory `/foo/` rather than `/`
- Fix case-sensitivity of org drawer `🔚`

[1] https://gohugo.io/content-management/urls/#pretty-urls
2021-01-02 22:29:06 +01:00
Bjørn Erik Pedersen
4fdec67b11
rst: Adjust log level 2021-01-01 11:50:13 +01:00
hugoreleaser
9b681ecfbd releaser: Prepare repository for 0.81.0-DEV
[ci skip]
2020-12-31 13:49:02 +00: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
hugoreleaser
5b3fc1c673 releaser: Bump versions for release of 0.80.0
[ci skip]
2020-12-31 13:36:35 +00:00
Bjørn Erik Pedersen
63a33afee7
Update 0.80.0-relnotes.md 2020-12-31 14:26:00 +01:00
hugoreleaser
69aa3d4599 releaser: Add release notes for 0.80.0
Rename to *-ready.md to continue.
[ci skip]
2020-12-31 13:09:24 +00:00
Bjørn Erik Pedersen
ffbf5e45fa
Allow Dart Sass transformations to be cached on disk
This enbles people to build their sites/themes on servers where the Dart Sass binary is not available.
2020-12-31 11:32:20 +01: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
428b0b3294
dartsass: Add missing OutputStyle option 2020-12-31 10:49:59 +01:00
Cameron Moore
1f7e9f7333 Update emoji import paths and version
Since emoji is v2, we must import it with the `/v2` suffix.  Doing so
allows the Go tools to detect the latest release.
2020-12-30 22:46:19 +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
Horst Gutmann
f9f779786e GroupByParamDate now supports datetimes
Previously, the method only worked for date strings but not (for
instance) full RFC3339 datetime strings.
2020-12-28 17:50:55 +01:00
Bjørn Erik Pedersen
a9718f44cd
para: Skip para test when not on CI
Fixes #6963
2020-12-23 19:47:20 +01:00
Bjørn Erik Pedersen
f802bb236a
Update SECURITY.md 2020-12-22 10:09:59 +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
10ae7c3210
Improve LookPath 2020-12-19 17:03:07 +01:00
Patrick Kollitsch
ae2d1bd52d docs: create a SECURITY.md
This file is used by Github as a tab on the repos homepage to access information about how to report security issues. The text is kept simple.

Will solve #8074
2020-12-18 17:55:49 +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
Cameron Moore
8103188b9b para: Show more detail on failed time test
Give us more visibility into how badly a given host is failing in the
time test.

Updates #6963
2020-12-17 22:19:17 +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
Bjørn Erik Pedersen
a2d146ec32
tpl: Regenerate templates 2020-12-16 12:20:02 +01:00
Maciej Sawicki
d2d493ab5d
tpl: Fix series detection in opengraph
When inside front matter you specified series with spaces,
then the opengraph template wouldn't detect other articles,
because in `.Site.Taxonomies.series` they are stored by 
urlized key.

Example:

```yaml
# in front matter
series:
    - My Series
```

```gohtml
{{/* in a template */}}
{{- $series := index .Site.Taxonomies.series$name }}

{{/* was resolved to */}}
{{- $series := index {'my-series': ...} "MySeries" }}
```
2020-12-16 12:13:30 +01:00
真夜
ce96895deb
hugolib/paths: Fix typo 2020-12-16 12:12:14 +01:00
Phil Davis
04b89857e1
all: Fix minor typos 2020-12-16 12:11:32 +01:00
Bjørn Erik Pedersen
21fa1e86f2
Fix BenchmarkMergeByLanguage
Fixes #7914
2020-12-09 17:47:10 +01:00
Anthony Fok
c84ad8db82
deps: Bump github.com/spf13/cobra from 0.15.0 to 0.20.0
The substring match in TestExecute deploy test is adjusted accordingly.
2020-12-04 20:43:03 -07:00
Patrick Kollitsch
4e0acb89b7
chore: configure proper link to discourse.gohugo.io (#8020)
* chore: configure proper link to discourse.gohugo.io 

This adds a configuration file to the issue templates for this repo. In this config file, an issue template is added that will look like the existing issue templates, but on click will lead directly to the discourse forum instead of hoping that people read what it says there. The support.md can be deleted.

* chore: remove obsolete support.md configuration

* chore: remove obsolete autoclosing workflow
2020-12-04 10:04:35 +01:00
Bjørn Erik Pedersen
718e09ed4b
tpl/internal/go_templates: Revert formatting
Should make future fork synch easier.
2020-12-03 13:47:43 +01:00
Bjørn Erik Pedersen
d90e37e0c6 all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
dependabot[bot]
32471b57bd build(deps): bump github.com/evanw/esbuild from 0.8.15 to 0.8.17
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.8.15 to 0.8.17.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.15...v0.8.17)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 13:04:16 +01:00
Andrew Zenk
4fc918e02c
tpl: Add title parameter to YouTube shortcode 2020-12-02 12:53:53 +01:00
sth
0ad378b09c
Use --baseURL path for live-reload URL
Fixes #6595
2020-12-02 12:52:26 +01:00
ivan-meridianbanc-com
aebfe156fb
Fix RelURL and AbsURL when path starts with language 2020-12-02 12:47:01 +01:00
dependabot[bot]
907d9e9268 build(deps): bump github.com/getkin/kin-openapi from 0.31.0 to 0.32.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.31.0 to 0.32.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.31.0...v0.32.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 12:26:27 +01:00
Cameron Moore
5862fd2a60 tpl: Fix substr when length parameter is zero
When length parameter is zero, always return an empty string.

Updates #7993
2020-12-01 23:20:04 +01:00
Cameron Moore
64789fb5dc tpl: Refactor and fix substr logic
Fix miscalculations when start is negative.  Results should now match
PHP substr.

Fixes #7993
2020-11-28 11:53:46 +01:00
hugoreleaser
32d4bf68da releaser: Prepare repository for 0.80.0-DEV
[ci skip]
2020-11-27 09:19:04 +00: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
hugoreleaser
4e6bf7907d releaser: Bump versions for release of 0.79.0
[ci skip]
2020-11-27 09:06:36 +00:00
Bjørn Erik Pedersen
50be4370b0
Update 0.79.0-relnotes.md 2020-11-27 09:55:51 +01:00
hugoreleaser
3d2e6a30d4 releaser: Add release notes for 0.79.0
Rename to *-ready.md to continue.
[ci skip]
2020-11-27 08:44:33 +00:00
Bjørn Erik Pedersen
4f1e4bb3fe
Merge commit '9f1265fde4' 2020-11-27 09:30:05 +01:00
Bjørn Erik Pedersen
9f1265fde4 Squashed 'docs/' changes from 57c1d1a67..1de7a358c
1de7a358c Clarify that "with" blocks do not render with empty values (#1287)
b48de8b0a Update js.md
e0124e4b1 Update js.md
087b39d74 Update hosting-on-render.md (#1286)
8f02b5412 Update js.md (#1284)
8dd8a8d1d Add link to "Build Websites with Hugo" book (#1174)
ae2dc138a Fix typo in page bundles (#1283)
ab14bfec3 Update configuration directory section
17da77ff1 Update multilingual.md (#1280)
5bce8db3a Fix for site-hierarchy image, issue #60
9d7a2366d Fix typo
ad4210c41 Fix typo
c88bc0383 Fix orphan branch url (#1262)
1cf6cf5b3 Hugo 0.78.2
538c3cb86 Merge branch 'tempv0.78.2'
e5e07fc81 releaser: Add release notes to /docs for release of 0.78.2
120a61a47 Fixed wrong var assignment example
4cebbb1a7 Ignore remote JSON errors (for now)
618fcf9ba Add a link to modules config option 'replacements'
e12722779 Fix typo ("wil" -> "will") (#1273)
0670e9894 Update js.md
5bde834cf Update GH docs to say "main" as default branch
26312f93d Update index.md
eb6f51df1 Update js.md
b890dc84d Merge branch 'tempv0.78.1'
6b73ea450 releaser: Add release notes to /docs for release of 0.78.1
46e582112 Update starter-kits.md (#1268)
a62786235 Update 404 docs: GitLab auto-detects 404.html (#1173)
cbd4fd2d9 Fix typo (#1271)
2ba3f9386 Update js.md
7b5109d90 Update js.md
bc75bc962 Release 0.78.0
0b2e8b0f1 releaser: Add release notes to /docs for release of 0.78.0
9ecba8480 Merge commit 'b74591123e'
60a475df7 js: Add avoidTDZ option
3b895261f Make js.Build fully support modules

git-subtree-dir: docs
git-subtree-split: 1de7a358cac94ac09a513456bdaae65e6ae94859
2020-11-27 09:26:24 +01:00
Bjørn Erik Pedersen
d162bbd799
publisher: Fix memory usage in writeStats
```
name                     old time/op    new time/op    delta
ClassCollectorWriter-16    72.1µs ± 0%    32.3µs ± 0%  -55.17%  (p=0.029 n=4+4)

name                     old alloc/op   new alloc/op   delta
ClassCollectorWriter-16    85.9kB ± 0%    35.1kB ± 0%  -59.16%  (p=0.029 n=4+4)

name                     old allocs/op  new allocs/op  delta
ClassCollectorWriter-16       329 ± 0%       149 ± 0%  -54.71%  (p=0.029 n=4+4)
```

Fixes #7945
2020-11-27 09:13:16 +01:00
dependabot[bot]
17e0bbe821 build(deps): bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.3.0...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-26 21:41:21 +01:00
Bjørn Erik Pedersen
e442cf30a2 Fix server rebuild issue with partials referenced from render hooks
Fixes #7990
2020-11-26 20:41:54 +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
Cameron Moore
34061706e6 output: Add more layout lookup tests
Add more tests to cover more cases and to help with documentation and
discussion of template lookup order.

Updates #7964
2020-11-25 12:52:33 +01:00
dependabot[bot]
6f7633df7d build(deps): bump github.com/google/go-cmp from 0.5.2 to 0.5.3
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.2...v0.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-24 20:20:40 +01:00
Christian Oliff
a546059a9c
examples: Remove unneeded meta tag from blog example
```html
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
```
This was only needed for IE10 and lower (which are no longer supported) and chromeframe which was a Google plugin for IE8 and lower and was discontinued many years ago. So this meta tag can be safely removed.
2020-11-24 20:20:04 +01:00
dependabot[bot]
b5d906e31e build(deps): bump github.com/getkin/kin-openapi from 0.30.0 to 0.31.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.30.0...v0.31.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-24 14:48:09 +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
SatowTakeshi
e4fcb672ed resources: Preserve url set in frontmatter without sanitizing
related #6007 (already closed)
2020-11-21 23:37:58 +01:00
Bjørn Erik Pedersen
18c13adcd4
watcher: Add file deleted by accident
See #7972
2020-11-21 17:21:14 +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
Bjørn Erik Pedersen
b298c06e05
deps: Update to Chroma v0.8.2
Closes #7970
2020-11-20 09:30:05 +01:00
dependabot[bot]
55e290af41 build(deps): bump github.com/evanw/esbuild from 0.8.8 to 0.8.11
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.8.8 to 0.8.11.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.8...v0.8.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-19 09:51:30 +01:00
dependabot[bot]
506a190a82 build(deps): bump github.com/getkin/kin-openapi from 0.26.0 to 0.30.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.26.0 to 0.30.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.26.0...v0.30.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 12:33:31 +01:00
dependabot[bot]
fc81de6439 build(deps): bump github.com/evanw/esbuild from 0.8.6 to 0.8.8
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.8.6 to 0.8.8.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.6...v0.8.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 12:32:33 +01:00
hugoreleaser
fcaa324e3c releaser: Prepare repository for 0.79.0-DEV
[ci skip]
2020-11-13 10:19:23 +00: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
hugoreleaser
a3012d85d1 releaser: Bump versions for release of 0.78.2
[ci skip]
2020-11-13 10:07:00 +00:00
hugoreleaser
fc7f739275 releaser: Add release notes for 0.78.2
[ci skip]
2020-11-13 10:07:00 +00:00
Bjørn Erik Pedersen
78f227b664
js: Let ESBuild handle all imports from node_modules
This commit fixes some issues where modules in /assets share the same name as in node_modules.

This was not intended, and with this commit the node_modules-components should be isolated. If you want to redefine something inside node_modules, use the `defines` option.

Fixes #7948
2020-11-13 08:54:29 +01:00
dependabot[bot]
5e03f644a4 build(deps): bump github.com/evanw/esbuild from 0.8.5 to 0.8.6
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.8.5 to 0.8.6.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.5...v0.8.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-12 13:59:18 +01:00
dependabot[bot]
a92ef20ff6 build(deps): bump github.com/evanw/esbuild from 0.8.4 to 0.8.5
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.4...v0.8.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-11 23:00:27 +01:00
dependabot[bot]
0d54a84406 build(deps): bump github.com/getkin/kin-openapi from 0.22.1 to 0.26.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.22.1 to 0.26.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.22.1...v0.26.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-08 12:44:01 +01:00
Mackenzie Morgan
943f3c932f Update GH docs to say "main" as default branch 2020-11-06 20:57:52 +01:00
AdamKorcz
4f20bf29eb Updated year in header 2020-11-06 13:19:18 +01:00
AdamKorcz
4c613d5d5d Added first fuzzer 2020-11-06 13:19:18 +01:00
dependabot[bot]
82a182e52c build(deps): bump github.com/frankban/quicktest from 1.11.1 to 1.11.2
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.11.1...v1.11.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-06 13:18:22 +01:00
dependabot[bot]
dfc662b208 build(deps): bump golang.org/x/text from 0.3.3 to 0.3.4
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.3 to 0.3.4.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.3...v0.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-06 09:09:13 +01:00
dependabot[bot]
2f0917cc01 build(deps): bump github.com/evanw/esbuild from 0.8.3 to 0.8.4
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.8.3 to 0.8.4.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.8.3...v0.8.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-06 09:01:32 +01:00
hugoreleaser
7565cda1ff releaser: Prepare repository for 0.79.0-DEV
[ci skip]
2020-11-05 09:50:35 +00: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
210f6d38ac releaser: Bump versions for release of 0.78.1
[ci skip]
2020-11-05 09:38:59 +00:00
hugoreleaser
03f87f8f06 releaser: Add release notes for 0.78.1
[ci skip]
2020-11-05 09:38:59 +00:00
Bjørn Erik Pedersen
3437174c3a
Disable NPM test on Travis on Windows
For now.
2020-11-05 09:56:22 +01:00
Bjørn Erik Pedersen
f66302ca05
travis: Install nodejs on Windows 2020-11-05 07:51:41 +01:00
Bjørn Erik Pedersen
944150bafb
js: Remove external source map option
It was merged by accident and the implementation does not look correct.

Fixes #7932
2020-11-04 23:04:12 +01:00
Bjørn Erik Pedersen
bf2837a314
js: Misc fixes
* Fix resolve of package.json deps in submodules
* Fix directory logic for writing assets/jsconfig.json

Fixes #7924
Fixes #7923
2020-11-04 19:21:43 +01:00
hugoreleaser
cf6131dc18 releaser: Prepare repository for 0.79.0-DEV
[ci skip]
2020-11-03 13:25:12 +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
hugoreleaser
3ebe83aea7 releaser: Bump versions for release of 0.78.0
[ci skip]
2020-11-03 13:13:12 +00:00
Bjørn Erik Pedersen
0c16debc7f
Update 0.78.0-relnotes.md 2020-11-03 14:03:53 +01:00
hugoreleaser
794e1f9e72 releaser: Add release notes for 0.78.0
Rename to *-ready.md to continue.
[ci skip]
2020-11-03 12:23:42 +00:00
Bjørn Erik Pedersen
c64e9504d8
Merge commit 'b74591123e' 2020-11-03 13:05:34 +01:00
Bjørn Erik Pedersen
b74591123e Squashed 'docs/' changes from d1157b687..57c1d1a67
57c1d1a67 Add note about issue with Instagram shortcode
2a4355113 Add example for regional language tags (#1139)
5e9a60fc0 Format dates with "th", "nd", and "rd". (#1254)
43df9a7f6 Update index.md
f15f32590 Update index.md
5a15be93d Update configuration.md
e71c1c545 Update configuration.md
5fd0439ff Release Hugo 0.77.0
5b875477c releaser: Add release notes to /docs for release of 0.77.0
09a2a3199 docs: Regen docs helper
bebef9bbe Merge commit '9cabb46f68'
f5ed02685 tpl: Refactor time.AsTime location implementation
f3b8eccd2 tpl: Update Hugo time to support optional [LOCATION] parameter

git-subtree-dir: docs
git-subtree-split: 57c1d1a67b9da5ba8ad5151d464f3fd7a21a24d8
2020-11-03 13:04:56 +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
Andreas Richter
3089fc0ba1 js.Build: Generate tsconfig files
Updates #7777

Added support to allow SourceMap files to be external to the build.
In addition added more information when the js compilation has an error.
Correctly append sourceMappingURL to output file.
Fix merge conflict.
2020-11-03 13:04:37 +01:00
hugoreleaser
e10e36cf70 releaser: Prepare repository for 0.78.0-DEV
[ci skip]
2020-10-30 10:24:27 +00: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
hugoreleaser
5d2fceecaf releaser: Bump versions for release of 0.77.0
[ci skip]
2020-10-30 10:12:16 +00:00
Bjørn Erik Pedersen
0696df6686
Release 0.77.0 2020-10-30 11:05:21 +01:00
Bjørn Erik Pedersen
5ba49c8778
Update 0.77.0-relnotes.md
[ci skip]
2020-10-30 10:39:04 +01:00
hugoreleaser
c3ccda8fab releaser: Add release notes for 0.77.0
Rename to *-ready.md to continue.
[ci skip]
2020-10-30 09:22:42 +00:00
Bjørn Erik Pedersen
beabc8d998
modules: Allow absolute paths for project imports
Fixes #7910
2020-10-30 10:14:08 +01: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 '9cabb46f68' 2020-10-30 09:50:15 +01:00
Bjørn Erik Pedersen
9cabb46f68 Squashed 'docs/' changes from 9abd3043a..d1157b687
d1157b687 Fix typo -- missing word in title
34c9a9ff3 Remove Hartwell Insurance subpage broken link
d42f6d8eb Fix strings.Repeat documentation
09b49debb Release 0.76.5
149877735 Merge branch 'tempv0.76.5'
72ffeb026 releaser: Add release notes to /docs for release of 0.76.5
4150d8ae8 Fixed typo: update PrevPage to Prev
c3e630db1 Update index.md
deb7520a8 Release 0.76.4
f58bd7134 Merge branch 'tempv0.76.4'
2581fe4bc releaser: Add release notes to /docs for release of 0.76.4
26d8417fc Release 0.76.3
34c49e06a Merge branch 'tempv0.76.3'
0de2af2ef releaser: Add release notes to /docs for release of 0.76.3
cce12c0f7 Add missing closing quotes and fix code-block lang (#1250)
8c1c80d9f Update AMP link (#1251)
7b1211ffa Fix typos in multilingual.md
29e9d70fd Update index.md
172a5480b Release 0.76.2
93ff424d3 Merge branch 'temp762'
3cad3c23a releaser: Add release notes to /docs for release of 0.76.2
610221964 Update index.md
8a9d31709 Release 0.76.1
64b245aa4 Merge branch 'temp761'
f19469ff8 releaser: Add release notes to /docs for release of 0.76.1
97f0ed030 Update front-matter.md
cca71f263 Update index.md
23c64f6a3 Fix typo in 0.76.0 release note
5f79e034d Update index.md
b66567de2 netlify: Bump to Hugo 0.76.0
a3e30300d Release 0.76.0
3b057e8fe releaser: Add release notes to /docs for release of 0.76.0
7fa1cd912 docs: Regen docshelper
769712aec Merge commit 'e556848805'
70ce6ae33 pagemeta: Make BuildConfig.Render an enum
a78d3849f Allow cascade to be a slice with a _target discriminator
705fea656 Add force flag to server redirects config
04e4e1cc1 tpl: Add Do Not Track (dnt) option to Vimeo shortcode
025c19fe1 Fix CLI example for PostCSS 8
0c70c47b2 markup/asciidocext: Add preserveTOC option

git-subtree-dir: docs
git-subtree-split: d1157b687e25054501c3bcbb735da51229f66b74
2020-10-30 09:49:15 +01:00
Bjørn Erik Pedersen
173187e263
Add module.replacements
Fixes #7904
Fixes #7908
2020-10-30 09:41:05 +01:00
Bjørn Erik Pedersen
8a1c637c44
Fix setting HUGO_MODULE_PROXY etc. via env vars
Fixes #7903
2020-10-30 09:41:04 +01:00
Cameron Moore
6d95dc9d74 tpl: Fix reflection bug in merge
Value.Type().Key() must only be called on map values.

Fixes #7899
2020-10-29 19:19:41 +01:00
José Moreira
56a343507c deploy: Do not call CDN service invalidation when executing a dry run deployment
Currently, if cache invalidation is enabled when running `hugo deploy --dryRun` with , the deployer does not take the dry run flag into consideration and triggers CloudFront/GoogleCloudCDN cache invalidation if any of those services are configured.

This change will instead print a feedback message if a dry run is in effect and quiet mode is not enabled.

Fixes #7884
2020-10-28 11:19:40 +01:00
Bhavin Gandhi
d48a98c477 create: Pass editor arguments from newContentEditor correctly
If newContentEditor has editor name with arguments like `emacsclient
-n`, it fails with `executable file not found in $PATH`. This change
parses the value correctly and passes it to the given editor.

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2020-10-24 20:34:03 +02:00
Anthony Fok
3261678f63
deps: Bump github.com/spf13/cobra from 0.0.7 to 1.1.1
Cobra 1.1.1 fixes internal formatting for go-md2man v2 (which caused
man page generation e.g. "hugo gen man" to be broken since Cobra 0.0.6).
See spf13/cobra#1049 for context.
2020-10-24 03:39:53 -06:00
Eric Hagman
f465c5c307
build: Allow optional "nodeploy" tag to exclude deploy command from bin
Fixes #7826
2020-10-23 09:03:41 +02:00
Gareth Watts
3400aff258 Allow cascade _target to work with non toml fm
The TOML lib unmarshals slices of string maps to []map[string]interface{}
whereas YAML and JSON decode to []interface{}

The existing tests only check for TOML working correctly, and _target
with cascade did not work at all for frontmatter defined in other formats.

Add a function to normalize those slices

Fixes #7874
2020-10-22 23:00:19 +02:00
Bjørn Erik Pedersen
fdfa4a5fe6 Allow getJSON errors to be ignored
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes #7866
2020-10-22 09:09:29 +02:00
dependabot[bot]
8cbe2bbfad build(deps): bump github.com/evanw/esbuild from 0.7.15 to 0.7.18
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.15 to 0.7.18.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.15...v0.7.18)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-21 10:19:40 +02: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
Bjørn Erik Pedersen
b886fa46bb
Revert "Add benchmark for building docs site"
We already have a lot of site building benchmarks. The main problem with adding the "Hugo site docs" to the list is that it cannot easiliy  be compared to any previous release, because its content/template/whatever has changed.

This reverts commit 837e084bbe.
2020-10-17 00:37:42 +02:00
Cameron Moore
14bce18a6c highlight: Avoid making unnecessary allocation
Avoid creating a local copy of the highlight configuration when no
options are passed.

Benchmarks of building the docs site:

name        old time/op    new time/op    delta
DocsSite-2     1.94s ± 4%     1.93s ± 4%    ~     (p=0.841 n=5+5)

name        old alloc/op   new alloc/op   delta
DocsSite-2     666MB ± 1%     656MB ± 0%  -1.48%  (p=0.008 n=5+5)

name        old allocs/op  new allocs/op  delta
DocsSite-2     8.85M ± 0%     8.76M ± 0%  -1.04%  (p=0.029 n=4+4)
2020-10-16 21:14:02 +02:00
Cameron Moore
837e084bbe Add benchmark for building docs site 2020-10-16 21:13:39 +02:00
Cameron Moore
08e4f9ff9c embedded: Always show page number when 5 pages or less
Fixes #7523
2020-10-16 16:16:49 +02:00
Cameron Moore
acfa153863
output: Improve layout path construction 2020-10-15 20:54:47 +02:00
dependabot[bot]
f033d9f01d build(deps): bump github.com/frankban/quicktest from 1.11.0 to 1.11.1
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.11.0...v1.11.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-15 00:01:45 +02:00
dependabot[bot]
59fe279424 build(deps): bump github.com/evanw/esbuild from 0.7.14 to 0.7.15
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.14 to 0.7.15.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.14...v0.7.15)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-14 21:59:26 +02:00
Bjørn Erik Pedersen
62119022d1
Merge branch 'release-0.76.5' 2020-10-14 17:44:47 +02:00
hugoreleaser
2f3f41f736 releaser: Prepare repository for 0.77.0-DEV
[ci skip]
2020-10-14 15:28:16 +00: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
dcf70ea5a5 releaser: Bump versions for release of 0.76.5
[ci skip]
2020-10-14 15:15:22 +00:00
hugoreleaser
7487c0abf2 releaser: Add release notes for 0.76.5
[ci skip]
2020-10-14 15:15:22 +00:00
Bjørn Erik Pedersen
79a022a15c
Render aliases even if render=link
Fixes #7832
2020-10-14 17:06:34 +02:00
Bjørn Erik Pedersen
ead5799f7e Render aliases even if render=link
Fixes #7832
2020-10-14 16:59:37 +02:00
dependabot[bot]
d57be11324 build(deps): bump github.com/spf13/afero from 1.4.0 to 1.4.1
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.4.0...v1.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 22:54:09 +02:00
dependabot[bot]
d070596694 build(deps): bump github.com/evanw/esbuild from 0.7.9 to 0.7.14
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.9 to 0.7.14.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.9...v0.7.14)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 22:51:34 +02:00
Daniel Sutton
f5ea359dd3
docker: Update to Go 1.15 and Alpine 3.12 2020-10-12 22:51:08 +02:00
Cameron Moore
78b26d538c output: Test all lookup permutations in TestLayout 2020-10-12 22:24:47 +02:00
Cameron Moore
28179bd556 output: Reformat TestLayout table 2020-10-12 22:24:47 +02:00
hugoreleaser
fef057b489 releaser: Prepare repository for 0.77.0-DEV
[ci skip]
2020-10-12 08:45:25 +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
1ef4211fea releaser: Bump versions for release of 0.76.4
[ci skip]
2020-10-12 08:32:44 +00:00
hugoreleaser
b148063ec0 releaser: Add release notes for 0.76.4
[ci skip]
2020-10-12 08:32:44 +00:00
Anthony Fok
e9a7ebaf67
snap: Install postcss v8 explicitly as it is now a peer dependency
Fix Snap build failures since 2020-09-21
2020-10-09 12:23:38 -06:00
Bjørn Erik Pedersen
506820435c lang/i18n: Fix for language code case issue with pt-br etc.
Fixes #7804
2020-10-09 18:02:43 +02:00
Bjørn Erik Pedersen
49972d0792
Merge branch 'release-0.76.3' 2020-10-08 19:33:23 +02:00
Bjørn Erik Pedersen
c98132e30e
Add merge helper 2020-10-08 19:32:53 +02:00
hugoreleaser
af19253f43 releaser: Prepare repository for 0.77.0-DEV
[ci skip]
2020-10-08 17:20:03 +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
d62bc74770 releaser: Bump versions for release of 0.76.3
[ci skip]
2020-10-08 17:07:29 +00:00
hugoreleaser
1b1d62fdc9 releaser: Add release notes for 0.76.3
[ci skip]
2020-10-08 17:07:29 +00:00
Bjørn Erik Pedersen
33e9d79b78 langs/i18n: Add workaround for known language, but missing plural rule error
Closes #7798
2020-10-08 14:20:18 +02:00
Bjørn Erik Pedersen
fc6abc39c7 langs/i18n: Fix for bare TOML keys
Hugo 0.76.0 updated go-i18n from v1 to v2. This allowed us to set the TOML unmarshaler to use, so we set the one we use in other places in Hugo.

But that does not support dotted bare keys, which caused some breakage in the wild.

This commit fixes that by:

* Using go-toml for language files
* Updating go-toml to the latest version
2020-10-08 14:20:18 +02:00
hugoreleaser
18ed22be5c releaser: Prepare repository for 0.77.0-DEV
[ci skip]
2020-10-07 09:11:54 +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
830b1a94de releaser: Bump versions for release of 0.76.2
[ci skip]
2020-10-07 08:59:11 +00:00
hugoreleaser
605cff4071 releaser: Add release notes for 0.76.2
[ci skip]
2020-10-07 08:59:11 +00:00
Bjørn Erik Pedersen
6dd60fca73
Revert "deps: Update to github.com/tdewolff/minify v2.9.4"
Closes #7792

This reverts commit b254532b52.
2020-10-07 10:46:19 +02:00
hugoreleaser
138a025916 releaser: Prepare repository for 0.77.0-DEV
[ci skip]
2020-10-07 07:45:26 +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
hugoreleaser
2b8e8e6d96 releaser: Bump versions for release of 0.76.1
[ci skip]
2020-10-07 07:33:10 +00:00
hugoreleaser
aef8369865 releaser: Add release notes for 0.76.1
[ci skip]
2020-10-07 07:33:10 +00:00
Bjørn Erik Pedersen
f9e798e8c4 langs/i18n: Fix i18n .Count regression
Fixes #7787
2020-10-07 00:32:21 +02:00
digitalcraftsman
ee56efffcb
Fix typo in 0.76.0 release note 2020-10-06 19:03:36 +02:00
hugoreleaser
2c4e76e962 releaser: Prepare repository for 0.77.0-DEV
[ci skip]
2020-10-06 15:42:25 +00: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
hugoreleaser
4482958f96 releaser: Bump versions for release of 0.76.0
[ci skip]
2020-10-06 15:29:25 +00:00
Bjørn Erik Pedersen
e1ec3bc2b2
Release 0.76.0 2020-10-06 17:21:35 +02:00
hugoreleaser
1cfa63b9ec
releaser: Add release notes for 0.76.0
Rename to *-ready.md to continue.
[ci skip]
2020-10-06 17:21:23 +02:00
Bjørn Erik Pedersen
b9318e4315
docs: Regen docshelper 2020-10-06 16:25:23 +02:00
Bjørn Erik Pedersen
5e39eb20a6
Merge commit 'e556848805' 2020-10-06 16:24:00 +02:00
Bjørn Erik Pedersen
e556848805 Squashed 'docs/' changes from 4895c29c5..9abd3043a
9abd3043a Add docs for shimming JS libraries
6a1c8dcd7 Update sitemap-template.md (#1245)
37c397332 Update frontends.md
a0f86f6df Update configuration.md
bb00cb2c1 Update page-bundles.md
773212de6 Restructure and simplify
fcba7dddf Some minor clarifications of weight sorting
759b967fc Update configuration-markup.md
56708f0b7 module import path remove slash at end
59f4f4acd Doc: Fix typo in hugo command
faacf2e97 Clarify pagination documentation (#1208)
d8eb60887 netlify: Bump to 0.75.1
8cedf6231 Merge branch 'temp751'
188e2bf56 releaser: Add release notes to /docs for release of 0.75.1
c96d4b7a3 Update index.md
1a9d192f7 Update index.md
32731b916 Update index.md
a5bfa0c9a Restore the ... home page
b6850bf96 Release 0.75.0
d6e5e624f releaser: Add release notes to /docs for release of 0.75.0
8cd6b4f47 typo: already -> already
2cb2b22bb Merge commit '534ae9c57a'
e3525de23 docs: Regen docs helper
fd746dd83 docs: Regenerate CLI docs
e20127980 Add "hugo mod npm pack"
8e82c7ce1 markup/highlight: Add support to linkable line anchors on Chroma
21e94911b markup/asciidocext: Fix AsciiDoc TOC with code
50b8dace5 modules: Add noVendor to module config
d05b541fe modules: Make ignoreVendor a glob pattern
c946082e7 docs: Update replaceRE func
149054341 docs: Update replace func
d917567df docs: Update merge function
f1e093c92 docs: Regen CLI docs
c7bac967d docs: Regen docs helper
7a38f7a45 Merge commit '7d7771b673'
1a5a7263a markup/asciidoc: Add support for .TableOfContents

git-subtree-dir: docs
git-subtree-split: 9abd3043a9214b390e8cc148f4588bf630620851
2020-10-06 16:22:20 +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
dependabot[bot]
ee090c0940 build(deps): bump github.com/evanw/esbuild from 0.7.8 to 0.7.9
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.8 to 0.7.9.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.8...v0.7.9)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-05 12:13:46 +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
dependabot[bot]
05e358fd33 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.5 to 2.9.7
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.5 to 2.9.7.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.5...v2.9.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-02 14:09:16 +02:00
dependabot[bot]
a2e85d9a75 build(deps): bump github.com/aws/aws-sdk-go from 1.34.34 to 1.35.0
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.34 to 1.35.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.34...v1.35.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 12:13:53 +02:00
dependabot[bot]
4fba78dd0e build(deps): bump github.com/getkin/kin-openapi from 0.22.0 to 0.22.1
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.22.0...v0.22.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-01 12:13:30 +02:00
dependabot[bot]
c011b4667f build(deps): bump github.com/aws/aws-sdk-go from 1.34.33 to 1.34.34
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.33 to 1.34.34.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.33...v1.34.34)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-30 12:13:40 +02:00
dependabot[bot]
35348b4b34 build(deps): bump github.com/evanw/esbuild from 0.7.7 to 0.7.8
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.7 to 0.7.8.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.7...v0.7.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-30 12:13:00 +02:00
dependabot[bot]
34915777c2 build(deps): bump github.com/aws/aws-sdk-go from 1.34.27 to 1.34.33
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.27 to 1.34.33.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.27...v1.34.33)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 19:48:58 +02:00
dependabot[bot]
0f4a837ed1 build(deps): bump github.com/evanw/esbuild from 0.7.4 to 0.7.7
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.4 to 0.7.7.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.4...v0.7.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 19:48:21 +02:00
dependabot[bot]
b395d686e9 build(deps): bump github.com/tdewolff/minify/v2 from 2.9.4 to 2.9.5
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.9.4 to 2.9.5.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.9.4...v2.9.5)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-29 19:47:59 +02:00
Bjørn Erik Pedersen
97987e5c02 langs/i18n: Upgrade to go-i18n v2
Fixes #5242
2020-09-29 17:48:07 +02:00
Bjørn Erik Pedersen
111344113b
publisher: Fix writeStats with quote inside quotes
Fixes #7746
2020-09-28 22:17:36 +02:00
dependabot[bot]
4855c186d8 build(deps): bump github.com/evanw/esbuild from 0.7.2 to 0.7.4
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.2 to 0.7.4.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.2...v0.7.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-24 10:36:14 +02:00
Andrey Sitnik
0c3d2b67e0 Fix CLI example for PostCSS 8 2020-09-22 19:31:02 +02:00
dependabot[bot]
6f07ec7e9e build(deps): bump github.com/aws/aws-sdk-go from 1.34.26 to 1.34.27
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.26 to 1.34.27.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.26...v1.34.27)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 13:24:10 +02:00
dependabot[bot]
4318dc72f8 build(deps): bump github.com/alecthomas/chroma from 0.8.0 to 0.8.1
Bumps [github.com/alecthomas/chroma](https://github.com/alecthomas/chroma) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/alecthomas/chroma/releases)
- [Changelog](https://github.com/alecthomas/chroma/blob/master/.goreleaser.yml)
- [Commits](https://github.com/alecthomas/chroma/compare/v0.8.0...v0.8.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 13:23:46 +02:00
dependabot[bot]
acdc27a32d build(deps): bump github.com/evanw/esbuild from 0.7.1 to 0.7.2
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.7.1 to 0.7.2.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.7.1...v0.7.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 13:23:01 +02:00
Bjørn Erik Pedersen
3acde9ae04
Make sure CSS is rebuilt when postcss.config.js or tailwind.config.js changes
Fixes #7715
2020-09-20 13:35:41 +02:00
Joe Mooring
473b6610d5 Fix typo in redirect error message 2020-09-19 22:06:54 +02:00
dependabot[bot]
0bce97703c build(deps): bump github.com/aws/aws-sdk-go from 1.34.22 to 1.34.26
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.22 to 1.34.26.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.22...v1.34.26)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-19 21:18:16 +02:00
Bjørn Erik Pedersen
b254532b52 deps: Update to github.com/tdewolff/minify v2.9.4 2020-09-19 21:17:02 +02:00
Anthony Fok
05a2289292
snap: Bump bundled Node.js from v12.18.3 to v12.18.4
due to CVE-2020-8201, CVE-2020-8251 and CVE-2020-8252,
see https://nodejs.org/en/blog/vulnerability/september-2020-security-releases/
2020-09-18 12:13:31 -06:00
Helder Pereira
8e553dcdef markup/asciidocext: Add preserveTOC option 2020-09-17 10:50:25 +02:00
dependabot[bot]
d4fc70a3b3 build(deps): bump github.com/frankban/quicktest from 1.10.2 to 1.11.0
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.10.2 to 1.11.0.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.10.2...v1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-17 09:55:45 +02:00
dependabot[bot]
d905abc002 build(deps): bump github.com/evanw/esbuild from 0.6.32 to 0.7.1
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.6.32 to 0.7.1.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.6.32...v0.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-16 20:52:20 +02:00
dependabot[bot]
8f3946746d build(deps): bump github.com/rogpeppe/go-internal from 1.5.1 to 1.6.2
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.5.1 to 1.6.2.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.5.1...v1.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-16 20:50:54 +02:00
dependabot[bot]
b01b2564ee build(deps): bump github.com/jdkato/prose from 1.1.1 to 1.2.0
Bumps [github.com/jdkato/prose](https://github.com/jdkato/prose) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/jdkato/prose/releases)
- [Commits](https://github.com/jdkato/prose/compare/v1.1.1...v1.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-16 20:50:25 +02:00
dependabot[bot]
9fa5ebe2c4 build(deps): bump github.com/spf13/afero from 1.2.2 to 1.4.0
Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.2.2 to 1.4.0.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](https://github.com/spf13/afero/compare/v1.2.2...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-16 20:48:25 +02:00
hugoreleaser
efaed306b1 releaser: Prepare repository for 0.76.0-DEV
[ci skip]
2020-09-15 07:00:54 +00: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
2a9dce423f releaser: Bump versions for release of 0.75.1
[ci skip]
2020-09-15 06:45:52 +00:00
hugoreleaser
30159b58e9 releaser: Add release notes for 0.75.1
[ci skip]
2020-09-15 06:45:52 +00:00
Bjørn Erik Pedersen
cd00f7f966 resources/image: Fix nilpointer for images with no Exif
E.g. PNG files.

Fixes #7688
2020-09-15 07:54:24 +02:00
Bjørn Erik Pedersen
214afe4c1b modules/npm: Preserve the original package.json if it exists
Fixes #7690
2020-09-15 01:04:31 +02:00
Evgeny Kuznetsov
cd830bb027 tpl: Fix grammar in the new 'requires non-zero' error message 2020-09-14 19:54:48 +02:00
hugoreleaser
a8458bfb25 releaser: Prepare repository for 0.76.0-DEV
[ci skip]
2020-09-14 09:31:44 +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
hugoreleaser
07b5e602f8 releaser: Bump versions for release of 0.75.0
[ci skip]
2020-09-14 09:19:06 +00:00
Bjørn Erik Pedersen
70f16e84e2
Release 0.75.0 2020-09-14 11:08:48 +02:00
hugoreleaser
abadf29542 releaser: Add release notes for 0.75.0
Rename to *-ready.md to continue.
[ci skip]
2020-09-14 08:51:14 +00:00
Bjørn Erik Pedersen
377ad87a51
Set PWD in environment when running the Node apps
E.g. PostCSS and Babel.

This is in line with what we do when running Go.
2020-09-14 10:22:24 +02:00
Daniel Holbach
292b0e26ec typo: already -> already 2020-09-14 10:15:59 +02:00
Bjørn Erik Pedersen
534ae9c57a Squashed 'docs/' changes from d3eb97a33..4895c29c5
4895c29c5 Document strings.Count function

git-subtree-dir: docs
git-subtree-split: 4895c29c5b1e090eea69dc6223b2e20e3b934a6f
2020-09-13 21:58:53 +02:00
Bjørn Erik Pedersen
df56682a10
Merge commit '534ae9c57a' 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
787da6bd5f
releaser: Drop 32-bit for MacOS
Fixes #7576
2020-09-13 21:07:08 +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
Andreas Richter
9df60b62f9
Print layout name if it was specified when showing missing layout file error
Fixes #7617
2020-09-13 20:36:37 +02:00
dependabot[bot]
4fad43c8bd build(deps): bump github.com/aws/aws-sdk-go from 1.34.21 to 1.34.22
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.21 to 1.34.22.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.21...v1.34.22)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-13 18:39:37 +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
Anthony Fok
748fd4cb0d
snap: Bump bundled Node.js from v8.12.0 to v12.18.3
Fixes #7278
2020-09-12 00:01:16 -06:00
Anthony Fok
b82f440c59
Revert "snap: Change confinement from strict to classic"
We need to wait until classic confinement review process at
https://forum.snapcraft.io/t/request-for-classic-confinement-for-hugo-snap/19892
is completed before "confinement: classic" uploads to the Snap Store
are accepted.

This reverts commit 6f4ff1a461.
2020-09-11 23:56:29 -06:00
dependabot[bot]
c8143efa5d build(deps): bump github.com/getkin/kin-openapi from 0.14.0 to 0.22.0
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.14.0 to 0.22.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.14.0...v0.22.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-11 22:08:53 +02:00
dependabot[bot]
c80132bbe5 build(deps): bump github.com/aws/aws-sdk-go from 1.34.20 to 1.34.21
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.20 to 1.34.21.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.34.20...v1.34.21)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-11 22:07:18 +02:00
dependabot[bot]
75fa4c5c95 build(deps): bump github.com/spf13/viper from 1.6.1 to 1.7.1
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.6.1 to 1.7.1.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.6.1...v1.7.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-11 22:06:42 +02:00
Bjørn Erik Pedersen
fd7969e0b0
deps: Run "go mod tidy" 2020-09-11 07:50:07 +02:00
Bjørn Erik Pedersen
b7fa3c4bba
deps: Update to Goldmark v1.2.1 2020-09-11 07:49:35 +02:00
Helder Pereira
6a848cbc3a markup/asciidocext: Fix AsciiDoc TOC with code
Fixes #7649
2020-09-10 21:53:13 +02:00
dependabot[bot]
746ba803af build(deps): bump github.com/aws/aws-sdk-go from 1.27.1 to 1.34.20
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.27.1 to 1.34.20.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.27.1...v1.34.20)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-10 21:42:13 +02:00
dependabot[bot]
612b7d376f build(deps): bump github.com/mitchellh/mapstructure from 1.1.2 to 1.3.3
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.1.2 to 1.3.3.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.1.2...v1.3.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-10 21:39:36 +02:00
Anthony Fok
6f4ff1a461
snap: Change confinement from strict to classic
See gohugoio/hugoDocs#1222
2020-09-10 09:40:28 -06:00
dependabot[bot]
ddeca45933 build(deps): bump github.com/spf13/cobra from 0.0.5 to 0.0.7
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 0.0.5 to 0.0.7.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/0.0.5...0.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-10 15:11:20 +02:00
dependabot[bot]
31f2091f58 build(deps): bump github.com/sanity-io/litter from 1.2.0 to 1.3.0
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-10 15:09:08 +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
20af9a0781 modules: Add ignoreImports to module imports config
Fixes #7646
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
dependabot[bot]
84adecf97b build(deps): bump github.com/gorilla/websocket from 1.4.1 to 1.4.2
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 22:39:47 +02:00
dependabot[bot]
573558a078 build(deps): bump github.com/fsnotify/fsnotify from 1.4.7 to 1.4.9
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.4.7 to 1.4.9.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.4.7...v1.4.9)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 22:39:25 +02:00
dependabot[bot]
8b10c22f82 build(deps): bump github.com/kyokomi/emoji
Bumps [github.com/kyokomi/emoji](https://github.com/kyokomi/emoji) from 2.2.1+incompatible to 2.2.4+incompatible.
- [Release notes](https://github.com/kyokomi/emoji/releases)
- [Commits](https://github.com/kyokomi/emoji/compare/v2.2.1...v2.2.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 22:39:02 +02:00
dependabot[bot]
195bd1243b build(deps): bump github.com/markbates/inflect from 1.0.0 to 1.0.4
Bumps [github.com/markbates/inflect](https://github.com/markbates/inflect) from 1.0.0 to 1.0.4.
- [Release notes](https://github.com/markbates/inflect/releases)
- [Commits](https://github.com/markbates/inflect/compare/v1.0.0...v1.0.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 22:11:16 +02:00
dependabot[bot]
6a544ece24 build(deps): bump github.com/frankban/quicktest from 1.7.2 to 1.10.2
Bumps [github.com/frankban/quicktest](https://github.com/frankban/quicktest) from 1.7.2 to 1.10.2.
- [Release notes](https://github.com/frankban/quicktest/releases)
- [Commits](https://github.com/frankban/quicktest/compare/v1.7.2...v1.10.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-09 22:10:25 +02:00
Ralph Slooten
4b430d456a Encode & in livereload injected code 2020-09-09 22:09:40 +02:00
dependabot[bot]
b9f10c75cb build(deps): bump github.com/niklasfasching/go-org from 1.3.1 to 1.3.2
Bumps [github.com/niklasfasching/go-org](https://github.com/niklasfasching/go-org) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/niklasfasching/go-org/releases)
- [Commits](https://github.com/niklasfasching/go-org/compare/v1.3.1...v1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 19:53:15 +02:00
dependabot[bot]
537c598e9a build(deps): bump github.com/bep/golibsass from 0.6.0 to 0.7.0
Bumps [github.com/bep/golibsass](https://github.com/bep/golibsass) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/bep/golibsass/releases)
- [Commits](https://github.com/bep/golibsass/compare/v0.6.0...v0.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 19:52:29 +02:00
dependabot[bot]
67348676f7 build(deps): bump golang.org/x/text from 0.3.2 to 0.3.3
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.2 to 0.3.3.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.2...v0.3.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 19:52:10 +02:00
dependabot[bot]
f9cc0ec76e build(deps): bump github.com/evanw/esbuild from 0.6.5 to 0.6.32
Bumps [github.com/evanw/esbuild](https://github.com/evanw/esbuild) from 0.6.5 to 0.6.32.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.6.5...v0.6.32)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 19:51:50 +02:00
dependabot[bot]
b5483eed6e build(deps): bump github.com/nicksnyder/go-i18n from 1.10.0 to 1.10.1
Bumps [github.com/nicksnyder/go-i18n](https://github.com/nicksnyder/go-i18n) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/nicksnyder/go-i18n/releases)
- [Changelog](https://github.com/nicksnyder/go-i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nicksnyder/go-i18n/compare/v1.10.0...v1.10.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 19:48:51 +02:00
Bjørn Erik Pedersen
90285f4750
Revert "Update dependabot.yml"
This reverts commit c0655ba6ce.
2020-09-08 10:28:16 +02:00
Bjørn Erik Pedersen
4949bdc2ef
markup/asciidocext: Fix broken test 2020-09-08 10:00:57 +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
c0655ba6ce
Update dependabot.yml 2020-09-07 22:08:03 +02:00
Bjørn Erik Pedersen
a2dda22c36
Create dependabot.yml 2020-09-07 21:51:49 +02:00
Bjørn Erik Pedersen
910d81a692
Remove Pygments from requirements.txt 2020-09-07 21:47:54 +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
dcf25c0b49
markup/asciidocext: Revert trace=true 2020-09-07 21:44:11 +02:00
Bjørn Erik Pedersen
7d7771b673 Squashed 'docs/' changes from 7297c1172..d3eb97a33
d3eb97a33 Document .IsSection page variable
a068bcf5c Ace and Amber support was removed with #6609
5cd9ca4b2 Mention MacPorts also on the Installing page  (#1215)
0ae8f5c19 Add instructions for using Macports
d50aba8f0 Revise ref and relref function pages
a17e25d6f Update quick-start.md: move notice about drafts up
cf87a5da2 Update macOS tarball installation instructions (#1203)
2e701f8f3 Corrected the url for index function link
736bd59e0 Clarify treatment of zero weights (#1207)
42a19f479 Fix example of output from urlize function
34f8de26d Revise content-management/cross-references
252435a95 Rewrite Translation of Strings
f0882bc14 Remove note that has been outdated by v0.71.0
dfe28ceb5 Improve mounts module config
58029627d Fix erroneous example code piping to if

git-subtree-dir: docs
git-subtree-split: d3eb97a3328f5390801bbce017233ce895fc2d28
2020-09-07 21:37:51 +02:00
Bjørn Erik Pedersen
b9e4f5898b
Merge commit '7d7771b673' 2020-09-07 21:37:51 +02:00
Bjørn Erik Pedersen
e820b366b9 Update to Go 1.15.1 and 1.14.8
Fixes #7627
2020-09-07 21:37:34 +02:00
Bjørn Erik Pedersen
4055c12184 Fix some change detection issues on server reloads
* Fix change detection when .GetPage/site.GetPage is used from shortcode
* Fix stale content for GetPage results with short name lookups on server reloads

Fixes #7623
Fixes #7624
Fixes #7625
2020-09-07 21:06:44 +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
19ef27b98e
markup/goldmark: Add a test case
Updates #7619
2020-09-04 10:23:02 +02:00
Andreas Richter
c6b661de82
js.Build: Add SourceMap flag with inline option
Added a flag to allow turning on sourcemap in ESBuild. The current support
can only support inline or true as value for sourcemap. This is because
the way ESBuild is invoked it doesn't have a separate output path
to write the mapfile external to the asset pipeline. Add disable for "" and "0".
Add test script and make sure mage check passes.

Fixes #7607
2020-09-01 16:19:08 +02:00
Cameron Moore
cdfd1c99ba tpl: Add limit support to replaceRE
Go stdlib doesn't contain a limited replace in the regexp package, but
we can accomplish the same thing with ReplaceAllStringFunc.

Fixes #7586
2020-08-28 18:57:56 +02:00
Cameron Moore
047af7cfe5 tpl: Extend merge to accept multiple parameters
Fixes #7595
2020-08-28 09:54:51 +02:00
Cameron Moore
f9ebaaed1b tpl: Add limit option to replace template function
Updates #7586
2020-08-28 08:55:58 +02:00
Jeff Warner
d39636a5fc
commands: Remove logic that hides 'Building Sites' message after build completes
Append newline to the message instead.

Fixes #7579
2020-08-22 09:56:43 +02:00
Aurken Bilbao
ad01aea3f4 Fixed misspelled words 2020-08-20 22:34:35 +02:00
Bjørn Erik Pedersen
ec37420468 Improve stderr logging for PostCSS and simlilar
Fixes #7584
2020-08-20 22:32:20 +02:00
Bjørn Erik Pedersen
ae63c2b5c9
Fail on partials with return when given none or a zero argument
We need to make a proper fix for this, but it is better with an error than just silently continue.

Fixes #7572
Updates #7528
2020-08-19 10:01:16 +02:00
Bjørn Erik Pedersen
e627449c0a Update to Go 1.15
Fixes #7554
2020-08-16 21:37:26 +02:00
Bjørn Erik Pedersen
c2235c6a62
Revert "Update stale.yml"
This reverts commit 4f69ade711.
2020-08-16 18:25:14 +02:00
Bjørn Erik Pedersen
4f69ade711
Update stale.yml 2020-08-15 00:21:08 +02:00
Bjørn Erik Pedersen
f8b8b091fc
Merge commit 'cb39847dee' 2020-08-14 18:31:40 +02:00
Bjørn Erik Pedersen
cb39847dee Squashed 'docs/' changes from a26d0e610..7297c1172
7297c1172 Add note about caching for Hugo Pipes.
c91be3403 minor markdown, capitalization and spelling fixes (#1183)
fd4a103bf Fix several 404 errors (#1162)
69378bc20 Update related.md
28c24e95f Add note on setting baseURL
7b1502c99 minor typo fix (#1180)
33abeb4fe Update related.md
4887563f6 Update js.md
ee5f1de2e Hugo 0.74.3
986ea0c8e releaser: Add release notes to /docs for release of 0.74.3
3299b44bd Fix Asciidoctor args
bcb950347 resources/js: Add option for setting bundle format
3f8324918 resources/js: Add es5 build target

git-subtree-dir: docs
git-subtree-split: 7297c1172754078511ac1c10ca0dfd4cab629506
2020-08-14 18:31:01 +02:00
Kyle Anderson
5f42590144 Remove trailing whitespace and tabs from RSS templates
The rss templates had some tab characters mixed in with the spaces.
Additionally there would end up being trailing whitespace in output
rss feeds, which looks red in git diff.
2020-08-12 09:25:16 +02:00
Fabian Tamp
f3cb0be35a Fix a typo in CONTRIBUTING.md
The URL `git://github.com/USERNAME/hugo.git` is invalid; it should instead be either `https://github.com/USERNAME/hugo.git` or `git@github.com:USERNAME/hugo.git`. I chose the latter for this PR.
2020-08-07 19:35:48 +02:00
Joe Mooring
bffc4e12fe Revert "Fix ellipsis display logic in pagination template"
This reverts commit 2fa851e650.
2020-08-06 13:42:08 +02:00
satotake
12f6a1cdc0
Respect mediatypes for deploy
Fixes #6861
2020-08-03 19:06:18 +02:00
Joe Mooring
2fa851e650 Fix ellipsis display logic in pagination template
Closes #7523
2020-07-31 16:08:23 +02:00
Ricardo N Feliciano
21dbfa1f11 mage: Add uninstall target 2020-07-30 08:44:51 +02:00
Joe Mooring
e5591e89d3 deps: Update Chroma to 0.8.0
Closes #7517
2020-07-27 22:12:54 +02:00
Niklas Fasching
88929bc23f deps: Update go-org to v1.3.1
fixes a bug in list item parsing
2020-07-24 19:48:44 +02:00
hugoreleaser
850c18bfe4 releaser: Prepare repository for 0.75.0-DEV
[ci skip]
2020-07-23 16:33:19 +00: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
hugoreleaser
90fe00df07 releaser: Bump versions for release of 0.74.3
[ci skip]
2020-07-23 16:21:21 +00:00
hugoreleaser
02efadc243 releaser: Add release notes for 0.74.3
[ci skip]
2020-07-23 16:21:21 +00:00
Bjørn Erik Pedersen
00e00da233 publisher: Collect transition attributes as classes
Fixes #7509
2020-07-23 16:21:58 +02: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
Joe Mooring
a06c06a5c2 Fix date format in internal schema template
Prior to this change, the offset indicator for dates with positive
offsets was rendered as &#43; instead of +.

Fixes #7495
2020-07-23 15:57:20 +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
eded9ac2a0 resources/js: Simplify options handling
Mostly to minify cache hash breakage.

Updates #7499
2020-07-22 10:13:30 +02:00
Philipp Klose
8d72512825 make sure documentation intro text only appears once 2020-07-21 00:47:55 +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 '28bd06265e' 2020-07-20 22:20:33 +02:00
Bjørn Erik Pedersen
28bd06265e Squashed 'docs/' changes from c3b4f8410..a26d0e610
a26d0e610 Add documentation to js.Build (#1175)
439a22c3e Update index.md
7a779b39a Hugo 0.74.2
07cb5740c Merge branch 'temp742'
abcea676c releaser: Add release notes to /docs for release of 0.74.2
e0dcdbfea Revert "Adding an issue link to the issue creation workflow (#1023)"
21c7131f1 Adding an issue link to the issue creation workflow (#1023)
922afb18b Update index.md
b9512b192 Update index.md
b7af5993c Update index.md
816f864b6 Release 0.74.1
1732f3461 Merge branch 'temp741'
d473f21c1 releaser: Add release notes to /docs for release of 0.74.1
bb234e9cd Add release notes 0.74.0
5cb3166d4 releaser: Add release notes to /docs for release of 0.74.0
7f35a3800 Merge commit '823ce055ed'
4b7054be5 docs: Regenerate docs helper
1d86f0aed Merge commit '6aa5c9117f'
068b2ab28 Update formats.md doc for new allowed extensions.
d71ed99d3 Add support for inline partials
efe0e549c Rework external asciidoctor integration

git-subtree-dir: docs
git-subtree-split: a26d0e610457c7942fd79e7abdd78021f9401796
2020-07-20 22:19:42 +02:00
Bjørn Erik Pedersen
9f9191471e
deps: esbuild v0.6.5 2020-07-20 22:19:08 +02:00
hugoreleaser
3727a9d111 releaser: Prepare repository for 0.75.0-DEV
[ci skip]
2020-07-17 17:35:17 +00: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
808e126216 releaser: Bump versions for release of 0.74.2
[ci skip]
2020-07-17 17:22:42 +00:00
hugoreleaser
aa85a46dc6 releaser: Add release notes for 0.74.2
[ci skip]
2020-07-17 17:22:42 +00:00
Bjørn Erik Pedersen
35011bcb26 Add .Defines to js.Build options
This is needed to import `react` as a library, e.g.:

```
{{ $jsx := resources.Get "index.jsx" }}
{{ $options := dict "defines" (dict "process.env.NODE_ENV" "\"development\"") }}
{{ $js := $jsx | js.Build $options }}
```

Fixes #7489
2020-07-17 19:09:09 +02:00
hugoreleaser
084624baac releaser: Prepare repository for 0.75.0-DEV
[ci skip]
2020-07-13 19:06:13 +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
a74f7d3cc0 releaser: Bump versions for release of 0.74.1
[ci skip]
2020-07-13 18:52:36 +00:00
hugoreleaser
cb84d98169 releaser: Add release notes for 0.74.1
[ci skip]
2020-07-13 18:52:36 +00:00
Bjørn Erik Pedersen
c91dbe4ce9 Fix baseof block regression
From Hugo 0.74.0.

Fixes #7478
2020-07-13 20:45:09 +02:00
hugoreleaser
6e0452e189 releaser: Prepare repository for 0.75.0-DEV
[ci skip]
2020-07-13 10:42:11 +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
hugoreleaser
6265184309 releaser: Bump versions for release of 0.74.0
[ci skip]
2020-07-13 10:30:11 +00:00
Bjørn Erik Pedersen
797127010d
Release 0.74.0 2020-07-13 12:20:41 +02:00
hugoreleaser
1672a332da releaser: Add release notes for 0.74.0
Rename to *-ready.md to continue.
[ci skip]
2020-07-13 09:47:04 +00:00
Bjørn Erik Pedersen
823ce055ed Squashed 'docs/' changes from cfd74b57d..c3b4f8410
c3b4f8410 Update theme
0aaecc16c Remove unnecessary period. (#1168)

git-subtree-dir: docs
git-subtree-split: c3b4f84106cf312fa2698c60c43c2b46bc4969e3
2020-07-13 11:01:55 +02:00
Bjørn Erik Pedersen
5f7a65a080
Merge commit '823ce055ed' 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
9df98ec49c Add proper Media Type handling in js.Build
See #732
2020-07-13 10:56:23 +02:00
Remko Tronçon
2fc3380707 Add js.Build asset bundling
Fixes #7321
2020-07-13 10:56:23 +02:00
Bjørn Erik Pedersen
f1916f114b
Merge commit '6aa5c9117f' 2020-07-07 07:00:01 +02:00
Bjørn Erik Pedersen
6aa5c9117f Squashed 'docs/' changes from ac2c4a487..cfd74b57d
cfd74b57d Add a config file update step.
5957d8815 Wrap cache configuration in code-toggle
914405c0e capitalization and indentation fix for taxonomies page (#1159)
223b80f42 Fix page kinds shortcode not rendering on Taxonomies page (#1158)
a9b6fa984 Clarify weight description.
29e121681 Warn about zero weights in front matter.
27ce7ba8c Release 0.73.0
e9596b2ee Merge branch 'temp73'
074a270cd releaser: Add release notes to /docs for release of 0.73.0
4f56a9fc0 width fix of expanding code box in documentation (#1156)
f27254d60 css fix of expanding code box in documentation (#1155)
43b576178 Fix incorrect directory name in quick-start (#1154)
16726eacf Add GroupByLastmod
73c31758e Fix for broken link again (#1151)
d07067295 Fix broken link (#1144)
bc0b484d1 Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy
674d71842 Fix Typo on Docker section of installation page
b87778165 Merge commit 'efa74c5c6e'
c7cdebed3 tpl/crypto: Add hmac
260130cc0 Allow hook template per section/type
1f70519d8 releaser: Add release notes to /docs for release of 0.72.0
8516d540c Merge commit '9e1dcefc5f'
c49195c69 common/maps: Add Scratch.Values
78072df81 Add redirect support to the server
90ca0af6b Fix typo in install instructions

git-subtree-dir: docs
git-subtree-split: cfd74b57d968d98f88d3ddaee651d9cbe79b7ce1
2020-07-07 06:58:43 +02:00
Bjørn Erik Pedersen
12a65e76df Add openapi3.Unmarshal
Fixes #7442
Fixes #7443
2020-07-06 20:03:36 +02:00
Joe Mooring
58c0f5e617 Remove trailing hyphen from auto heading ID
Applicable when autoHeadingIDType is either `github` or `github-ascii`.

When autoHeadingIDType is `blackfriday`, the existing code removes
trailing whitespace while iterating through the characters, using
a boolean "futureDash" mechanism.

Fixes #6798
2020-07-05 14:13:02 +02:00
Robert van Gent
a1c3e3c1f3 deploy: Ensure that non-trivial default flag values are passed through. 2020-07-04 21:19:25 +02:00
Bjørn Erik Pedersen
42e150fbfa Fix server reload when non-HTML shortcode changes
Fixes #7448
2020-07-03 23:31:51 +02:00
Bjørn Erik Pedersen
028b356787
tpl/strings: Add strings.Count
Fixes #7453
2020-07-03 10:35:46 +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
defd7106bf
tpl: Add debug.Dump
Fixes #3957
2020-07-02 09:04:46 +02:00
Bryan Klein
beb6c03bc8 Update config.go to add two Asciidoctor extensions
Added two common extensions to allow my Hugo+Asciidoctor site to build with the new configuration.
2020-07-02 07:57:43 +02:00
Bjørn Erik Pedersen
4a3efea7ef Add support for inline partials
Fixes #7444
2020-07-01 23:10:21 +02:00
Sebastian Boehm
c66dc6c74f Add support for native Org dates in frontmatter 2020-06-30 10:30:55 +02:00
Niklas Fasching
127d5feb32 deps: Update go-org to v1.3.0
- Add support for image links (i.e. link with image as description)
- Kinda breaking: Wrap headlines and headline+content in containers as emacs
  Org mode does. Could break people's styles - I don't expect it, but who knows
  what counts as sane when it comes to css.

  Before:

  ```
  <h2 id="headline-1">FOO</h2>
  foo bar
  ```

  After:

  ```
  <div id="outline-container-headline-1" class="outline-2">
  <h2 id="headline-1">FOO</h2>
  <div id="outline-text-headline-1" class="outline-text-2">
  foo bar
  </div>
  </div>
  ```
2020-06-29 18:08:06 +02:00
Niklas Fasching
2d42ba912b deps: Update go-org to v1.2.0
- Add support for #+MACRO
- fix a bug with #+LINK (edge case, should never happen anyways :TM:)
- Make title export optional (add export option)
- Remove cosmetic whitespace added by go-org (for easier visual
  diffing) inside p tags (<p>\nfoo\n</p> => <p>foo</p>)
  (should make `white-space: pre` on p look more in line with expectations)
- implement table separators via multiple tbodies (the html spec is ok with
  that)
2020-06-27 13:28:01 +02:00
Bjørn Erik Pedersen
5b7b5dea1f
Update bug_report.md 2020-06-26 21:03:09 +02:00
Bjørn Erik Pedersen
ccfaeb678b
hugolib: Add missing zero check on file 2020-06-26 13:27:01 +02:00
Bjørn Erik Pedersen
057b1377c5
cache: Remove some unused code 2020-06-25 17:34:58 +02:00
Bjørn Erik Pedersen
48dbb593f7
commands: Add an option to print memory usage at intervals
Use it with `hugo --print-mem
2020-06-25 12:19: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
Bjørn Erik Pedersen
77aa385b84
Enable the embedded template test when race detector is off
See #5926
2020-06-25 09:16:28 +02:00
Bjørn Erik Pedersen
545a1c1ced
Merge branch 'release-0.73.0' 2020-06-23 18:45:33 +02:00
hugoreleaser
47aaa52e39 releaser: Prepare repository for 0.74.0-DEV
[ci skip]
2020-06-23 16:42:50 +00: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
hugoreleaser
a78b3e3415 releaser: Bump versions for release of 0.73.0
[ci skip]
2020-06-23 16:29:21 +00:00
Bjørn Erik Pedersen
cfcb014515
Release 0.73.0 2020-06-23 18:21:12 +02:00
Mateusz Szczyrzyca
0b579db80f Updated installation instruction about Sass/SCSS support 2020-06-23 17:08:29 +02:00
hugoreleaser
ee5d027cd5 releaser: Add release notes for 0.73.0
Rename to *-ready.md to continue.
[ci skip]
2020-06-23 08:57:01 +00:00
Bjørn Erik Pedersen
4a340ba254
Remove some old release notes 2020-06-23 09:37:25 +02:00
Nico
3466884e36 Create robots.txt in the domain root directory
Before a robots.txt is created in every Site. So in public/robots.txt if there are no languages (was correct). But if there are multiple languages in every language directory, too (was wrong). If defaultContentLanguageInSubdir is true, no language is created into the root directory, so no robots.txt is in the root directory (was wrong). If multihosts are configured for each language, that is the only case where one robots.txt must be created in each language directory (was correct).

I've changed the behaviour, that only in the multihost case the robots.txt is created in the language directories. In any other case it is created in public/robots.txt. I've also added tests that files are not created in the wrong directories.

Fixes #5160
See also #4193
2020-06-20 17:13:26 +02:00
Bjørn Erik Pedersen
6ff435aa3f Make GroupByParamDate work with string params
Fixes #3983
2020-06-19 11:58:58 +02: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
Helder Pereira
9679023f2b Fix aliases with path in baseURL 2020-06-17 10:52:35 +02:00
Bjørn Erik Pedersen
0a9172672a
Merge commit 'efa74c5c6e' 2020-06-16 14:19:31 +02:00
Bjørn Erik Pedersen
efa74c5c6e Squashed 'docs/' changes from 9be494de3..ac2c4a487
ac2c4a487 Update documentation for Ugly URLs (#1082)
88bdec17a Change 072.0 to 0.72.0 in release post's description
2aa7d7818 Update rss.md (#1104)
c80677aeb Update quick-start.md (#1076)
d04196bbd Minor spelling and capitalization fixes
837d2feba Fixed spelling mistake
67dc78e12 Update installing.md
ce280c5d6 Update relurl.md
bb4d0e703 Capitalization and Redirecting URL fixes
e1fecada0 Update partials.md
1d99bb182 Typos and whitespacing issues fixed
b20dba125 actually fix index function link this time
f47d6f1e3 Fixing typos, whitespace issues and links
dc82309b9 fix link to the index function
1eab0cbea add missing word (#1130)
9c3ee62ae more fixes
e9bc5880a whitespace, typos and HTTPS fixes
93b806493 Add missing word to Module section
80ced9062 Display image on page bundles page.
727029b0a Update index.md
51fc48e4d Release 0.72.0
1ff68ac3b releaser: Add release notes to /docs for release of 0.72.0
f74a25b92 common/maps: Add Scratch.Values
2fd83db96 Add redirect support to the server
bdfccf9f4 Fix typo in install instructions
e12737ea6 Create SUPPORT.md

git-subtree-dir: docs
git-subtree-split: ac2c4a4871e90ddfb180f23704ce7ec9023529ca
2020-06-16 14:18:51 +02:00
Bjørn Erik Pedersen
6408c1cbc8 Fix server data race/nil pointer in withMaps
Fixes #7392
2020-06-16 11:48:10 +02:00
Bjørn Erik Pedersen
522ba1cd98 Fix order of GetTerms
Preserve the order from front matter, which would be behaviour when doing this manually (before GetTerms).

Fixes #7213
2020-06-15 22:23:02 +02:00
Cameron Moore
889dc47ceb Add genDocsHelper mage target
Expose the functionality of the hidden `hugo gen docshelper` command as
a mage target.
2020-06-15 20:07:28 +02:00
Helder Pereira
f720fe56db Fix aliases with uglyURLs 2020-06-15 12:19:59 +02:00
Bjørn Erik Pedersen
d6ed17c60f Fix crash for closing shortcode with no .Inner set
Fixes #6857
Closes #7330
2020-06-14 20:19:08 +02:00
Helder Pereira
145b3fcce3 Fix aliases with relativeURLs 2020-06-14 14:08:41 +02:00
Bjørn Erik Pedersen
01e249e97c
Regenerate templates 2020-06-12 11:29:04 +02:00
Joe Mooring
4b560cc119 Beautify HTML generated by pagination template
Fixes #7199.
2020-06-12 11:27:20 +02:00
Bjørn Erik Pedersen
e3e627e6b7
Add a nested data dir test
Ref. a discussion.
2020-06-12 09:14:20 +02:00
Raphael Krupinski
83d03a5201
hugofs: Use os.PathError in RootMappingFs.doLstat 2020-06-11 14:59:01 +02:00
Bjørn Erik Pedersen
fc0f13b684 commands: Fix URL rewrites vs fast render server mode
Fixes #7357
2020-06-06 12:37:42 +02:00
Edouard
7eeebe1e5a
tpl/crypto: Add hmac 2020-06-05 20:04:11 +02:00
Alexandros
740fa4a91d
Remove credit (#7347) 2020-06-02 19:31:15 +02:00
Bjørn Erik Pedersen
f8c67f93e1 Allow hook template per section/type
Fixes #7349
2020-06-02 19:02:10 +02:00
Sam Smith
3d9235e8fc tpl: Fix bad rounding in NumFmt
strconv.FormatFloat doesn't round properly sometimes, this adds a
different method of rounding, fixes #7116
2020-06-02 17:20:36 +02:00
hugoreleaser
f7d909f394 releaser: Prepare repository for 0.73.0-DEV
[ci skip]
2020-05-31 12:16:50 +00: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
hugoreleaser
2dfe242ea6 releaser: Bump versions for release of 0.72.0
[ci skip]
2020-05-31 12:05:36 +00:00
Bjørn Erik Pedersen
7a1464e547
Release 0.72.0 2020-05-31 13:48:27 +02:00
hugoreleaser
41d50b4dd3 releaser: Add release notes for 0.72.0
Rename to *-ready.md to continue.
[ci skip]
2020-05-31 11:03:50 +00:00
Bjørn Erik Pedersen
4d53ae697e
releaser: Adjust the "thanks" section 2020-05-31 12:46:18 +02:00
Bjørn Erik Pedersen
626b16e024
Merge commit '9e1dcefc5f' 2020-05-31 12:43:33 +02:00
Bjørn Erik Pedersen
9e1dcefc5f Squashed 'docs/' changes from 6c2195936..9be494de3
9be494de3 Clean up the markup config
c3e123133 Remove JustComment
bc1b02bc5 Add Smart to Anchor section
49e796409 Added where .RegularPagesRecursive was added
a92296e31 Fixed the new-in shortcode in pages-vs-site-pages
051e1267c Documented .RegularPagesRecursive
5bcec88a3 Fix broken link in RSS templates page
3db79d433 Correct pull request link on migrations.md
55c347168 Release 0.71.1
11a4e36c3 Merge branch 'temp711'
481fc8ed6 releaser: Add release notes to /docs for release of 0.71.1
40ba83c26 Update site.md
382632b58 Use-modules: More help how to get started importing a theme (#1107)
06751d465 Addition of hugefastsearch to search options (#1118)
8346d3b18 Add example of how to set the permalinks option for pages in "root"
ebb3b4f3a Refine highlight shortcode options
1075a172a Update index.md
7cc927ea6 Fix typo in v0.71.0 release notes
4121da273 Pull in latest theme version to get link hooks
4809be651 Document render-heading feature
2078a3bd1 Release 0.71.0
c09f6899e releaser: Add release notes to /docs for release of 0.71.0
90ffe2b50 Merge commit 'c9403cbcea'
bf3dd0837 Add math.Pow

git-subtree-dir: docs
git-subtree-split: 9be494de3ac79081be60e0f002db110cb96ec7a3
2020-05-31 12:43:23 +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
432885c499
deps: Update Goldmark to improve Typographer
See https://github.com/yuin/goldmark/releases/tag/v1.1.31
See #7289
2020-05-29 19:02:30 +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
Bjørn Erik Pedersen
c950c86b4e publisher: Fix tag collector for nested table elements
Fixes #7318
2020-05-27 11:10:48 +02:00
Anthony Fok
915202494b
snap: Fix build error: my previous commits did not fix it
- Revert to legacy snap and my custom plugin x-nodejs for now
- Quote "@babel/cli" and add "@babel/core"
- Change bin/babel.js to bin/babel
2020-05-25 11:26:26 -06:00
hugoreleaser
b3e4f911f4 releaser: Prepare repository for 0.72.0-DEV
[ci skip]
2020-05-25 09:21:10 +00: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
646bc85088 releaser: Bump versions for release of 0.71.1
[ci skip]
2020-05-25 09:08:55 +00:00
hugoreleaser
5c0d10045d releaser: Add release notes for 0.71.1
[ci skip]
2020-05-25 09:08:55 +00:00
Bjørn Erik Pedersen
81f5633245
Add some more date test cases
See #7310
2020-05-24 14:35:49 +02:00
Bjørn Erik Pedersen
9698b0dab1
Fix RenderString vs render hooks
Fixes #7265
2020-05-24 13:20:57 +02:00
Bjørn Erik Pedersen
32344fe3db
Prevent WARNINGs in RenderString 2020-05-24 12:49:45 +02:00
Bjørn Erik Pedersen
4d7fa9f114 Fix IsAncestor/IsDescendant for taxonomies
Fixes #7305
2020-05-24 12:35:45 +02:00
Bjørn Erik Pedersen
a985efcecf Fix GetPage on section/bundle name overlaps
In the internal Radix we stored the directory based nodes without a traling slash, e.g. `/blog`.

The original motivation was probably to make it easy to do prefix searching: Give me all ancestors.

This, however have lead to some ambigouty with overlapping directory names.

This particular problem was, however, not possible to work around in an easy way, so from now we store these as `/blog/`.

Fixes #7301
2020-05-24 12:35:45 +02:00
Bjørn Erik Pedersen
6c3c6686f5 Fix Go template script escaping
Fixes #6695
2020-05-23 22:00:34 +02:00
Bjørn Erik Pedersen
c34bf48560
Add a test helper 2020-05-22 10:57:25 +02:00
hugoreleaser
833d16d467 releaser: Prepare repository for 0.72.0-DEV
[ci skip]
2020-05-18 16:18:12 +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
hugoreleaser
330e52ebe6 releaser: Bump versions for release of 0.71.0
[ci skip]
2020-05-18 16:05:47 +00:00
Bjørn Erik Pedersen
9e78235374
Release 0.71 2020-05-18 17:57:12 +02:00
hugoreleaser
7cd66c53b9 releaser: Add release notes for 0.71.0
Rename to *-ready.md to continue.
[ci skip]
2020-05-18 15:47:00 +00:00
Bjørn Erik Pedersen
723ec555e7 Fix Babel on Windows
Fixes #7251
2020-05-18 16:57:13 +02:00
Bjørn Erik Pedersen
518d149646
commands: Use WARN log level also for the early initialization
Fixes #7285
2020-05-18 16:52:45 +02:00
Bjørn Erik Pedersen
e0e81b280f
Merge commit 'c9403cbcea' 2020-05-18 15:25:26 +02:00
Bjørn Erik Pedersen
c9403cbcea Squashed 'docs/' changes from ec0abe052..6c2195936
6c2195936 Update featured.png
109a0fcca add len function to navigation side menu
39a356bc5 Revert "Add some rickrolls redirects"
b8393b1b5 Add some rickrolls redirects
2ce21c34b Update configuration-markup.md (add rel="noopener")
95bd7974e Disambiguate global and page resources
5e233dc4b Update base.md
959b9dc3a Fix typo on "where" page
aff8059a1 Release 0.70.0
44a172ac0 releaser: Add release notes to /docs for release of 0.70.0
1b01c8988 Release 0.70.0
5ece21c6c Merge commit '89044b8f87'
0894aec5b Rename transpileJS to babel
5da27c7a6 resources: Add JavaScript transpiling solution

git-subtree-dir: docs
git-subtree-split: 6c21959360394165435fa36eac489bf6a701ae9a
2020-05-18 15:24:58 +02:00
Bjørn Erik Pedersen
3cc41523be Update to Go 1.14.3 and Go 1.13.11 2020-05-16 23:25:45 +02:00
Bjørn Erik Pedersen
2fd0a5a678
Improve error message when no Babel installed 2020-05-16 12:51:35 +02:00
Cameron Little
6e051c053e Add test for headings render hook 2020-05-15 21:12:43 +02:00
Eli W. Hunter
423b8f2fb8 Add render template hooks for headings
This commit also

* Renames previous types to be non-specific. (e.g. hookedRenderer rather
  than linkRenderer)

Resolves #6713
2020-05-15 21:12:43 +02:00
Joe Mooring
991934497e Add math.Pow
Closes #7266
2020-05-14 10:00:31 +02:00
John Weldon
558c09305e deploy: Do not suppress .well-known/ directory
Deployments ignore directories with a leading `.`, but should not ignore
certain well known 'hidden' directories like `.well-known/`

Fixes #6691
2020-05-14 09:56:53 +02:00
Anthony Fok
b69a36140f
snap: Quote "@babel/cli" to solve build error
Cannot parse snapcraft.yaml from ~gohugoio/hugo/+git/hugo:master:
  while scanning for the next token found character ‘@’ that cannot
  start any token in “”, line 70, column 34: node-packages:
  [postcss-cli, @babel/cli] ^

Also:

- Upgrade to snapcraft 3.x by adding "base: core"
- Add "license: Apache-2.0"
2020-05-12 14:29:57 -06:00
Anthony Fok
a0103864ab
snap: Remove custom x-nodejs plugin
My changes have been merged into snapcraft upstream.

https://bugs.launchpad.net/snapcraft/+bug/1795531
https://bugs.launchpad.net/snapcraft/+bug/1797374

Revert "snap: Add custom x-nodejs plugin to support ppc64el and s390x"

This reverts commit 91f49c0700.
2020-05-12 14:27:57 -06:00
Cameron Little
b342e8fbdb Upgrade chroma to 0.7.3 to fix invalid css
The new version of chroma includes a fix to not emit styles for tokens
without a class (which is invalid).

Fixes #7207
2020-05-09 17:05:14 +02:00
Daniel Tipping
6205d56b85 Use .Lastmod for og:updated_time
.Lastmod is the time at which the website was most recently updated,
rather than .Date which is the time at which the website content file
was created.
2020-05-07 18:42:20 +02:00
hugoreleaser
a5039dddaf releaser: Prepare repository for 0.71.0-DEV
[ci skip]
2020-05-06 11:29:18 +00: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
hugoreleaser
b98e2f66b0 releaser: Bump versions 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
hugoreleaser
0e314925fb releaser: Add release notes for 0.70.0
Rename to *-ready.md to continue.
[ci skip]
2020-05-06 10:24:22 +00:00
Bjørn Erik Pedersen
e4621446ce
Merge commit '89044b8f87' 2020-05-06 12:12:57 +02:00
Bjørn Erik Pedersen
89044b8f87 Squashed 'docs/' changes from 19f44e150..ec0abe052
ec0abe052 Update index.md
ed44339cd Update bio.md
cef04eb95 Minor edits
4d45dcc8d Submitting Digital.gov to the Hugo Showcase
d35126af7 Azure uses storage containers, not buckets; edited accordingly. (#1078)
9c249cc89 fix grammatical error
9728699a3 Release Hugo 0.69.2
cccabed0c Merge branch 'temp692'
3d0a740c4 releaser: Add release notes to /docs for release of 0.69.2
b760aceb1 HTTPS external links in docs
49e4631b0 Release 0.69.1
01f3da870 Merge branch 'temp691'
8280d85aa releaser: Add release notes to /docs for release of 0.69.1
40ea44d24 fix typo (#1088)
725f53643 Rebuild cache
80ee1efd9 Add KeyCDN Showcase
f253e906e docs: Fix typo in Hugo's Security Model
b3ffd1ad3 Mentioning a range is equivalent to foreach (#1086)
0c396911f Update jsonify function docs
376befc9a Fix typo (#1084)
4bdc9bc72 Mark .Page.UniqueID as deprecated and add .File.UniqueID
30a7b7bf2 Update hosting-on-github.md
c5db4ba2b Update postprocess.md
1121f74a5 Update install guide with Scoop extended
8988aa6fa Merge branch 'postprocess'
225d3f9c7 Release Hugo 0.69.0
4caf7a89a releaser: Add release notes to /docs for release of 0.69.0
664b2a0fa Document resources.PostProcess and buildStats
9737b34e9 docs: Regen docs helper
0fab3ba24 Merge commit 'da3c3e5fbd'
96dad83b1 Update hosting-on-aws-amplify.md
57eb27897 Merge commit 'c494c37a45'
dcc7afef7 fix typo in getting started

git-subtree-dir: docs
git-subtree-split: ec0abe052bcfebc65c323df4ff14ad277bb405d8
2020-05-06 12:12:21 +02:00
Piotr Perzyna
01befcce35
deps: Update minify to v2.6.2
Fixes #6699
2020-05-03 17:29:26 +02:00
Tom
04b1a6d997
Add support for sort by boolean 2020-05-02 11:57:34 +02:00
Bjørn Erik Pedersen
dd31e80007 deps: Update to Libsass 3.6.4
Fixes #7231
2020-05-01 19:14:04 +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
Bjørn Erik Pedersen
67f920419a
Disable a test locally
It has started to fail in LiteIDE for some reason (works from the shell and on CI).
2020-04-28 12:24:02 +02:00
Bjørn Erik Pedersen
c03ea2b660 Fix some missing JS class collector cases
Fixes #7216
2020-04-27 19:06:29 +02:00
Michael Lynch
fe60b7d9e4 Add diagnostic hints to init timeout message
Expand the text in the init timeout message to give the reader more hints as to what may be causing the issue.

The current error sent me on a wild goose chase trying to debug my shortcodes, but it turned out that the issue was just that I wasn't caching my resources/ directory on my build server. Once I found this blog post, I solved the issue in minutes:

https://www.henriksommerfeld.se/hugo-timeout-not-a-circular-loop-in-shortcode/

Googling the error message yields several additional posts from users who focus on loops in their shortcode when the problem seems to be overly-expensive builds.
2020-04-27 13:23:35 +02:00
hugoreleaser
c2d9fd1ebe releaser: Prepare repository for 0.70.0-DEV
[ci skip]
2020-04-24 08:00:48 +00: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
03802ff3cb releaser: Bump versions for release of 0.69.2
[ci skip]
2020-04-24 07:48:07 +00:00
hugoreleaser
5e31198c98 releaser: Add release notes for 0.69.2
[ci skip]
2020-04-24 07:48:07 +00:00
Takayama Fumihiko
8d5766d417 Fix IsAncestor and IsDescendant when the same page is passed 2020-04-23 20:23:42 +02:00
SatowTakeshi
5c41f41ad4 deps: Update goldmark-highlighting
Recreate #7027
Fixes #6596
2020-04-23 18:48:52 +02:00
Takayama Fumihiko
27a4c4410c Fix IsAncestor and IsDescendant under subsection 2020-04-23 18:12:13 +02:00
hugoreleaser
ade27699e5 releaser: Prepare repository for 0.70.0-DEV
[ci skip]
2020-04-22 08:07:03 +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
hugoreleaser
8549189e8e releaser: Bump versions for release of 0.69.1
[ci skip]
2020-04-22 07:55:01 +00:00
hugoreleaser
c2c7a4ce5b releaser: Add release notes for 0.69.1
[ci skip]
2020-04-22 07:55:01 +00:00
Panagiotis Koursaris
49e6c8cb4e
hugolib/filesystems: Fix typo in test suite 2020-04-21 23:16:36 +02:00
Bjørn Erik Pedersen
f37e77f2d3 Fix class collector when running with --minify
Also add a related stresstest.

Fixes #7161
2020-04-21 21:00:52 +02:00
Bjørn Erik Pedersen
27af5a339a
related: Fix toLower
Don't change the slice.

Fixes #7198
2020-04-21 17:46:26 +02:00
Bjørn Erik Pedersen
b3c825756f
Fix broken test 2020-04-21 16:44:35 +02:00
BurtonQin
5146dc614f tpl/tmplimpl/template: Change defer RLock to RUnlock 2020-04-21 13:23:31 +02:00
Boqin Qin
736f84b2d5
hugolib: Add Unlock before panic 2020-04-20 17:47:34 +02:00
Onur Yaman
cd4d820201 docs: Fix typo in Hugo's Security Model 2020-04-18 14:16:42 +02:00
Niklas Fasching
2b28e5a9cb deps: Update go-org to v1.1.0
- inline source blocks and exports
- result blocks and source block :exports parameter
- fix: html escaping in example blocks
- #+LINK based links
2020-04-17 22:07:52 +02:00
Steve
102ec2da7a
commands: Modify gen chromastyles to output all CSS classes
Chroma was updated to include a new function to output all CSS
classes without skipping any considered redundant with the current
style.

This will modify the `hugo gen chromastyles` command to use this new
function by default, which avoids potential problems if the style is
later modified.

Also includes requires the updated Chroma (v0.7.2).

Resolves #7167
2020-04-13 18:31:33 +02:00
Bjørn Erik Pedersen
feaa582cbe
deps: Update to goldmark v1.1.28
Fixes #7113
2020-04-13 16:55:23 +02:00
Bjørn Erik Pedersen
ee67dbeff5
Fix query parameter handling in server fast render mode
There may be a simpler way to get to the raw path, but this will have to do for now.

Fixes #7163
2020-04-12 19:18:54 +02:00
hugoreleaser
4a3f2427ed releaser: Prepare repository for 0.70.0-DEV
[ci skip]
2020-04-10 09:19:20 +00: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
hugoreleaser
9b55d13589 releaser: Bump versions for release of 0.69.0
[ci skip]
2020-04-10 09:08:37 +00:00
Bjørn Erik Pedersen
6f56a636f6
Update 0.69.0-relnotes.md 2020-04-10 10:58:36 +02:00
hugoreleaser
5ec7fa343a releaser: Add release notes for 0.69.0
Rename to *-ready.md to continue.
[ci skip]
2020-04-10 08:25:47 +00:00
Bjørn Erik Pedersen
b7ff4dc23e
docs: Regen docs helper 2020-04-10 09:07:41 +02:00
Bjørn Erik Pedersen
da3c3e5fbd Squashed 'docs/' changes from 20d77860b..19f44e150
19f44e150 fix typo (#1077)
b66478084 Fix build listing improvements version

git-subtree-dir: docs
git-subtree-split: 19f44e150fd7921abedbdae5561991815b98fd2d
2020-04-10 09:06:04 +02:00
Bjørn Erik Pedersen
30748decf1
Merge commit 'da3c3e5fbd' 2020-04-10 09:06:04 +02:00
Bjørn Erik Pedersen
095bf64c99
Collect HTML elements during the build to use in PurgeCSS etc.
The main use case for this is to use with resources.PostProcess and resources.PostCSS with purgecss.

You would normally set it up to extract keywords from your templates, doing it from the full /public takes forever for bigger sites.

Doing the template thing misses dynamically created class names etc., and it's hard/impossible to set up in when using themes.

You can enable this in your site config:

```toml
[build]
  writeStats = true
```

It will then write a `hugo_stats.json` file to the project root as part of the build.

If you're only using this for the production build, you should consider putting it below `config/production`.

You can then set it up with PostCSS like this:

```js
const purgecss = require('@fullhuman/postcss-purgecss')({
    content: [ './hugo_stats.json' ],
    defaultExtractor: (content) => {
        let els = JSON.parse(content).htmlElements;
        return els.tags.concat(els.classes, els.ids);
    }
});

module.exports = {
    plugins: [
        require('tailwindcss'),
        require('autoprefixer'),
        ...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : [])
    ]
};
```

Fixes #6999
2020-04-09 22:57:26 +02:00
Elliott Sales de Andrade
7791a804e2
deps: Update to latest emoji package 2020-04-08 12:56:14 +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
2f721f8ec6
Add basic "post resource publish support"
Fixes #7146
2020-04-07 21:59:20 +02:00
Cameron Moore
8568928aa8 tpl: Extend Jsonify to support options map
Add support for prefix and indent options used by json.MarshalIndent
from the Go stdlib.
2020-04-07 20:01:57 +02:00
Cameron Moore
1bc93021e3 tpl: Extend Jsonify to support optional indent parameter
Fixes #5040
2020-04-07 20:01:57 +02:00
Robert Fekete
7eba37ae9b Typo correction 2020-04-07 19:47:44 +02:00
Jay Williams
efc61d6f3b
commands: Use semver for min_version per recommendations
See https://github.com/gohugoio/hugoThemes#themetoml
2020-04-07 19:42:45 +02:00
Bjørn Erik Pedersen
d8d6a25b57
modules: Fix hugo mod vendor for regular file mounts
Fixes #7140
2020-04-07 10:13:55 +02:00
Bjørn Erik Pedersen
9f12be54ee
Revert "Revert "common/herrors: Fix typos in comments""
OK, I'm getting tired. Sorry for the noise.

This reverts commit 4437e918cd.
2020-04-06 01:07:57 +02:00
Bjørn Erik Pedersen
4437e918cd
Revert "common/herrors: Fix typos in comments"
This reverts commit 1123711b09.
2020-04-06 01:06:27 +02:00
Shubham Shahare
4de3ecdc26
deps: Updateto gitmap v1.1.2
Fixes #6985
2020-04-04 23:24:33 +02:00
rnazmo
1123711b09 common/herrors: Fix typos in comments 2020-04-02 22:06:22 +02:00
Bjørn Erik Pedersen
3d84ef9720
Merge commit 'c494c37a45' 2020-03-31 22:11:54 +02:00
Bjørn Erik Pedersen
c494c37a45 Squashed 'docs/' changes from 2a0ea423d..20d77860b
20d77860b Remove the calibre image action
58f53654d Improve image metadata formatting (#1067)
c569f3657 Update theme
80e6d362e Update theme
d5806cca5 Update theme
efc5cb227 Remove broken link on "where" page (#1058)
443266076 Comments Alternatives (#1036)
9b480ebb7 Fix typo
1402365ee Fix included typo in build-options.md
3b5a76de1 Update index.md
1196c7695 Update index.md
1887ea1ed Update index.md
d0666e74e Hugo 0.68.3
d514cfac9 Merge branch 'temp683'
49e57362b releaser: Add release notes to /docs for release of 0.68.3
fa0ac3bf1 Merge branch 'temp682'
46993c209 Release 0.68.2
4c8d6d242 releaser: Add release notes to /docs for release of 0.68.2
9694f4d36 Update index.md
368a03754 Update index.md
0d997010c Merge branch 'temp681'
24138a9cd releaser: Add release notes to /docs for release of 0.68.1
7dd6cc788 Update index.md
b6125b4a8 Update build-options.md
a2dead37a Release 0.68.0
7cff41348 Merge branch 'temp680'
b3b37959c releaser: Add release notes to /docs for release of 0.68.0
0f98184b0 Some minify configuration adjustments
02219f787 Add minify config
efeea7be0 Allow headless bundles to list pages via $page.Pages and $page.RegularPages
7950d0ad1 Mention `resources` folder in the "Directory structure"  docs.

git-subtree-dir: docs
git-subtree-split: 20d77860b2a992b4917af75a657419b19baafa43
2020-03-31 22:10:45 +02:00
SatowTakeshi
9c9987535f helpers: Fix TrimShortHTML
Where some tags are siblings of p tag.

Fixes #7081
2020-03-28 11:10:25 +01:00
Bjørn Erik Pedersen
4a39564efe Fix IsDescendant/IsAncestor for overlapping section names
Fixes #7096
2020-03-26 16:11:36 +01:00
Stéphane Wirtel
b6e097cfe6 fix typo in getting started 2020-03-24 17:31:37 +01:00
hugoreleaser
19a8accc9f releaser: Prepare repository for 0.69.0-DEV
[ci skip]
2020-03-24 12:16:13 +00: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
8f49df946a releaser: Bump versions for release of 0.68.3
[ci skip]
2020-03-24 12:04:27 +00:00
hugoreleaser
1a68ad4e31 releaser: Add release notes for 0.68.3
[ci skip]
2020-03-24 12:04:27 +00:00
Bjørn Erik Pedersen
523d51948f Fix _build.list.local logic
Fixes #7089
2020-03-24 12:47:42 +01:00
hugoreleaser
971b28904b releaser: Prepare repository for 0.69.0-DEV
[ci skip]
2020-03-24 08:33:02 +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
73ae6d581d releaser: Bump versions for release of 0.68.2
[ci skip]
2020-03-24 08:21:09 +00:00
hugoreleaser
e18a2ad3f4 releaser: Add release notes for 0.68.2
[ci skip]
2020-03-24 08:21:09 +00:00
Bjørn Erik Pedersen
cfa73050a4 Fix cache reset for a page's collections on server live reload
Fixes #7085
2020-03-23 23:14:39 +01:00
hugoreleaser
244e49c0ea releaser: Prepare repository for 0.69.0-DEV
[ci skip]
2020-03-22 10:47:54 +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
87dd5725de releaser: Bump versions for release of 0.68.1
[ci skip]
2020-03-22 10:36:42 +00:00
hugoreleaser
8c6a03a92b releaser: Add release notes for 0.68.1
[ci skip]
2020-03-22 10:36:42 +00:00
Bjørn Erik Pedersen
1ce3e7d521
releaser: Include "Revert" commits in change log 2020-03-21 18:51:29 +01:00
Bjørn Erik Pedersen
c9dc316ad1
Revert "resources: Add data context to the key in ExecuteAsTemplate"
This reverts commit 18cb21ff2e.

Fixes #7064
2020-03-21 18:38:19 +01:00
hugoreleaser
1664a0e893 releaser: Prepare repository for 0.69.0-DEV
[ci skip]
2020-03-21 11:59:39 +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
hugoreleaser
e1b609af9b releaser: Bump versions for release of 0.68.0
[ci skip]
2020-03-21 11:47:37 +00:00
Bjørn Erik Pedersen
8e5566af6e
Release 0.68.0 2020-03-21 12:41:25 +01:00
Bjørn Erik Pedersen
1005f754e0
Update 0.68.0-relnotes.md
[ci skip]
2020-03-21 12:40:46 +01:00
hugoreleaser
efde7078ed releaser: Add release notes for 0.68.0
Rename to *-ready.md to continue.
[ci skip]
2020-03-21 11:33:28 +00:00
Bjørn Erik Pedersen
2ebb9f5484
Fix Go build version 2020-03-21 12:25:03 +01: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
1d91d8e14b Update to Go 1.14.1 and 1.13.9
Fixes #7078
2020-03-20 18:25:54 +01:00
Carl Johnson
95f492114e
Fix GetTerms nil pointer
Fixes #7061
2020-03-20 14:35:41 +01:00
Bjørn Erik Pedersen
c947351d7c
Merge commit 'aa54803a84' 2020-03-20 09:19:29 +01:00
Bjørn Erik Pedersen
aa54803a84 Squashed 'docs/' changes from 988f7d5c2..2a0ea423d
2a0ea423d Wrap cascade ex in code toggle
841573e3e Correcting reference for YouTube shortcode (#1055)
8f9378f93 Release 0.67.1
178759468 Merge branch 'temp671'
1b5ae9cb1 releaser: Add release notes to /docs for release of 0.67.1
a87aa44ec Don't set GOPATH when building from source
bd35dfbd8 Update hugo-deploy.md
527cf3b2b Adding a commercial search service
709844459 Add languageDirection to language configuration
523be23eb Fix include typo on v67 Release Notes
fdd7cc66c Adjust relase notes
613ba75e8 releaser: Add release notes to /docs for release of 0.67.0
3fb1376d1 docs: Doument the server config
6408a9b4e Merge commit '14e369b961'
10457ca46 deploy: Add include and exclude support for remote

git-subtree-dir: docs
git-subtree-split: 2a0ea423d77a81c4dd439708505b4680e49d7c5d
2020-03-20 09:18:47 +01:00
Evan Anderson
cc2a5d52a4 Pass directory name to filters in LstatIfPossible in the same way as Readdir 2020-03-19 20:09:34 +01:00
Elliott Sales de Andrade
52c159c452 Update to goldmark 1.1.25.
This fixes a bug, so there's a small change to tests.
2020-03-19 12:26:19 +01:00
Bjørn Erik Pedersen
c7b6d74e89
resources: Fix scss vs css import regexp
Fixes #7063
2020-03-17 08:03:25 +01:00
Bjørn Erik Pedersen
1a8af7d4f0 Add workaround for regular CSS imports in SCSS
Fixes #7059
2020-03-16 23:21:44 +01:00
Bjørn Erik Pedersen
03b93bb988 Add .RegularPagesRecursive
Fixes #6411
2020-03-16 17:37:36 +01:00
hugoreleaser
94fb4dc3dd releaser: Prepare repository for 0.68.0-DEV
[ci skip]
2020-03-15 19:41:55 +00: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
hugoreleaser
99d36237c0 releaser: Bump versions for release of 0.67.1
[ci skip]
2020-03-15 19:30:33 +00:00
hugoreleaser
e371162c3f releaser: Add release notes for 0.67.1
[ci skip]
2020-03-15 19:30:33 +00:00
Bjørn Erik Pedersen
5eadc4c0a8 metrics: Fix --templateMetricsHints
Also improve non-string comparisons.

Fixes #7048
2020-03-12 19:26:19 +01:00
Bjørn Erik Pedersen
18cb21ff2e
resources: Add data context to the key in ExecuteAsTemplate
Fixes #7046
2020-03-11 22:21:16 +01:00
Bjørn Erik Pedersen
df298558a5
Improve Tailwind/PostCSS error messages
Fixes #7041
Fixes #7042
2020-03-11 14:13:03 +01:00
Bjørn Erik Pedersen
b1106f8715 deps: Update Blackfriday
Fixes #7039
2020-03-10 13:06:23 +01:00
Bjørn Erik Pedersen
c0177fe2b2
resources: Try to fix a Go 1.15 go vet error 2020-03-10 12:29:09 +01:00
Tan Yuanhong
5914f91b6c
Add languageDirection to language configuration
Fixes #6550
2020-03-10 10:10:58 +01:00
hugoreleaser
5b4659fa0b releaser: Prepare repository for 0.68.0-DEV
[ci skip]
2020-03-09 20:47:30 +00: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
hugoreleaser
f7d4b01c6d releaser: Bump versions for release of 0.67.0
[ci skip]
2020-03-09 20:35:43 +00:00
Bjørn Erik Pedersen
b809b9680d
Update 0.67.0-relnotes.md 2020-03-09 21:26:43 +01:00
hugoreleaser
a9c91361c2 releaser: Add release notes for 0.67.0
Rename to *-ready.md to continue.
[ci skip]
2020-03-09 20:11:33 +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 '14e369b961' 2020-03-09 20:21:17 +01:00
Bjørn Erik Pedersen
14e369b961 Squashed 'docs/' changes from 341ecabb2..988f7d5c2
988f7d5c2 Document default `enableInlineShortcodes` value
0f604a345 Fix typo in 0.66.0 release note
26fc74fe3 How to access individual EXIF data tags
d5d3bad9a Fix localhost links
fa6921213 Update index.md
5bf558f78 Release 0.66.0
74ccdaaf5 Merge branch 'temp660'
75faa478b releaser: Add release notes to /docs for release of 0.66.0
c4a4a9922 docs: Regen CLI docs
0624ac198 Add build.UseResourceCacheWhen
58a8d7cd1 Add build options documentation
d926c595e fix typo
99713d44b resources: Add basic @import support to resources.PostCSS
224b96cf7 deploy: Implement include/exclude filters for deploy
eb1a00050 Adjusting description; WordPress with capitalized P
91d8efa22 Add another tool for migration from the Wordpress
a6938a4ac Adjust showcase description
a9c0a0a69 Adjust showcase
e5af08aa6 Adding Aether as a proposed showcase item.
0013daa34 Add hugo.IsProduction function
34c419ef3 tpl: Add math.Sqrt
5bdab0ebd Update minification.md
9039332e2 Hugo 0.65.3
1400caf3a Merge branch 'temp653'
9796bb337 releaser: Add release notes to /docs for release of 0.65.3
65b26598f Fix typo
23aa57d80 Fix crashes for 404 in IsAncestor etc.
42c54bc6c 0.65.2
67fd5c1f6 Merge branch 'temp652'
d820ac017 releaser: Add release notes to /docs for release of 0.65.2
51f0888ff Release 0.65.1
91e95260c releaser: Add release notes to /docs for release of 0.65.1
1880ebf05 fix broken link on internal.md
ffaa33889 Update migrations.md
de4d64675 Another tool for migration from Medium platform
90b178d77 releaser: Add release notes to /docs for release of 0.65.1
6925cda30 Handle corner case with rendering text as code in URL
3cb4b19dd Release 0.65.0
7a600cb99 Merge branch 'temp650'
ef9531ff6 releaser: Add release notes to /docs for release of 0.65.0
9bc19606f docs: Regenerate CLI docs
d4a886ed2 Add Page.GetTerms
a3bf273a5 fix broken link on use-modules.md
001f52f4e Fix mage URL in development.md
eef72e887 Merge commit '4b670bc8cc'
b18a76631 commands: Support "hugo mod get -u ./..."

git-subtree-dir: docs
git-subtree-split: 988f7d5c2d7a1d40ec2c8ab961cb5a4e41b5bd4c
2020-03-09 20:19:32 +01:00
Bjørn Erik Pedersen
6cceef65c2 Fix ambigous error on site.GetPage
Fixes #7016
2020-03-09 16:11:50 +01:00
Bjørn Erik Pedersen
ffcb4aeb8e Fix handling of HTML files without front matter
This means that any HTML file inside /content will be treated as a regular file.

If you want it processes with shortcodes and a layout, add front matter.

The defintion of an HTML file here is:

* File with extension .htm or .html
* With first non-whitespace character "<" that isn't a HTML comment.

This is in line with the documentation.

Fixes #7030
Fixes #7028
See #6789
2020-03-09 15:01:55 +01:00
satotake
8279d2e227
Support unComparable args of uniq/complement/in
Fixes #6105
2020-03-09 13:32:38 +01:00
Sam Smith
c4fa2f0799 tpl: Fix error with unicode in file paths
Add url.QueryUnescape before reading file which allows files with
unicode in their paths to be read.

Fixes #6996
2020-03-09 13:31:04 +01:00
Bjørn Erik Pedersen
108314444b Add HTTP header support for the dev server
Fixes #7031
2020-03-08 19:57:30 +01:00
David Jones
51e178a6a2
deploy: Add include and exclude support for remote 2020-03-08 17:35:32 +01:00
hugoreleaser
cb12f41a96 releaser: Prepare repository for 0.67.0-DEV
[ci skip]
2020-03-03 15:31:19 +00: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
hugoreleaser
713132cd4b releaser: Bump versions for release of 0.66.0
[ci skip]
2020-03-03 15:19:36 +00:00
Bjørn Erik Pedersen
bbaefd7e3e
Update 0.66.0-relnotes.md 2020-03-03 16:10:42 +01:00
hugoreleaser
cc1a718860 releaser: Add release notes for 0.66.0
Rename to *-ready.md to continue.
[ci skip]
2020-03-03 14:55:26 +00:00
Bjørn Erik Pedersen
6a34f88dcc
Skip some tests on CircleCI 2020-03-03 15:45:13 +01:00
Carl Johnson
ae383f04c8 {{ in }} should work with html.Template type
Fixes #7002
2020-03-03 13:37:42 +01:00
Bjørn Erik Pedersen
ee31e61fb0
docs: Regen CLI docs 2020-03-03 13:36:35 +01:00
Bjørn Erik Pedersen
760a87a45a commands: Add --all flag to hugo mod clean 2020-03-03 13:29:58 +01:00
Bjørn Erik Pedersen
3d3fa5c3fe Add build.UseResourceCacheWhen
Fixes #6993
2020-03-03 13:29:58 +01:00
Anthony Fok
ee3d02134d
Update dependency list in README.md
to include only runtime dependencies,
i.e. what is in the released binary.
2020-03-02 22:51:20 -07:00
Bjørn Erik Pedersen
8947c3fa0b Fix ref/relref short lookup for pages in sub-folder
Fixes #6952
2020-03-02 21:08:28 +01:00
Sam Smith
d7798906d8 tpl: Change error message on missing resource
Fixes #6942
2020-03-02 18:46:14 +01:00
Bjørn Erik Pedersen
305ce1c9ec
resources: Add full filename to image when processing fails
Fixes #7000
2020-03-02 12:39:26 +01:00
Bjørn Erik Pedersen
3e9db2ad95
hugolib: Fix error handling in page collector
Fixes #6988
2020-03-02 11:07:09 +01:00
Anthony Fok
449deb7f9c
Update dependency list in README 2020-03-02 01:10:42 -07:00
Bjørn Erik Pedersen
1746e8a9b2 Fix ref/relRef regression for relative refs from bundles
Fixes #6952
2020-02-29 18:32:06 +01:00
Bjørn Erik Pedersen
6f48146e75 identity: Fix potential infinite recursion in server change detection
Fixes #6986
2020-02-29 15:12:56 +01:00
Bjørn Erik Pedersen
b0d850321e Fix rebuild logic when editing template using a base template
We have been doing too much work in that case.

Fixes #6968
2020-02-28 14:14:55 +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
Bjørn Erik Pedersen
33ae621083 Update to Go 1.14 and 1.13.8
Fixes #6958
2020-02-26 17:33:11 +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
322c285ba2 releaser: Prepare repository for 0.66.0-DEV
[ci skip]
2020-02-23 10:09:29 +00: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
hugoreleaser
0ac528d746 releaser: Bump versions for release of 0.65.3
[ci skip]
2020-02-23 09:58:31 +00:00
hugoreleaser
d8bde266c1 releaser: Add release notes for 0.65.3
[ci skip]
2020-02-23 09:58:31 +00:00
Bjørn Erik Pedersen
0bd6356c6d Fix panic when home page is drafted
Fixes #6927
2020-02-23 00:11:10 +01:00
satotake
ca68abf0bc
Fix goldmark toc rendering
Previously gordmark-based TOC renderes only `KindText` and `KindString`

This commit expands target node with Goldmark's renderer

I am not sure of what are expected results as TOC contents in some (rare) cases
but Blackfriday's behaviours are fundamentally respected.

For example,
- image `[image text](link)` is rendered as `<img>` tag
- GFM AutoLink `gohugo.io` is rendered as text

* Render AutoLink as <a> tag as Blackfriday does

Fixes #6736
Fixes #6809
2020-02-22 18:06:30 +01: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
1510f07780 releaser: Bump versions for release of 0.65.2
[ci skip]
2020-02-21 10:10:11 +00:00
hugoreleaser
aa2ef45421 releaser: Add release notes for 0.65.2
[ci skip]
2020-02-21 10:10:11 +00:00
Bjørn Erik Pedersen
76b2afe642
Apply missing go fmt 2020-02-21 10:12:33 +01:00
Bjørn Erik Pedersen
f460530347
Fix panic on no output formats
A page needs its output formats even if it should not be rendered or its resources should not be published.

Fixes #6924
2020-02-21 09:41:39 +01:00
Bjørn Erik Pedersen
4c2a0de412
Fix panic in 404.Parent
Fixes #6924
2020-02-21 08:14:08 +01: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
dbaa15d40f releaser: Bump versions for release of 0.65.1
[ci skip]
2020-02-20 13:42:26 +00:00
hugoreleaser
a449e87da7 releaser: Add release notes for 0.65.1
[ci skip]
2020-02-20 13:42:26 +00:00
Bjørn Erik Pedersen
7ef5a4c83e
hugolib: Fix 2 Paginator.Pages taxonomy regressions
Fixes #6921
Fixes #6918
2020-02-20 14:13:04 +01:00
Bjørn Erik Pedersen
a70bbd0696
hugolib: Fix deletion of orphaned sections
Avoid deleting inside the recursive walk.

Fixes #6920
2020-02-20 13:40:16 +01: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
hugoreleaser
9fd7d3957e releaser: Bump versions for release of 0.65.0
[ci skip]
2020-02-20 08:11:06 +00:00
hugoreleaser
c45025cb90
releaser: Add release notes for 0.65.0 2020-02-20 09:01:06 +01:00
Bjørn Erik Pedersen
a5ebdf7d17
docs: Regenerate CLI docs 2020-02-19 22:28:06 +01:00
Bjørn Erik Pedersen
9bdedb251c
Fix lazy publishing with publishResources=false
Fixes #6914
2020-02-19 18:22:41 +01:00
Bjørn Erik Pedersen
dce210ab56
modules: Improve "hugo mod clean"
* Only clean project modules
* Optional glob pattern of module paths to clean

Closes #6907
2020-02-19 17:14:35 +01:00
Bjørn Erik Pedersen
0b96aba022
commands: Add "hugo mod verify"
See #6907
2020-02-19 17:14:35 +01:00
Bjørn Erik Pedersen
fa520a2d98 Add Page.GetTerms
Fixes #6905
2020-02-19 14:52:23 +01:00
Bjørn Erik Pedersen
4b670bc8cc Squashed 'docs/' changes from 16753a78d..341ecabb2
341ecabb2 Update lookup-order.md
bfabd8ce8 Update homepage.md
7a1e0b742 Update shortcodes.md
e8bf22497 HTTPS links to Vimeo embeds
a9d0e7c68 Revise the wildly inaccurate types doc
af33bb724 netlify: Bump version
f4251583e Merge branch 'temp641'
4dcda861d releaser: Add release notes to /docs for release of 0.64.1
92bd0b1f5 Update errorf.md

git-subtree-dir: docs
git-subtree-split: 341ecabb29abb9a9626d52309ce0650311607b81
2020-02-19 09:16:56 +01:00
Bjørn Erik Pedersen
82029c1ec9
Merge commit '4b670bc8cc' 2020-02-19 09:16:56 +01:00
Bjørn Erik Pedersen
7489a86459
Add a list terms benchmark
See #6905
2020-02-19 09:08:32 +01:00
Bjørn Erik Pedersen
da54787cfa
Handle disabled RSS even if it's defined in outputs
See https://github.com/gohugoio/hugo/issues/6897#issuecomment-587947078
2020-02-19 09:08:31 +01:00
Elliott Sales de Andrade
c7975b48b6
Fix goMinorVersion on non-final Go releases
This should work for alpha/beta/rc releases.
2020-02-19 08:46:21 +01:00
Bjørn Erik Pedersen
b2dcd53e3c
Use the tree for taxonomy.Pages() 2020-02-18 19:47:45 +01:00
Bjørn Erik Pedersen
36983e6189
Add some cagegories to the site collections benchmarks 2020-02-18 18:52:35 +01:00
Bjørn Erik Pedersen
d73e37387c
tpl: Adjust the RSS taxonomy logic
See #6909
2020-02-18 17:29:46 +01:00
Bjørn Erik Pedersen
aa3e183056
tpl: Fix RSS template for the terms listing
Fixes #6909
2020-02-18 16:55:30 +01:00
Bjørn Erik Pedersen
1b7acfe763
Fix taxonomy
Recently introduced in master.

See https://github.com/gohugoio/hugo/issues/6897#issuecomment-587499907
2020-02-18 16:43:36 +01:00
Bjørn Erik Pedersen
19e12caf8c
Fix RenderString for pages without content
Fixes #6882
2020-02-18 14:08:59 +01:00
Bjørn Erik Pedersen
20f2211fce
modules: Do not try to get local themes in "hugo mod get"
Fixes #6893
2020-02-18 14:08:58 +01:00
satotake
a21a9373e0
deps: Update goldmark-highlighting
See  #6901
2020-02-18 14:08:46 +01:00
Bjørn Erik Pedersen
775c7c2474
commands: Support "hugo mod get -u ./..."
Fixes #6828
2020-02-18 12:17:16 +01:00
Bjørn Erik Pedersen
eada236f87
Introduce a tree map for all content
This commit introduces a new data structure to store pages and their resources.

This data structure is backed by radix trees.

This simplies tree operations, makes all pages a bundle,  and paves the way for #6310.

It also solves a set of annoying issues (see list below).

Not a motivation behind this, but this commit also makes Hugo in general a little bit faster and more memory effective (see benchmarks). Especially for partial rebuilds on content edits, but also when taxonomies is in use.

```
name                                   old time/op    new time/op    delta
SiteNew/Bundle_with_image/Edit-16        1.32ms ± 8%    1.00ms ± 9%  -24.42%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file/Edit-16    1.28ms ± 0%    0.94ms ± 0%  -26.26%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories/Edit-16      33.9ms ± 2%    21.8ms ± 1%  -35.67%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs/Edit-16            40.6ms ± 1%    37.7ms ± 3%   -7.20%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree/Edit-16        56.7ms ± 0%    51.7ms ± 1%   -8.82%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates/Edit-16      19.9ms ± 2%    18.3ms ± 3%   -7.64%  (p=0.029 n=4+4)
SiteNew/Page_collections/Edit-16         37.9ms ± 4%    34.0ms ± 2%  -10.28%  (p=0.029 n=4+4)
SiteNew/Bundle_with_image-16             10.7ms ± 0%    10.6ms ± 0%   -1.15%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16         10.8ms ± 0%    10.7ms ± 0%   -1.05%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16           43.2ms ± 1%    39.6ms ± 1%   -8.35%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16                 47.6ms ± 1%    47.3ms ± 0%     ~     (p=0.057 n=4+4)
SiteNew/Deep_content_tree-16             73.0ms ± 1%    74.2ms ± 1%     ~     (p=0.114 n=4+4)
SiteNew/Many_HTML_templates-16           37.9ms ± 0%    38.1ms ± 1%     ~     (p=0.114 n=4+4)
SiteNew/Page_collections-16              53.6ms ± 1%    54.7ms ± 1%   +2.09%  (p=0.029 n=4+4)

name                                   old alloc/op   new alloc/op   delta
SiteNew/Bundle_with_image/Edit-16         486kB ± 0%     430kB ± 0%  -11.47%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file/Edit-16     265kB ± 0%     209kB ± 0%  -21.06%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories/Edit-16      13.6MB ± 0%     8.8MB ± 0%  -34.93%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs/Edit-16            66.5MB ± 0%    63.9MB ± 0%   -3.95%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree/Edit-16        28.8MB ± 0%    25.8MB ± 0%  -10.55%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates/Edit-16      6.16MB ± 0%    5.56MB ± 0%   -9.86%  (p=0.029 n=4+4)
SiteNew/Page_collections/Edit-16         16.9MB ± 0%    16.0MB ± 0%   -5.19%  (p=0.029 n=4+4)
SiteNew/Bundle_with_image-16             2.28MB ± 0%    2.29MB ± 0%   +0.35%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16         2.07MB ± 0%    2.07MB ± 0%     ~     (p=0.114 n=4+4)
SiteNew/Tags_and_categories-16           14.3MB ± 0%    13.2MB ± 0%   -7.30%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16                 69.1MB ± 0%    69.0MB ± 0%     ~     (p=0.343 n=4+4)
SiteNew/Deep_content_tree-16             31.3MB ± 0%    31.8MB ± 0%   +1.49%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16           10.8MB ± 0%    10.9MB ± 0%   +1.11%  (p=0.029 n=4+4)
SiteNew/Page_collections-16              21.4MB ± 0%    21.6MB ± 0%   +1.15%  (p=0.029 n=4+4)

name                                   old allocs/op  new allocs/op  delta
SiteNew/Bundle_with_image/Edit-16         4.74k ± 0%     3.86k ± 0%  -18.57%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file/Edit-16     4.73k ± 0%     3.85k ± 0%  -18.58%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories/Edit-16        301k ± 0%      198k ± 0%  -34.14%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs/Edit-16              389k ± 0%      373k ± 0%   -4.07%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree/Edit-16          338k ± 0%      262k ± 0%  -22.63%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates/Edit-16        102k ± 0%       88k ± 0%  -13.81%  (p=0.029 n=4+4)
SiteNew/Page_collections/Edit-16           176k ± 0%      152k ± 0%  -13.32%  (p=0.029 n=4+4)
SiteNew/Bundle_with_image-16              26.8k ± 0%     26.8k ± 0%   +0.05%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16          26.8k ± 0%     26.8k ± 0%   +0.05%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16             273k ± 0%      245k ± 0%  -10.36%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16                   396k ± 0%      398k ± 0%   +0.39%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree-16               317k ± 0%      325k ± 0%   +2.53%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16             146k ± 0%      147k ± 0%   +0.98%  (p=0.029 n=4+4)
SiteNew/Page_collections-16                210k ± 0%      215k ± 0%   +2.44%  (p=0.029 n=4+4)
```

Fixes #6312
Fixes #6087
Fixes #6738
Fixes #6412
Fixes #6743
Fixes #6875
Fixes #6034
Fixes #6902
Fixes #6173
Fixes #6590
2020-02-18 09:49:42 +01:00
Bjørn Erik Pedersen
e5329f13c0
Another benchmark rename 2020-02-18 09:48:36 +01:00
Bjørn Erik Pedersen
5b145ddc4c
Rename the Edit benchmarks
To make them easier to filter out.
2020-02-18 09:45:21 +01:00
satotake
3c568ad013
markup/highlight: Fix chroma highlight
* Use chroma.Coalesce
* Escape code strings if lexer is nil

Fixes #6877
Fixes #6856
2020-02-17 14:59:26 +01:00
Bjørn Erik Pedersen
54bdcaacae
Refactor a benchmark to make it runnable as test 2020-02-17 09:24:15 +01:00
Bjørn Erik Pedersen
1622510a5c
Add benchmark for content edits 2020-02-17 09:05:37 +01:00
Bjørn Erik Pedersen
56d0b65887 Add "go mod verify" to build scripts 2020-02-16 00:15:58 +01:00
Jaymo Kang
75c3787fc2
Add git to Dockerfile
Needed for GitInfo.
2020-02-14 16:49:20 +01:00
Bjørn Erik Pedersen
9babb1f0c4
deps: Update go.sum 2020-02-14 10:18:56 +01:00
Mark Rosemaker
8a5124d6b3
commands: Rename doWithCommandeer to cfgInit/cfgSetAndInit
This will make it clearer what it does and make the code more consistent.
2020-02-13 00:37:49 +01:00
Bjørn Erik Pedersen
898a0a96af deps: Update golibsass
Fixes #6885
2020-02-12 18:56:47 +01:00
Bjørn Erik Pedersen
3b721110d5
Shuffle test files before insertion 2020-02-10 12:03:41 +01:00
Bjørn Erik Pedersen
40ba7e6d63 Update to LibSass v3.6.3
Fixes #6862
2020-02-10 10:42:05 +01:00
hugoreleaser
4f43c9022a releaser: Prepare repository for 0.65.0-DEV
[ci skip]
2020-02-09 20:53:18 +00: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
hugoreleaser
8bd8d4fe9a releaser: Bump versions for release of 0.64.1
[ci skip]
2020-02-09 20:44:34 +00:00
hugoreleaser
ad7c38cd66 releaser: Add release notes for 0.64.1
[ci skip]
2020-02-09 20:44:34 +00:00
Bjørn Erik Pedersen
b78576fd38 hugofs: Fix mount with hole regression
Fixes #6854
2020-02-09 21:35:39 +01:00
Bjørn Erik Pedersen
18888e09bb Fix bundle resource ordering regression
Introduced in Hugo 0.64.0

Fixes #6851
2020-02-09 21:35:39 +01:00
Bjørn Erik Pedersen
1e5eb8679e
Merge commit '3c0036805d' 2020-02-06 13:03:30 +01:00
Bjørn Erik Pedersen
3c0036805d Squashed 'docs/' changes from bd0e15bb6..16753a78d
16753a78d remove kaiju from comments.md
25906f6ad Hugo 0.64.0
aacc7a130 releaser: Add release notes to /docs for release of 0.64.0
2243afe90 Explain Ace/Amber support has been removed
293c9496a Document the hugo function
479890f9b Update comments.md
ceab41097 Update theme
9a95876c7 Remove note
696543e13 Update usage.md
a04bab2b9 Release 0.63.2
ccaed74b5 Merge branch 'temp632'
623b363c5 releaser: Add release notes to /docs for release of 0.63.2
39ce6f50e releaser: Add release notes to /docs for release of 0.63.2
9175ac2ca Another theme fix
88c264251 Rebuild _vendor
e739dc3a8 Release 0.63.1
129ecac84 Merge branch 'temp631'
bcd7c1154 releaser: Add release notes to /docs for release of 0.63.1
e4f0d9285 releaser: Add release notes to /docs for release of 0.63.1
6a40124d6 Update theme
c486747de Params cleanup
c408c4334 netlify: Bump to 0.63.0
7e8a48be8 Adjust base template docs
a5920e9aa Adjust release notes
d4d25c524 Merge branch 'temp63'
16d981721 releaser: Add release notes to /docs for release of 0.63.0
08ab681d1 releaser: Add release notes to /docs for release of 0.63.0
90feaac39 docs, output: Add base template lookup variant to docs.json
afe2b4399 docs, output: Add base template lookup variant to docs.json
1f7466a76 docs: Regen docs helper
7ceefb94a docs: Regen docs helper
ee14087cd Remove typo from RenderString.md
6daf333d3 Remove the calibreapp action
682f710d7 docs: Updating 'submodule add' command in "Host on GitHub" to use https instead of ssh.
ef57b2dae Improve documentation on slug behavior
835ddd9c2 Fix broken link
137a32f90 Fixed typo in content-management/page-resources
936633e25 Fixed spelling error, "wich" -> "which"
a559d41e3 Using a Different Version of Hugo in AWS Amplify
2ee83402d Update rss.md
f900a2ce0 Add render-image code example and edit wording
bd0a0207c Change wording on Page Resources documentation
d213b4599 linuxbrew was renamed to homebrew (#1004)
dcb0925f8 Update index.md
789416a08 Release 0.62.2
2dc66f13c releaser: Add release notes to /docs for release of 0.62.2
813fbc865 releaser: Add release notes to /docs for release of 0.62.2
ed5b07df3 docs: Document the new autoHeadingIDType setting
02d4747e5 docs: Document the new autoHeadingIDType setting
406a8a9a6 docs: Regenerate docshelper
065319786 docs: Regenerate docshelper
61d540021 Merge commit '26f1458a2d'
7cac5909b releaser: Add release notes to /docs for release of 0.62.1
6e30e01a2 releaser: Add release notes to /docs for release of 0.62.0
2694dcdd8 Merge commit '8a4005cf2b'
115dd6782 docs: More on hooks
f4460fd54 tpl: Do not return any value in errorf
3587d2998 tpl: Add a warnf template func
7c9b02e30 docs: Regen docshelper
a7bfdeb24 Fix incorrect MIME type from image/jpg to image/jpeg
1a6089cfe Preserve HTML Text for link render hooks
4544a998c docs: Footnote
c42733258 Add render template hooks for links and images
0d8bec78a Merge commit '2e711a28c7'
3974c326c markup/tableofcontents: Add config option for ordered list
8c2bd1a62 releaser: Add release notes to /docs for release of 0.61.0
f00b2d507 releaser: Add release notes to /docs for release of 0.60.1
9a5109838 releaser: Add release notes to /docs for release of 0.60.0
d2c222f71 Add Goldmark as the new default markdown handler
df96f9efa Update homepage.md
f17e67b4b tpl/collections: Allow dict to create nested structures
5f923768a Merge commit 'efc0b1bb6c'
8a861bf16 Support Go time format strings in permalinks
bbb8c4fea releaser: Add release notes to /docs for release of 0.59.1
9d9070dda releaser: Add release notes to /docs for release of 0.59.0
98716176b Merge commit '5ac0f751aa'
2057ba4c5 Merge commit '5070ba6c9e'
c98bcff07 Merge commit 'b9bd35d72e' as 'docs'

git-subtree-dir: docs
git-subtree-split: 16753a78d85e05c4a2cea94e263dda2e0047d155
2020-02-06 13:02:49 +01:00
Cameron Moore
7f0ebd4a3c CONTRIBUTING: Fix note about CGO 2020-02-06 09:09:08 +01:00
Bjørn Erik Pedersen
23ea43180b
Update Go version requirement
We run tests on current + (current -1) (we also test on the latest Go source), which means that the current supported Go versions are Go 1.12 and 1.13.

Closes #6853
2020-02-04 23:48:31 +01:00
hugoreleaser
6a74cbe916 releaser: Prepare repository for 0.65.0-DEV
[ci skip]
2020-02-04 09:16:38 +00: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
7624ab0281 releaser: Bump versions for release of 0.64.0
[ci skip]
2020-02-04 09:07:21 +00:00
Bjørn Erik Pedersen
8490a0aa9d
Update 0.64.0-relnotes.md 2020-02-04 09:59:09 +01:00
hugoreleaser
bd731d27be releaser: Add release notes for 0.64.0
Rename to *-ready.md to continue.
[ci skip]
2020-02-04 08:45:30 +00:00
Bjørn Erik Pedersen
80dd6ddde2 Fix module mount in sub folder
This addresses a specific issue, but is a also a major simplification of the filesystem file mounts.

Fixes #6730
2020-02-04 00:17:10 +01:00
Bjørn Erik Pedersen
2997310124
Mention a "no CGO rule"
See #6842
2020-02-01 10:27:26 +01:00
Bjørn Erik Pedersen
2bbc865f7b commands: Fix config environment handling
Fixes #6503
Fixes #6824
2020-01-31 16:36:36 +01:00
Bjørn Erik Pedersen
0792cfa9fa Update to Go 1.13.7 and Go 1.12.16
Fixes #6830
2020-01-31 14:18:48 +01:00
Bjørn Erik Pedersen
b3f0674b80
transform/livereloadinject: Add defer to livereload script tag
In #6821 we moved the loading from end of body to head to make Turbolinks and similar work.

This commit adds a defer attribute to avoid page parse blocking.
2020-01-31 08:15:22 +01:00
Bjørn Erik Pedersen
ef78a0d18a
transform/livereloadinject: Don't use document.write to inject livereload
I suspect the person who originally implemented it saw examples using location.host etc. to build the URL.

We have all that information ready at build (static) time.

Fixes #6507
2020-01-31 08:02:53 +01:00
Bjørn Erik Pedersen
5859586453
hubolig: Add a render hook whitespace test
See #6832
2020-01-31 07:51:05 +01:00
Bjørn Erik Pedersen
2d159e9cc7 Do not render alias paginator pages for non-HTML outputs
Update #6797
2020-01-30 23:45:19 +01:00
Bjørn Erik Pedersen
f45cb31728 Fix base template handling with preceding comments
Fixes #6816
2020-01-30 23:44:42 +01:00
Bjørn Erik Pedersen
49ef647203 modules: Fix "hugo mod get -u" with no arguments
Fixes #6826
Closes #6825
2020-01-30 17:15:35 +01:00
Bjørn Erik Pedersen
8f08cdd0ac transform/livereloadinject: Inject livereload script right after head if possible
We used to insert the livereload script right before the closing body.

This dord  not work when combined with tools such as Turbolinks.

This commit changes it So we try to inject the script as early as possible.

Fixes #6821
2020-01-29 21:12:07 +01:00
Bhavin Gandhi
281abb18ee deps: Update goldmark to v1.1.22
v1.1.22 has a fix for issue where links with newline in the title
don't get parsed correctly. Reference:
https://github.com/yuin/goldmark/issues/94

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2020-01-29 19:48:33 +01:00
hugoreleaser
d8e685154d releaser: Prepare repository for 0.64.0-DEV
[ci skip]
2020-01-27 12:22:47 +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
c7427a50ed releaser: Bump versions for release of 0.63.2
[ci skip]
2020-01-27 12:13:04 +00:00
hugoreleaser
49e2931eb2 releaser: Add release notes for 0.63.2
[ci skip]
2020-01-27 12:13:04 +00:00
Bjørn Erik Pedersen
e8831a056b
hubolib: Revert to .Type = "page" when empty
This was changed with good intentions in 0.63.0.

This behaviour was not documented, but it was of course in use.

This commit rolls back to how it behaved before:

For `Page.Type` you will get:

* `type` from front matter if set.
* `.Section`
* If none of the above returns anything, return "page"

Fixes #6805
2020-01-27 12:33:33 +01:00
Bjørn Erik Pedersen
74b6c4e5ff
And now finally fix the 404 templates
Fixes #6795
2020-01-27 12:30:31 +01:00
Bjørn Erik Pedersen
8df5d76e70
Fix 404 with base template regression
Fixes #6795
2020-01-26 13:14:08 +01:00
hugoreleaser
8ae2c9c3d6 releaser: Prepare repository for 0.64.0-DEV
[ci skip]
2020-01-23 20:17:44 +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
fd32849bfe releaser: Bump versions for release of 0.63.1
[ci skip]
2020-01-23 20:08:10 +00:00
hugoreleaser
417f9ddf55 releaser: Add release notes for 0.63.1
[ci skip]
2020-01-23 20:08:10 +00:00
Bjørn Erik Pedersen
0df7bd62df
deps: Make the build flags shared between sites
Updates #6789
2020-01-23 20:11:53 +01:00
Bjørn Erik Pedersen
f441f67512 Fix baseof with regular define regression
Fixes #6790
2020-01-23 19:54:06 +01:00
Bjørn Erik Pedersen
7ed22e9fb6
Revert to minify v2.6.1
Closes #6791
2020-01-23 17:03:23 +01:00
hugoreleaser
fb974ae87f releaser: Prepare repository for 0.64.0-DEV
[ci skip]
2020-01-23 12:48:39 +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
hugoreleaser
3b3f5a2596 releaser: Bump versions for release of 0.63.0
[ci skip]
2020-01-23 12:39:31 +00:00
Bjørn Erik Pedersen
d10ed683c5
Release 0.63.0 2020-01-23 13:30:04 +01:00
hugoreleaser
19e387d181 releaser: Add release notes for 0.63.0
Rename to *-ready.md to continue.
[ci skip]
2020-01-23 11:12:11 +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
Bjørn Erik Pedersen
17af79a03e Fix 0.62.1 server rebuild slowdown regression
Fixes #6784
2020-01-23 11:50:02 +01:00
Bjørn Erik Pedersen
2fefc01606
tpl/compare: Fix eq when > 2 args
Fixes #6786
2020-01-23 10:48:28 +01:00
Tan Yuanhong
0c251be66b Allow multiple arguments in ne/ge/gt/le/lt functions
Treat op arg1 arg2 arg3 ... as (arg1 op arg2) && (arg1 op arg3)
and so on for ne/ge/gt/le/lt.

Closes #6619
2020-01-23 10:36:35 +01:00
Bjørn Erik Pedersen
836c24261f
hugolib: Disable a test assertion on ARM
See #6655
2020-01-22 11:44:29 +01:00
Bjørn Erik Pedersen
c6d650c8c8
tpl/tplimpl: Rework template management to get rid of concurrency issues
This more or less completes the simplification of the template handling code in Hugo started in v0.62.

The main motivation was to fix a long lasting issue about a crash in HTML content files  without front matter.

But this commit also comes with a big functional improvement.

As we now have moved the base template evaluation to the build stage we now use the same lookup rules for `baseof` as for `list` etc. type of templates.

This means that in this simple example you can have a `baseof` template for the `blog` section without having to duplicate the others:

```
layouts
├── _default
│   ├── baseof.html
│   ├── list.html
│   └── single.html
└── blog
    └── baseof.html
```

Also, when simplifying code, you often get rid of some double work, as shown in the "site building" benchmarks below.

These benchmarks looks suspiciously good, but I have repeated the below with ca. the same result. Compared to master:

```
name                              old time/op    new time/op    delta
SiteNew/Bundle_with_image-16        13.1ms ± 1%    10.5ms ± 1%  -19.34%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16    13.0ms ± 0%    10.7ms ± 1%  -18.05%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16      46.4ms ± 2%    43.1ms ± 1%   -7.15%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16            52.2ms ± 2%    47.8ms ± 1%   -8.30%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree-16        77.9ms ± 1%    70.9ms ± 1%   -9.01%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16      43.0ms ± 0%    37.2ms ± 1%  -13.54%  (p=0.029 n=4+4)
SiteNew/Page_collections-16         58.2ms ± 1%    52.4ms ± 1%   -9.95%  (p=0.029 n=4+4)

name                              old alloc/op   new alloc/op   delta
SiteNew/Bundle_with_image-16        3.81MB ± 0%    2.22MB ± 0%  -41.70%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16    3.60MB ± 0%    2.01MB ± 0%  -44.20%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16      19.3MB ± 1%    14.1MB ± 0%  -26.91%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16            70.7MB ± 0%    69.0MB ± 0%   -2.40%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree-16        37.1MB ± 0%    31.2MB ± 0%  -15.94%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16      17.6MB ± 0%    10.6MB ± 0%  -39.92%  (p=0.029 n=4+4)
SiteNew/Page_collections-16         25.9MB ± 0%    21.2MB ± 0%  -17.99%  (p=0.029 n=4+4)

name                              old allocs/op  new allocs/op  delta
SiteNew/Bundle_with_image-16         52.3k ± 0%     26.1k ± 0%  -50.18%  (p=0.029 n=4+4)
SiteNew/Bundle_with_JSON_file-16     52.3k ± 0%     26.1k ± 0%  -50.16%  (p=0.029 n=4+4)
SiteNew/Tags_and_categories-16        336k ± 1%      269k ± 0%  -19.90%  (p=0.029 n=4+4)
SiteNew/Canonify_URLs-16              422k ± 0%      395k ± 0%   -6.43%  (p=0.029 n=4+4)
SiteNew/Deep_content_tree-16          401k ± 0%      313k ± 0%  -21.79%  (p=0.029 n=4+4)
SiteNew/Many_HTML_templates-16        247k ± 0%      143k ± 0%  -42.17%  (p=0.029 n=4+4)
SiteNew/Page_collections-16           282k ± 0%      207k ± 0%  -26.55%  (p=0.029 n=4+4)
```

Fixes #6716
Fixes #6760
Fixes #6768
Fixes #6778
2020-01-22 09:39:49 +01:00
Niklas Fasching
8585b388d2 deps: Update go-org
Not really a new major version but it's used in production and apparently that
means it should be a 1+. Will try to follow semver better from now on.

Changes:

- `#+OPTIONS: toc:1` now supports not just true/false but numbers to limit
  headline levels included in table of conents
- bug fix latex fragment parsing
2020-01-21 10:21:57 +01:00
Jonathan Ling
d61bee5e09 examples: Fix blog not building
The example blog had not been updated for some time and I had to restructure it a little bit.

Fixes #6752

Changed tag and category directory structure
2020-01-19 14:42:27 +01:00
Joshua Wong
21ca2e9ce4 Add support for newline characters in raw string shortcode 2020-01-18 11:24:10 +01:00
Ghislain Bourgeois
3efa1d8121 deps: Update github.com/alecthomas/chroma
This new release improves YAML syntax highlighting.
2020-01-16 20:57:02 +01:00
Bjørn Erik Pedersen
65ec8fe827
deps: Update minify to v2.7.2
Fixes #6756
2020-01-15 16:04:44 +01:00
Matt Riggott
d3e8ab2e39 deps: Update Goldmark to v1.1.21
This is the first version of Goldmark that supports all the
Smartypants-style typographic punctuation transformations. Now, a
straight single quote in the middle of a word is translated into a curly
quote (e.g. "that's" becomes "that&rsquo;s"). Earlier versions leave
them untouched. This brings Goldmark in line with Blackfriday.

Fixes #6571.
2020-01-15 12:07:25 +01:00
Joshua Wong
da81455656 Allow raw string literals in shortcode params 2020-01-15 09:27:19 +01:00
Bjørn Erik Pedersen
0c0bb37285
deps: Update github.com/gohugoio/testmodBuilder 2020-01-14 17:09:11 +01:00
Bjørn Erik Pedersen
ddd75f2121
hugolib: Some more benchmark adjustments 2020-01-13 16:47:10 +01:00
Bjørn Erik Pedersen
4ed6ebef4c
hugolib: Adjust site benchmarks 2020-01-13 16:39:33 +01:00
Bjørn Erik Pedersen
94cfdf6bef deps: Update direct dependencies
Closes #6719
2020-01-07 20:12:20 +01:00
Bjørn Erik Pedersen
4513801778
minifiers: Update to new CSS config
Update #6719
2020-01-07 18:06:22 +01:00
Bjørn Erik Pedersen
56354a63bb
deps: Update to Minify v2.7.0
Updates ##6719
2020-01-07 16:13:38 +01:00
Bjørn Erik Pedersen
b9b73a2f63
Revert "Add support for freebsd/arm64"
golang.org/x/sys is an indirect dependency and needs to be updates as such.

This reverts commit aead8108b8.
2020-01-07 13:42:43 +01:00
Dmitri Goutnik
aead8108b8 Add support for freebsd/arm64
Update #6719 6719
2020-01-07 13:21:19 +01:00
Bjørn Erik Pedersen
1cf235412f
tpl: Put Go's internal template funcs in Hugo's map
```
name                            old time/op    new time/op    delta
SiteNew/Many_HTML_templates-16    43.4ms ± 0%    42.7ms ± 0%  -1.71%  (p=0.016 n=4+5)

name                            old alloc/op   new alloc/op   delta
SiteNew/Many_HTML_templates-16    17.5MB ± 0%    17.5MB ± 0%    ~     (p=0.690 n=5+5)

name                            old allocs/op  new allocs/op  delta
SiteNew/Many_HTML_templates-16      247k ± 0%      247k ± 0%    ~     (p=0.310 n=5+5)
```

Fixes #6717
2020-01-07 13:18:19 +01:00
Bjørn Erik Pedersen
df6e9efd8f
Update releasenotes_writer.go 2020-01-07 13:15:22 +01:00
Bjørn Erik Pedersen
ea05c0e845
hugolib: Add a benchmark with lots of templates 2020-01-07 10:48:17 +01:00
hugoreleaser
273047b5ba releaser: Prepare repository for 0.63.0-DEV
[ci skip]
2020-01-05 18:58:55 +00: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
hugoreleaser
12230b6897 releaser: Bump versions for release of 0.62.2
[ci skip]
2020-01-05 18:50:35 +00:00
hugoreleaser
afdb180e23 releaser: Add release notes for 0.62.2
[ci skip]
2020-01-05 18:50:35 +00:00
Bjørn Erik Pedersen
196a9df585 hugolib: Fix relative .Page.GetPage from bundle
Fixes #6705
2020-01-05 19:41:53 +01:00
Bjørn Erik Pedersen
9b6e61464b
markup/goldmark: Adjust auto ID space handling
GitHub does not consider tabs as delimiter, see https://github.com/bep/portable-hugo-links/blob/master/blog/p2.md

Closes #6710
2020-01-05 15:58:14 +01: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
16e7c11203
markup/goldmark: Add an optional Blackfriday auto ID strategy
Fixes #6707
2020-01-05 11:56:05 +01:00
Bjørn Erik Pedersen
8f071fc159
markup/goldmark: Make the autoID type config a string
To potentially make room for one more.

See #6707
2020-01-05 11:29:22 +01:00
Bjørn Erik Pedersen
469351d5b6
Merge commit '26f1458a2d' 2020-01-05 11:14:51 +01:00
Bjørn Erik Pedersen
26f1458a2d Squashed 'docs/' changes from 54f0e8776..bd0e15bb6
bd0e15bb6 Optimised images with calibre/image-actions
59830ea44 Remove comments from quickstart code samples
348821b5d Remove image-actions
1cbbd26a9 Update index.md
bcf3de764 Update index.md
fcf17e6ef Release 0.62.1
0956bde21 Merge branch 'temp621'
28d604756 releaser: Add release notes to /docs for release of 0.62.1
c895f12e7 Fix statement about version installed with apt-get (#854)
e96928e38 Updated quickstart to split theme download and theme config add into separate blocks (#967)
e099c1ad6 changed ".Title" to ".URL" (#972)
bea71280d Fix small typing error (#1001)
9c28c422e Correct hyperlink for 'markdownify' function
cf3844a06 Corrected small conjugation mistake (#996)
8b9c1d4f2 Added remarks about additional parameters in ref/relref (#995)
ca06c9a56 Fix illegal character in render-link.html example
7a85c789b Update RenderString.md
69df3b17e Update configuration-markup.md
43e9222a2 Revert "Add shortcodes to note comparing with `markdownify`"
2bd5bc2d7 Add shortcodes to note comparing with `markdownify`
ddfee60b7 Update configuration-markup.md
f87c35fe2 docs: Remove extra double quotation
5ca5cc15f Update index.md
6e457f5ec Update configuration-markup.md
12df3c0fc Update configuration-markup.md
91977fd96 Update configuration-markup.md
377b8954a Update configuration-markup.md
99d691b5e Update hosting-on-render.md
ccf855b22 Update index.md
a945acc42 Update index.md
7d4f308d6 Fix Netlify config
f4caa07f5 Release 0.62.0
79d18276f releaser: Add release notes to /docs for release of 0.62.0
9db1a08d1 Merge commit '8a4005cf2b'
79e556223 docs: More on hooks
5088c54df tpl: Do not return any value in errorf
98c8c8638 tpl: Add a warnf template func
4a9d76cea docs: Regen docshelper
626e53b55 Fix incorrect MIME type from image/jpg to image/jpeg
f92f77c5d Preserve HTML Text for link render hooks
6db9c52b1 docs: Footnote
16801db3b Add render template hooks for links and images
0facb823c Merge commit '2e711a28c7'
79bf8ed4c markup/tableofcontents: Add config option for ordered list

git-subtree-dir: docs
git-subtree-split: bd0e15bb6063f7ad4f0c47eb33c8c0c23c962d13
2020-01-05 11:13:09 +01:00
Bjørn Erik Pedersen
5ee1f0876f
markup/goldmark: Simplify code 2020-01-04 23:58:23 +01:00
Bjørn Erik Pedersen
a82d2700fc
markup/goldmark: Make auto IDs GitHub compatible
You can turn off this behaviour:

```toml
[markup]
  [markup.goldmark]
    [markup.goldmark.parser]
      autoHeadingIDAsciiOnly = true
```
Note that the `anchorize` now adapts its behaviour depending on the default Markdown handler.

Fixes #6616
2020-01-04 19:46:01 +01:00
hugoreleaser
ae816452b1 releaser: Prepare repository for 0.63.0-DEV
[ci skip]
2020-01-01 17:46:46 +00: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
3a21a1708d releaser: Bump versions for release of 0.62.1
[ci skip]
2020-01-01 17:38:22 +00:00
hugoreleaser
451746ddd7 releaser: Add release notes for 0.62.1
[ci skip]
2020-01-01 17:38:22 +00:00
Bjørn Erik Pedersen
ff6253bc7c Support files in content mounts
This commit is a general improvement of handling if single file mounts.

Fixes #6684
Fixes #6696
2020-01-01 18:19:49 +01:00
Remco de Man
aa4ccb8a1e Update alpine base image in Dockerfile to 3.11
When building the extended version of Hugo using the Dockerfile and
`--build-arg HUGO_BUILD_TAGS=extended`, the obtained Docker container is
broken, because the source is build under alpine 3.11 and the compiled
binary is copied to an image based on alpine 3.10. This problem was most
likely introduced due to an update of the golang base image.

This commit changes the base image from alpine:3.10 to alpine:3.11,
fixing extended version builds.
2019-12-30 13:56:58 +01:00
Bjørn Erik Pedersen
5509954c7e hugolib: Fix inline shortcode regression
Fixes #6677
2019-12-28 14:31:51 +01:00
hugoreleaser
6b59b64f02 releaser: Prepare repository for 0.63.0-DEV
[ci skip]
2019-12-23 10:32:39 +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
hugoreleaser
b361d9a462 releaser: Bump versions for release of 0.62.0
[ci skip]
2019-12-23 10:23:27 +00:00
Bjørn Erik Pedersen
592a7d104d
Release 0.62.0 2019-12-23 10:49:08 +01:00
hugoreleaser
93216fda72 releaser: Add release notes for 0.62.0
Rename to *-ready.md to continue.
[ci skip]
2019-12-23 08:57:02 +00:00
Bjørn Erik Pedersen
8a4005cf2b Squashed 'docs/' changes from af4b7ac5b..54f0e8776
54f0e8776 Update image-actions.yml
94e5cad02 Update image-actions.yml
0ad20d226 Add a page about Hugo's Security Model
0dee16d11 Link to Régis Full Partials series
138782808 Update partialCached.md

git-subtree-dir: docs
git-subtree-split: 54f0e877670fd434c6903e20774fcf7eba9255fa
2019-12-22 22:51:45 +01:00
Bjørn Erik Pedersen
740b72558b
Merge commit '8a4005cf2b' 2019-12-22 22:51:45 +01:00
Bjørn Erik Pedersen
1fb17be9a0 deps: Update Goldmark to v1.1.18
Fixes #6649
2019-12-22 18:14:04 +01:00
Niklas Fasching
51d89dab18 deps: Update go-org
- export #+TITLE (front-matter title) as `<h1>` and demote all normal headlines
  by 1 accordingly (i.e. a normal top level headline now becomes a `<h2>`
  rather than a `<h1>`)
- preserve whitespace in paragraphs - this allows rendering meaningful
  whitespace when wished for using e.g. css `white-space: pre;` (e.g. in verse
  / quote blocks)
2019-12-22 16:18:55 +01:00
Bjørn Erik Pedersen
c8bfe47c6a
docs: More on hooks 2019-12-21 11:59:36 +01:00
Bjørn Erik Pedersen
50cc7fe545
tpl: Do not return any value in errorf
Fixes #6653
2019-12-21 10:26:14 +01:00
Bjørn Erik Pedersen
1773d71d5b tpl: Add a warnf template func
Fixes #6628
2019-12-21 10:23:00 +01:00
Bjørn Erik Pedersen
8a58ebb311 hugolib: Improve error and reload handling of hook templates in server mode
Fixes #6635
2019-12-20 11:38:44 +01:00
Bjørn Erik Pedersen
0453683816
deps: Update to Goldmark v1.1.17
Fixes #6641
2019-12-20 08:00:37 +01:00
Bjørn Erik Pedersen
55c29d4de3
docs: Regen docshelper 2019-12-19 23:48:01 +01:00
Bjørn Erik Pedersen
ccb1bf1abb
tpl/collections: Some more params merge adjustments
* If the end result is maps.Params, we need to lower the keys
* Also make sure to handle nested maps of different type

Update #6633
2019-12-19 20:50:30 +01:00
Bjørn Erik Pedersen
a67d95fe1a Preserve HTML Text for image render hooks
Fixes #6639
2019-12-19 19:02:03 +01:00
Bjørn Erik Pedersen
ad6504e6b5 Fix abs path handling in module mounts
Fixes #6622
2019-12-19 18:51:59 +01:00
John Zaitseff
158e7ec204 Fix incorrect MIME type from image/jpg to image/jpeg
According to multiple sources, both official ([IANA] and [RFC2046]) and
otherwise (eg, [Mozilla] and [Wikipedia]), the official MIME type for
JPEG images is `image/jpeg`, not `image/jpg`.  Change Hugo to match.

[IANA]: https://www.iana.org/assignments/media-types/media-types.xhtml#image
[RFC2046]: https://tools.ietf.org/html/rfc2046
[Mozilla]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
[Wikipedia]: https://en.wikipedia.org/wiki/JPEG
2019-12-19 18:02:11 +01:00
Bjørn Erik Pedersen
eef934ae7e deps: Update Goldmark
Fixes #6626
2019-12-19 09:05:35 +01:00
Bjørn Erik Pedersen
00954c5d1f Preserve HTML Text for link render hooks
The context now have two text methods:

* Text - rendered
* PlainText

Fixes #6629
2019-12-18 22:55:19 +01:00
Bjørn Erik Pedersen
1b785a7a6d
tpl/collections: Fix merge vs Params
Fixes #6633
2019-12-18 21:31:34 +01:00
Bjørn Erik Pedersen
d20ca37005 tpl: Get rid of the custom template truth logic
Fixes #6615
2019-12-18 20:05:22 +01:00
Bjørn Erik Pedersen
3e316155c5
docs: Footnote 2019-12-18 16:37:43 +01:00
Bjørn Erik Pedersen
e625088ef5
Add render template hooks for links and images
This commit also

* revises the change detection for templates used by content files in server mode.
* Adds a Page.RenderString method

Fixes #6545
Fixes #4663
Closes #6043
2019-12-18 11:44:40 +01:00
Bjørn Erik Pedersen
67f3aa72cf
Merge commit '2e711a28c7' 2019-12-15 10:37:36 +01:00
Bjørn Erik Pedersen
2e711a28c7 Squashed 'docs/' changes from 51c4f3184..af4b7ac5b
af4b7ac5b Remove mention of Amber and Ace
c841e9207 Exif docs corrections (#978)
0f82420b8 Change cache assets default example to 1 year
676dc6e12 Release 0.61.0
a1d9fb18a Merge commit '79c5d7053486f540b6219e693d5590f2c4c3937a'
1b9e675cd releaser: Add release notes to /docs for release of 0.61.0
5b95cbc8a Fixed suffixIsRemoved error in code samples (#975)
59b2c245b Fix Usage section in toc.md to consider Goldmark TOC settings
fd3828673 Add link on how to configure TOC w/ Goldmark
ea339f2d6 Added external learning resources including Hugo In Action book.
fab502d5d Adjust release notes
269a025ef Release 0.60.1
6bff50bea Merge branch 'temp601'
e15251c43 releaser: Add release notes to /docs for release of 0.60.1
690b864b9 Update use-modules.md
345ca8c36 Update syntax-highlighting.md
be64af9f5 Update syntax-highlighting.md
df9dead83 Update syntax-highlighting.md
1c6e6d238 Fix relnotes
0ea6b2012 Update homepagetweets.toml
2c465625d Update index.md
0025bba09 Update index.md
7417f1c05 Update index.md
9eeb8ce57 Release 0.60.0
25a711023 Merge branch 'temp60'
0c4faab0e releaser: Add release notes to /docs for release of 0.60.0
779e5108e Update installing.md
2ef1c386a Minor text improvements in README.md
41ec5a19a Reword sentence for clarity search.md
ded74f098 Add Goldmark as the new default markdown handler
cb55cdbb0 Update introduction.md
fcaad653a Update homepage.md
7427a1fc5 Update configuration.md
8cc2c72ca tpl/collections: Allow dict to create nested structures
4538c092c Merge commit 'efc0b1bb6c'
90f908e7b Support Go time format strings in permalinks

git-subtree-dir: docs
git-subtree-split: af4b7ac5b403e392a92228e66058331905fff7dc
2019-12-15 10:35:09 +01:00
Shohei Ueda
0947cf9583 Enhance accessibility to issues
Add links to the Hugo issues, Hugo docs issues, and Hugo website theme issues.

Close #6233
2019-12-14 18:47:23 +01:00
Bjørn Erik Pedersen
3c24ae030f
hugolib: Fix test 2019-12-12 14:48:59 +01:00
Bjørn Erik Pedersen
03d6960a15
deps: Re-introduce the correct version of Goldmark
It was accidently pulled back to an old version earlier today.
2019-12-12 14:45:46 +01:00
Bjørn Erik Pedersen
92c7f7ab85
tpl: Add some comments 2019-12-12 11:44:36 +01:00
Bjørn Erik Pedersen
a03c631c42
Rework template handling for function and map lookups
This is a big commit, but it deletes lots of code and simplifies a lot.

* Resolving the template funcs at execution time means we don't have to create template clones per site
* Having a custom map resolver means that we can remove the AST lower case transformation for the special lower case Params map

Not only is the above easier to reason about, it's also faster, especially if you have more than one language, as in the benchmark below:

```
name                          old time/op    new time/op    delta
SiteNew/Deep_content_tree-16    53.7ms ± 0%    48.1ms ± 2%  -10.38%  (p=0.029 n=4+4)

name                          old alloc/op   new alloc/op   delta
SiteNew/Deep_content_tree-16    41.0MB ± 0%    36.8MB ± 0%  -10.26%  (p=0.029 n=4+4)

name                          old allocs/op  new allocs/op  delta
SiteNew/Deep_content_tree-16      481k ± 0%      410k ± 0%  -14.66%  (p=0.029 n=4+4)
```

This should be even better if you also have lots of templates.

Closes #6594
2019-12-12 10:04:35 +01:00
Bjørn Erik Pedersen
167c01530b
Create lightweight forks of text/template and html/template
This commit also removes support for Ace and Amber templates.

Updates #6594
2019-12-12 09:59:34 +01:00
Gavin D. Howard
4c804319f6 markup/tableofcontents: Add config option for ordered list 2019-12-12 07:48:40 +01:00
hugoreleaser
186a5ebfca releaser: Prepare repository for 0.62.0-DEV
[ci skip]
2019-12-11 08:35:04 +00:00
hugoreleaser
9b445b9da2 releaser: Add release notes to /docs for release of 0.61.0
[ci skip]
2019-12-11 08:26:33 +00:00
hugoreleaser
3af783966d releaser: Bump versions for release of 0.61.0
[ci skip]
2019-12-11 08:26:33 +00:00
Bjørn Erik Pedersen
31f322a610
Release 0.61.0 2019-12-11 09:14:48 +01:00
hugoreleaser
38c60f2be4 releaser: Add release notes for 0.61.0
Rename to *-ready.md to continue.
[ci skip]
2019-12-11 07:55:37 +00:00
Bjørn Erik Pedersen
3cc217a650 deps: Update Goldmark 2019-12-11 08:41:57 +01:00
Bjørn Erik Pedersen
5f8c2818f1
Deprecate Ace and Amber
Fixes #6609
2019-12-11 08:08:42 +01:00
Daniel Tang
c5f2f5837f markup: Add typographic chars from goldmark to toc
Fixes #6592
2019-12-10 23:48:44 +01:00
Bjørn Erik Pedersen
0efb00c2a8 tpl/partials: Allow any key type in partialCached
Fixes #6572
2019-12-03 00:13:47 +01:00
Bjørn Erik Pedersen
40a092b068 markup: Reimplement pygmentsCodefencesGuessSyntax
Fixes #6565
2019-12-02 14:12:23 +01:00
Bjørn Erik Pedersen
d534ce9424 deps: Update Goldmark
Fixes #6557
2019-12-01 22:07:31 +01:00
hugoreleaser
a6b6b135a4 releaser: Prepare repository for 0.61.0-DEV
[ci skip]
2019-11-29 15:05:19 +00:00
hugoreleaser
960667561f releaser: Add release notes to /docs for release of 0.60.1
[ci skip]
2019-11-29 14:56:16 +00:00
hugoreleaser
6c05563082 releaser: Bump versions for release of 0.60.1
[ci skip]
2019-11-29 14:56:16 +00:00
hugoreleaser
f5250ec09d releaser: Add release notes for 0.60.1
[ci skip]
2019-11-29 14:56:16 +00:00
MeiK
86a5b59f64 deps: Update minify
Fixes #6475
2019-11-29 14:37:32 +01:00
Bjørn Erik Pedersen
bb80fff69a
Fix headless regression
Fixes #6552
2019-11-29 13:46:29 +01:00
Bjørn Erik Pedersen
347cfb0c17 deps: Update Goldmark
Fixes #6549
Fixes #6551
2019-11-29 13:44:29 +01:00
Bjørn Erik Pedersen
b60ae35b97
hugolib: Fix timeout number parsing for YAML/JSON config
Where numbers are all floats.

Fixes #6555
2019-11-29 10:50:36 +01:00
hugoreleaser
003ba5b10f releaser: Prepare repository for 0.61.0-DEV
[ci skip]
2019-11-27 10:19:00 +00:00
hugoreleaser
f2dea9b036 releaser: Add release notes to /docs for release of 0.60.0
[ci skip]
2019-11-27 10:09:46 +00:00
hugoreleaser
763b0dcb97 releaser: Bump versions for release of 0.60.0
[ci skip]
2019-11-27 10:09:46 +00:00
Bjørn Erik Pedersen
b2969b7a77
Release 0.60.0 2019-11-27 11:01:50 +01:00
hugoreleaser
60fea562c4
releaser: Add release notes for 0.60.0
Rename to *-ready.md to continue.
[ci skip]
2019-11-27 11:01:23 +01:00
Bjørn Erik Pedersen
14a1de14fb
modules: Add some more output if modules download takes time
Closes #6519
2019-11-27 09:51:47 +01:00
Bjørn Erik Pedersen
dcde8af8c6
Add some internal template image tests
Closes #6542
2019-11-27 09:24:08 +01:00
Max Arnold
c91970c08d tpl/tplimpl: Featured and Site.Params image support for Schema 2019-11-26 23:53:43 +01:00
Bjørn Erik Pedersen
dd1e5fc0b4 hugolib: Disable test assertion on Windows 2019-11-26 23:51:31 +01:00
Bjørn Erik Pedersen
b0c7749fa1 deps: Update Goldmark
Closes https://github.com/yuin/goldmark/issues/36#event-2832923993
2019-11-26 23:51:31 +01:00
Max Arnold
25a6b33693 tpl/tplimpl: Add support for featured and global image to OpenGraph template 2019-11-26 20:11:53 +01:00
Bjørn Erik Pedersen
0176643924 hugolib: Fix cascade in server mode
Fixes #6538
2019-11-26 17:04:39 +01:00
Bjørn Erik Pedersen
da53523599
hugolib: Fix .Sections vs siblings
Fixes #6365
2019-11-26 13:12:44 +01:00
Bjørn Erik Pedersen
96f09659ce
Fix language handling in ExecuteAsTemplate
Fixes #6331
2019-11-26 12:55:00 +01:00
Bjørn Erik Pedersen
03b369e672
hugolib: Adjust .Site.Permalinks deprecation level 2019-11-25 20:19:41 +01:00
Bjørn Erik Pedersen
69fd1c60d8
hugolib: Remove .Site.Ref/RelRef 2019-11-25 20:17:59 +01:00
Bjørn Erik Pedersen
33d733300a
Deprecate mmark
Fixes #6486
2019-11-25 20:14:20 +01:00
Bjørn Erik Pedersen
e3451371bd
hugolib: Fix recently broken timeout config 2019-11-25 20:13:29 +01:00
Bjørn Erik Pedersen
5c5231e09e
commands: Use HUGO_ENV if set
Fixes #6456
2019-11-25 19:12:14 +01:00
Bjørn Erik Pedersen
d6f7a9e28d resources/images: Make the image cache more robust
Also allow timeout to be set as a duration string, e.g. `30s`.

Fixes #6501
2019-11-25 18:59:06 +01:00
Bjørn Erik Pedersen
031f948f87 Update to Go 1.13.4 and Go 1.12.13 2019-11-25 18:59:06 +01:00
Bjørn Erik Pedersen
71597bd1ad mage: Restore -v behaviour 2019-11-25 18:59:06 +01:00
Bjørn Erik Pedersen
a8e9f8389a hugolib: Increase default timeout value to 30s
Fixes #6502
2019-11-25 18:59:06 +01:00
Bjørn Erik Pedersen
03e2d7462d hubolig: Fix potential data race
Fixes #6478
2019-11-25 18:59:06 +01:00
Bjørn Erik Pedersen
ea96e1dc55
Revert "deps: Update Goldmark"
See https://github.com/yuin/goldmark/issues/36

This reverts commit 8221912869.
2019-11-25 16:58:37 +01:00
Bjørn Erik Pedersen
8221912869
deps: Update Goldmark 2019-11-25 12:50:45 +01:00
Chris Trimble
8beaa4c25e mage: Fix mage check on darwin and add debugging output
Darwin no longer supports 386 builds after Catalina. Also add
debugging output when running test suites from mage.
2019-11-25 09:48:26 +01:00
Chris Trimble
8a89b8582f commands: Fix jekyll metadata import on individual posts
Prior refactor had eliminated writing FrontMatter for Jekyll imports. This
fixes that bug as well as adds a regression test.

Also removed unused site var, replaced some raw strings, and added regression
test for \r\n removal.

Fixes #5576
2019-11-25 09:46:44 +01:00
jasdeepgill
e1175ae83a Improve grammar in README.md 2019-11-25 09:45:21 +01:00
Bjørn Erik Pedersen
a2d77f4a80
markup/highlight: Replace the temp for with a dependency 2019-11-24 13:59:16 +01:00
Bjørn Erik Pedersen
b546417a27
deps: Update Chroma 2019-11-24 12:29:55 +01:00
Bjørn Erik Pedersen
4175b04686
deps: Update Goldmark 2019-11-24 12:28:57 +01:00
Bjørn Erik Pedersen
55f951cbba
markup/tableofcontents: GoDoc etc. 2019-11-23 16:59:43 +01:00
Cameron Moore
20f351ee4c Minor cleanups
Use fmt.Fprint were appropriate instead of Fprintf.  Remove some unused
code.
2019-11-23 16:38:02 +01:00
Bjørn Erik Pedersen
bfb9613a14
Add Goldmark as the new default markdown handler
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo.

If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration:

```toml
[markup]
defaultMarkdownHandler="blackfriday"
```

Fixes #5963
Fixes #1778
Fixes #6355
2019-11-23 14:12:24 +01:00
Bjørn Erik Pedersen
a3fe5e5e35
Fix Params case handling in the index, sort and where func
This means that you can now do:

```
{{ range where .Site.Pages "Params.MYPARAM" "foo" }}
```
2019-11-22 18:41:50 +01:00
Bjørn Erik Pedersen
cd07e6d57b
Fix GetPage Params case issue
Fixes #5946
2019-11-22 18:41:40 +01:00
Bjørn Erik Pedersen
628efd6e29
common/para: Add parallel task executor helper
Usage of this will come later.
2019-11-21 18:38:14 +01:00
Bjørn Erik Pedersen
2dcc1318d1 Add some more output if loading modules takes time
Also include the time to collect modules etc. in the "Total in ..." time reported for the `hugo` command.

Fixes #6519
2019-11-21 18:11:07 +01:00
Bjørn Erik Pedersen
14a985f8ab
Update homepage.md
Fixes https://github.com/gohugoio/hugo/issues/6510
2019-11-18 09:17:49 +01:00
Bjørn Erik Pedersen
0cf85c071a
hugolib: Add a benchmark 2019-11-17 17:22:32 +01:00
Bjørn Erik Pedersen
20ec9fa2bb
modules: Do not check for remote modules if main project is vendored
Fixes #6506
2019-11-14 12:24:55 +01:00
Bjørn Erik Pedersen
812688fc2f
hugolib: Fix emoji handling inside shortcodes
Fixes #6504
2019-11-14 10:00:06 +01:00
Bjørn Erik Pedersen
a2670bf460 tpl/collections: Allow dict to create nested structures
Fixes #6497
2019-11-11 21:55:16 +01:00
reuben honigwachs
1a36ce9b09 commands: Add hint when dir not empty
Many users seem to stumble over creating new sites in existing non-empty directories. And that `--force` is the necessary option. So I added *See --force* as a hint to the error.

Fixes #4825.
2019-11-11 21:38:10 +01:00
Bjørn Erik Pedersen
90d0cdf236
tpl/collections: Add collections.Reverse
Fixes #6499
2019-11-11 18:33:22 +01:00
Bjørn Erik Pedersen
95ef93be66
tpl/collections: Make index work with slice as the last arg
Fixes #6496
2019-11-11 13:54:57 +01:00
Bjørn Erik Pedersen
79355043e8
Merge commit 'efc0b1bb6c' 2019-11-11 11:46:22 +01:00
Bjørn Erik Pedersen
efc0b1bb6c Squashed 'docs/' changes from 723da4a37..51c4f3184
51c4f3184 update figure shortcode docs
2e9c8200d Fix mediatype table
040355013 Rework the index doc
6f0c67c08 Release 0.59.1
a1add2ad0 Merge branch 'temp591'
e0ad971c0 releaser: Add release notes to /docs for release of 0.59.1
c03eb16e7 Fix automatic typo
a623ccfd1 Update quick-start.md
de36e6f8f Clarify that `print` takes 1+ arguments
de439ab84 correct the themes url www.themes.gohugo.io > themes.gohugo.io
806102d10 Remove homepage Tweet (Account no longer exists)
fc4c88513 Add extended version choco instructions (#703)
1b1e8b33c Fix environment typo (#950)
76932cb49 HTTPS relevant search link URLs (#951)
2ef6bdfa4 Update theme
336a6468a Fix consecutive typo (#949)
f44183ddb Fix corresponding typo (#948)
995bf0048 Update index.md
e99758f79 Release 0.59.0
36517d198 releaser: Add release notes to /docs for release of 0.59.0
3acb75f89 Merge commit '5ac0f751aa'
8b3cb611a Merge commit '5070ba6c9e'
fd0127841 Merge commit 'b9bd35d72e' as 'docs'
39121de4d docs: Replace /docs
180195aa3 cache/filecache: Recover from file corruption
4b286b9d2 resources/images: Allow to set background fill colour
689f647ba media: Add common video media types
46cafdbac examples: Replace .RSSLink
653e6856e resources/page: Use binary search in Pages.Prev/Next if possible
f4f566edf Make Pages.Prev/Next work like the other Prev/Next methods
7b3edc293 tpl: Add optional "title" attribute to iframe in Vimeo shortcode
65b7d4221 tpl: Modify error messages of after, first, and last
0e75af74d tpl: Last now accepts 0 as limit
5f1aafafb Update feature_request.md
a9762b5c4 common: Fix elements are doubling when append a not assignable type
096a4b67b tpl: After now accepts 0 as index
bc70f2bf1 helpers: Fix data race in global logger init
0d7b05be4 tpl: Make getJSON/getCVS accept non-string args
71b18a078 Update to Go 1.12.10 and 1.13.1
339ee3714 Simplify test output to simplify diffing
f10db101a hugofs: Add FileMeta.String
b401858eb deps: Update minify to v2.5.2
39ed33fce resources: Fix image test error on s390x, ppc64* and arm64
020a6fbd7 Add BaseFs to RenderingContext
b152216d5 deps: Update go-org
64ec8c890 media: Use + to create the Type string
c466b88c9 deps: Upgrade to latest version of emoji dependency
2df5d202c Revert "deps: Upgrade to latest version of emoji dependency"
170f18d93 deps: Upgrade to latest version of emoji dependency
15a0364d3 readme: Update Architectures
674e81ae8 deploy: Add ability to invalidate Google Cloud CDN
298092d51 resources: Ensure same dirinfos sort order in TestImageOperationsGolden
019ae3848 Update bug_report.md
329e88db1 Support typed bool, int and float in shortcode params
e073f4efb deps: Update Chroma
454a033dc github: Add issue templates and action
e5856e61d resources: Support output image format in image operations
34dc06b03 tpl: Add `rel="noopener"` for external links
2b1814ee5 tpl: Remove unneeded space
8cb7a0d4d releaser: Prepare repository for 0.59.0-DEV
4aac02d49 releaser: Add release notes to /docs for release of 0.58.3
85376a757 releaser: Bump versions for release of 0.58.3
0fd30f832 releaser: Add release notes for 0.58.3 [ci skip]
c262a95a5 Add some more resource transform tests
6dec671fb Fix cache key transformed resources
c0d7188ec deploy: Do not compile in Azure on Solaris
13768c3c5 releaser: Prepare repository for 0.59.0-DEV
253e5fdc6 releaser: Add release notes to /docs for release of 0.58.2
7bc1270ec releaser: Bump versions for release of 0.58.2
d4c98e580 releaser: Add release notes for 0.58.2 [ci skip]
c0d757367 Fix cache keys for bundled resoures in transform.Unmarshal
fcfa6f33b filecache: Ignore "does not exist" errors in prune
77b23fe3d releaser: Prepare repository for 0.59.0-DEV
24277b920 releaser: Add release notes to /docs for release of 0.58.1
8bc478d3f releaser: Bump versions for release of 0.58.1
609a9afbe releaser: Add release notes for 0.58.1 [ci skip]
9442937d8 Avoid writing the same processed image to /public twice
901077c03 hugolib: Fix broken bundle live reload logic
24ad42957 deps: Update github.com/bep/gitmap
3be2c2535 Fix concat with fingerprint regression
5e6609477 tpl: Remove eq argument limitation
f4e1cb8d0 releaser: Prepare repository for 0.59.0-DEV
64d8bf1ee releaser: Add release notes to /docs for release of 0.58.0
10c0baddf releaser: Bump versions for release of 0.58.0
9d3ae81b9 Release 0.58.0
bb894ceaf Allow slices in the image Filter funcs, not just varargs
529c7f109 Update 0.58.0-relnotes.md
57a54d19d releaser: Add release notes for 0.58.0
dc3f3df29 hugolib: Adjust Go version specific test
b43130115 Update to Go 1.13
28501ceb9 hugolib: Remove the old and slow site benchmarks
8624b9fe9 Cache processed images by their source path
018494f36 Remove test artifact
43298f028 Make the "is this a Hugo Module" logic more lenient
1b5c7e327 hugolib: Add a Sass includePaths test
05d83b6c0 Update to Go 1.11.13 and 1.12.9
4898fb3d6 Make home.Pages work like any other section
45d7988f2 Add some fingerprint tests
ce47c21a2 resources: Cache Exif data to disk
de9cbf619 Remove metaDataFormat setting
4f5011692 resources: Make the Exif benchmark filenames distinct
3becba7a9 resources: Add Exif benchmark
20bdc69a4 resources: Remove unused map type
28143397d Add image.Exif
8a8d4a6d9 deps: Update go-org (fix descriptive lists)
00297085d tpl: Migrate last shortcodes (YouTube and Vimeo) to HTTPS embeds
823f53c86 Add a set of image filters
f9978ed16 Image resource refactor
58d4c0a8b deps: Update go-org (fix footnotes in headlines)
c5319db9f Discrepancy typo fix
ad1d6d640 source: Remove debug check left during development
fd3d90ced hugolib: Change to output non-panic error message if missing shortcode template
3ae4b3e19 releaser: Prepare repository for 0.58.0-DEV
a849cb2d9 releaser: Add release notes to /docs for release of 0.57.2
01fbb4635 releaser: Bump versions for release of 0.57.2
9958e5e91 releaser: Add release notes for 0.57.2 [ci skip]
f77a4a2f4 Revert "Update to Go 1.11.13 and 1.12.9"
88d699361 tpl: Use RegularPages for RSS template
ea6816030 hugolib: Don't use the global warning logger
564cf1bb1 tpl: Avoid "home page warning" in RSS template
4b4bdcfe7 hugolib: Allow index.md inside bundles
18836a71c Adjust the default paginator for sections
ab40ce679 Revert the 0.57 home.Pages change
416493b54 hugolib: Add a site benchmark
f28efd358 Update to Go 1.11.13 and 1.12.9
36d749f4e releaser: Prepare repository for 0.58.0-DEV
58c56e9de releaser: Add release notes to /docs for release of 0.57.1
484106cfa releaser: Bump versions for release of 0.57.1
4d60a920f releaser: Add release notes for 0.57.1 [ci skip]
6ccf50ea7 hugolib: Fix draft etc. handling of _index.md pages
67524c993 Fix mainSections logic
952a31949 Fix live reload mount logic with sub paths
321418f22 modules: Disable "auto tidy" for now
7f3aab5ac hugolib: Recover and log panics in content init
028b99261 hugolib: Add some outputs tests
9475f61a3 hugolib: Fix taxonomies vs expired
ea9261e85 commands: Make sure the hugo field is always initialized before it's used
37f592980 releaser: Prepare repository for 0.58.0-DEV
9b00e6476 releaser: Add release notes to /docs for release of 0.57.0
ab849fcc9 releaser: Bump versions for release of 0.57.0
8a4c080cc Add release notes for 0.57.0
4644b95bd hugolib: Remove temporary warning
1089cfe4e Add FileInfo to resources created with resources.Match etc.
cd575023a Improve the server assets cache invalidation logic
631509810 modules: Do not fail build on errors in theme.toml
b64617fe4 Add resources.Match and resources.GetMatch
17ca8f0c4 commands: Fix faulty -h logic in hugo mod get
9e5718270 tests: Convert from testify to quicktest
6027ee110 Avoid unnecessary conversions
c577a9ed2 Fixed ineffectual assignments
a93cbb0d6 Simplify code
bd98182db Implement cascading front matter
e88d79899 Fixed tautological error conditions
c0eef3b40 Use the SVG logo in README.md
166a394a2 Fix static sync issue with virtual mounts
824395204 Add a branch bundle test case
7ff0a8ee9 Simplify page tree logic
df374851a hugolib: Add some more site benchmarks
a843ca53b  transform/urlreplacers: Cache the next position of `urlreplacer.prefix`
02397e76c postcss: Fix no-map vs noMap discrepancy
de8762424 hugolib: Fix output format handling of mix cased page kinds
9ef4dca36 hugolib: Fix broken test
2d1d33673 tpl: Regenerate templates
be0d4efc3 tpl: Always load GitHub Gists over HTTPS
f7f549e3a Fix assorted typos
6512d128c common/collections: Fix typo
b8758de19 examples: Fix multilingual example compatibility with latest version
53077b0da Merge pull request #6149 from bep/sort-caseinsensitive
a4f96a9d8 releaser: Prepare repository for 0.57.0-DEV
f637a1eac releaser: Add release notes to /docs for release of 0.56.3
9433c3c70 releaser: Bump versions for release of 0.56.3
7b448340c releaser: Add release notes for 0.56.3 [ci skip]
0e086785f hugolib: Fix bundle header clone logic
02b947eaa docs: Regenerate CLI docs
d7c233afe commands: Add "hugo config mounts" command
45ee8a7a5 commands: Cleanup the hugo config command
4b6c5eba3 Move the mount duplicate filter to the modules package
edf9f0a35 Allow overlap in module mounts
36220851e Fix self-mounts on the main project
53ade40ba releaser: Prepare repository for 0.57.0-DEV
5f033a7fc releaser: Add release notes to /docs for release of 0.56.2
2e6da0067 releaser: Bump versions for release of 0.56.2
06f29068f releaser: Add release notes for 0.56.2 [ci skip]
84bc8d84e Add some more content language test assertions
6eca0a3de commands: Fix config reloading in Vim and similar
e28bd4c0f Fix Jekyll import
2c7c36109 releaser: Create a proper automated title for patch releases
c62bbf7b1 Fix image format detection for upper case extensions, e.g. JPG
00a238e32 Fix i18n project vs theme order
e5f960245 Add proper error message when receiving nil in Resource transformation
9f497e7b5 Merge branch 'release-0.56.1'
3ad16af6f releaser: Prepare repository for 0.57.0-DEV
56908509e deps: Update go-org to v0.1.2
0ad218afc releaser: Add release notes to /docs for release of 0.56.1
b5fda703f releaser: Bump versions for release of 0.56.1
447700228 releaser: Add release notes for 0.56.1 [ci skip]
544f826dd releaser: Make it a one click release for patch releases
e393c6290 common/maps: Do not return error on params dot access on incompatible types
93d02aabe resources: Fix image Width/Height regression
508db1906 Revert "cache/filecache: Skip resource cache init if the fs is missing"
e5fe37892 modules: Set GO111MODULE=on
da4c4a778 cache/filecache: Skip resource cache init if the fs is missing
b4827fbb1 releaser: Prepare repository for 0.57.0-DEV
45f4eb984 releaser: Add release notes to /docs for release of 0.56.0
263f86d45 releaser: Bump versions for release of 0.56.0
bed75108e Update release notes
8d7006d85 releaser: Add release notes draft for 0.56.0
e5b6e2085 resources: Fix test on Windows
77bf2991b docs: Add Hugo Modules docs
e5f229974 Block symlink dir traversal for /static
87a07282a modules: Gofmt
882d678bb modules: Rename disabled => disable in config
fa28df105 hugolib: Fix broken test
072aa7f11 hugolib: Add a symdiff test
215d2ed88 docs: Regenerate CLI docs
23adc0c2d docs: Regenerate data helpers
461b0e066 Merge commit '5cb4e46cfa'
5cb4e46cf Squashed 'docs/' changes from 540aeddc7..41aae7abb
9f5a92078 Add Hugo Modules
47953148b deps: Tidy
2fc0abd22 Fix livereload for @import case
53da3881d releaser: Remove unused function
ac101aba4 deps: Update xerrors
58a47ccde travis: Ignore errors in go mod download
95b1d3013 deps: Update Chroma
a5604e18b resource/postcss: Change postcss to check for local installation under node_modules/.bin
05d0eddd2 Merge commit '35febb2e2a'
35febb2e2 Squashed 'docs/' changes from 0c3c04fd6..540aeddc7
c624a7799 tpl/collections: Add Merge function
020086cb2 Add org to front matter formats
8524baee1 deps: Update go-org
90b0127f6 Fix typo s/Meny/Menu/
7611078da hugolib: Add testfile to .gitignore
b2a3d4644 tpl/tplimpl: Regenerate templates
88c8a15be Pagination - do not render href if no next item
59c4bc52e Include path to source page in non-relative ref/relref warning
dc1d4a920 hugolib: Add another site benchmark
de7b9475c commands: Remove comma after URL in new site output
d6ca728ff deps: Revert to an older version of Blackfriday
ff10aa522 examples: Update link to prevent redirect
9f258d2b8 examples: Update URLs
31c9c690f releaser: Update Go Releaser and consolidate the 2 configs
e8a716b23 tpl/collections: Fix slice type handling in sort
3e6cb2cb7 hugolib: Fix bundle path when slug is set
8d898ad66 tpl/collections: Unwrap any interface value in sort and where
fad183c4a Refactor Org mode front matter: Introduce '#+KEY[]:' array notation
b6867bf80 Improve Org mode support: Replace goorgeous with go-org
9df57154e deploy: Default --target to the first deployment target
35abce27c Add safety barrier between concatenated javascript resources
8914fe7ed Update CLI doc for "long" form
b0f536fb2 Drop dashes in http header matcher attributes; other changes from code review
1384d77a0 docs: Add documentation for "hugo deploy"
5e83f4256 deploy: remove TODO comment about subfolders; handled by GoCDK blob URLs
b376b2685 deps: Update gocloud.dev to v0.15.0.
fb007e9ae tpl/collections: Convert numeric values to float64 and compare them
4c560020b resources: Return nil when not found in resources.Get
d44d3ea89 deps: Update Viper
d1cf53f5f Remove references to Google+
811ee996a Update gitmap to get CommitDate field
4f61a926f Merge commit 'be04ece859'
be04ece85 Squashed 'docs/' changes from 50c02516c..0c3c04fd6
5b4b8bb3c commands: Create new 'hugo list all' command
2278b0eb0 Medium -> Hugo exporting tool
41974303f dockerfile:  Switch base image for final build
6b3f1a100 Merge branch 'release-0.55.6'
fa8e334da releaser: Prepare repository for 0.56.0-DEV
a5d4c82d2 releaser: Add release notes to /docs for release of 0.55.6
32f4b3833 releaser: Bump versions for release of 0.55.6
9b48c5d6b Release 0.55.6
8a1873a2d releaser: Add release notes draft for 0.55.6
95ce2a40e hugolib: Prevent parallel server rebuilds
e22b3f54c tpl: Fix internal templates usage of safeHTMLAttr
71b8d8b6a Update to Go 1.12.5 and Go 1.11.10
5dc6d0df9 deploy: Add tests; fix Windows
527cf1ab0 deploy: Support configuration of upload order
f4956d9aa deploy: Support invalidating a CloudFront CDN cache
2838d58b1 i18n: Move the package below /langs
f330e869e deploy: compute MD5 by reading if List didn't provide one
f2b5d4de3 Revert docs/config.toml changes
0091b1f89 travis: Use proxy.golang.org
c7165589b Add a "deploy" command
ad5703a91 hugolib: Disable racy test
f94a388ad releaser: Prepare repository for 0.56.0-DEV
a83256b9c releaser: Add release notes to /docs for release of 0.55.5
77ad1336d releaser: Bump versions for release of 0.55.5
e33ed29b7 Release 0.55.5
2fb708d3d releaser: Add release notes draft for 0.55.5
cee181c3a docs: Regenerate docs helper
b1d438ea2 Merge commit 'f147b5c53e'
f147b5c53 Squashed 'docs/' changes from 13097daf2..50c02516c
6b76841b0 output: Fix permalink in sitemap etc. when multiple permalinkable output formats
bcbed4ebd hugolib: Fix PrevInSection/NextInSection for nested sections
009076e5e lazy: Fix concurrent initialization order
1cbb501be Update blackfriday to v1.5.2
66b143a01 tpl/compare: Fix nil compare in eq/ne for interface values
4f93f8c67 tpl: Fix hugo package name and add godocs
f76e50118 tpl: Provide more detailed errors in Where
f84df16fe releaser: Prepare repository for 0.56.0-DEV
579004178 releaser: Add release notes to /docs for release of 0.55.4
f2fbca23a releaser: Bump versions for release of 0.55.4
1707f1a5f Release 0.55.4
211d66797 releaser: Add release notes draft for 0.55.4
33c738116 hugolib: Fix shortcode version=1 logic
69a56420a hugolib: Avoid recloning of shortcode templates
4756ec3cd i18n: Avoid rebuilding the Translations map for every lookup
4c3c51203 commands: Init mem profile at the end
0775c98e6 hugolib: No links for bundled pages
1477fb33c releaser: Prepare repository for 0.56.0-DEV
993b84333 releaser: Add release notes to /docs for release of 0.55.3
a9ee2ab58 releaser: Bump versions for release of 0.55.3
c85b726f8 Release 0.55.3
89cf7a3f4 releaser: Add release notes draft for 0.55.3
75b16e30e docs: Regenerate docs helper
0508ca185 Merge commit 'a0c28c943c'
a0c28c943 Squashed 'docs/' changes from 0f2bf195e..13097daf2
c7dd66bfe Fix links for non-HTML output formats
7aeeb60d7 hugolib: Add some OutputFormats.Get tests
ea529c847 Fix menu URL when multiple permalinkable output formats
6c80acbd5 hugolib: Add some integration tests for in/uniq using Pages
7fbfedf01 tpl/collections: Return error on invalid input in in
06f56fc98 tpl/collections: Make Pages etc. work with the in func
d7a67dcb5 tpl/collections: Make Pages etc. work in uniq
3e421bd47 commands: Replace IsDraft with Draft in list command
102876033 releaser: Prepare repository for 0.56.0-DEV
9d0203488 releaser: Add release notes to /docs for release of 0.55.2
ccfbb63d1 releaser: Bump versions for release of 0.55.2
fcd63a865 Release 0.55.2
7ace59d5b releaser: Add release notes draft for 0.55.2
35f41834e hugolib: Add more tests for Permalinkable
9b17cbb62 hugolib: Fix Pages reinitialization on rebuilds
2957795f5 tpl/tplimpl: Handle late transformation of templates
56550d1e4 hugolib: Fix shortcode namespace issue
7881b0965 hugolib: Fix false WARNINGs in lang prefix check
49d0a8264 hugolib: Fix bundle resource publishing when multiple output formats
b799b12f4 hugolib: Fix panic for unused taxonomy content files
701486728 hugolib: Fix dates for sections with dates in front matter
f2795d4d2 Fix WeightedPages in union etc.
e85c057f9 releaser: Prepare repository for 0.56.0-DEV
223b3c2ee releaser: Add release notes to /docs for release of 0.55.1
7ca15c7dd releaser: Bump versions for release of 0.55.1
adb776b22 Release 0.55.1
5efdd14eb releaser: Add release notes draft for 0.55.1
8d7607aed hugolib: Add a test for parent's resources in shortcode
4d425a86f Fix
9e9a1f92b hugolib: Fix simple menu config
f7375c497 Fix paginator refresh on server change
7966c0b5b Remove the space in `. RelPermalink`
cc98fc8ad Merge commit '8b73644d81'
8b73644d8 Squashed 'docs/' changes from acf70cdd9..0f2bf195e
3b86b4a9f resources/page: Fix .RSSLinke deprecation message
27a8049da tpl/tplimpl: Replace deprecated .GetParam usage
ee4274244 releaser: Prepare repository for 0.56.0-DEV
4333cc77f releaser: Add release notes to /docs for release of 0.55.0
452cdcd7c releaser: Bump versions for release of 0.55.0
05d614e13 Release 0.55.0
018cd0c9d releaser: Add release notes draft for 0.55.0
612a06f06 Misc paginator adjustments
3db4a1cf7 Update to Go 1.12.2 and Go 1.11.7
f34e6172c hugolib: Log warning on relative front matter url with lang
708d4ceeb Adjust rlimit logic
ed65bda3b docs: Add information about summary front matter variable
3a62d5474 hugolib: Consider summary in front matter for .Summary
ebab291c0 resources/page: Regenerate JSON wrapper
75467cd78 resources/page: Add missing GitInfo to Page
d1553b4b0 integrity: Add support for sha384
1d9dde82a hugolib: Fix default date assignment for sections
87b16abd9 Add HUGO_NUMWORKERMULTIPLIER
415ca9673 hugolib: Fix the GOMAXPROCS env get
8559f5c29 Use YAML for the benchmark compare
e2dc432fe hugolib: Fix benchmark for YAML front matter
950295516 hugolib: Buffer the render pages chan
032e6802d deps: Update to imaging v1.6.0
d0d661dff hugolib: Re-work "fast render" logic in the new flow
4494a01b7 metrics: Adjust the howSimilar logic vs strings
e91e222cd resources/page: Implement compare.ProbablyEqer for the core slices
5185fb065 hugolib: Allow relative URLs in front matter
92baa14fd hugolib: Allow page-relative aliases
a55640de8 tpl: Allow the partial template func to return any type
9225db636 releaser: Remove version replacement in docs config
f7ef7d376 releaser: Adjust patch vs images logic
f9d6feca0 hugolib: Fix alias path for AMP and similar
439ab0339 resources: Fix image publish ordering issue
b6a60f718 output: Add missing JSON tag
bfdc44964 docs: Regenerate docshelper data
cc8515f18 deps: Update Chroma
8bfd3a54a hugolib: Add a simple test for jsonify of Site
bb533ca5e docs: Regenerate CLI docs
876e5f67b Merge commit 'c2037f0c9a'
c2037f0c9 Squashed 'docs/' changes from 4f4d1f48c..acf70cdd9
9bc6187b8 hugolib: Do not fall back to site title if not set in content file
10bb614a7 deps: Update Afero
bceda1b28 hugolib: Add a test for home page with no title
4dae52af6 Avoid nilpointer on no File on Page
794d4052b herrors/errors: Improve the "feature not available" error
a7ee9b0bb hugolib: Add String() to fileInfo
91ef9655a resources/page: Re-introduce .Page.Page
b5f39d23b all: Apply staticcheck recommendations
3011f36c2 hugolib: Remove unused slice
d30e84548 Run gofmt -s
597e418cb Make Page an interface
44f5c1c14 List future and expired dates in CSV format
984a73af9 Update to Go 1.12.1 and Go 1.11.6
e54213f52 tpl/tplimpl: Fix mutex unlock
4a2a8afff commands: Fix doLiveReload logic
79d517d86 deps: Update Viper
34c49d788 hugolib: Adjust site benchmark
b9e75afd6 Update to Go 1.12
dfc72d61a Remove Gitter dev chat link
02eaddc2f tpl/tplimpl: Fix template truth logic
bdf47e8da Update Travis config to work for forked builds
75904332f Add skipHTML option to blackfriday config
60c0eb4e8 Update stretchr/testify to 1.3.0.
c154c2f7b Rewrite relative action URLS
075b17ee1 Support Docker args TAGS, WORKDIR, CGO; speed up repetitive builds
b4148cd1d hugolib: Adjust test for Go 1.12
908692fae Support nested keys/fields with missing values with the `where` function
7e4b18c5a commands: Update debouncer version
483cf19d5 common/herrors: Fix args order in strings.TrimPrefix
720104294 tpl: Fix strings.HasPrefix args order
5383fe458 releaser: Prepare repository for 0.55.0-DEV
b1a82c61a releaser: Add release notes to /docs for release of 0.54.0
6fe6b9c17 releaser: Bump versions for release of 0.54.0
52cec0fb2 Release 0.54.0
23e52ea4c releaser: Add release notes draft for 0.54.0
9b619dc02 releaser: Adjust patch logic
fab41f42d common/hugo: Use official semver even for main releases
f27faf9af Squashed 'docs/' changes from 49809a038..4f4d1f48c
c7c66e664 Merge commit 'f27faf9afd'
5e078383a Squashed 'docs/' changes from 785e375f..49809a03
ddc15ed41 Merge commit '5e078383a7'
ddc6d4e30 tpl/data: Adjust tests
6a2bfcbec tpl/data: Prevent getJSON and getCSV fetch failure from aborting build
59d87044a commands: Add test for --configDir
3244cb3b3 Ignore unknown config files in config dir
d9282cf98 Store supported config formats in a variable
c52045bbb Fix some inline shortcode issues
8ed2a1caa Bump to Go 1.11.5
e85961390 Update Afero
2a9060a85 hugolib: Expand TestPageWithEmoji to cover '+', '-' and '_' too
3038464ea Accept hyphen and plus sign in emoji detection
526b5b1c4 Fix OpenGraph image fallback to site params
26f75edb7 Support numeric sort in ByParam
e1a66c734 Fix Params case handling in the new site global
db3c49d04 Make hugo server -t work again
e3cb8e6c7 Add configFile(s) back to the watch list after RENAME event too
55251aa89 Remove historical rssURI config
843fcd19d Use subtests with server_test.go
ce8a09a4c resources: Move resource interfaces into its own package
669ada436 resource: Move resource processors into sub-packages
507451229 Update _index.md
40ffb0484 hugolib: Restore 0.48 slash handling in taxonomies
4bae8b04a Revert " Fix handling of taxonomy terms containing slashes"
0584432b0 Update go.sum
65fa06927 Revert "hugolib: Restore taxonomy term path separation"
9e4f9e0bb tpl: Fix reflect
3f3187de0 cache/namedmemcache: Fix data race
cc351958e Update Chroma
c24f3ae22 Make docshelper run again
214e9745b releaser: Use Git short commit in release binaries
ecc892275 releaser: Bump Goreleaser version
22afe2804 Merge commit '978856e2ad'
978856e2a Squashed 'docs/' changes from bd91d1cfd..785e375f5
843187120 releaser: Prepare repository for 0.54-DEV
8fc339dc2 releaser: Add release notes to /docs for release of 0.53
5236cb8e9 releaser: Bump versions for release of 0.53
a28865cfc release: Fix goreleaser config
cb6c77b81 Release 0.53
be58c7b9c tpl/transform: Include options in cache key
62d031aed docs: Adjust CSV example
ce06bdb16 Rename CSV option from comma to delimiter
2efc1a64c docs: Document transform.Unmarshal
25ddbb09f hugolib: Adjust test
e691c48a5 docs: Regenerate CLI docs
094709e10 tpl/transform: Simplify transform.Unmarshal func
a57446979 Add CSV support to transform.Unmarshal
822dc627a tpl/transform: Add transform.Unmarshal func
43f9df019 Prevent resource publishing for transformed inline resources
102171444 hugolib: Add .Name as a shortcode variable
5a83bf314 Squashed 'docs/' changes from d1cf9adc4..bd91d1cfd
6f069e549 Merge commit '5a83bf314f'
0483299bc hugolib: Improve logic of output path trimming
27b62a546 snap: Revert build-snap to 1.11/stable channel for go
35bfca3b1 commands: Remove the benchmark command
9cd54cab2 Move the emoji parsing to pageparser
a8853f1c5 parser/pageparser: Split the page lexer into some more files
4d93aca27 hugolib: Enable Emoji in site benchmark
f2167de83 parser/pageparser: Add a benchmark
64b6b2907 tpl: Fix case handling in cast params
bb9c2988f Update to Go 1.11.4
c04030b14 releaser: Get ldflags for build date etc. in line for all builds
f7691fe96 transform/urlreplacers: Simplify implementation
efe0b4e5c transform/urlreplacers: Support unquoted URLs in canonifyURLs replacer
d5a0b6bbb hugolib: Remove "double layout" lookup
5178cd13a Fix "failed to create file caches from configuration: file exists" on Windows
9ce0a1fb7 hugolib: Restore taxonomy term path separation
ab9214768 importer: fix jekyll import highlight options
506868170 docs: Regenerate CLI docs
b17a61a60 Merge commit 'eb16165694'
eb1616569 Squashed 'docs/' changes from 37095d540..d1cf9adc4
782947408 Add /config dir support
256418917 resource/image: Fix "always false" condition
c84f506f8 tpl: Add reflect namespace
4b5f74395 minifiers: Fixx CSS2 color code handling
931a13245 tpl/hugo: Use the correct Hugo var
837835885 hugolib: Add .Site.Sites
831d23cb4 Add tpl/site and tpl/hugo
514e18dc2 cache/filecache: Simplify test
b804a7088 cache/filecache: Use OS fs for test
30a7c9ea3 tpl: Add godoc packages comments
834684810 common/collections: Fix defines typo
54ecade02 releaser: Prepare repository for 0.53-DEV
9433cf5a9 releaser: Add release notes to /docs for release of 0.52
3c909eb3f releaser: Bump versions for release of 0.52
724b3e673 Release 0.52
056c75477 releaser: Add release notes draft for 0.52
a9a93d082 hugolib: Fall back to title in ByLinkTitle sort
b09a40333 hugolib: Improve nil handling in IsDescendant and IsAncestor
7540a6283 parser/pageparser: Fix handling of commented out front matter
7e75aeca8 Remove duplicate mapstructure depdendency
e14e0b192 Add dependency list to README
ed698e94c tpl/path: Add tests
89e2716d2 tpl: Regenerate templates
aba2647c1 tpl: Fix whitespace issue
f37c5a256 tpl: Add "param" shortcode
aded0f25f docs: Document inline shortcodes
bc337e6ab Add inline shortcode support
112461fde tpl/collections: Add float64 support to where
94ab125b2 parser/pageparser: Fix when only shortcode and then summary
dcfeed35c commands: Include drafts in convert command
f9b4eb4f3 Handle themes in the new file cache (for images, assets)
e82b2dc8c Fix ignored --config flag with 'new' command
5df2b79dd Fix Permalink for resource, baseURL with path and canonifyURLs set
12742bac7 Add tests for permalink on Resource with baseURL with path
fabf026f4 helpers: Add a comment about file mode for new files
94f0f7e59 cache/filecache: Add a :project placeholder
3c29c5af8 cache/filecache: Add a cache prune func
33502667f cache/filecache: Add a filecache root dir
d3489eba5 cache/filecache: Use time.Duration for maxAge
17d7ecde2 cache/filecache: Split implementation and config into separate files
e4b257288 Update to LibSASS 3.5.5
782dd1585 More spelling corrections
aff9c0916 cache/filecache: Spelling corrections
fdd4a768f Remove appveyor
abeeff132 docs: Document the new file cache
f7aeaa612 Add a consolidated file cache
7d78a2afd Add Windows build config to Travis
5570a6e47 Revert "Add Elasticsearch/bonsai.io to services doc."
c0b3a1af0 Add Elasticsearch/bonsai.io to services doc.
a8cb1b07b tpl: Fix test to pass with gccgo
2900801ac releaser: Prepare repository for 0.52-DEV
f3d519079 releaser: Add release notes to /docs for release of 0.51
1ccc0b79a releaser: Bump versions for release of 0.51
cbed50e22 Release 0.51
05ecd8111 releaser: Add release notes draft for 0.51
e456e34bd docs: Document shortcode error handling
5d14d04ac docs: Document symdiff
ddcb40285 docs: Document complement
3a44920e7 hugolib: Improve error message on duplicate menu items
79a06aa4b tpl/collections: Properly handle pointer types in complement/symdiff
d212f6094 deps: Update minify
488776b64 tpl/collections: Add collections.SymDiff
b8b8436fc hugolib: Fix changing paginators in lazy render
42d8dfc8c tpl/collections: Add collections.Complement
47506d164 commands: Fix spelling
2998fa0cd docs: Re-generate CLI docs
d16a7a33f Fix shortcode directly following a shortcode delimiter
5b1edd281 commands: Add --minify to hugo server
2bd9d9099 commands: Fix recently broken error template
4b7d3e57a Make WARN the new default log log level
4f3c09596 Revert "tpl: Update Jsonify to return pretty-print output"
486bc46a5 docs: Regenerate the docs helper
61f210dd7 tpl: Fix the docshelper
f8446188d Skip watcher event files if matched in ignoreFiles
d523aa4bb deps: Update Chroma
b8725f518 Fix ANSI character output regression on Windows
0bc4b0246 hugolib: Remove deprecated useModTimeAsFallback
faeb55c1d hugolib: Bump to ERROR for the deprecated Pages.Sort
6c6a6c87e hugolib: Deprecate .Site.Ref and .Site.RelRef
1d18eb057 Add file (line/col) info to ref/relref errors
33a7b36fd hugolib: Add .Position to shortcode
6180c85fb hugolib: Fix REF_NOT_FOUND logging to include page path
d3a98325c common/loggers: Improve log color regexp
b2a676f5f hugolib: Fix broken manual summary handling
3a786a248 tpl: Fix BOM issue in templates
729593c84 hugolib: Fix deadlock when content building times out
e65268f2c Correct minor typo (#5372)
f863b6a07 releaser: Prepare repository for 0.51-DEV
f5be59920 releaser: Add release notes to /docs for release of 0.50
b14c11b0e releaser: Bump versions for release of 0.50
0addb2add Release 0.50
8bba85601 releaser: Add release notes draft for 0.50
7082a5d14 Update go.sum
aa281b513 mod: Update minify
325019872 docs: Regenerate CLI docs
d6a4af701 Squashed 'docs/' changes from 084804447..37095d540
27569275b Merge commit 'd6a4af7018'
4b2738d87 Merge commit '74309fe569'
74309fe56 Squashed 'docs/' changes from e5e98b950..084804447
9c88a8a55 common/loggers: Make sure the global logger also gets colored labels
95e72f5e8 i18n: Avoid using the global logger
1c7b7b4ef common/loggers: Add color to ERROR and WARN
1ad117cbe common/herrors: Make the file error log format configurable
dac7092a9 common/collections: Allow a mix of slice types in append/Scratch.Add
b27ccf34b resource: Allow .Data.Integrity to be accessed on its own
286d0b7dc Revert "mod: Update minify"
83c873ff3 mod: Update minify
a2440dc0e mod: Update cast
1e9ac3dcc commands: Truncate the error log on repeated config errors
40e99672b docs: Regenerate CLI docs
3a3badfd1 resource: Serialize image processing
df021317a commands: Only show Ansi escape codes if in a terminal
78578632f Fix archetype handling of directories in theme
6b78b3810 Revert "commands: Read disableFastRender from flag even if it's not changed"
78a4c2e32 commands: Read disableFastRender from flag even if it's not changed
d4ebfea1f comamnds: Use overflow-x: auto; for browser errors
93aa6261b common/loggers: Remove the ANSI color for the browser error version
acc14b464 hugolib: Adjust error test to make it pass on Go tip
2d7709d15 tpl: Handle truncated identifiers in Go template errors
deff9e154 Add some color to the relevant filenames in terminal log
889aca054 Run gofmt -s
e3ed4a83b hugolib: Rename some page_* files
6636cf1be Resolve error handling/parser related TODOs
f669ef6be herrors: Improve handling of JSON errors
ed7b3e261 commands, hugolib: Get file context in "config parse failed" errors
2bf686ee2 hugolib: Improve errors in /i18n handlling
9f74dc2a5 hugolib: Improve errors in /data handlling
d1661b823 hugolib: Continue the file context/line number errors work
7930d2132 hugolib: Remove the now superflous Source struct
eb038cfa0 Convert the rest to new page parser code paths
129c27ee6 parser/metadecoders: Consolidate the metadata decoders
44da60d86 hugolib: Redo the summary delimiter logic
1e3e34002 hugolib: Integrate new page parser
1b7ecfc2e hugolib: Use []byte in shortcode parsing
27f5a906a parser/pageparser: Use []byte in page lexer
2fdc4a24d parser/pageparser: Add front matter etc. support
f6863e1ef parser/pageparser: File renames and splitting
d6c16afde Move the shortcode parser to the new pageparser package
6f3716dc2 commands: Avoid panic in error handler on config errors
5a52cd5f9 tpl: Update Jsonify to return pretty-print output
4a366fcfe Prevent stale content in Fast Render Mode
083311d03 hugolib: Fix test on Windows
0fe4ff187 tpl: Improve the Execute panic error message
1f42e47e4 Allow date and slug from filename for leaf bundles
35fbfb19a commands: Show server error info in browser
3a3089121 Simple doc fix in CONTRIBUTING.md
c21e5179c tpl: Use .Lastmod in embedded schema template
a205f24ba Revert "commands: Add .gitignore "hugo new site""
92979d928 commands: Add .gitignore "hugo new site"
0a3340e95 resource: Optimize integrity string generation
6b21ac3e6 commands: Add help text to "hugo new"
d14420539 snap: Set "extended" tag based on build_url on Launchpad
3d4a9882b helpers: Call rst2html directly on *nix
bdca97279 Update URLs to stop 301 redirects
604ddb90c Merge branch 'release-0.49.2'
b09e495a7 releaser: Prepare repository for 0.50-DEV
42cde6666 releaser: Add release notes to /docs for release of 0.49.2
ad60948c4 releaser: Bump versions for release of 0.49.2
c397f2c08 Release 0.49.2
b9e18e20c releaser: Add release notes draft for 0.49.2
2159d77f3 common/collections: Fix type checking in Append
535755e4f common/collections: Fix type checking in Append
3583dd6d7 Merge branch 'release-0.49.1'
e5b4cb241 releaser: Prepare repository for 0.50-DEV
821adf3ae releaser: Add release notes to /docs for release of 0.49.1
8ba9a2736 releaser: Bump versions for release of 0.49.1
235acf223 Relase 0.49.1
ac0fac934 releaser: Add release notes draft for 0.49.1
23f48c300 common/maps: Improve append in Scratch
e2201ef15 tpl/collections: Fix handling of different interface types in Slice
b5e17f7c8 Add GOPATH Hugo building tip
31a8bb8c0 common/maps: Improve append in Scratch
8e825ddf5 Revert "tpl: Fix baseof.html in error message"
646a52a5c tpl: Fix baseof.html in error message
e421696d0 helpers: Consolidate MakeSegment vs MakePathSanitized
4b4af2c52 hugolib: Use stdlib context package
fae48d745 hugolib: Normalize permalink path segments
06d28a464 hugolib: Fix FuzzyWordCount test error message
681817030 Render Markdown in figure shortcode "caption" and "attr" params
c5279064d Re-organize the figure shortcode for better readability
152cffb13 Update README & CONTRIBUTING
0d5110d03 tpl: Cast IsSet key to int for indexed types
d3b81ee58 hugolib: Improve error message for bad taxonomy weights
1fd30d462 hugolib: Cast taxonomy weight parameters to int
498d62995 hugolib: Allow nil to be unwrapped as *Page
10ac2ec44 tpl/collections: Fix handling of different interface types in Slice
ce264b936 tpl: Add a delimiter parameter to lang.NumFmt
91f49c070 snap: Add custom x-nodejs plugin to support ppc64el and s390x
a475bf125 snap: Fetch mage with GO111MODULE=off
f1dede370 snap: Revert 'Skip "mage -v test" due to build failure on Launchpad'
fa873a6cb snap: Use build-snaps instead of building go from source
fb732d532 hugolib: Be a litle more specific in NextPage TODO
ad705aac0 hugolib: Introduce Page.NextPage and Page.PrevPage
52ac85fbc snap: Skip "mage -v test" due to build failure on Launchpad
048a64be1 releaser: Update path to snap/snapcraft.yaml
3033a9a37 snap: Fix go plugin build failure by renaming go.mod
27d421118 snap: Move snapcraft.yaml to snap/snapcraft.yaml
4730a78a7 snapcraft: Try installing postcss again
b7706d6ae snapcraft: Set GO111MODULE=on in override-build script
48413d76f build: Update the temp docker script
66b9e2bff releaser: Prepare repository for 0.50-DEV
398996e8b releaser: Add release notes to /docs for release of 0.49
7f005f5e9 releaser: Bump versions for release of 0.49
011e3aaa9 Release 0.49
369744845 docs: Document directory based archetypes
2638b04c6 releaser: Add release notes draft for 0.49
cf47f43ff ci: Add "go mod download" to CI scripts
3b6bd1210 docs: Regenerate CLI docs
8388cd90e docs: Document group
807c55192 Squashed 'docs/' changes from 6b00298bb..e5e98b950
bc57f5c36 Merge commit '807c551922'
fe6a6f273 resource/integrity: Make Data.Integrity be of type template.HTMLAttr
2650fa772 Add directory based archetypes
ef525b15d Build on CircleCI outside of GOPATH
f91681469 Prevent symbolic links from themes
cae07ce84 tpl/collections: Allow first function to return an empty slice
4f9c109dc tpl/opengraph: Use safeHTMLAttr instead of safeHTML for HTML attributes
f1a00b206 hugolib: Remove deprecated rssURI
df4cbbd3b commands: Remove deprecated flags
2e2e34a93 hugolib: Deprecate Pages.Sort
2eed35c82 hugolib: Minor cleaning in the sorting code
dd692c710 hugolib: Clear the page cache per render
ed4f1edbd hugolib: Compare every element in pages cache
058cc6c2c Revert "hugolib: Normalize permalink path segments"
4b82f7484 Update releasenotes_writer.go
06976ebb8 hugolib: Normalize permalink path segments
555a5612b hugolib: Do not set RSS as Kind in RSS output
75e54345f hugolib: Make sure ambiguous lookups in GetPage gets an error
df50c108b docs: Add docs for append
e27fd4c1b tpl/collections: Add collections.Append
b7ca3e1b3 Merge commit '13e64d7276'
13e64d727 Squashed 'docs/' changes from 9b494a58c..6b00298bb
9b26b5487 minifiers: Set minifier to KeepEndTags
3dafe206e minifiers: Make JSON minification more generic
37d646347 Update Mage
43d446522 tpl/data: Revise error handling in getJSON and getCSV
4f72e7912 tpl: Show error on union or intersect of uncomparable types
fe6676c77 tpl/collections: Improve type handling in collections.Slice
7a97d3e6b tpl/collections: Allow pointer receiver in Group
6667c6d74 tpl/collections: Add group template func
cfda13b36 hugolib: Allow creating page groups from any page collection
bb2fe814c Update dependencies
e5d66074c tpl/strings: Add strings.FirstUpper
d970327d7 hugofs: Fix filepath issue in test
0013bea90 resource: Fix golint issues
30bc4ed0a Improve some godoc comments
f6f22ad94 tpl: Fix golint godoc issues
400fe96ae media: Fix golint issues
3f45e729f output: Fix golint godoc issues
ffaa73dc8 publisher: Fix golint godoc issue
f8d8c8542 langs: Fix golint godoc issue
10dc87bf8 i18n: Fix golint issue
7231869ba related: Fix golint issues
ccd328548 releaser: Fix golint issues
600047ff1 source: Fix golint godoc issues
5f2e1cb89 hugofs: Fix golint issues
c8ce65046 helpers: Fix golint issues
a53f96231 deps: Fix most golint issues
daffeec30 config: Fix golint issues
b8b91f550 common: Fix golint errors
f0effac80 commands: Fix golint issues
be3ae3ec9 hugolib: Do not FirstUpper taxonomy titles
2cf8fe2ea Fix broken Travis config
3b103cb7b Update to latest Mage
0cc936583 resource: Fix broken build
c15c7da42 resource: Remove some duplicate code
bcbe57c6e Update Dockerfile to Go 1.11
e38e88124 hugolib: Simplify some code
0665a3951 hugolib: Add missing error checks
1ed8c3633 hugolib: Remove extraneous createStaticFs call
e03eb90a3 hugolib: Fix godoc comment
c915d0d32 hugolib: Fix typo in private func name
47d4edce6 Fix error message for go vet
ea8ef573c mage: Init packages once
293e12355 appveyor: Update script to Go 1.11
fdf3c3b82 build: Remove the remains of Go Dep
312d2252b Update CONTRIBUTING.md
f627903ef Update README.md
a2f0f9d47 snapcraft: Update to work with Go Modules
1ff54ab3d releaser: Prepare repository for 0.49-DEV
456f5476c releaser: Add release notes to /docs for release of 0.48
09811d0be releaser: Bump versions for release of 0.48
d351ac2e6 Release 0.48
59f57900a releaser: Add release notes draft for 0.48
59cdad325 release: Fix CircleCI script
6022f219f hugolib: Only run variable variable overwrite test on Go 1.11
0c8a41548 hugolib: Add a test for template variable overwrite
f4675fa0f helpers: Fix permissions when creating new folders
ebb56e8bd Improve minifier MIME type resolution
6b9934a26 circleci: Update to Go 1.11
c7f057797 travis: Set GO111MODULE=on for mage install
08d14113b resource: Add instruction to install PostCSS when missing
94d6d6780 Update snapcraft build config to Go 1.11
45c9c45d1 Use Go 1.11 modules with Mage
fce32c07f Add go.mod
d32ff16fd Update Travis to Go 1.11 and Go 1.10.4
e6eda2a37 minfiers: Keep end tags
66f688f71 snap: Skip installing postcss due to failure on build server
2c934be8a snap: Refactor, fix bin/node, and add bin/postcss
94d0e79d3 hugolib: Include language code in REF_NOT_FOUND errors
b9a503feb tpl/tplimpl: Make the autogenerated templates collapsed in PRs
fff132537  Fix handling of taxonomy terms containing slashes
8999de193 Fix build on armv7
a81c64e43 releaser: Prepare repository for 0.48-DEV
7ef509625 releaser: Add release notes to /docs for release of 0.47.1
16b691a87 releaser: Bump versions for release of 0.47.1
aefd9a80a Release 0.47.1
57ace857a releaser: Add release notes draft for 0.47.1
fdff0d3af tpl/tplimpl: Fix .Site.Params case regression
834617f9f snap: Remove unused files from Git, Perl, etc.
ef20ec1fb snap: Add nodejs to allow PostCSS to work
5a0ee2b93 minifiers: Do not strip IE conditional statements
674682668 releaser: Prepare repository for 0.48-DEV
caf608d56 releaser: Add release notes to /docs for release of 0.47
6711dacde releaser: Bump versions for release of 0.47
de2329348 releaser: Work around a Goreleaser bug
918177ac2 Release  0.47
83a980d29 releaser: Add release notes draft for 0.47
4a16b5f4b docs: Regenerate CLI docs
a95896878 Squashed 'docs/' changes from d88477eb3..9b494a58c
873f8805c Merge commit 'a95896878f'
374387577 tpl/tplimpl: Fix compiling Amber templates that import other templates
baa62d0ab hugolib: Adjust tests for shortcode p-issue
78c99463f hugolib: Fix shortcode output wrapped in p
abc54080e Add configFile(s) back to the watch list after REMOVE event
a655e00d7 commands: Gracefully handle typos in server config when running the server
9d973004f hugolib: Fix image cache-clearing for sub-languages
224754601 hugolib: Force render of any changed page, even in Fast Render Mode
d139a037d hugoblib: Fix "adding a bundle" in server mode
0a88741fe hugolib: Fix error when deleting a bundle in server mode
d999b4e82 Revert "releaser: Revert to the old versions of the release pipeline"
20148345a releaser: Fix goreleaser config
e5052f4e0 commands: Include theme name in version mismatch error
c81fbf462 minifiers: Make the JS minifier matcher less specific
a6f199f7a hugolib: Use the interface value when doing Related search
0dd06bdac hugolib: Fix Related when called from shortcode
5c5384916 tpl/tplimpl: Reimplement the ".Params tolower" template transformer
56c61559b Only duplicate resource output in multihost mode
78f8475a0 Fix Resource output in multihost setups
c09ee78fd tpl: Suppress blank lines from opengraph internal template
f6ae436c5 publisher: Close file when done
2182ecfd3 hugolib: Fix GitInfo when multiple content dirs
e85833d86 hugolib: Add multiple content dirs to GitInfo test site
43a5aaa77 Fix broken tests
1639fd20d Merge commit '3a44bf182f'
3a44bf182 Squashed 'docs/' changes from 81847981f..d88477eb3
c2a674139 readme: https links to 3rd party sites
06bd01364 Update alias.go
755d1ffe7 tpl/tmplimpl: Add MIME type to embedded JS
fb3cb05cc resource: Remove test debug
d07882dfb Update dependencies
7f5356717 Update Chroma
789ef8c63 Add support for minification of final output
71931b30b Remove alias of os.Stat
d40116e5f Renmae FileStat Stat
c362634b7 Fix typo
d71120852 Add fileStat to tpl/os/os
a6b1eb1e9 transform: Reduce allocation in the benchmark itself
27110133f transform: Simplify the 0 transformer case
31faf98ce releaser: Prepare repository for 0.47-DEV
f14d77384 releaser: Add release notes to /docs for release of 0.46
3aa838cf2 releaser: Bump versions for release of 0.46
a3a26597c Release 0.46
92d776b0d releaser: Add release notes draft for 0.46
e6dd54943 Merge commit '766085c2dc'
766085c2d Squashed 'docs/' changes from a4fa0d1d6..81847981f
b5d13ca16 Update Chroma
6b02f5c0f Make resources fetched via resources.Get and similar language agnostic
88e447c44 tocss/scss: Improve _ prefix handling in SCSS imports
b718d743b Fix file paths for uncached transformed images
0ba19c57f tpl/partials: Add templates.Exists
0afa2897a tpl/partials: Remove superflous loop
f219ac09f tocss/scss: Improve SCSS project vs themes import resolution
786f72302 Fix image cache eviction for sites with subdir in baseURL
0cae1cf82 releaser: Prepare repository for 0.46-DEV
3b18042ee releaser: Add release notes to /docs for release of 0.45.1
e38843f4b releaser: Bump versions for release of 0.45.1
87f0dc14a Release 0.45.1
b7d9ab136 releaser: Add release notes draft for 0.45.1
04d4c08db hugolib: Fix .Site.GetPage regression
016dd4a69 Add Page.FirstSection
c6b599a06 hugolib: Fix "borrow content from another language" issue
3a6784b16 releaser: Prepare repository for 0.46-DEV
48d7a641d releaser: Add release notes to /docs for release of 0.45
2c5a036de releaser: Bump versions for release of 0.45
592c5b307 Update release notes 0.45
a0c4a3660 releaser: Add release notes draft for 0.45
062510cf1 Get rid of the utils package
4e1d0cd9f Update hugo_windows.go
a451c49fd hugolib: Print a WARNING about relative non-relative ref/relref matches
ff16c42ed hugolib: Allow untyped nil to be merged in lang.Merge
166483fe1 resource/scss: Add IncludePaths config option
f01505c91 resource/scss: Fix source maps on Windows
8278384b9 Increase refLinker test coverage
65e610e16 hugolib: Avoid nilpointer in absoluteSourceRef
b56d9a129 Fix typo-logic bug in GetPage
d6fde8fa1 Enable test case fixed by commit 501543d4
2bac37154 Add test coverage for recent ref overhaul
9b4b97a72 hugolib: Create an adapter from old to new getPage
501543d4b hugolib: Only do page-relative getPage for relative paths
6ffa88234 hugolib: Improve error handling in refLink
1eb8b36b3 docs: Update ref, relref, GetPage docs
00c74ee7f docs: Document refLinksErrorLevel and refLinksNotFoundURL
e25aa655f Add configurable ref/relref error handling and notFoundURL
12679b408 hugolib: Mark shortcode changes as content changes in server mode
c39ac5738 Revert "hugolib: Fix potential server panic with drafts/future enabled"
a3535c848 Squashed 'docs/' changes from cfe89ecbc..a4fa0d1d6
9da617912 Merge commit 'a3535c8486'
1ab4658c0 hugolib: Fix potential server panic with drafts/future enabled
75acff5f2 hugolib: Avoid server panic on TOML mistake in i18n
5c9d5413a hugolib/filesystems: Fix theme config for Work Fs
59ebc83d7 Merge commit 'b6b37a1f00'
b6b37a1f0 Squashed 'docs/' changes from f59b3ab06..cfe89ecbc
ebe4d39f1 resource/postcss: Try node_modules/postcss-cli/bin/postcss first
1b0aeeaaf commands: Disable flaky server tests on Windows CI
a4c513cae commands: Increase sleep in server teset to make it less shaky on Windows
d741064be Add optional lang as argument to rel/relref
3eb313fef Simplify .Site.GetPage etc.
b93417aa1 Unify page lookups
fd1f4a786 Fix addkit link to account for i18n
4c240800a resource/bundler: Improve error message
38204c4ab hugolib: Only set 'allThemes' if there are themes in the config file
2f2bc7ff7 resource/integrity: Remove unused code
242b297f5 releaser: Remove flag on Windows build
f44c9ab9c releaser: Prepare repository for 0.45-DEV
9f9695cf7 releaser: Add release notes to /docs for release of 0.44
0831d8cca releaser: Bump versions for release of 0.44
1d4ff024c Finish release notes 0.44
521e63ac7 releaser: Add release notes draft for 0.44
47d38628e resource: Clean up the in-memory Resource reader usage
0024dcfe3 resource: Move opening of the transformed resources after cache check
beec1fc98 resource: Fix resources.Concat for transformed resources
306573def Improve type support in resources.Concat
80c8f3b81 hugolib: Fix static filesystem for themed multihost sites
6b6dcb44a Flush partialCached cache on rebuilds
d96f2a460 resource: Include the transformation step in the error message
ac5303503 media: Only show deprecation warning when needed
b874a1ba7 media: Allow multiple file suffixes per media type
410870593 hugolib: Remove empty resources/ dir after TestNewSiteDefaultLang
9c1e82085 .gitattributes: Exclude *.svg from CRLF/LF conversion
2b73e89d6 tpl: Set permission of embedded templates to 0644
febf0aec8 Build a fully static Windows extended binary
a4fad5be6 Adjust release notes
6084f0433 releaser: Prepare repository for 0.44-DEV
cbb7214b6 releaser: Add release notes to /docs for release of 0.43
e6136b36f releaser: Bump versions for release of 0.43
659917a00 releaser: Revert to the old versions of the release pipeline
9d194ab90 releaser: Add release for 0.43
a305609e1 snap: Migrate from deprecated keywords to "override-build"
179de5f5b Revert "Consider root and current section's content type if set in front matter"
5dc1f95b6 Revert "Restrict the new type layout resolution to page and section kinds"
6bc892fc2 Revert "output: gofmt -l -w output/layout.go"
5f06dbf77 Revert "snap: Build both hugo and hugo.extended for 0.43"
0850e9798 Revert "Revert "Add Goreleaser extended config""
a3b4b10f6 Revert "Add Goreleaser extended config"
e3df6478f Bump CircleCI image
626afc982 Add Goreleaser extended config
e1027c584 snap: Build both hugo and hugo.extended for 0.43
e1a052ecb fix: nfpm replacements
bfc3488b8 Add temporary build script
ce84b524f Add "extended" to "hugo version"
3cea2932e Fix typos
0efd37480 Merge commit '98293eaa15'
98293eaa1 Squashed 'docs/' changes from 501c6e233..f59b3ab06
2b8d907ab Add a newScratch template func
43338c3a9 hugolib: Do not create paginator pages for the other output formats
dea71670c Add Hugo Piper with SCSS support and much more
a5d0a57e6 output: Fix the shortcodes/partials vs base template detection
f465571b3 output: gofmt -l -w output/layout.go
f8212d200 tpl/collections: Return en empty slice in after instead of error
78e8a744b Restrict the new type layout resolution to page and section kinds
c790029e1 Consider root and current section's content type if set in front matter
554553c09 circleci: Update docker image
de37455ec hugolib: Allow forward slash in shortcode names
282f6035e Merge branch 'release-0.42.2'
360fa1221 releaser: Prepare repository for 0.43-DEV
02aa32003 releaser: Add release notes to /docs for release of 0.42.2
d2640fbc1 releaser: Bump versions for release of 0.42.2
1637d12e3 Release 0.42.2
3a7706b06 commands: Fix broken server-reload on config changes
2955f93fc commands: Fix broken server-reload on config changes
1f0c4e1fb Update GoReleaser config
91ab455d8 tpl: Remove some "debug info"
ca1e46efb tpl: Update internal pagination template to support Bootstrap 4
fd71fa89b Create missing head.html partial on new theme generation
b5a3aa708 Add html doctype to baseof.html template for new themes
3d5928889 Revert "tpl: Support text/template/parse API change in go1.11"
dc7bc7b4d appveyor: Disable asciidoctor for now
42ed60258 hugolib: Replace deprecated {Get,}ByPrefix with {Get,}Match
6a2968fd5 Adds .gitattributes to force Go files to LF
23d5fc82e Update to Go 1.9.7 and Go 1.10.3
8531ec7ca Update Dockerfile to a multi-stage build
9f27091e1 tpl: Support text/template/parse API change in go1.11
187621ae2 releaser: Prepare repository for 0.43-DEV
4172a835e releaser: Add release notes to /docs for release of 0.42.1
fc9738896 releaser: Bump versions for release of 0.42.1
d67e843c1 Release 0.42.1
6e33c557b releaser: Add release notes draft for 0.42.1
128f14efa hugolib: Reset the global pages cache on server rebuilds
34ee27a78 commands: Do not fail server build when /static is missing
0f1fc01ef releaser: Prepare repository for 0.43-DEV
f32ccd018 Merge tag 'v0.42'
ffb609f4a releaser: Add release notes to /docs for release of 0.42
19d91abc9 releaser: Bump versions for release of 0.42
f5c0a2b4b Release 0.42
31828026a releaser: Add release notes draft for 0.42
c74b0f8f9 docs: Update theme documentation
80949dc73 docs: Remove some files now moved
e02629f81 Merge commit 'b239595af5'
b239595af Squashed 'docs/' changes from 0fd7b4169..501c6e233
ed4a345ef commands: Create LICENSE rather than LICENSE.md in "new theme"
9717ac7dc commands: Create _default/baseof.html in "new theme"
692ec0087 commands: Make "new theme" feedback more intuitive
d3dd74fd6 commands: Move nextStepsText() to new_site.go
80230f26a Add support for theme composition and inheritance
6464981ad hugolib: Make sure that .Site.Taxonomies is always set on rebuilds
2e6712e28 tpl: Always load GA script over HTTPS
65deb72dc tplimpl: Remove speakerdeck shortcode
dc4226a8b hugolib: Reset Page's main output on server rebuilds
bf5f10faa Reset the "distinct error logger" on rebuilds
019bd5576 tpl/strings: strings.RuneCount
c3115292a tpl: Prevent isBaseTemplate() from matching "baseof" in dir
0c6c98e40 tpl/strings: Remove overflow check in strings.Repeat
90c774908 tpl/strings: Adjust the overflow validation in strings.Repeat
13435a6f6 tpl: Add strings.Repeat
07b96d16e Fixes #4798
ceaff7caf tpl: Remove frameborder attr YT iframe + CSS fixes
b84389c5e Fix vimeo_simple thumb scaling
8de532447 Add vimeo_simple
20cbc2c78 Add a BlackFriday option for rel="noreferrer" on external links
2174525ce hugolib: A little more on shortcode ordinal
7a6192647 Add a BlackFriday option for rel="nofollow" on external links
d68367cbe fix typo instagram_simple
5241f0bae releaser: Prepare repository for 0.42-DEV
b5b36e320 dep: Update Chroma
4f0665f47 Enhance Page and Resource String()
fc8c5ad82 Merge tag 'v0.41'
171caf28a releaser: Add release notes to /docs for release of 0.41
0e77f5d4e releaser: Bump versions for release of 0.41
9e7e322de Release 0.41
06827398f releaser: Add release notes draft for 0.41
cfc5096e8 releaser: Put release notes below /en
ab02594e0 create: Provide the correct .Site object to archetype templates
c71f201fd docs: Document the GDPR Privacy Config
4ed1228d5 Fix GA anonymizeIp order
a51945ea4 Add no-cookie variants of the Google Analytics templates
7b9dbef41 Merge commit 'd2b1030060'
d2b103006 Squashed 'docs/' changes from e161ea09d..0fd7b4169
0bf0e1972 tpl: Remove the shortcode assets for now
1f244b802 tpl: Adjust instagram_simple margins
448081b84 Remove youtube_simple for now
1f1d955b5 Add anonymizeIP to GA privacy config
ffcf26e68 Fix broken test
9753cb59f Support DNT in Twitter shortcode for GDPR
3bfe8f4be tpl: Alias tweet shortode to twitter
6aa2c3850 Regenerate embedded templates
6d69dac9d Fix youtube_simple thumb scaling
9ad46a203 Add instagram_simple shortcode
4256de339 deps: Go fmt
bed7a0faf Remove the id from youtube_simple
35ccf06da Fix some recently broken embedded templates
4ddcf52cc Add an unified .Site.Config with a services section
353148c2b Move the privacy config into a parent
568b4335c commands: Avoid ANSI character output on Windows
14705ecea tpl: Add another class and an id to youtube_simple
69ee6b41e Make the simple mode YouTube links schemaless
88e356868 Add YouTube shortcode simple mode
2f17f9378 Do not return error on .Get "class" and vice versa in shortcodes
0a7027e2a Create SUPPORT.md
5f24a2c04 Add PrivacyEnhanced mode for YouTube to the GDPR Policy
710142016 Add RespectDoNotTrack to GDPR privacy policy for Google Analytics
f45b522eb tpl/tplimpl: Adjust GA templates
678920734 tpl/tplimpl/embedded: Wrap the relevant templates with the privacy policy disable check
0bbdef986 config: Add the foundation for GDPR privacy configuration
9bd4236e1 Show site build warning in TestPageBundlerSiteRegular
4eedb377b commands: Do not show empty BuildDate in version
b2b500f56 hugolib: Use double quotes instead of back quotes
2fb9af59c Improve markup determination logic
00e36a416 Merge branch 'release-0.40.3'
bfb774490 releaser: Prepare repository for 0.41-DEV
ecae2106b releaser: Add release notes to /docs for release of 0.40.3
315a73c9f releaser: Bump versions for release of 0.40.3
46dc006f1 Release 0.40.3
d089e9d45 releaser: Add release notes draft for 0.40.3
90d0d8309 hugolib: Fix possible .Content cut
086ae81a9 hugolib: Fix possible .Content cut
c2bb62d63 tpl/tplimpl: Move README one level up
34ad9a4f1 tpl/tplimpl: Extract internal templates
914cc85e2 Merge commit '83bef6955e'
83bef6955 Squashed 'docs/' changes from 896bad9f4..e161ea09d
a6816db77 Fix typo
b6ededf05 Update CONTRIBUTING.md
8b03c51ea releaser: Prepare repository for 0.41-DEV
5a9d1324d releaser: Add release notes to /docs for release of 0.40.2
f1269a6d0 releaser: Bump versions for release of 0.40.2
669b3d3a9 Release 0.40.2
317d81ec4 releaser: Add release notes draft for 0.40.2
655983a22 Reset .Page.Scratch on live-reload
001a28c2f Fix .WordCount, .FuzzyWordCount, .ReadingTime when summary marker is set
391f59f99 releaser: Prepare repository for 0.41-DEV
459935b29 releaser: Add release notes to /docs for release of 0.40.1
b5dafb0f2 releaser: Bump versions for release of 0.40.1
88cb2697e Release 0.40.1
6fb2d30d2 releaser: Add release notes draft for 0.40.1
288c39643 hugolib: Fix some shortcode vs .Content corner cases
44e47478d releaser: Prepare repository for 0.41-DEV
c7e59367d releaser: Add release notes to /docs for release of 0.40
3aed26837 releaser: Bump versions for release of 0.40
7ef118392 Release 0.40
2e77cc07a releaser: Add release notes draft for 0.40
402f6788e hugolib: Add .Page.BundleType
3decf4a32 hugolib: Add zero-based Ordinal to shortcode
24c662ce6 hugolib: Defer the unlock in orderedMap.Add
a215abf70 Squashed 'docs/' changes from 76e881257..896bad9f4
474bad34c Merge commit 'a215abf70e'
85535084d hugolib: Process and render shortcodes in their order of appearance
19084eaf7 hugolib: Init the content and shortcodes early
47e7788b3 tpl/path: Add path.Ext, path.Dir and path.Base
51af1d2ea tpl/os: Make fileExist use the same filesystem as readFile
1b9dc52ef Merge commit 'd2ec1a06df'
d2ec1a06d Squashed 'docs/' changes from f9a5dc59b..76e881257
4d26ab33d Make .Content (almost) always available in shortcodes
d6a2024e6 Revert "Improve .Content vs shortcodes"
d6982ac0a Revert "hugolib: Prepare child page resources before the page itself"
3238e14fd hugolib: Prepare child page resources before the page itself
47c05c47e Add language merge support for Pages in resource.Resources
e590cc26e Improve .Content vs shortcodes
74520d2cf Improve .Get docs
e2b277bba Update missing positional parameter test for .Get
236f0c840 .Get doesn't crash on missing positional param fixes #4619
cd6a26124 .Get function: fix syntax signature
d681ea55a Improve error message in metadata parse
a96ad5c21 hugolib: Fix broken test
159bed34c parser: Add some context to front matter parse error
5cc944ffd Updated GetCSV error message (#4636)
89d2cf49a releaser: Prepare repository for 0.40-DEV
933a16b10 releaser: Add release notes to /docs for release of 0.39
60845a5a0 releaser: Bump versions for release of 0.39
9a39146ed releaser: Fix LICENSE vs LICENSE.md
1a6a0fa6f Release 0.39
936fc76ad releaser: Add release notes draft for 0.39
f21b827f7 commands: Re-add the missing releaser command
7c597c7d7 Merge commit '047c4188df'
047c4188d Squashed 'docs/' changes from d9c8fc220..f9a5dc59b
e136c26d0 Remove old LICENSE.md
dd4827749 Add a GitHub compatible Apache 2 license text
4dba6ce15 tpl/urls: Add anchorize template func
880ca19f2 tpl/path: Add path.Join
01b72eb59 tpl: Add path.Split template func
61d52f146 hugolib: Do not reset .Page.Scratch on rebuilds
0e7716a42 resource: Implement Resource.Content
417c5e2b6 Make Page.Content a method that returns interface{}
94c8b29c3 source: Remove deprecated File.Bytes
1b4e0c416 commands: Remove accidental and breaking space in baseURL flag
27a524b09 commands: Properly handle CLI slice arguments
bede93de0 commands: Correctly handle destination and i18n-warnings
2aab6dee8 commands: Fix handling of persistent CLI flags
f3775877c hugolib: Fix livereload of bundled pages
9c782d514 commands: Fix failing Travis server test
14c35c8a5 Allow "*/" inside commented out shortcodes
96689a5c3 commands: Make commands.Execute return a Response object
e7010c1b6 commands: Remove some TODOs
f396cffa2 commands: Fix the config command
24d5c2194 commands: Fix some flag diff
a7d00fc39 commands: Add basic server test
1e233b1c4 commands: Fix TestFixURL
b110d0ae0 commands: Remove the Hugo global
73825cfc1 commands: Make the limit command work again
a8f7fbbb1 commands: Move the commands related logic to its own file
e8d6ca953 commands: Add CLI tests
4d32f2fa8 commands: Make the hugo command non-global
018602c46 commands: Extract some common types into its own file
2f0d98a19 commands: Make the server command non-global
e0621d207 commands: Make the gen commands non-global
e26a8b242 commands: Make the list commands non-global
2a2c98386 commands: Make the import commands non-global
15b1e269a comands: Make the config command non-global
56a130804 commands: Make the new commands non-global
4b780ca77 commands: Make convert command non-global
7bc5e89fb commands: Make more commands non-global
fdf1d94eb commands: Make benchmark non-global
1157fef85 commands: Start of flag cleaning
e614d8a57 commands: Use short date format in CLI docs
fca49d6c6 Update README.md
0e8b3cbcd Sync dependencies
230f2b8c4 Bump Go versions
d7f47b780 releaser: Prepare repository for 0.39-DEV
712c0fdfe releaser: Add release notes to /docs for release of 0.38.2
62e758826 releaser: Bump versions for release of 0.38.2
47da0dca5 Release 0.38.2
8d87bfd5e releaser: Add release notes draft for 0.38.2
719251c1a Bump the debouncer dependency
8b2ef83bb Use a versioned debounce dependency
080302eb8 Fix handling of --contentDir etc. flag
094ec1714 travis: Disable shallow clone to fix TestPageWithLastmodFromGitInfo
e84b7ade6 Revert "Disable failing test on Travis"
2817e8424 Fix handling of content files with "." in them
623c9afa8  And now really disable failing test on Travis
2170943ae Disable failing test on Travis
9cd4d3597 Revert "Try an older GitMap version"
3a3261a3b Try an older GitMap version
6792d86ad hugolib: Set .Parent in bundled pages to its owner
e7d87e241 releaser: Prepare repository for 0.39-DEV
c475eab47 releaser: Add release notes to /docs for release of 0.38.1
3a96fa40b releaser: Bump versions for release of 0.38.1
c356f1d41 Release 0.38.1
30c2c2f8e releaser: Add release notes draft for 0.38.1
f87239e4c Fix livereload for the home page bundle
db0633c1a snap: Revert to "mage test" because "mage check" fails
874159b54 snap: Add bash completion
294c0f800 snap: Fix empty BuildDate in "hugo version"
a4deaeff0 Fix some livereload content regressions
4d115c56f Update github.com/bep/gitmap to fix snap build
26f34fd59 Fix two tests that are broken on Windows
730b66b65 commands: Handle mass content etc. edits in server mode
4f639d6bd releaser: Prepare repository for 0.39-DEV
f7bc28c52 releaser: Add release notes to /docs for release of 0.38
20e9c08e1 releaser: Bump versions for release of 0.38
37140a093 Release 0.38
da80163c7 releaser: Add release notes draft for 0.38
60e66d12e travis: Clean up and increase verbosity
ed8bf081f Squashed 'docs/' changes from 3068989b9..d9c8fc220
558825cc2 Merge commit 'ed8bf081fd'
10c33c17c docs: Generate docshelper data
2c54f1ad4 docshelper: List Chroma lexers
eb15ac37e travis: Run "gem install" without sudo
eb42774e5 Add support for a content dir set per language
f27977809 Update stale.yml
7a634898c Update Chroma
1823c053c Add .Site.IsServer
511d5d3b7 travis: Move to Ubuntu Trusty image
8299fa885 snap: Remove "make" from build-packages because we use mage now
06495f713 snapcraft.yaml: Call mage with "-v" for debugging
93e24a03c hugolib: Fix freeze in invalid front matter error case
e9c7b6205 Allow themes to define output formats, media types and params
3d1a6e109 hugolib: Add ConfigSourceDescriptor
b6798ee86 Bump some deprecations
0a23baa6a Squashed 'docs/' changes from 211a3c613..3068989b9
84f4b731d Merge commit '0a23baa6a9'
61f6e9f63 tpl/transform: Add a comments test for Remarshal
904a3d9dd Update Chroma to get Go template support
f0052b6d0 commands: Recover from error in server
da8801577 Spring test cleaning, take 2
debd3663d hugolib: Test cleaning #1
af67ad8af hugolib: Trim some now superflous tests
e46ab29bd hugolib: Add Reset method to delete key from Scratch
10fef32de releaser: Adjust the "thank you" section
70005364a docs: Add docs for lang.Merge
ffaec4ca8 Add a way to merge pages by language
3886fc1fe Squashed 'docs/' changes from 4e7e1815b..211a3c613
91fb8f1b5 Merge commit '3886fc1fef'
ac12d51e7 create: Remove archetype title/date warning
3fbc75534 resource: Fix path duplication/flattening in processed images
e427ba426 hugolib: Remove superflous debug file
79dd7cb31 hugolib: Simplify Prev/Next
0dbf79c2f docs: Add docs on the new front matter configuration
f12ad7d56 hugolib: Adjust GitInfo author date test
ce6e4310f Refactor the GitInfo into the date handlers
95d62004a Merge commit 'c029065582'
c02906558 Squashed 'docs/' changes from 715741f73..4e7e1815b
68bf1511f hugolib: Extract date and slug from filename
f8dc47eef Allow partial redefinition of the ouputs config
ae3fa349d output: Fix build
64cec0729 outputs: Adjust the layout examples
9ac620658 releaser: Prepare repository for 0.38-DEV
f414966b9 releaser: Add release notes to /docs for release of 0.37.1
c29a2ed2f releaser: Bump versions for release of 0.37.1
dfb6484a4 Release 0.37.1
8a0296839 releaser: Add release notes draft for 0.37.1
e7fda289b Remove defaultLayout config
50a03a5ac commands: Do not print build total when --quiet is set
ba94abbf5 resource: Fix SVG and similar resource handling
55fb0eac2 releaser: Remove suplerflous release notes slug
06e5ee652 releaser: Prepare repository for 0.38-DEV
956a2dce8 releaser: Add release notes to /docs for release of 0.37
1f1c562b9 releaser: Bump versions for release of 0.37
3e1a6ebc1 Release 0.37
8915cb83f releaser: Add release notes draft for 0.37
900b5f6cf Squashed 'docs/' changes from 1dc05a16b..715741f73
57637d89e Merge commit '900b5f6cfe'
13ea1e7c3 resource: Use Floyd-Steinberg dithering for PNGs
9f740b37c hugolib: Fix paginator URL for sections with URL in front matter
e39797fa7 hugolib: Avoid scanning entire site to find the home
00868081f Fix bug in Site.assembleSections method
e9750d831 hugolib: Continue GitInfo lookup on error
19d9a46f6 Properly handle -DEV suffix when comparing Hugo versions
0602135fd Make ge, le etc. work with the Hugo Version number
55bd46a63 commands: Remove ERROR on missing baseURL
8dc77b84a releaser: Create bundles for the release notes
4560261b5 Merge commit '374d184e67'
374d184e6 Squashed 'docs/' changes from f97826a17..1dc05a16b
772128485 Run gofmt -s with Go 1.10
c2c4cb1f9 hugolib: Fix broken footnote test
492fea7cd Update Blackfriday to fix footnote HTML5 validation error
5ed11edf5 releaser: Update to Go 1.10
799c654b0 resource: Preserve color palette for PNG images
faa3159e5 Fix typos in development contribution doc
eaf573a27 Update dependencies
3ced6f8d4 magefile: Disable Go 1.10 gofmt check for now
a3f26e563 Second try: Update to Go 1.10 (!)
0c452c6e7 Revert "Update to Go 1.10 (!)"
ff10c15a9 Update to Go 1.10 (!)
efd506314 Merge branch 'release-0.36.1'
8de91da74 releaser: Prepare repository for 0.37-DEV
25e88ccab releaser: Add release notes to /docs for release of 0.36.1
19228ed83 releaser: Bump versions for release of 0.36.1
a1f40084f Release 0.36.1
d7bf9d4da releaser: Add release notes draft for 0.36.1
53e661e7c releaser: Update to Go 1.9.4
fc23a80ff Bump Travis/Snapcraft to Go 1.9.4
d8fdffb55 resource: Fix multi-threaded image processing issue
2851af022 resource: Improve error processing error message
08521dac8 hugolib: Improve error message in .Render
58382e957 resource: Fix multi-threaded image processing issue
53dac9a50 resource: Improve error processing error message
4edb4bcc6 hugolib: Improve error message in .Render
0816a97a4 parser: Add WARNING for integer YAML keys
10a917dfd parser: Tune stringifyMapKeys
d4beef0d2 parser: Rename stringifyYAMLMapKeys to stringifyMapKeys
51213e0be parser: Add benchmarks for stringifyYAMLMapKeys
1fa241777 Add support for YAML array data files
bb549a0d5 Account for array type data in data dir merge/override logic
82eefded1 hugolib: Refactor tests for JSON, YAML and TOML equivalency, add coverage
e17283499 hugolib: Re-enable YAML data tests disabled in f554503f
b5cb8866e Merge commit '9cc9bab462'
9cc9bab46 Squashed 'docs/' changes from 2fc775dec..f97826a17
d382502d6 tpl/transform: Add template func for TOML/JSON/YAML docs examples conversion
2e95ec684 Add "target" and "rel" parameters to figure shortcode
76d38d5e5 Use more canonical "twitter:image" property, not "twitter:image:src"
f554503fe hugolib: Temp. disable some YAML data tests
16a5c7451 parser: Fix YAML maps key type
49b98975b releaser: Update to Go 1.9.4
0de375a7e Bump Travis/Snapcraft to Go 1.9.4
e02ee7d6a releaser: Prepare repository for 0.37-DEV
18e3657a2 releaser: Add release notes to /docs for release of 0.36
4bc8727fc releaser: Bump versions for release of 0.36
a9a0190b1 Release 0.336
742deaa3d releaser: Add release notes draft for 0.36
694c0fd76 docs: Add documentation for smart cropping etc.
15ff07657 Merge commit 'c305e44f5f'
c305e44f5 Squashed 'docs/' changes from dce236ad1..2fc775dec
722086b4e resource: Add smart cropping
084cf4191 tpl: Ensure site templates can override theme templates
fc06d5c18 hugolib: Add additional test to TestTemplateLookupOrder
9a367d9d0 hugolib: Fix broken TestTemplateLookupOrder
4402c0777 Fix JSON array-based data file handling regression
4743de0d3 Increase data directory test coverage
19e26cb4e releaser: Prepare repository for 0.36-DEV
0283db6c6 releaser: Add release notes to /docs for release of 0.35
58188807a releaser: Bump versions for release of 0.35
51d5c5421 Release 0.35
a9a5b1e09 docs: Regenerate CLI docs
cf5c2df81 releaser: Add release notes draft for 0.35
158e1151c Merge commit '337d0c5f51'
337d0c5f5 Squashed 'docs/' changes from 56c34962c..dce236ad1
f0c0ece44 Add "removable-media" interface to snapcraft.yaml
a34213f0b Fix Docker build
fe40823de readme: Update list of "builders" to include myself
ae742cb1b Fix language params handling
feeed073c commands: Remove some now superflous Fast Render Mode code
94e736c5e hugolib: Extract the Fast Render Mode logic into a method
1707dae8d hugolib: Handle newly created files in Fast Render Mode
2fa70c934 command: Remove undraft command
b6f3f087a commands: Mark deprecated flags in the CLI help
adfd4370b hugolib: Deprecate useModTimeAsFallback
25d691daf tpl: Update Twitter card to also consider images in .Resources
df20b0546 resource: Make resource counters for name and title independent
863a812e0 create: Provide .Name to the archetype templates
f08ea02d2 commands: Deprecate CLI flags canonifyURLs, pluralizeListTitles, preserveTaxonomyNames, uglyURLs
016398ffe hugolib: Fix --uglyURLs from comand line regression
3752348ef Only set 'url' if permalink in metadata and remove duplicate confirm msg
4eb2fec67 Fix handling of top-level page bundles
83c761b71 tpl/collections: Seed random on init only
ed4a00e46 commands: Fix baseURL server regression for multilingual sites
7b472e460 resource: Start Resources :counter first time they're used
96e3fbcf2 travis: Re-enable macOS builds
a91aba1c1 Update to Go 1.9.3
6413559f7 Add a way to disable one or more languages
322c56722 Fix "date" page param
91bb774ae Support pages without front matter
3f0379adb Add page metadata dates tests
ae5a45be6 hugolib: Remove unused code
4d912e2aa hugolib, output: Fix robots.txt in multihost mode
1e27d0589 docs: Re-generate CLI docs
d418c2c2e Remove and update deprecation status
b2fcbb1f9 output: Remove duplicate layout lookup layouts
3446fe9b8 hugolib: Add the last lookup variant for the GetPage index
4a7c2b369 github: Shorten the stale setup
912147ab8 resource: Fix typo in comment
517b6b623 hugolib: Simplify bundle lookup via .Site.GetPage, ref, relref
a19563910 Add a GetPage to the site benchmarks
0432c64dd Add headless bundle support
5a0819b9b Merge matching resources params maps
78c863305 Add some general code contribution criterias
22ad1ebdb travis: Disable macOS builds for now
ebdd8cba3 helpers: Avoid unescape in highlight
8125b4b03 Tighten page kind logic, introduce tests
87217d1d0 releaser: Prepare repository for 0.35-DEV
ffd7dc396 releaser: Add release notes to /docs for release of 0.34
2228d3e28 releaser: Bump versions for release of 0.34
5903a9ce1 Release 0.34
4d644c9d6 releaser: Add release notes draft for 0.34
34a216fe6 resource: Avoid some strings.ToLower in globbing
adee04f4b releaser: Fix BuildDate in release binaries
942138016 resource: Add Match and GetMatch
5d0308698 hugolib: Fix handling of pages bundled in sub-folders in ByPrefix etc.
07700aab0 output: Add some more layout docshelper variants
4d5e4f379 hugolib: Add validation for defaultContentLanguage
cd7796828 releaser: Prepare repository for 0.34-DEV
c7b9347be releaser: Add release notes to /docs for release of 0.33
c6b903729 releaser: Bump versions for release of 0.33
09a934b32 Release 0.33
e6cc2a655 releaser: Add release notes draft for 0.33
a39ae4bb0 output: Redo the docshelper layouts examples
b3eeb9764 Merge commit '3cf4300097'
3cf430009 Squashed 'docs/' changes from ddb7d8fae..56c34962c
9409bc0f7 Improve .Site.GetPage for regular translated pages
4eb1650be resource: Use path.Match instead of filepath.Match
20c9b6ec8 resource: Add front matter metadata to Resource
f8a119b60 Update Afero to avoid panic on "file name is too long"
ecaf14514 resource: Fix handling of very long image file names
d4f8f88e6 commands: And now really fix the server watch logic
4e524ffcf commands: Fix server without watch
64f0e9d1c Update Chroma and other third-party deps
13d53b31f commands: Remove superflous BuildDate logic
51dd462c3 layout: Respect Type and Layout for list template selection
b6ea6d07d Run benchmarks 3 times
4dac1781e resource: Add some GoDoc
8a409894b hugolib: Allow url in front matter for list type pages
46db900da resource: Implement Resources.ByPrefix
60c9f3b1c resource: Make GetByPrefix work for Page resources
57e10f174 Support uglyURLs per section
db85e8340 resource: Make .Resources.GetByPrefix case insensitive
1046e9363 Update CONTRIBUTING.md
d5803da1b Support offline builds
27c77e1ab releaser: Prepare repository for 0.33-DEV
218773a82 releaser: Add release notes to /docs for release of 0.32.4
a97ef61ba releaser: Bump versions for release of 0.32.4
4aaf27dc5 Release 0.32.4
f7d0b05f9 releaser: Add release notes draft for 0.32.4
f82428d2e releaser: Git info bounds checking
50fb49c3d resource: Remove superflous comment
5235a5bf5 Correct fix for --cleanDestinationDir flag
1921a70ab Revert "Remove the --cleanDestinationDir flag", there is a better fix.
f0eecc6a4 Fix non-ASCII path handling for Page resources
768ec5df9 Remove the --cleanDestinationDir flag
238e7f7fb releaser: Prepare repository for 0.33-DEV
0aaa38544 releaser: Add release notes to /docs for release of 0.32.3
fdec5e308 releaser: Bump versions for release of 0.32.3
71abb53ff Release 0.32.2
db5d79862 releaser: Add release notes draft for 0.32.3
2d3189b22 hugolib: Fix handling of mixed-case taxonomy folders with content file
4b04db0f0 resource: Avoid processing and storing same image for each language
97c1866e3 resource: Resources.ByType should return Resources
8969331f5 Fix multihost detection for sites without language definition
6feb13878 commands: Report build time on config.toml change
059e8458d Fix hugo benchmark --renderToMemory
ab82a27d0 Fix URLs for bundle resources in multihost mode
f25d8a9e1 Fix sub-folder baseURL handling for Page resources
54a89cde6 releaser: Prepare repository for 0.33-DEV
2cd962233 releaser: Add release notes to /docs for release of 0.32.2
865877cd0 releaser: Bump versions for release of 0.32.2
1ff80a8bb Release 0.32.2
956ef4097 releaser: Add release notes draft for 0.32.2
196da49c9 resource: Handle publish to /public on fresh build
2aa4c009e Merge commit 'eb738cd35c'
eb738cd35 Squashed 'docs/' changes from fc61378a3..ddb7d8fae
3dd8c1c02 releaser: Prepare repository for 0.33-DEV
fd301c3c0 releaser: Add release notes to /docs for release of 0.32.1
54ef60b03 releaser: Bump versions for release of 0.32.1
14a758ff2 Release Hugo 0.32.1
e64eb5ec2 releaser: Add release notes draft for 0.32.1
d36d71edd commands: Fix broken hugo --renderToMemory
a54fd7df2 resource: Use the correct Destination FS
16e1d99c6 resource: Create target dir if not exists
bf8a61fde hugolib: Add test for image processing from shortcodes
72158ab2e releaser: Prepare repository for 0.33-DEV
cb359a75c releaser: Add release notes to /docs for release of 0.32
82db03943 releaser: Bump versions for release of 0.32
2d2289c79 Release v0.32
6894f121b releaser: Add release notes draft for 0.32
245212a5b Merge commit 'f3cd083961'
f3cd08396 Squashed 'docs/' changes from 3e663efb2..fc61378a3
407c24020 hugolib: Add test for homepage content for all rendering engines
c067f3455 tpl/transform: Do not unescape input to highlight
72903be58 commands: Make sure all language homes are always re-rendered in fast render mode
1c114d539 hugolib: Do not tolower result from Page.GetParam
e14129461 resource: Avoid potential case issue in image names
612dcc194 helpers: Avoid writing the last MD5 buff part twice
e50a8c7a1 resource: Use MD5 to identify image files
7e76a6fd3 source: Fix test on Windows
1b0780dbe source: Make sure .File.Dir() ends with a slash
3cdf19e9b  Implement Page bundling and image handling
02f2735f6 tpl/strings: Fix broken test
22cd89adc Make chomp return the type it receives
db4b7a5c6 Reuse the BlackFriday instance when possible
251149860 livereload: Fix host comparison when ports aren't present
9df3736fe Add .Title and .Page to MenuEntry
243694102 Remove the goroutines from the shortcode lexer
315352616 mage: Do not run Go Fmt check on Go tip
fdbef2a81 Adjust the stale setup
426ac9c18 Add Github stale bot config
84805a68c Use StopTimer in site benchmarks
a2d81ce98 Add output formats definition to benchmarks
051fa343d Improve site benchmarks
23f69efb3 Fix context of opengraph video range
e69da7a4c Add Pandoc support, refactor external helpers
e7652180a vendor: Fix Humanize for multi-byte runes
798921012 vendor: Update Chroma to v0.2.0
7f2ae3ef3 vendor: update goorgeous@v1.1.0
8a8ba63c7 releaser: Prepare repository for 0.32-DEV
c1c04d74a releaser: Add release notes to /docs for release of 0.31.1
aa68205d1 releaser: Bump versions for release of 0.31.1
94115888e Release 0.31.1
bf8aa4ac5 releaser: Add release notes draft for 0.31.1
6d79beb5f tpl/images: Close image file
8afd7d9ce commands: Fix broken --appendPort=false
42fbf15fb releaser: Prepare repository for 0.32-DEV
288723a04 releaser: Add release notes to /docs for release of 0.31
f4b416bbe releaser: Bump versions for release of 0.31
058f25146 Release 0.31
3dd7e8b7a releaser: Add release notes draft for 0.31
30c0d485e Squashed 'docs/' changes from a042b67b5..3e663efb2
14786c4d8 Merge commit '30c0d485ea'
089fe4930 hugolib: Make sure everything ends up in its lang root in multihost mode
118b83d74 helpers: Properly handle []interface{} as staticDir
adbd5bc47 source: Enable disabled test
c1d325934 helpers: Remove (now) unused GetStaticDir
d99db71ab livereload: Fix recently broken window.location.reload logic
503ca6de6 Fix broken shortcodes for Ace and Amber
b3daa1f4b hugolib: Fix .IsTranslated  with identical filenames
df1677a6e Merge commit '05e42bc643'
05e42bc64 Squashed 'docs/' changes from e65df1059..a042b67b5
0a81a6b4b output: Fall back to unstranslated base template
60dfb9a6e Add support for multiple staticDirs
2e0465764 Add multilingual multihost support
6233ddf9d tpl/partials: Fix the lock contention in cached partial
e66d813bc gopkg: Update Chroma to get SVG support
f5ed04bd4 tpl/partials: Fix cache locking
7730d683e tplimpl: Make partial benchmarks use RunParallel
bb048d811 Use ms precision for static change logging
9299a16c9 circleci: Bump to Go 1.9.2
a9be687b8 hugolib: Pre-allocate some slices
b32ffed6a Update Chroma to get the latest SASS lexer
77cbd001f Update Travis and snapcraft to Go 1.9.2
764f1304e hugolib: Add some more taxonomy permalinks test cases
d9a78b61a Handle Taxonomy permalinks
23ba779fa i18n: Support unknown language codes
550cec0b1 gopkg: Bump go-i18n version
b88a105a7 Revert "i18n: Allow custom language codes"
b3443b3d0 Revert "i18n: Prevent data race in lang code handling"
c97216e4f i18n: Prevent data race in lang code handling
bb04010cb i18n: Allow custom language codes
76dc811c6 tpl/math: Refactor Mod with cast
488631fe0 Add support for height argument to figure shortcode
fdd62eb4c Add linebreak to README.md for better readability
b6f2e3b43 Update toml dependency revision in Gopkg.lock too
c61998d3a Update toml dep to fetch its latest master branch instead of v0.3.0
45ad8ac38 vendor: Lock mage to v1
133cfd171 mage: Skip Check on Go 1.8
db1a5af15 Gopk.toml cleanup
9ccc958ce Update Dockerfile and Snap build to reflect move to dep
30e471b8c Update CONTRIBUTING to reflect Go Dep
f711b170e Update magefile to use Go Dep
9536f7cd0 Adjust some deps versions
1ac47cd88 Run dep init
ba0b22ef4 vendor: Remove to prepare for dep
c9c19d794 Fix error handling in mage build
1d52bfbb4 releaser: Prepare repository for 0.31-DEV
142ebba2c releaser: Add release notes to /docs for release of 0.30.2
bf633ea2f releaser: Bump versions for release of 0.30.2
6faf47e8d 0.30.2 Release
7954bc0f0 releaser: Add release notes draft for 0.30.2
c4bf03a55 releaser: Improve release notes front matter
316410331 commands: Support Fast Render mode with sub-path in baseURL
6a5170116 Merge commit '325009c3fd'
325009c3f Squashed 'docs/' changes from 4628b9ec2..e65df1059
bc53cd7b1 releaser: Prepare repository for 0.31-DEV
4e07b4144 releaser: Add release notes to /docs for release of 0.30.1
89a3f47a2 releaser: Bump versions for release of 0.30.1
35be07f7c Release 0.30.1
6f84570d8 releaser: Add release notes draft for 0.30.1
896416257 circleci: Must go get mage
e939aaed8 releaser: Correctly set final version on patch releases
d2b3f00df Bump Snap to go1.9.1
fa53b13ca Fix hugo -w
c3c10f2c7 Simplify Site benchmarks
ad5ef4383 Fix mage vs make issues
5109ed520 Revert "tplimpl: Output xmlns:xhtml only if there are translations available"
45e0908b8 releaser: Prepare repository for 0.31-DEV
41180c51e releaser: Add release notes to /docs for release of 0.30
811f381e2 releaser: Bump versions for release of 0.30
7d783a1c0 Release Hugo 0.30
49d5e7da4 Use Make for the release for now
190508ae1 releaser: Add release notes draft for 0.30
04bdb596a Fix CircleCI build issue
fe71cb6f5 Replace make with mage in CircleCI build
68ace4343 Update CircleCI build to use Mage
ecf5e081b Squashed 'docs/' changes from 000ab7c42..4628b9ec2
5c31e0c34 Merge commit 'ecf5e081b5'
7c30e2cbb Add table linenos support for Chroma highlighter
60bd332c1 Only re-render the view(s) you're working on
6a30874f1 Make sure Date and PublishDate is always set to a value if one is available
15ec031d9 Add correct config file name to verbose server log
01e54609e metrics: Reset benchmark timer
5800a20a2 metrics: Detect partialCached candidates
e2e8bcbec tpl: Rework the partial test and benchmarks
66a169a24 Simplify HugoNoGitInfo in magefile
2cc476567 Add mage installation step to CONTRIBUTING.md
856fc445d Bump Go versions in Travis config
a6ed645a3 Change last 'make' statements to 'mage'
23488f874 Minor README changes
8d2580f07 Replace make with mage
06e563340 Merge commit 'dae5a7c61c'
dae5a7c61 Squashed 'docs/' changes from 36d7e22f5..000ab7c42
a58741a17 helpers: Fix broken test
d32fd8e32 vendor: Update deps
0859d9dfe tplimpl: Output xmlns:xhtml only if there are translations available
384a6ac4b Create magefile from Makefile
4fc67fe44 tpl: Add errorf template function
47fdfd519 Clean up lint in various packages
d45e358a0 helpers: Fix broken Chroma test
24fab9984 hugolib: Fix broken hightlighter smoke test
6a986b7c0 vendor: Update dependencies
8cf55aff0 vendor: Update Chroma
8717a60cc Change SummaryLength to be configurable (#3924)
281887899 tpl: Add os.fileExists template function
b6a30283f Merge commit '9d68f695e7'
9d68f695e Squashed 'docs/' changes from 20959c7b..36d7e22f
57adc539f tpl: Add float template function
b277cb33e hugolib: Move metrics output to the end of the site build
a354d130d examples: Fix `now` usage in footer
f806e951f releaser: Prepare repository for 0.30-DEV
524c67107 releaser: Add release notes to /docs for release of 0.29
396759a09 releaser: Bump versions for release of 0.29
e6079a9c0 releaser: Add release notes for 0.29
b5e1dc589 tpl: Set Metrics at creation time
d3681f51c metrics: Fix sort order
4f576e1c0 Revert "vendor: Update Chroma"
b4a14c25f metrics: Add simple template metrics feature
cb8eb4726 vendor: Update Chroma
e94d4f017 commands: Make noHTTPCache default false
8a69d2356 tpl: Add math.Ceil, Floor, and Round to method mappings
d9697e275 Split go build in Dockerfile
09d960f17 Update Dockerfile to benefit build cache
a3a3f5b86 snap: Add git to snap package for GitInfo
404e2994e releaser: Prepare repository for 0.29-DEV
2a7f6dda1 releaser: Add release notes to /docs for release of 0.28
9e850c1f6 releaser: Bump versions for release of 0.28
ab86851a1 releaser: Add final 0.28 release notes
53b6235bb releaser: Add release notes draft for 0.28
61c27b58b Squashed 'docs/' changes from 1662b9d0..20959c7b
932ae5270 Merge commit '61c27b58b3'
30694a133 Squashed 'docs/' changes from 5be6fef0..1662b9d0
23ba0edf7 Merge commit '30694a133a'
fb33d8286 Use Chroma as new default syntax highlighter
81ed56479 tpl: Add urls.Parse function
19c591048 tpl: Add math.Ceil, Floor, and Round
80c7ea60a Make noHTTPCache default on
0d29a0f78 Trim newlines in the hightlight shortcode
b8fabce21 vendor: Update goorgeous
b18047763 Add liveReloadPort flag to server
c31e083ea Fix the docs helper tool
9436f0b0c Allow the pull-docs script to pull other than master
7a89dce53 Squashed 'docs/' changes from 32356e4e..5be6fef0
f8fd5796b Merge commit '7a89dce53b'
173b54498 commands: Remove superflous space
df411ec81 commands: Rename noHttpCache to noHTTPCache
0b34af216 Add noHttpCache to hugo server
c0370e0ee Merge commit 'ba45da9d03'
ba45da9d0 Squashed 'docs/' changes from 44fe0285..32356e4e
5c3b21036 releaser: Prepare repository for 0.28-DEV
5a4002bc8 releaser: Add release notes to /docs for release of 0.27.1
18126434f releaser: Bump versions for release of 0.27.1
dda269f17 releaser: Add release notes for 0.27.1
2d613dd90 tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)
642ba6cab snap: Bump to 1.9
d1d6aa634 Remove .goxc.json
0375cbd02 releaser: Prepare repository for 0.28-DEV
01fdf6d26 releaser: Add release notes to /docs for release of 0.27
828eb70fa releaser: Bump versions for release of 0.27
f4ea43398 Release of 0.27
457048634 releaser: Add release notes draft for 0.27
1b4319be6 Squashed 'docs/' changes from 1d052b16..44fe0285
58245a29d docs: Merge commit '1b4319be62'
d2249c509 Set up Hugo release flow on CircleCI
f4bf21413 tpl/time: Add time.Duration and time.ParseDuration template funcs
0462c96a5 tpl/compare: Add cond (ternary) template func
202510fdc hugolib: Fix "published" front matter handling
573deca08 hugolib: Fix typo in aquired
eeb057f22 docs: Document Related Content
3b4f17bbc hugolib: Implement "related content"
7d63a23b0 Squashed 'docs/' changes from f887bd7b..1d052b16
16c912766 docs: Merge commit '7d63a23b0c'
f88fe312c output: Fix taxonomy term base template lookup
d33563b5d release: CGO_ENABLED=0
fc4a0d170 Update Travis build to Go 1.9!
7231d5a82 livereload: Maintain the scroll position if possible
88e1bca92 Update template_embedded.go
d000cf605 tpl: Prepare for template metrics
29a2da059 tpl: Cleanup strings.TrimPrefix and TrimSuffix
7674ad738 tpl: Add strings.TrimLeft and TrimRight
08f48b91d compare, hugolib, tpl: Add Eqer interface
2fc121ce2 appveyor: Simplify
2a2e69070 hugolib: Simplify Page.Eq
a7555c543 hugolib: Do not return error in Eq on type mismatch
c265c102a hugolib: Rename Page.Equals to Page.Eq
f0f49ed9b hugolib: Add Page.Equals
71ae9b453 hugolib: Rewrite replaceDivider to reduce memory allocation
199816fdd hugolib: Extract replaceDivider logic
919bc9210 Add an iFrame title to the YouTube shortcode
07f6e1499 travis: Pull docutils out into requirements.txt
e8468a985 travis: Fix docutils setup
359af563a travis: Try to fix docutils setup on Linux
0019ce002 output: Improve the base template identification
33ae10b6a tpl/transform: Only strip p tag in markdownify if only one paragraph
2d1bd876c Update docs versiona and README
ec4e6f9df Squashed 'docs/' content from commit f887bd7b
a1900826b Merge commit 'ec4e6f9df2' as 'docs'

git-subtree-dir: docs
git-subtree-split: 51c4f31840e260b5afe1d1a488978887fcb129a5
2019-11-11 11:45:18 +01:00
Bjørn Erik Pedersen
d1d1f240a2 hubolib: Headless bundles should not be listed in .Pages
Fixes #6492
2019-11-10 18:57:31 +01:00
Luke Francl
70a1aa345b Support Go time format strings in permalinks
In the vein of an ancient TODO about supporting custom date formatting with
strftime, this allows `:`-prefixed Go time format strings in permalink segments.
This allows users to customize date-based permalinks any way they need to.

For example, with a date of 2019-11-09, the permalink `/:06/:1/:2` will render
as `/19/11/9`.

See:

07978e4a49 (diff-0688a3b65c7f5d01aa216f8d9b57fd00R111-R112)
https://discourse.gohugo.io/t/implementing-additional-date-formats-for-permalinks/17860
https://github.com/gohugoio/hugo/pull/6488
2019-11-10 11:00:02 +01:00
Anthony Fok
cafecca440 travis: Increase timeout to 30000 for mage -v check
The default timeout of 15000 millisecond is too short
for go test -race on arm64.

See golang/go#35308
2019-11-08 08:24:41 +01:00
Bjørn Erik Pedersen
5f6b6ec689
Prepare for Goldmark
This commmit prepares for the addition of Goldmark as the new Markdown renderer in Hugo.

This introduces a new `markup` package with some common interfaces and each implementation in its own package.

See #5963
2019-11-06 19:09:08 +01:00
Bjørn Erik Pedersen
366ee4d8da
deps: Update quicktest
To make the test build on Go 1.14.
2019-11-06 17:04:58 +01:00
Bjørn Erik Pedersen
c26d00db64
hugolib: Fix ref/relref anhcor handling
Fixes #6481
2019-11-06 09:29:38 +01:00
Anthony Fok
8483b53aef deps: Update to Chroma v0.6.9 for Java lexer fix
Fixes #6476
2019-11-05 08:24:41 +01:00
Bjørn Erik Pedersen
9f46a72c7e tpl/collections: Add some index map test cases
See #3974
2019-11-04 11:13:27 +01:00
Bjørn Erik Pedersen
9abd396789
helpers: Use pointer receiver for ContentSpec 2019-11-04 10:57:11 +01:00
Bjørn Erik Pedersen
ad4c56b551 travis: Allow arm64 to fail
As that is what it does at the moment.
2019-11-04 09:29:12 +01:00
Bjørn Erik Pedersen
3717db1f90
minifiers: Add a JSON roundtrip test
See #6472
2019-11-03 11:34:22 +01:00
Anthony Fok
ae4fde0866 Update .travis.yml for arm64 support, etc.
- Add arm64 support for Linux thanks to Travis CI’s new feature, see
  https://blog.travis-ci.com/2019-10-07-multi-cpu-architecture-support
- Force GO111MODULE=on
- Cache directories
- Switch to bionic (Ubuntu 18.04) environment
- Use "master" instead of "tip" to match the latest Travis CI docs
- Allow "mage -v check" to fail on non-AMD64 architectures
  because "go test -race ./..." currently fails on arm64 and ppc64le.
2019-11-01 11:03:06 -06:00
Anthony Fok
c6d69d0c95 mage: Skip Test386 on non-AMD64 architectures
This is to allow "mage check" to run on arm64 on Travis CI.
2019-11-01 11:03:06 -06:00
Anthony Fok
c3d433af56 Update past go-cmp's checkptr fix
To fix our -race test under Go 1.14.

See google/go-cmp#167
2019-11-01 02:25:11 -06:00
hugoreleaser
07a203406a releaser: Prepare repository for 0.60.0-DEV
[ci skip]
2019-10-31 15:30:12 +00:00
hugoreleaser
d5dab232c2 releaser: Add release notes to /docs for release of 0.59.1
[ci skip]
2019-10-31 15:20:53 +00:00
hugoreleaser
e04a22c5e4 releaser: Bump versions for release of 0.59.1
[ci skip]
2019-10-31 15:20:53 +00:00
hugoreleaser
d14265da8f releaser: Add release notes for 0.59.1
[ci skip]
2019-10-31 15:20:53 +00:00
Bjørn Erik Pedersen
33c474b9b3 hugofs: Fix crash in multilingual content fs
Fixes #6463
2019-10-31 16:11:53 +01:00
Jake Jarvis
ed2682325a Dockerfile: Switch to mage builds, various optimizations
- Use Alpine for both stages for consistency.
- Switch to mage from go install as dictated in the latest docs.
- Easy switch to building Hugo Extended by directly setting HUGO_BUILD_TAGS flag at image build time: `docker build --build-arg HUGO_BUILD_TAGS=extended .`
- Update to Go 1.13 and Alpine 3.10.
- The only possibly breaking change: Moved the `hugo` binary in the final stage from /hugo to /usr/bin/hugo so one can simply run `hugo` without having to search around for its location.
2019-10-31 09:53:49 +01:00
Anthony Fok
66fe68ffc9 resources/images: Add exception for new test image
in TestImageOperationsGolden due to "fused multiply and add" (FMA)
instruction on s390x, ppc64* and arm64.

See #6439
2019-10-30 12:22:13 -06:00
Bjørn Erik Pedersen
c5e1e8241a
Adjust benchmark templates 2019-10-28 10:56:07 +01:00
Bjørn Erik Pedersen
baa975082c deps: Update to Chroma v0.6.8 to fix a crash
Also improve relevant logging.

Fixes #6450
2019-10-24 11:11:18 +02:00
Bjørn Erik Pedersen
3e8b5a5c01
deps: Update quicktest 2019-10-23 09:08:45 +02:00
Nick Krichevsky
e6aa6edb4c Do not attempt to build if there is no config file
Fixes #5896
2019-10-22 00:10:36 +02:00
hugoreleaser
6bcc5ad8b2 releaser: Prepare repository for 0.60.0-DEV
[ci skip]
2019-10-21 09:47:26 +00:00
hugoreleaser
1dd0c69c7b releaser: Add release notes to /docs for release of 0.59.0
[ci skip]
2019-10-21 09:38:50 +00:00
hugoreleaser
b084af4bfa releaser: Bump versions for release of 0.59.0
[ci skip]
2019-10-21 09:38:50 +00:00
Bjørn Erik Pedersen
0237d45955
Release 0.59.0 2019-10-21 11:33:11 +02:00
hugoreleaser
109ac877c2
releaser: Add release notes for 0.59.0
Rename to *-ready.md to continue.
[ci skip]
2019-10-21 11:32:54 +02:00
Bjørn Erik Pedersen
5ac0f751aa Squashed 'docs/' changes from 0584815c8..723da4a37
723da4a37 Vendor the theme

git-subtree-dir: docs
git-subtree-split: 723da4a3769ee8a6c02758b553618143f92fccef
2019-10-21 10:52:23 +02:00
Bjørn Erik Pedersen
de8ca7e4d4
Merge commit '5ac0f751aa' 2019-10-21 10:52:23 +02:00
Bjørn Erik Pedersen
5070ba6c9e Squashed 'docs/' changes from fdea5430f..0584815c8
0584815c8 Add a page about Pages methods (Next, Prev)
653dc8db5 Add note about default bgColor

git-subtree-dir: docs
git-subtree-split: 0584815c8a9ef49c9682b6468a9f2a1e9f05be46
2019-10-21 10:49:16 +02:00
Bjørn Erik Pedersen
ec5962278f
Merge commit '5070ba6c9e' 2019-10-21 10:49:16 +02:00
Bjørn Erik Pedersen
b9bd35d72e Squashed 'docs/' content from commit fdea5430f
git-subtree-dir: docs
git-subtree-split: fdea5430f89dfd849d39212abdf5ace0a4763e5a
2019-10-21 10:22:28 +02:00
Bjørn Erik Pedersen
27aef3f1fb Merge commit 'b9bd35d72e' as 'docs' 2019-10-21 10:22:28 +02:00
Bjørn Erik Pedersen
39121de4d9
docs: Replace /docs 2019-10-21 10:21:51 +02:00
Bjørn Erik Pedersen
180195aa34
cache/filecache: Recover from file corruption
Fixes #6401
2019-10-21 09:51:51 +02:00
Bjørn Erik Pedersen
4b286b9d27 resources/images: Allow to set background fill colour
Closes #6298
2019-10-20 22:06:58 +02:00
Nicolas Martignoni
689f647baf media: Add common video media types
- See https://discourse.gohugo.io/t/resources-bytype-for-video-files/21285
2019-10-16 17:16:14 +02:00
Bjørn Erik Pedersen
46cafdbaca
examples: Replace .RSSLink
Fixes #6037
2019-10-14 09:30:09 +02:00
Bjørn Erik Pedersen
653e6856ea resources/page: Use binary search in Pages.Prev/Next if possible
This is obviously much faster for lager data sets:

```bash
name                         old time/op    new time/op    delta
SearchPage/ByWeight-100-4       267ns ± 4%     272ns ± 5%     ~     (p=0.457 n=4+4)
SearchPage/ByWeight-5000-4     10.8µs ± 3%     1.2µs ± 2%  -88.99%  (p=0.029 n=4+4)
SearchPage/ByWeight-10000-4    21.1µs ± 1%     1.4µs ±11%  -93.28%  (p=0.029 n=4+4)
```

See #4500
2019-10-13 12:36:17 +02:00
Bjørn Erik Pedersen
f4f566edf4 Make Pages.Prev/Next work like the other Prev/Next methods
Fixes #4500
2019-10-13 12:36:17 +02:00
Zach Bayoff
7b3edc2931 tpl: Add optional "title" attribute to iframe in Vimeo shortcode
Add an optional "title" attribute to the iframe in the vimeo shortcode. If one is not given, the title attribute will default to "vimeo video". It is imperative for iframes to have a non-empty "title" attribute in order to meet WCAG2.0 accessibility guidelines https://www.w3.org/TR/WCAG20-TECHS/H64.
2019-10-12 18:10:14 +02:00
Baibhav Vatsa
65b7d4221b tpl: Modify error messages of after, first, and last
Modified the messages functions after, first, and last threw on being passed invalid parameters (index or limit) to be more standardised and resemble what Go compiler would throw.

Fixes #6415
2019-10-12 18:07:46 +02:00
Baibhav Vatsa
0e75af74db tpl: Last now accepts 0 as limit
Modified the if conditional because of which last threw an error if 0 was passed as limit. The function now returns an empty slice if it is called with 0 as limit. The behavior of first and last is now the same when 0 is passed as limit. Also added tests to test the new behavior.

Fixes #6419
2019-10-11 20:34:51 +02:00
Bjørn Erik Pedersen
5f1aafafb4
Update feature_request.md 2019-10-11 16:43:00 +02:00
Vazrupe (HyeonGyu Lee)
a9762b5c48 common: Fix elements are doubling when append a not assignable type
Fixes #6188
2019-10-11 10:38:12 +02:00
Baibhav Vatsa
096a4b67b9 tpl: After now accepts 0 as index
Modified the if conditional because of which after threw an error if called with 0 as index. The function now returns the whole original slice if 0 is passed as an index. Also added tests to test the new behavior.

Fixes #6388
2019-10-11 08:35:27 +02:00
Bjørn Erik Pedersen
bc70f2bf12 helpers: Fix data race in global logger init
Fixes #6409
2019-10-10 16:07:53 +02:00
Bjørn Erik Pedersen
0d7b05be4c tpl: Make getJSON/getCVS accept non-string args
This broke for the Twitter simple shortcode now that Shortcodes accepts typed arguments.

Fixes #6382
2019-10-10 13:30:39 +02:00
Bjørn Erik Pedersen
71b18a0786 Update to Go 1.12.10 and 1.13.1
Fixes #6406
2019-10-10 09:50:44 +02:00
Bjørn Erik Pedersen
339ee37143
Simplify test output to simplify diffing 2019-10-09 10:49:52 +02:00
Bjørn Erik Pedersen
f10db101a1
hugofs: Add FileMeta.String
To make the page listing easier to compare.
2019-10-09 10:30:09 +02:00
Anthony Fok
b401858ebd deps: Update minify to v2.5.2
- v2.5.1 removes import comments, solving a build error with Go 1.13
  in GOPATH mode (used Debian packaging for example)
- v2.5.2 no longer converts polyline/rect/polygon/line to path
  as it has been reported to break a SVG referenced by CSS,
  see tdewolff/minify#260

The test case for Min SVG in TestResourceChains is updated accordingly.

Fixes pocc/tshark.dev#33
2019-10-09 09:01:08 +02:00
Anthony Fok
39ed33fceb resources: Fix image test error on s390x, ppc64* and arm64
In TestImageOperationsGolden, tolerate slight floating-point rounding
differences due to the use or non-use of "fused multiply and add" (FMA)
instruction on different architectures.

Special thanks to @disintegration for the solution in goldenEqual();
see https://github.com/disintegration/gift/issues/20

Fixes #6387
2019-10-07 21:52:43 +02:00
Niklas Fasching
020a6fbd7f Add BaseFs to RenderingContext
The org mode renderer supports including other files [1]. We don't want to
allow reading of arbitrary files (go-org defaults to ioutil.ReadFile [2]) but want
to make use of the FileSystem abstractions hugo provides. For starters we will
allow reading from the content directory only

[1]: e.g. `#+INCLUDE: ./foo.py src python` includes `foo.py` as a python source
block.
2019-10-07 17:30:15 +02:00
Niklas Fasching
b152216d5c deps: Update go-org
- add support for latex fragments
- allow customization of ReadFile method for includes (#+INCLUDE: ...)
2019-10-07 17:30:15 +02:00
Bjørn Erik Pedersen
64ec8c8904 media: Use + to create the Type string 2019-10-06 22:20:58 +02:00
Jamie Tanna
c466b88c99 deps: Upgrade to latest version of emoji dependency
To add support for new emojis in Hugo, we need to upgrade our internal
dependency on the emoji package.

Note that we also need to update our tests, as the underlying emoji that
is rendered has changed.

Follow-up to #6391. (170f18d935 and
2df5d202c6)
2019-10-05 22:58:53 +02:00
Bjørn Erik Pedersen
2df5d202c6
Revert "deps: Upgrade to latest version of emoji dependency"
This reverts commit 170f18d935.
2019-10-05 19:25:25 +02:00
Jamie Tanna
170f18d935 deps: Upgrade to latest version of emoji dependency
To add support for new emojis in Hugo, we need to upgrade our internal
dependency on the emoji package.
2019-10-05 18:47:35 +02:00
Bjørn Erik Pedersen
15a0364d39
readme: Update Architectures 2019-10-04 20:55:10 +02:00
Garret Kelly
674e81ae87 deploy: Add ability to invalidate Google Cloud CDN 2019-10-03 16:53:45 +02:00
Anthony Fok
298092d516 resources: Ensure same dirinfos sort order in TestImageOperationsGolden
Fix filename mismatch errors on Debian auto-building machines
possibly due to different directory order on ext4 vs tmpfs file systems.
2019-10-03 16:48:22 +02:00
Bjørn Erik Pedersen
019ae38483
Update bug_report.md 2019-09-30 20:09:49 +02:00
Bjørn Erik Pedersen
329e88db1f Support typed bool, int and float in shortcode params
This means that you now can do:

    {{< vidur 9KvBeKu false true 32 3.14 >}}

And the boolean and numeric values will be converted to `bool`, `int` and `float64`.

If you want these to be  strings, they must be quoted:

    {{< vidur 9KvBeKu "false" "true" "32" "3.14" >}}

Fixes #6371
2019-09-29 23:22:41 +02:00
Bjørn Erik Pedersen
e073f4efb1
deps: Update Chroma
Closes #6279
2019-09-25 08:42:15 +02:00
Brian MacKinney
454a033dc5 github: Add issue templates and action 2019-09-25 08:40:04 +02:00
J. Ansorg
e5856e61d8 resources: Support output image format in image operations
The image format is defined as the image extension of the known formats,
excluding the dot.
All of 'img.Resize "600x jpeg"', 'img.Resize "600x jpg"',
and 'img.Resize "600x png"' are valid format definitions.
If the target format is defined in the operation definition string,
then the converted image will be stored in this format. Permalinks and
media type are updated correspondingly.
Unknown image extensions in the operation definition have not effect.

See #6298
2019-09-21 16:50:27 +02:00
XhmikosR
34dc06b032 tpl: Add rel="noopener" for external links
This could be a security and performance issue.

See https://developers.google.com/web/tools/lighthouse/audits/noopener
2019-09-21 10:08:47 +02:00
XhmikosR
2b1814ee58 tpl: Remove unneeded space 2019-09-21 10:06:15 +02:00
hugoreleaser
8cb7a0d4db releaser: Prepare repository for 0.59.0-DEV
[ci skip]
2019-09-19 15:36:35 +00:00
hugoreleaser
4aac02d49c releaser: Add release notes to /docs for release of 0.58.3
[ci skip]
2019-09-19 15:28:26 +00:00
hugoreleaser
85376a757b releaser: Bump versions for release of 0.58.3
[ci skip]
2019-09-19 15:28:26 +00:00
hugoreleaser
0fd30f832b releaser: Add release notes for 0.58.3
[ci skip]
2019-09-19 15:28:26 +00:00
Bjørn Erik Pedersen
c262a95a5c
Add some more resource transform tests
See #6348
2019-09-19 16:58:14 +02:00
Bjørn Erik Pedersen
6dec671fb9 Fix cache key transformed resources
Fixes #6348
2019-09-19 12:36:01 +02:00
Fazal Majid
c0d7188ec8 deploy: Do not compile in Azure on Solaris
See #6324
2019-09-13 14:53:36 +02:00
hugoreleaser
13768c3c50 releaser: Prepare repository for 0.59.0-DEV
[ci skip]
2019-09-13 08:12:38 +00:00
hugoreleaser
253e5fdc69 releaser: Add release notes to /docs for release of 0.58.2
[ci skip]
2019-09-13 08:04:20 +00:00
hugoreleaser
7bc1270ec7 releaser: Bump versions for release of 0.58.2
[ci skip]
2019-09-13 08:04:20 +00:00
hugoreleaser
d4c98e5800 releaser: Add release notes for 0.58.2
[ci skip]
2019-09-13 08:04:20 +00:00
Bjørn Erik Pedersen
c0d7573677 Fix cache keys for bundled resoures in transform.Unmarshal
Fixes #6327
2019-09-12 20:58:06 +02:00
Bjørn Erik Pedersen
fcfa6f33bb
filecache: Ignore "does not exist" errors in prune
Fixes #6326
Fixes #5745
2019-09-12 17:37:41 +02:00
hugoreleaser
77b23fe3db releaser: Prepare repository for 0.59.0-DEV
[ci skip]
2019-09-06 09:26:46 +00:00
hugoreleaser
24277b9202 releaser: Add release notes to /docs for release of 0.58.1
[ci skip]
2019-09-06 09:18:56 +00:00
hugoreleaser
8bc478d3f7 releaser: Bump versions for release of 0.58.1
[ci skip]
2019-09-06 09:18:56 +00:00
hugoreleaser
609a9afbed releaser: Add release notes for 0.58.1
[ci skip]
2019-09-06 09:18:56 +00:00
Bjørn Erik Pedersen
9442937d82 Avoid writing the same processed image to /public twice
Fixes #6307
2019-09-06 11:04:57 +02:00
Bjørn Erik Pedersen
901077c036
hugolib: Fix broken bundle live reload logic
Fixes #6315
Updates #6308
2019-09-06 11:03:23 +02:00
Bjørn Erik Pedersen
24ad429571
deps: Update github.com/bep/gitmap
Fixes #6313
2019-09-06 10:39:21 +02:00
Bjørn Erik Pedersen
3be2c25351 Fix concat with fingerprint regression
In Hugo 0.58 we optimized the transformers that only adjusted metadata, e.g. the fingerprint.

This depended on the source readers implementing `io.ReadSeeker`.

The reader produced by `concat` did that, but the implementation was buggy.

This commit fixes that.

Fixes #6309
2019-09-05 19:59:49 +02:00
Vazrupe (HyeonGyu Lee)
5e66094775 tpl: Remove eq argument limitation
Fixes #6237
2019-09-05 14:38:47 +02:00
hugoreleaser
f4e1cb8d05 releaser: Prepare repository for 0.59.0-DEV
[ci skip]
2019-09-04 15:51:16 +00:00
hugoreleaser
64d8bf1ee9 releaser: Add release notes to /docs for release of 0.58.0
[ci skip]
2019-09-04 15:41:58 +00:00
hugoreleaser
10c0baddfa releaser: Bump versions for release of 0.58.0
[ci skip]
2019-09-04 15:41:58 +00:00
Bjørn Erik Pedersen
9d3ae81b91
Release 0.58.0 2019-09-04 17:33:42 +02:00
Bjørn Erik Pedersen
bb894ceaf8
Allow slices in the image Filter funcs, not just varargs
[ci skip]

See #6255
2019-09-04 17:24:50 +02:00
Bjørn Erik Pedersen
529c7f1090
Update 0.58.0-relnotes.md
[ci skip]
2019-09-04 13:05:50 +02:00
hugoreleaser
57a54d19d5 releaser: Add release notes for 0.58.0
Rename to *-ready.md to continue.
[ci skip]
2019-09-04 10:39:05 +00:00
Bjørn Erik Pedersen
dc3f3df29d
hugolib: Adjust Go version specific test
See #6304
2019-09-04 09:50:32 +02:00
Bjørn Erik Pedersen
b43130115d
Update to Go 1.13
Fixes #6304
2019-09-04 00:54:41 +02:00
Bjørn Erik Pedersen
28501ceb93
hugolib: Remove the old and slow site benchmarks 2019-09-03 21:36:53 +02:00
Bjørn Erik Pedersen
8624b9fe9e Cache processed images by their source path
Fixes #6269
2019-09-03 18:38:57 +02:00
Bjørn Erik Pedersen
018494f363
Remove test artifact 2019-09-03 17:18:18 +02:00
Bjørn Erik Pedersen
43298f028c Make the "is this a Hugo Module" logic more lenient
Now we only try to load modules via Go if there is one or more modules imported in project config.

Fixes #6299
2019-09-03 15:12:33 +02:00
Bjørn Erik Pedersen
1b5c7e327c
hugolib: Add a Sass includePaths test
See #6274
2019-09-03 12:25:41 +02:00
Bjørn Erik Pedersen
05d83b6c08
Update to Go 1.11.13 and 1.12.9
Fixes #6228
2019-09-03 10:05:17 +02:00
Bjørn Erik Pedersen
4898fb3d64
Make home.Pages work like any other section
Fixes #6240
2019-09-02 17:34:02 +02:00
Bjørn Erik Pedersen
45d7988f2d
Add some fingerprint tests
Closes #6284
Closes #6280
2019-09-02 17:18:32 +02:00
Bjørn Erik Pedersen
ce47c21a29 resources: Cache Exif data to disk
```bash
name                        old time/op    new time/op    delta
ImageExif/Cold_cache-4         312µs ±28%     355µs ± 7%     ~     (p=0.343 n=4+4)
ImageExif/Cold_cache,_10-4     479µs ± 6%     546µs ± 0%  +13.91%  (p=0.029 n=4+4)
ImageExif/Warm_cache-4         272µs ± 1%      81µs ± 5%  -70.30%  (p=0.029 n=4+4)

name                        old alloc/op   new alloc/op   delta
ImageExif/Cold_cache-4         151kB ± 0%     161kB ± 0%   +6.46%  (p=0.029 n=4+4)
ImageExif/Cold_cache,_10-4     179kB ± 0%     189kB ± 0%   +5.49%  (p=0.029 n=4+4)
ImageExif/Warm_cache-4         151kB ± 0%      13kB ± 0%  -91.52%  (p=0.029 n=4+4)

name                        old allocs/op  new allocs/op  delta
ImageExif/Cold_cache-4         1.03k ± 0%     1.21k ± 0%  +17.78%  (p=0.029 n=4+4)
ImageExif/Cold_cache,_10-4     1.65k ± 0%     1.83k ± 0%  +11.09%  (p=0.029 n=4+4)
ImageExif/Warm_cache-4         1.03k ± 0%     0.28k ± 0%  -72.40%  (p=0.029 n=4+4)
```

Fixes #6291
2019-09-02 16:37:28 +02:00
Bjørn Erik Pedersen
de9cbf6195
Remove metaDataFormat setting
Not in use anymore.
2019-09-01 23:48:51 +02:00
Bjørn Erik Pedersen
4f5011692a
resources: Make the Exif benchmark filenames distinct 2019-09-01 22:05:39 +02:00
Bjørn Erik Pedersen
3becba7a98
resources: Add Exif benchmark
See #6291
2019-09-01 18:02:49 +02:00
Bjørn Erik Pedersen
20bdc69a47
resources: Remove unused map type 2019-08-31 21:30:13 +02:00
Bjørn Erik Pedersen
28143397d6
Add image.Exif
Note that we will probably need to add some metadata cache for this to scale.

Fixes #4600
2019-08-31 19:04:56 +02:00
Niklas Fasching
8a8d4a6d97 deps: Update go-org (fix descriptive lists)
</dt> and </dd> closing tags were broken, see
https://github.com/niklasfasching/go-org/pull/9
2019-08-31 15:03:12 +02:00
Jake Jarvis
00297085db tpl: Migrate last shortcodes (YouTube and Vimeo) to HTTPS embeds 2019-08-30 11:55:55 +02:00
Bjørn Erik Pedersen
823f53c861
Add a set of image filters
With this you can do variants of this:

```
{{ $img := resources.Get "images/misc/3-jenny.jpg" }}
{{ $img := $img.Resize "300x" }}
{{ $g1 := $img.Filter images.Grayscale }}
{{ $g2 := $img | images.Filter (images.Saturate 30) (images.GaussianBlur 3) }}
```

Fixes #6255
2019-08-28 15:59:54 +02:00
Bjørn Erik Pedersen
f9978ed164
Image resource refactor
This commit pulls most of the image related logic into its own package, to make it easier to reason about and extend.

This is also a rewrite of the transformation logic used in Hugo Pipes, mostly to allow constructs like the one below:

    {{ ($myimg | fingerprint ).Width }}

Fixes #5903
Fixes #6234
Fixes #6266
2019-08-26 15:00:44 +02:00
Niklas Fasching
58d4c0a8be deps: Update go-org (fix footnotes in headlines) 2019-08-24 13:23:42 +02:00
Christian Oliff
c5319db9f1 Discrepancy typo fix 2019-08-23 17:21:37 +02:00
Bjørn Erik Pedersen
ad1d6d6406
source: Remove debug check left during development
Fixes #6249
2019-08-23 07:37:56 +02:00
Vazrupe (HyeonGyu Lee)
fd3d90ced8 hugolib: Change to output non-panic error message if missing shortcode template
A panic occurred when the `nested` variable was nil.
Changed to check if the `nested` variable is nil.

Fixes #6075
2019-08-22 10:40:16 +02:00
hugoreleaser
3ae4b3e19f releaser: Prepare repository for 0.58.0-DEV
[ci skip]
2019-08-17 17:59:28 +00:00
hugoreleaser
a849cb2d9b releaser: Add release notes to /docs for release of 0.57.2
[ci skip]
2019-08-17 17:51:54 +00:00
hugoreleaser
01fbb46354 releaser: Bump versions for release of 0.57.2
[ci skip]
2019-08-17 17:51:54 +00:00
hugoreleaser
9958e5e911 releaser: Add release notes for 0.57.2
[ci skip]
2019-08-17 17:51:54 +00:00
Bjørn Erik Pedersen
f77a4a2f4a
Revert "Update to Go 1.11.13 and 1.12.9"
This reverts commit f28efd3582.
2019-08-17 19:38:12 +02:00
Bjørn Erik Pedersen
88d6993612
tpl: Use RegularPages for RSS template
This is in line with how it was in Hugo 0.56.

See #6238
2019-08-17 19:37:14 +02:00
Bjørn Erik Pedersen
ea68160300 hugolib: Don't use the global warning logger
See #6238
2019-08-17 18:50:16 +02:00
Bjørn Erik Pedersen
564cf1bb11 tpl: Avoid "home page warning" in RSS template
See #6238
2019-08-17 18:50:16 +02:00
Bjørn Erik Pedersen
4b4bdcfe74 hugolib: Allow index.md inside bundles
Fixes #6208
2019-08-17 18:50:16 +02:00
Bjørn Erik Pedersen
18836a71ce
Adjust the default paginator for sections
To make it in line with 0.56 for sections; only paginate regular pages.

Fixes #6231
2019-08-17 13:08:03 +02:00
Bjørn Erik Pedersen
ab40ce679f
Revert the 0.57 home.Pages change
In 0.57 we change the behaviour of home.Pages to be in line with the other sections. This has created a lot noise and breakage in the wild.

This commit reverts that change, but adds a warning that we will change this in 0.58 and that you should consider using .Site.RegularPages if that is what you want.
2019-08-17 13:06:39 +02:00
Bjørn Erik Pedersen
416493b548
hugolib: Add a site benchmark 2019-08-16 16:24:21 +02:00
Bjørn Erik Pedersen
f28efd3582
Update to Go 1.11.13 and 1.12.9
Fixes #6228
2019-08-16 10:46:34 +02:00
hugoreleaser
36d749f4ea releaser: Prepare repository for 0.58.0-DEV
[ci skip]
2019-08-15 19:00:12 +00:00
hugoreleaser
58c56e9ded releaser: Add release notes to /docs for release of 0.57.1
[ci skip]
2019-08-15 18:52:49 +00:00
hugoreleaser
484106cfa2 releaser: Bump versions for release of 0.57.1
[ci skip]
2019-08-15 18:52:49 +00:00
hugoreleaser
4d60a920fa releaser: Add release notes for 0.57.1
[ci skip]
2019-08-15 18:52:49 +00:00
Bjørn Erik Pedersen
6ccf50ea7b hugolib: Fix draft etc. handling of _index.md pages
We will need to revisit this with a proper spec, but this commit makes sure that draft/expiryDate etc. set in front matter on _index.md content files that should disable the page will:

* Not crash
* Make the rendered page not render any `.Content`.

Fixes #6222
Fixes #6210
2019-08-15 20:41:48 +02:00
Bjørn Erik Pedersen
67524c9936 Fix mainSections logic
Fixes #6217
2019-08-15 20:21:57 +02:00
Bjørn Erik Pedersen
952a319496 Fix live reload mount logic with sub paths
Fixes #6209
2019-08-15 19:14:22 +02:00
Bjørn Erik Pedersen
321418f22a
modules: Disable "auto tidy" for now
See #6115
2019-08-15 16:50:02 +02:00
Bjørn Erik Pedersen
7f3aab5ac2
hugolib: Recover and log panics in content init
See #6210
2019-08-15 10:56:49 +02:00
Bjørn Erik Pedersen
028b992611
hugolib: Add some outputs tests
See #6210
2019-08-15 10:30:37 +02:00
Bjørn Erik Pedersen
9475f61a37
hugolib: Fix taxonomies vs expired
In Hugo 0.57 we needed to delay the page metadata initialization until we had built the page graph.

This introduced a regression in that we now created taxonomy entries for expired pages.

This fixes that by moving the "should not build" filter before we assemble the taxonomies.

Fixes #6213
2019-08-15 09:52:08 +02:00
HyeonGyu Lee
ea9261e856 commands: Make sure the hugo field is always initialized before it's used
Wrap the field to make it accessible after initialization.

Fixes #6193
2019-08-15 09:33:47 +02:00
hugoreleaser
37f5929803 releaser: Prepare repository for 0.58.0-DEV
[ci skip]
2019-08-14 08:13:53 +00:00
hugoreleaser
9b00e64765 releaser: Add release notes to /docs for release of 0.57.0
[ci skip]
2019-08-14 08:05:33 +00:00
hugoreleaser
ab849fcc98 releaser: Bump versions for release of 0.57.0
[ci skip]
2019-08-14 08:05:33 +00:00
hugoreleaser
8a4c080cc5
Add release notes for 0.57.0 2019-08-14 09:56:35 +02:00
Bjørn Erik Pedersen
4644b95bd5
hugolib: Remove temporary warning 2019-08-14 08:11:39 +02:00
Bjørn Erik Pedersen
1089cfe4e1
Add FileInfo to resources created with resources.Match etc.
Without it, image resize fails.

See #6190
2019-08-13 18:45:08 +02:00
Bjørn Erik Pedersen
cd575023af Improve the server assets cache invalidation logic
Fixes #6199
2019-08-13 18:09:46 +02:00
Bjørn Erik Pedersen
6315098104 modules: Do not fail build on errors in theme.toml
Fixes #6162
2019-08-13 18:09:11 +02:00
Bjørn Erik Pedersen
b64617fe4f
Add resources.Match and resources.GetMatch
Fix #6190
2019-08-13 11:44:20 +02:00
Bjørn Erik Pedersen
17ca8f0c4c
commands: Fix faulty -h logic in hugo mod get
Fixes #6197
2019-08-13 11:17:19 +02:00
Bjørn Erik Pedersen
9e57182705
tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
Christian Muehlhaeuser
6027ee1108 Avoid unnecessary conversions
No need to convert these types.
2019-08-10 20:12:38 +02:00
Christian Muehlhaeuser
c577a9ed23 Fixed ineffectual assignments
Dropped/fixed ineffectual assignments after static code analysis.
2019-08-10 20:11:51 +02:00
Christian Muehlhaeuser
a93cbb0d6c Simplify code
- Use bytes.Equal instead of bytes.Compare
- Omit range's value where it's unused
2019-08-10 20:10:32 +02:00
Bjørn Erik Pedersen
bd98182dbd Implement cascading front matter
Fixes #6041
2019-08-10 20:07:42 +02:00
Christian Muehlhaeuser
e88d798990 Fixed tautological error conditions
Drop error & nil checks where the value can not have changed.
2019-08-10 01:04:43 +02:00
XhmikosR
c0eef3b401 Use the SVG logo in README.md 2019-08-09 16:58:41 +02:00
Bjørn Erik Pedersen
166a394a2f Fix static sync issue with virtual mounts
Fixes #6165
2019-08-09 10:18:28 +02:00
Bjørn Erik Pedersen
8243952046 Add a branch bundle test case
See #6173
2019-08-09 09:44:41 +02:00
Bjørn Erik Pedersen
7ff0a8ee9f Simplify page tree logic
This is preparation for #6041.

For historic reasons, the code for bulding the section tree and the taxonomies were very much separate.

This works, but makes it hard to extend, maintain, and possibly not so fast as it could be.

This simplification also introduces 3 slightly breaking changes, which I suspect most people will be pleased about. See referenced issues:

This commit also switches the radix tree dependency to a mutable implementation: github.com/armon/go-radix.

Fixes #6154
Fixes #6153
Fixes #6152
2019-08-08 20:13:39 +02:00
Bjørn Erik Pedersen
df374851a0
hugolib: Add some more site benchmarks 2019-08-08 11:04:47 +02:00
HyeonGyu Lee
a843ca53b5 transform/urlreplacers: Cache the next position of urlreplacer.prefix
Improved performance due to `bytes.Index` repeated calls

Fixes #5942
2019-08-06 17:46:20 +02:00
Bjørn Erik Pedersen
02397e76ce
postcss: Fix no-map vs noMap discrepancy
Fixes #6166
2019-08-05 13:48:58 +02:00
Bjørn Erik Pedersen
de87624241 hugolib: Fix output format handling of mix cased page kinds
Fixes #4528
2019-08-05 11:22:03 +02:00
Bjørn Erik Pedersen
9ef4dca361
hugolib: Fix broken test 2019-08-01 22:09:58 +02:00
Bjørn Erik Pedersen
2d1d33673d
tpl: Regenerate templates 2019-08-01 14:05:20 +02:00
Christian Oliff
be0d4efc3d tpl: Always load GitHub Gists over HTTPS 2019-08-01 13:57:41 +02:00
XhmikosR
f7f549e3a7 Fix assorted typos 2019-08-01 13:55:48 +02:00
Shawn Smith
6512d128c6 common/collections: Fix typo 2019-08-01 13:52:05 +02:00
Robin Andersson
b8758de19e examples: Fix multilingual example compatibility with latest version 2019-08-01 13:49:07 +02:00
Bjørn Erik Pedersen
53077b0da5
Merge pull request #6149 from bep/sort-caseinsensitive
Implement lexicographically string sorting
2019-08-01 10:19:19 +02:00
hugoreleaser
a4f96a9d8c releaser: Prepare repository for 0.57.0-DEV
[ci skip]
2019-07-31 12:56:14 +00:00
hugoreleaser
f637a1eace releaser: Add release notes to /docs for release of 0.56.3
[ci skip]
2019-07-31 12:48:33 +00:00
hugoreleaser
9433c3c706 releaser: Bump versions for release of 0.56.3
[ci skip]
2019-07-31 12:48:33 +00:00
hugoreleaser
7b448340c0 releaser: Add release notes for 0.56.3
[ci skip]
2019-07-31 12:48:33 +00:00
Bjørn Erik Pedersen
0e086785fa hugolib: Fix bundle header clone logic
Fixes #6136
2019-07-31 14:20:24 +02:00
Bjørn Erik Pedersen
02b947eaa3
docs: Regenerate CLI docs 2019-07-31 12:11:22 +02:00
Bjørn Erik Pedersen
d7c233afee commands: Add "hugo config mounts" command
This prints the effective file mounts in a project.

Fixes #6144
2019-07-31 12:10:05 +02:00
Bjørn Erik Pedersen
45ee8a7a52 commands: Cleanup the hugo config command
Most importantly filter out some keys not relevant for the end user.

See #6144
2019-07-31 12:10:05 +02:00
Bjørn Erik Pedersen
4b6c5eba30 Move the mount duplicate filter to the modules package
Also simplify the mount validation logic. There are plenty of ways a user can create mount configs that behaves oddly.
2019-07-31 12:10:05 +02:00
Bjørn Erik Pedersen
edf9f0a354 Allow overlap in module mounts
Fixes #6146
2019-07-31 12:10:05 +02:00
Bjørn Erik Pedersen
36220851e4 Fix self-mounts on the main project
Fixes #6143
2019-07-31 12:10:05 +02:00
hugoreleaser
53ade40ba4 releaser: Prepare repository for 0.57.0-DEV
[ci skip]
2019-07-30 09:12:29 +00:00
hugoreleaser
5f033a7fcc releaser: Add release notes to /docs for release of 0.56.2
[ci skip]
2019-07-30 09:05:09 +00:00
hugoreleaser
2e6da00679 releaser: Bump versions for release of 0.56.2
[ci skip]
2019-07-30 09:05:09 +00:00
hugoreleaser
06f29068f8 releaser: Add release notes for 0.56.2
[ci skip]
2019-07-30 09:05:09 +00:00
Bjørn Erik Pedersen
84bc8d84e4
Add some more content language test assertions
See #6136
2019-07-30 09:58:58 +02:00
Bjørn Erik Pedersen
6eca0a3dee
commands: Fix config reloading in Vim and similar
The config path was simplified in Hugo 0.56.0 to support more config dirs/files (go.mod etc.),
and the new code path assumed that every file change would trigger a `Write` event.

This is not true for Vim etc. which triggers a `Chmod` and then a `Rename`.

Lesson learned: Be really careful changing Os/editor specific code without proper tests.

Fixes #6139
2019-07-30 09:35:01 +02:00
Bjørn Erik Pedersen
e28bd4c0f8
Fix Jekyll import
Fixes #6131
2019-07-30 09:14:14 +02:00
Bjørn Erik Pedersen
2c7c361091
releaser: Create a proper automated title for patch releases
Fixes #6126
2019-07-30 09:02:03 +02:00
Bjørn Erik Pedersen
c62bbf7b11
Fix image format detection for upper case extensions, e.g. JPG
This regression was introduced in 0.56.0.

Fixes #6137
2019-07-30 08:53:50 +02:00
Bjørn Erik Pedersen
00a238e32c Fix i18n project vs theme order
Fixes #6134
2019-07-29 19:10:15 +02:00
Bjørn Erik Pedersen
e5f9602459
Add proper error message when receiving nil in Resource transformation
Closes #6128
2019-07-29 09:59:39 +02:00
Bjørn Erik Pedersen
9f497e7b5f
Merge branch 'release-0.56.1' 2019-07-28 17:06:46 +02:00
hugoreleaser
3ad16af6f8 releaser: Prepare repository for 0.57.0-DEV
[ci skip]
2019-07-28 15:05:28 +00:00
Niklas Fasching
56908509eb deps: Update go-org to v0.1.2
fixes superfluous whitespace around code blocks due to misuse of pre tag
2019-07-28 16:52:27 +02:00
hugoreleaser
0ad218afc5 releaser: Add release notes to /docs for release of 0.56.1
[ci skip]
2019-07-28 14:51:43 +00:00
hugoreleaser
b5fda703f9 releaser: Bump versions for release of 0.56.1
[ci skip]
2019-07-28 14:51:43 +00:00
hugoreleaser
447700228c releaser: Add release notes for 0.56.1
[ci skip]
2019-07-28 14:51:43 +00:00
Bjørn Erik Pedersen
544f826dd6
releaser: Make it a one click release for patch releases 2019-07-28 15:05:15 +02:00
Bjørn Erik Pedersen
e393c6290e common/maps: Do not return error on params dot access on incompatible types
This error was introduced in 0.56 and has shown some site breakage in the wild.

Fixes #6121
2019-07-28 13:03:12 +02:00
Bjørn Erik Pedersen
93d02aabe6 resources: Fix image Width/Height regression
Fixes #6120
2019-07-28 12:34:18 +02:00
Bjørn Erik Pedersen
508db1906b
Revert "cache/filecache: Skip resource cache init if the fs is missing"
I need to revisit this.

This reverts commit da4c4a7789.
2019-07-26 16:29:33 +02:00
Bjørn Erik Pedersen
e5fe378925
modules: Set GO111MODULE=on
Fixes #6114
2019-07-26 10:55:50 +02:00
Bjørn Erik Pedersen
da4c4a7789
cache/filecache: Skip resource cache init if the fs is missing
Fixes #6113
2019-07-26 10:45:07 +02:00
hugoreleaser
b4827fbb14 releaser: Prepare repository for 0.57.0-DEV
[ci skip]
2019-07-25 16:45:08 +00:00
hugoreleaser
45f4eb9846 releaser: Add release notes to /docs for release of 0.56.0
[ci skip]
2019-07-25 16:37:58 +00:00
hugoreleaser
263f86d456 releaser: Bump versions for release of 0.56.0
[ci skip]
2019-07-25 16:37:58 +00:00
Bjørn Erik Pedersen
bed75108e4
Update release notes 2019-07-25 18:29:55 +02:00
hugoreleaser
8d7006d853 releaser: Add release notes draft for 0.56.0
Rename to *-ready.md to continue. [ci skip]
2019-07-25 15:58:15 +00:00
Bjørn Erik Pedersen
e5b6e2085a
resources: Fix test on Windows 2019-07-25 16:54:05 +02:00
Bjørn Erik Pedersen
77bf2991b1 docs: Add Hugo Modules docs 2019-07-25 13:21:30 +02:00
Bjørn Erik Pedersen
e5f2299741 Block symlink dir traversal for /static
This is in line with how it behaved before, but it was lifted a little for the project mount for Hugo Modules,
but that could create hard-to-detect loops.
2019-07-25 11:27:25 +02:00
Bjørn Erik Pedersen
87a07282a2
modules: Gofmt 2019-07-24 23:31:30 +02:00
Bjørn Erik Pedersen
882d678bbf
modules: Rename disabled => disable in config 2019-07-24 21:46:24 +02:00
Bjørn Erik Pedersen
fa28df1058
hugolib: Fix broken test 2019-07-24 19:50:34 +02:00
Bjørn Erik Pedersen
072aa7f110
hugolib: Add a symdiff test 2019-07-24 10:05:09 +02:00
Bjørn Erik Pedersen
215d2ed883
docs: Regenerate CLI docs 2019-07-24 09:40:41 +02:00
Bjørn Erik Pedersen
23adc0c2d9
docs: Regenerate data helpers 2019-07-24 09:39:12 +02:00
Bjørn Erik Pedersen
461b0e066f
Merge commit '5cb4e46cfa' 2019-07-24 09:36:50 +02:00
Bjørn Erik Pedersen
5cb4e46cfa Squashed 'docs/' changes from 540aeddc7..41aae7abb
41aae7abb Better deploy script example

git-subtree-dir: docs
git-subtree-split: 41aae7abb37d43db3a38e09f2ef674cce2c98ce9
2019-07-24 09:36:50 +02:00
Bjørn Erik Pedersen
9f5a92078a
Add Hugo Modules
This commit implements Hugo Modules.

This is a broad subject, but some keywords include:

* A new `module` configuration section where you can import almost anything. You can configure both your own file mounts nd the file mounts of the modules you import. This is the new recommended way of configuring what you earlier put in `configDir`, `staticDir` etc. And it also allows you to mount folders in non-Hugo-projects, e.g. the `SCSS` folder in the Bootstrap GitHub project.
* A module consists of a set of mounts to the standard 7 component types in Hugo: `static`, `content`, `layouts`, `data`, `assets`, `i18n`, and `archetypes`. Yes, Theme Components can now include content, which should be very useful, especially in bigger multilingual projects.
* Modules not in your local file cache will be downloaded automatically and even "hot replaced" while the server is running.
* Hugo Modules supports and encourages semver versioned modules, and uses the minimal version selection algorithm to resolve versions.
* A new set of CLI commands are provided to manage all of this: `hugo mod init`,  `hugo mod get`,  `hugo mod graph`,  `hugo mod tidy`, and  `hugo mod vendor`.

All of the above is backed by Go Modules.

Fixes #5973
Fixes #5996
Fixes #6010
Fixes #5911
Fixes #5940
Fixes #6074
Fixes #6082
Fixes #6092
2019-07-24 09:35:53 +02:00
Bjørn Erik Pedersen
47953148b6
deps: Tidy 2019-07-23 00:13:46 +02:00
Bjørn Erik Pedersen
2fc0abd22a
Fix livereload for @import case
Fixes #6106
2019-07-22 13:54:24 +02:00
peaceiris
53da3881de releaser: Remove unused function
gitLog function is not used
2019-07-20 12:33:30 +02:00
Bjørn Erik Pedersen
ac101aba4f
deps: Update xerrors
To get it to build on Go 1.13.
2019-07-19 09:09:04 +02:00
Bjørn Erik Pedersen
58a47ccde0
travis: Ignore errors in go mod download
It sometimes fails with 502 errors, but the dependency download later when tests are run.
2019-07-17 15:35:31 +02:00
Bjørn Erik Pedersen
95b1d3013b
deps: Update Chroma
Fixes #6088
2019-07-16 21:08:18 +02:00
Eric Selin
a5604e18b0
resource/postcss: Change postcss to check for local installation under node_modules/.bin
Fixes #5091
2019-07-16 10:02:20 +02:00
Bjørn Erik Pedersen
05d0eddd2b
Merge commit '35febb2e2a' 2019-07-15 23:50:56 +02:00
Bjørn Erik Pedersen
35febb2e2a Squashed 'docs/' changes from 0c3c04fd6..540aeddc7
540aeddc7 Small fixes for Open Graph internal template
47bbb3fd7 Bump lodash.template from 4.4.0 to 4.5.0 in /themes/gohugoioTheme
64c1cc3db Update title.md
36c27be37 Update configuration.md
4627cfe9a added commento.io to the list
341d9d945 Fix link to font assets
4a6876dec Small typo fix in configuration.md
736d6ddd7 Add bypasscensorship.org showcase.
de7ab636b Use actual width in image processing examples
6c88ab2da Update directory-structure.md
88f559e81 Fix spelling mistakes
7bd427141 Rephrase four points from Hosting on Github docs
bce1b1832 Fix typos for absLangURL and relLangURL functions
abab57335 Update directory-structure.md
a6716f2ed Fix metadata list
5ef61d912 Fix typo
d9e467b8b Actuall show how to generate pages in quickstart
0aadc92e7 Update link to issue theme submission
b1902faaa Remove incorrect note about Hugo snap --classic use.
d451e7362 Update documentation on page variables
ab2233c39 Update publish_to_ghpages.sh
7c120346b Fix typo in syntax highlighting page.
f01dc555d Correct some typos
be825ade9 Videos plural produces og:video
bc962fbdf Updated installing.md file to include linuxbrew installation
08c9f8fc8 Mention 1 MB file size limit in readFile doc
7145e29e2 Fixes bad URL in menus.md for .hasChildren * part of issue #814
0edbd59c4 add warning about .Hugo variable being deprecated
77f74ced5 fix: typo in output-formats.md
f71b67f34 Correct typo "RFC339" to "RFC1123Z" (#837)
424c0207a baseurl -> baseURL
f4e24a03e Render launched; no invite code needed
37e1101d3 Add Render hosting guide
01d0a6481 Bump js-yaml from 3.12.0 to 3.13.1 in /themes/gohugoioTheme
edb7b36b0 Link site hierarchy schema to larger version
af72acda0 Fixes typo in fingerprint.md
0a738467b Adding required XML tag to sample templates
52211f656 Remove note that XML declaration is not needed
a39b9ac87 Adding required XML tag to sample templates
1a44d8a50 Add configuration information for Azure
5b7c6b5a1 remove google plus
5a64301ba HTTPS link to yaml.org/spec/

git-subtree-dir: docs
git-subtree-split: 540aeddc797658a2c3d0e49e944592d2b23b3bb8
2019-07-15 23:49:41 +02:00
Bjørn Erik Pedersen
c624a77992 tpl/collections: Add Merge function
Merges two maps recursively and returns a new one. Merge is case-insensitive.

Fixes #5992
2019-07-15 20:47:35 +02:00
Niklas Fasching
020086cb2b Add org to front matter formats
actually it's 5, there's also csv. Afaict it's not meant to be used in that way
though so let's just add org.
2019-07-10 11:14:37 +02:00
Niklas Fasching
8524baee16 deps: Update go-org
- added support for anonymous footnotes
- changed source block html output to more closely resemble emacs org-export
  output
2019-07-10 11:14:37 +02:00
Kaushal Modi
90b0127f63 Fix typo s/Meny/Menu/ 2019-07-09 17:28:53 +02:00
Bjørn Erik Pedersen
7611078dae
hugolib: Add testfile to .gitignore 2019-07-07 13:01:30 +02:00
Bjørn Erik Pedersen
b2a3d4644b
tpl/tplimpl: Regenerate templates 2019-06-26 22:39:32 +02:00
Mark Mandel
88c8a15be1 Pagination - do not render href if no next item
When using a html link checker with Hugo, this template consistently causes errors, as it renders `href=""` attributes when next/previous is disabled.

This change makes it so that the `href` attribute is not rendered at all if `HasNext` is false - which is better semantically, and makes link checking far easier.
2019-06-26 22:38:30 +02:00
Justin Van Patten
59c4bc52ed Include path to source page in non-relative ref/relref warning
We occasionally see warnings when building our site:

```
WARN 2019/06/25 23:07:08 make non-relative ref/relref page reference(s) in page %q absolute, e.g. {{< ref "/blog/my-post.md" >}}
```

But the `%q` value is missing, making it difficult to track down the source of the warning.

This change addresses that, by including the source path in the warning:

```
WARN 2019/06/25 23:07:31 make non-relative ref/relref page reference(s) in page "blog/my-post/index.md" absolute, e.g. {{< ref "/blog/my-post.md" >}}
```
2019-06-26 09:25:12 +02:00
Bjørn Erik Pedersen
dc1d4a9200
hugolib: Add another site benchmark
Also rework test test setup so the benchmarks can also be run as tests, which
is useful when creating new benchmarks an make sure they ... work.
2019-06-26 09:09:40 +02:00
Joshua Arnott
de7b9475c0 commands: Remove comma after URL in new site output
Some terminals include the comma in the URL when hyperlinking, resulting in a 404
2019-06-19 23:03:30 +02:00
Bjørn Erik Pedersen
d6ca728ff3
deps: Revert to an older version of Blackfriday
See #6040
2019-06-16 22:13:23 +02:00
Christian Oliff
ff10aa522d examples: Update link to prevent redirect 2019-06-12 13:56:05 +02:00
Christian Oliff
9f258d2b8f examples: Update URLs 2019-06-12 12:29:19 +02:00
Bjørn Erik Pedersen
31c9c690fd releaser: Update Go Releaser and consolidate the 2 configs
Fixes #5949
2019-06-11 00:02:06 +02:00
Bjørn Erik Pedersen
e8a716b23a tpl/collections: Fix slice type handling in sort
The `sort` template func was producing a `[]page.Page` which did not work in `.Paginate`.

Fixes #6023
2019-06-10 08:32:44 +02:00
Bjørn Erik Pedersen
3e6cb2cb77 hugolib: Fix bundle path when slug is set
Fixes #4870
2019-06-09 16:55:08 +02:00
Bjørn Erik Pedersen
8d898ad667 tpl/collections: Unwrap any interface value in sort and where
Hugo `0.55.0` introduced some new interface types for `Page` etc.

This worked great in general, but there were cases where this would fail in `where` and `sort`.

One such example would be sorting by `MenuItem.Page.Date` where `Page` on `MenuItem` was a small subset of the bigger `page.Page` interface.

This commit fixes that by unwrapping such interface values.

Fixes #5989
2019-06-09 16:54:36 +02:00
Niklas Fasching
fad183c4ae Refactor Org mode front matter: Introduce '#+KEY[]:' array notation
Hugo requires some front matter values to be arrays (e.g. for taxonomies).
Org mode front matter syntax (`#+KEY: VALUE`) does however not support anything
but string values normally - which is why goorgeous hardcoded the values for
the keys tags, categories & aliases to be parsed as string arrays. This causes
problems with custom taxonomies.

A simple thing we can do instead is make keywords ending in '[]' be parsed as
string arrays.
2019-06-08 10:13:00 +02:00
Niklas Fasching
b6867bf806 Improve Org mode support: Replace goorgeous with go-org
Sadly, goorgeous has not been updated in over a year and still has a lot of
open issues (e.g. no support for nested lists).

go-org fixes most of those issues and supports a larger subset of Org mode
syntax.
2019-06-08 10:13:00 +02:00
Robert van Gent
9df57154ee deploy: Default --target to the first deployment target 2019-06-08 00:41:59 +02:00
Vincent Fiduccia
35abce27ca Add safety barrier between concatenated javascript resources 2019-06-02 10:23:48 +02:00
Robert van Gent
8914fe7ed7 Update CLI doc for "long" form 2019-05-31 22:08:12 +02:00
Robert van Gent
b0f536fb27 Drop dashes in http header matcher attributes; other changes from code review 2019-05-31 22:08:12 +02:00
Robert van Gent
1384d77a04 docs: Add documentation for "hugo deploy" 2019-05-31 22:08:12 +02:00
Robert van Gent
5e83f42562 deploy: remove TODO comment about subfolders; handled by GoCDK blob URLs 2019-05-30 22:42:44 +02:00
Robert van Gent
b376b2685a deps: Update gocloud.dev to v0.15.0. 2019-05-30 22:07:04 +02:00
Anton Harniakou
fb007e9ae5 tpl/collections: Convert numeric values to float64 and compare them
Fixes #5685
2019-05-30 11:32:58 +02:00
Bjørn Erik Pedersen
4c560020bc
resources: Return nil when not found in resources.Get
Fixes #5999
2019-05-29 22:33:03 +02:00
Bjørn Erik Pedersen
d44d3ea898
deps: Update Viper
This will hopefully improve the dependency/install problems we have seen lately.

See #5954
2019-05-28 16:11:09 +02:00
Bruno Amaral
d1cf53f5f4 Remove references to Google+
According to google, this is no longer supported and structured data should be used instead: https://support.google.com/webmasters/answer/6083347?hl=en
2019-05-26 19:24:45 +02:00
Bjørn Erik Pedersen
811ee996a6
Update gitmap to get CommitDate field 2019-05-25 10:43:09 +02:00
Bjørn Erik Pedersen
4f61a926f6
Merge commit 'be04ece859' 2019-05-25 10:41:51 +02:00
Bjørn Erik Pedersen
be04ece859 Squashed 'docs/' changes from 50c02516c..0c3c04fd6
0c3c04fd6 Merge pull request #827 from BCNelson/range-patch
b14dd3505 Updated link to Go Docs to more helpful page
c3d83149a Boolean Values in the Where Function
56d4cea3c hugo-extended no longer the default
e9b15c698 Update index.md
11de98e0d Release 0.55.6
d2def17f4 Merge branch 'release-0.55.6'
115457b70 releaser: Add release notes to /docs for release of 0.55.6
25855690d Fix misspelling
fc5e43db2 Update 404.md with Netlify Instructions
9f684318f Removed mentioning of removed --stepAnalysis command line option
86ba9071c Related md5 and aliases for sha1/sha256
15f48966a Added related sha function into the See Also
5e08b6930 Fix date description
908e87ab2 Revert docs/config.toml changes
c925646cf Add a "deploy" command
e765084dd Update sectionvars.md
e08be4d81 Update sectionvars.md
7c9653cbe Hugo 0.55.5
1035ff028 releaser: Add release notes to /docs for release of 0.55.5
cda21f9d4 docs: Regenerate docs helper

git-subtree-dir: docs
git-subtree-split: 0c3c04fd63a7f140bdca0d3ca9b1e9dc794ebd77
2019-05-25 10:41:23 +02:00
Ruslan Nasonov
5b4b8bb3c1 commands: Create new 'hugo list all' command
New:
- command `hugo list all`, return all posts meta in csv format

Refactoring:
- move common parts in commands/list.go to function `buildSites`
- change way to detect path to content

See #5904
2019-05-25 00:09:51 +02:00
Brice BERDAH
2278b0eb02 Medium -> Hugo exporting tool
Suggesting a simple yet powerful tool for people looking to export their Medium blog to Hugo
2019-05-24 15:35:41 +02:00
Brian 'Redbeard' Harrington
41974303f3 dockerfile: Switch base image for final build
Switching the base image for the final build to alpine as it still
provides a minimal interface, but has a mechanism for easily including
relevant CA certificates.  This is currently pinned to a tagged version,
though since none of the underlying mechanisms are used this should
balance both remaining stable, supported for a period of time, and
providing usable functionality.

Resolves #5970
Affects #5056
2019-05-23 12:49:13 -06:00
Bjørn Erik Pedersen
6b3f1a1002
Merge branch 'release-0.55.6' 2019-05-18 10:18:23 +02:00
hugoreleaser
fa8e334dae releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-05-18 07:57:50 +00:00
hugoreleaser
a5d4c82d2f releaser: Add release notes to /docs for release of 0.55.6
[ci skip]
2019-05-18 07:55:28 +00:00
hugoreleaser
32f4b38338 releaser: Bump versions for release of 0.55.6
[ci skip]
2019-05-18 07:55:28 +00:00
Bjørn Erik Pedersen
9b48c5d6bd
Release 0.55.6 2019-05-18 09:50:50 +02:00
hugoreleaser
8a1873a2d5 releaser: Add release notes draft for 0.55.6
Rename to *-ready.md to continue. [ci skip]
2019-05-18 07:39:23 +00:00
Bjørn Erik Pedersen
95ce2a40e7
hugolib: Prevent parallel server rebuilds
There have been reports about infrequent paginator crashes when running the Hugo server since 0.55.0.

The reason have been narrowed down to that of parallel rebuilds.

This isn't a new thing, but the changes in 0.55.0 made it extra important to serialize the page initialization.

This commit fixes that by protecting the `Build` method with a lock when running in server mode.

Fixes #5885
Fixes #5968
2019-05-18 09:01:40 +02:00
Rodolfo Carvalho
e22b3f54c3 tpl: Fix internal templates usage of safeHTMLAttr
The `safeHTMLAttr` function operates on a full attribute definition, not
just within the attribute value.

Docs: https://gohugo.io/functions/safehtmlattr/

For `opengraph.html`, run the whole `content` HTML attribute through
`safeHTMLAttr`. That will preserve `+` signs in formatted dates.

For `vimeo_simple.html`, `safeHTMLAttr` was in the context of an
attribute value, thus having no effect. In this case we could replace it
with `safeURL`, but since the code is coming from an API it is safer to
just let Go's template engine sanitize the value as it already does with
`provider_url`.

Fixes #5236 (no need to change Go upstream)
Related to #5246
2019-05-17 16:00:54 +02:00
Bjørn Erik Pedersen
71b8d8b6a4
Update to Go 1.12.5 and Go 1.11.10
Fixes #5944
2019-05-15 07:49:04 +02:00
Robert van Gent
5dc6d0df94 deploy: Add tests; fix Windows 2019-05-09 22:11:23 +02:00
Robert van Gent
527cf1ab03 deploy: Support configuration of upload order 2019-05-06 22:59:07 +02:00
Robert van Gent
f4956d9aae deploy: Support invalidating a CloudFront CDN cache 2019-05-06 21:09:33 +02:00
Bjørn Erik Pedersen
2838d58b1d
i18n: Move the package below /langs
To get fewer top level packages.
2019-05-04 18:25:56 +02:00
Robert van Gent
f330e869e4 deploy: compute MD5 by reading if List didn't provide one 2019-05-04 09:31:34 +02:00
Robert van Gent
f2b5d4de34 Revert docs/config.toml changes 2019-05-03 17:58:40 +02:00
Bjørn Erik Pedersen
0091b1f893 travis: Use proxy.golang.org 2019-05-03 17:58:40 +02:00
Robert van Gent
c7165589b3 Add a "deploy" command 2019-05-03 17:58:40 +02:00
Bjørn Erik Pedersen
ad5703a917
hugolib: Disable racy test
See #5926
2019-05-03 09:20:39 +02:00
hugoreleaser
f94a388ad3 releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-05-02 13:06:04 +00:00
hugoreleaser
a83256b9cd releaser: Add release notes to /docs for release of 0.55.5
[ci skip]
2019-05-02 13:03:34 +00:00
hugoreleaser
77ad1336d2 releaser: Bump versions for release of 0.55.5
[ci skip]
2019-05-02 13:03:34 +00:00
Bjørn Erik Pedersen
e33ed29b75
Release 0.55.5 2019-05-02 14:50:04 +02:00
hugoreleaser
2fb708d3d0 releaser: Add release notes draft for 0.55.5
Rename to *-ready.md to continue. [ci skip]
2019-05-02 12:36:11 +00:00
Bjørn Erik Pedersen
cee181c3a6
docs: Regenerate docs helper 2019-05-02 14:26:02 +02:00
Bjørn Erik Pedersen
b1d438ea28
Merge commit 'f147b5c53e' 2019-05-02 14:24:13 +02:00
Bjørn Erik Pedersen
f147b5c53e Squashed 'docs/' changes from 13097daf2..50c02516c
50c02516c resources: Clean
380554caf Added Pharmaseal case study
bd462671d Fix typo
0522a2595 no -> fr
f2c4671db Fix broken Netlify setup
056da25f2 Release 0.55.4
2ddca746e Merge branch 'temp554'
3d6cf9967 releaser: Add release notes to /docs for release of 0.55.4
9dc637cab Minor link fix
95186103c Release 0.55.3
b2449cd25 releaser: Add release notes to /docs for release of 0.55.3
55934c3a2 docs: Regenerate docs helper

git-subtree-dir: docs
git-subtree-split: 50c02516cb7237dc1b95e98fe433327a4bcefc10
2019-05-02 14:23:40 +02:00
Bjørn Erik Pedersen
6b76841b05 output: Fix permalink in sitemap etc. when multiple permalinkable output formats
In Hugo 0.55.0 we made AMP `permalinkable`. We also render the output formats in their natural sort order, meaning `AMP` will be rendered before `HTML`. References in the sitemap would then point to the AMP version, and this is normally not what you'd want.

This commit fixes that by making `HTML` by default sort before the others.

If this is not you want, you can set `weight` on the output format configuration.

Fixes #5910
2019-05-02 14:23:16 +02:00
Bjørn Erik Pedersen
bcbed4ebda hugolib: Fix PrevInSection/NextInSection for nested sections
This was broken in Hugo 0.55.0.

Fixes #5883
2019-05-01 19:34:28 +02:00
Bjørn Erik Pedersen
009076e5ee lazy: Fix concurrent initialization order
Fixes #5901
2019-05-01 16:00:31 +02:00
David Birks
1cbb501be8 Update blackfriday to v1.5.2 2019-05-01 11:56:53 +02:00
Bjørn Erik Pedersen
66b143a01d tpl/compare: Fix nil compare in eq/ne for interface values
Fixes #5905
2019-04-29 18:43:44 +02:00
Cameron Moore
4f93f8c670 tpl: Fix hugo package name and add godocs 2019-04-27 22:44:57 +02:00
Cameron Moore
f76e50118b tpl: Provide more detailed errors in Where 2019-04-27 09:54:22 +02:00
hugoreleaser
f84df16fea releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-04-25 07:41:16 +00:00
hugoreleaser
579004178b releaser: Add release notes to /docs for release of 0.55.4
[ci skip]
2019-04-25 07:38:48 +00:00
hugoreleaser
f2fbca23aa releaser: Bump versions for release of 0.55.4
[ci skip]
2019-04-25 07:38:48 +00:00
Bjørn Erik Pedersen
1707f1a5f5
Release 0.55.4 2019-04-25 09:28:17 +02:00
hugoreleaser
211d667979 releaser: Add release notes draft for 0.55.4
Rename to *-ready.md to continue. [ci skip]
2019-04-25 07:26:35 +00:00
Bjørn Erik Pedersen
33c738116c hugolib: Fix shortcode version=1 logic
Fixes #5831
2019-04-24 15:35:04 +02:00
Bjørn Erik Pedersen
69a56420ae hugolib: Avoid recloning of shortcode templates
```bash
benchmark                                    old ns/op     new ns/op     delta
BenchmarkSiteNew/Bundle_with_image-4         14572242      14382188      -1.30%
BenchmarkSiteNew/Bundle_with_JSON_file-4     13683922      13738196      +0.40%
BenchmarkSiteNew/Multiple_languages-4        41912231      25192494      -39.89%

benchmark                                    old allocs     new allocs     delta
BenchmarkSiteNew/Bundle_with_image-4         57496          57493          -0.01%
BenchmarkSiteNew/Bundle_with_JSON_file-4     57492          57501          +0.02%
BenchmarkSiteNew/Multiple_languages-4        242422         118809         -50.99%

benchmark                                    old bytes     new bytes     delta
BenchmarkSiteNew/Bundle_with_image-4         3845077       3844065       -0.03%
BenchmarkSiteNew/Bundle_with_JSON_file-4     3627442       3627798       +0.01%
BenchmarkSiteNew/Multiple_languages-4        13963502      7543885       -45.97%
```

Fixes #5890
2019-04-24 12:37:57 +02:00
Bjørn Erik Pedersen
4756ec3cd8 i18n: Avoid rebuilding the Translations map for every lookup
```bash
benchmark                                                    old ns/op     new ns/op     delta
BenchmarkI18nTranslate/all-present-4                         764           757           -0.92%
BenchmarkI18nTranslate/present-in-default-4                  2578          1457          -43.48%
BenchmarkI18nTranslate/present-in-current-4                  764           766           +0.26%
BenchmarkI18nTranslate/missing-4                             3362          1103          -67.19%
BenchmarkI18nTranslate/file-missing-4                        4646          3611          -22.28%
BenchmarkI18nTranslate/context-provided-4                    2013          2014          +0.05%
BenchmarkI18nTranslate/same-id-and-translation-4             1961          784           -60.02%
BenchmarkI18nTranslate/same-id-and-translation-default-4     3717          1405          -62.20%
BenchmarkI18nTranslate/unknown-language-code-4               1775          1787          +0.68%

benchmark                                                    old allocs     new allocs     delta
BenchmarkI18nTranslate/all-present-4                         6              6              +0.00%
BenchmarkI18nTranslate/present-in-default-4                  16             10             -37.50%
BenchmarkI18nTranslate/present-in-current-4                  6              6              +0.00%
BenchmarkI18nTranslate/missing-4                             20             8              -60.00%
BenchmarkI18nTranslate/file-missing-4                        27             21             -22.22%
BenchmarkI18nTranslate/context-provided-4                    15             15             +0.00%
BenchmarkI18nTranslate/same-id-and-translation-4             12             6              -50.00%
BenchmarkI18nTranslate/same-id-and-translation-default-4     22             10             -54.55%
BenchmarkI18nTranslate/unknown-language-code-4               13             13             +0.00%

benchmark                                                    old bytes     new bytes     delta
BenchmarkI18nTranslate/all-present-4                         152           152           +0.00%
BenchmarkI18nTranslate/present-in-default-4                  1144          216           -81.12%
BenchmarkI18nTranslate/present-in-current-4                  152           152           +0.00%
BenchmarkI18nTranslate/missing-4                             2008          152           -92.43%
BenchmarkI18nTranslate/file-missing-4                        1208          600           -50.33%
BenchmarkI18nTranslate/context-provided-4                    704           704           +0.00%
BenchmarkI18nTranslate/same-id-and-translation-4             1080          152           -85.93%
BenchmarkI18nTranslate/same-id-and-translation-default-4     2073          216           -89.58%
BenchmarkI18nTranslate/unknown-language-code-4               696           696           +0.00%
```

Fixes #5892
2019-04-23 21:40:50 +02:00
Bjørn Erik Pedersen
4c3c512038
commands: Init mem profile at the end
Much more useful ...
2019-04-23 17:14:02 +02:00
Bjørn Erik Pedersen
0775c98e6c hugolib: No links for bundled pages
This fixes a bug introduced in Hugo 0.55.

Fixes #5882
2019-04-22 13:22:01 +02:00
hugoreleaser
1477fb33c9 releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-04-20 14:25:57 +00:00
hugoreleaser
993b84333c releaser: Add release notes to /docs for release of 0.55.3
[ci skip]
2019-04-20 14:23:12 +00:00
hugoreleaser
a9ee2ab58c releaser: Bump versions for release of 0.55.3
[ci skip]
2019-04-20 14:23:12 +00:00
Bjørn Erik Pedersen
c85b726f8a
Release 0.55.3 2019-04-20 16:12:42 +02:00
hugoreleaser
89cf7a3f4b releaser: Add release notes draft for 0.55.3
Rename to *-ready.md to continue. [ci skip]
2019-04-20 14:08:54 +00:00
Bjørn Erik Pedersen
75b16e30ec
docs: Regenerate docs helper 2019-04-20 15:20:08 +02:00
Bjørn Erik Pedersen
0508ca1856
Merge commit 'a0c28c943c' 2019-04-20 15:19:38 +02:00
Bjørn Erik Pedersen
a0c28c943c Squashed 'docs/' changes from 0f2bf195e..13097daf2
13097daf2 Update shortcode docs vs 0.55
9a7e19231 Update URL docs for relative URLs etc
bd58dd877 Adjust Output Formats docs
f3e9fbc00 Document output format `permalinkable`
3778ce689 Update partials.md
7b207a404 Partial: Update variable name in example
7d7b1f03c Document partials returning a value.
7ae93b7ca Merge branch 'temp552'
81910d266 releaser: Add release notes to /docs for release of 0.55.2
c166cef47 Fix typo
23adeb672 Point mmark links to its new repository
369a87339 Merge branch 'temp551'
eb6097e9f Bump to 0.55.1
766ee61a8 releaser: Add release notes to /docs for release of 0.55.1
a5a5f5d75 Start of taxonomy docs update for Hugo 0.55
fb5f75e9a Remove the space in `. RelPermalink`

git-subtree-dir: docs
git-subtree-split: 13097daf2e22fabfdb7528ca8709e86dba2b4a72
2019-04-20 15:18:59 +02:00
Bjørn Erik Pedersen
c7dd66bfe2 Fix links for non-HTML output formats
They were not correct for regular pages.

Fixes #5877
2019-04-20 15:01:20 +02:00
Bjørn Erik Pedersen
7aeeb60d7e
hugolib: Add some OutputFormats.Get tests
See #5877
2019-04-19 10:52:31 +02:00
Bjørn Erik Pedersen
ea529c847e Fix menu URL when multiple permalinkable output formats
In Hugo `0.55` we introduced the `permalinkable` config attribute on Output Format, default enabled for `AMP` and `HTML`.

This meant that a Page could have different `RelPermalink` and `Permalink` depending on the rendering format.

The menu `URL` did not reflect that fact.

Fixes #5849
2019-04-19 10:29:52 +02:00
Bjørn Erik Pedersen
6c80acbd5e
hugolib: Add some integration tests for in/uniq using Pages
See #5875
See #5852
2019-04-19 09:07:21 +02:00
Bjørn Erik Pedersen
7fbfedf013
tpl/collections: Return error on invalid input in in
See #5875
2019-04-19 08:58:12 +02:00
Bjørn Erik Pedersen
06f56fc983 tpl/collections: Make Pages etc. work with the in func
Fixes #5875
2019-04-18 23:42:01 +02:00
Bjørn Erik Pedersen
d7a67dcb51 tpl/collections: Make Pages etc. work in uniq
Fixes #5852
2019-04-18 16:50:13 +02:00
Bjørn Erik Pedersen
3e421bd47c
commands: Replace IsDraft with Draft in list command
Fixes #5873
2019-04-18 09:25:40 +02:00
hugoreleaser
1028760331 releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-04-17 12:22:55 +00:00
hugoreleaser
9d02034881 releaser: Add release notes to /docs for release of 0.55.2
[ci skip]
2019-04-17 12:20:37 +00:00
hugoreleaser
ccfbb63d17 releaser: Bump versions for release of 0.55.2
[ci skip]
2019-04-17 12:20:37 +00:00
Bjørn Erik Pedersen
fcd63a865e
Release 0.55.2 2019-04-17 14:13:46 +02:00
hugoreleaser
7ace59d5bf releaser: Add release notes draft for 0.55.2
Rename to *-ready.md to continue. [ci skip]
2019-04-17 12:10:37 +00:00
Bjørn Erik Pedersen
35f41834ea
hugolib: Add more tests for Permalinkable
See #5849
2019-04-17 13:26:27 +02:00
Bjørn Erik Pedersen
9b17cbb62a hugolib: Fix Pages reinitialization on rebuilds
Which had some unpredictable behaviour when using `.Pages` on home page etc. that had a content page.

Fixes #5833
2019-04-17 12:56:46 +02:00
Bjørn Erik Pedersen
2957795f52 tpl/tplimpl: Handle late transformation of templates
Fixes #5865
2019-04-16 21:24:09 +02:00
Bjørn Erik Pedersen
56550d1e44
hugolib: Fix shortcode namespace issue
Fixes #5863
2019-04-15 18:31:56 +02:00
Bjørn Erik Pedersen
7881b0965f
hugolib: Fix false WARNINGs in lang prefix check
Add a slash to the check to make it less likely to match a valid value.

Fixes #5860
2019-04-15 17:12:29 +02:00
Bjørn Erik Pedersen
49d0a82641 hugolib: Fix bundle resource publishing when multiple output formats
The faulty logic published the bundled resources for the "first output" format.

This worked most of the time, but since the output formats list is sorted,
any output format only used for some of the pages (e.g. CSS) would not work properly.

Fixes #5858
2019-04-15 17:01:39 +02:00
Bjørn Erik Pedersen
b799b12f4a hugolib: Fix panic for unused taxonomy content files
In Hugo 0.55 we connected the taxonomy nodes with their owning Page.

This failed if you had, say, a content file for a author that did not author anything in the site:

```
content/authors/silent-persin/_index.md
```

Fixes #5847
2019-04-15 13:36:05 +02:00
Bjørn Erik Pedersen
701486728e hugolib: Fix dates for sections with dates in front matter
Fixes #5854
2019-04-13 20:01:43 +02:00
Bjørn Erik Pedersen
f2795d4d2c Fix WeightedPages in union etc.
We introduced a callback func() to get the owner Page in 0.55.0.

Sadly, funcs is  not comparable type in Go.

This commit replaces the func with a struct pointer that wraps the Page.

Fixes #5850
2019-04-13 18:52:38 +02:00
hugoreleaser
e85c057f99 releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-04-12 09:58:35 +00:00
hugoreleaser
223b3c2eec releaser: Add release notes to /docs for release of 0.55.1
[ci skip]
2019-04-12 09:56:13 +00:00
hugoreleaser
7ca15c7ddb releaser: Bump versions for release of 0.55.1
[ci skip]
2019-04-12 09:56:13 +00:00
Bjørn Erik Pedersen
adb776b22b
Release 0.55.1 2019-04-12 11:30:04 +02:00
hugoreleaser
5efdd14ebd releaser: Add release notes draft for 0.55.1
Rename to *-ready.md to continue. [ci skip]
2019-04-12 09:29:27 +00:00
Bjørn Erik Pedersen
8d7607aed1
hugolib: Add a test for parent's resources in shortcode
See #5833
2019-04-12 10:44:21 +02:00
Bjørn Erik Pedersen
4d425a86f5
Fix 2019-04-12 10:26:10 +02:00
Bjørn Erik Pedersen
9e9a1f92ba
hugolib: Fix simple menu config
This stopped working in Hugo 0.55:

```bash
---
menu: "main"
---
```

This was also the case for using a slice of menu entries.

This still worked:

---
menu:
  main:
    weight: 30
---
2019-04-12 10:04:17 +02:00
Bjørn Erik Pedersen
f7375c4972
Fix paginator refresh on server change
Fixes #5838
2019-04-12 09:18:59 +02:00
Yihui Xie
7966c0b5b7 Remove the space in . RelPermalink
The same fix as 3b86b4a9f5, applied to doc.
2019-04-10 22:45:20 +02:00
Bjørn Erik Pedersen
cc98fc8ad2
Merge commit '8b73644d81' 2019-04-09 23:59:59 +02:00
Bjørn Erik Pedersen
8b73644d81 Squashed 'docs/' changes from acf70cdd9..0f2bf195e
0f2bf195e Adjust shortcodes for 0.55
48c577121 Fix deprecation warnings
ed95a341a Update index.md
e4bc8981f Release 0.55.0
25acacb91 Merge branch 'temp55'
b240e321a releaser: Add release notes to /docs for release of 0.55.0
86a190c92 docs: Add information about summary front matter variable
9d94f4340 integrity: Add support for sha384
dd3fe9f92 Add HUGO_NUMWORKERMULTIPLIER
968372d86 Add trace.out to .gitignore
660772713 Add the Fireship images to cache
41a3e19cb hugolib: Allow page-relative aliases
4497e4b12 Update faq.md
b0ee3dccc output: Add missing JSON tag
173dac0b7 docs: Regenerate docshelper data
e30473062 docs: Regenerate CLI docs
8cb775be2 Merge commit 'c2037f0c9a'
5bc64bf44 Make Page an interface
371ff6c12 Add skipHTML option to blackfriday config

git-subtree-dir: docs
git-subtree-split: 0f2bf195ef549013cc843199fb50317b0d1a5e85
2019-04-09 23:59:13 +02:00
Bjørn Erik Pedersen
3b86b4a9f5
resources/page: Fix .RSSLinke deprecation message
Closes #4427
2019-04-09 16:47:29 +02:00
Bjørn Erik Pedersen
27a8049da7
tpl/tplimpl: Replace deprecated .GetParam usage
Fixes #5834
2019-04-09 16:39:12 +02:00
hugoreleaser
ee4274244b releaser: Prepare repository for 0.56.0-DEV
[ci skip]
2019-04-08 16:42:12 +00:00
hugoreleaser
4333cc77fe releaser: Add release notes to /docs for release of 0.55.0
[ci skip]
2019-04-08 16:39:45 +00:00
hugoreleaser
452cdcd7c8 releaser: Bump versions for release of 0.55.0
[ci skip]
2019-04-08 16:39:45 +00:00
Bjørn Erik Pedersen
05d614e13b
Release 0.55.0 2019-04-08 18:34:48 +02:00
hugoreleaser
018cd0c9da
releaser: Add release notes draft for 0.55.0
Rename to *-ready.md to continue. [ci skip]
2019-04-08 18:33:35 +02:00
Bjørn Erik Pedersen
612a06f067 Misc paginator adjustments
* Rewind paginator for server mode
* Add some more related tests.
* Replace the clumsy scratch constructs in internal paginator template with variables

See #5825
2019-04-08 11:02:12 +02:00
Bjørn Erik Pedersen
3db4a1cf7a Update to Go 1.12.2 and Go 1.11.7
Fixes #5819
2019-04-07 18:54:53 +02:00
Bjørn Erik Pedersen
f34e6172cf hugolib: Log warning on relative front matter url with lang
Will do this for one version only, as there may be situations where this is the correct thing.

Also add some more related test cases.

Fixes #5818
2019-04-07 18:54:18 +02:00
Bjørn Erik Pedersen
708d4ceebd Adjust rlimit logic
Closes #5821
2019-04-07 00:53:55 +02:00
Jim McDonald
ed65bda3b4 docs: Add information about summary front matter variable 2019-04-06 00:17:54 +02:00
Jim McDonald
3a62d54745 hugolib: Consider summary in front matter for .Summary
Add the ability to have a `summary` page variable that overrides
the auto-generated summary.  Logic for obtaining summary becomes:

  * if summary divider is present in content, use the text above it
  * if summary variables is present in page metadata, use that
  * auto-generate summary from first _x_ words of the content

Fixes #5800
2019-04-05 19:11:04 +02:00
Bjørn Erik Pedersen
ebab291c0e
resources/page: Regenerate JSON wrapper 2019-04-05 16:58:52 +02:00
Bjørn Erik Pedersen
75467cd785
resources/page: Add missing GitInfo to Page 2019-04-05 16:52:37 +02:00
Bjørn Erik Pedersen
d1553b4b0f
integrity: Add support for sha384
Fixes #5815
2019-04-05 16:35:07 +02:00
Bjørn Erik Pedersen
1d9dde82a0
hugolib: Fix default date assignment for sections
See #5784
2019-04-05 11:20:09 +02:00
Bjørn Erik Pedersen
87b16abd93
Add HUGO_NUMWORKERMULTIPLIER
And use that to calculate number of workers, if set, else fall back to number of logical CPUs.

Also tweak the relevant related settings to match the new setup.

Also remove the setting of `runtime.GOMAXPROCS` as this has been the default behaviour since Go 1.5.

Fixes #5814
2019-04-05 10:21:25 +02:00
Bjørn Erik Pedersen
415ca9673d
hugolib: Fix the GOMAXPROCS env get
Fixes #5813
2019-04-05 09:57:43 +02:00
Bjørn Erik Pedersen
8559f5c29f
Use YAML for the benchmark compare 2019-04-05 08:55:39 +02:00
Bjørn Erik Pedersen
e2dc432fe2
hugolib: Fix benchmark for YAML front matter 2019-04-05 08:52:58 +02:00
Bjørn Erik Pedersen
950295516d
hugolib: Buffer the render pages chan 2019-04-04 16:50:10 +02:00
Bjørn Erik Pedersen
032e6802d1
deps: Update to imaging v1.6.0
Closes #5812
2019-04-04 14:39:39 +02:00
Bjørn Erik Pedersen
d0d661dffd
hugolib: Re-work "fast render" logic in the new flow
Note that this fixes some "live reload" issues recently introduced in non-released code.

Closes #5811
See #5784
2019-04-04 13:51:22 +02:00
Bjørn Erik Pedersen
4494a01b79
metrics: Adjust the howSimilar logic vs strings
Also add a test.
2019-04-02 21:00:42 +02:00
Bjørn Erik Pedersen
e91e222cd2
resources/page: Implement compare.ProbablyEqer for the core slices
Fixes #5808
2019-04-02 16:10:13 +02:00
Bjørn Erik Pedersen
5185fb065b hugolib: Allow relative URLs in front matter
Before this commit you would have to do this in multilingual setups:

```
---
title: "Custom!"
url: "/jp/custom/foo"
---
```

This commit allows for relative URLs, e.g:

```
---
title: "Custom!"
url: "custom/foo"
---
```

Which is obviously easier and more portable.

The meaning of relative may change to include more in the future (e.g. role based access).

Fixes #5704
2019-04-02 10:33:15 +02:00
Bjørn Erik Pedersen
92baa14fd3 hugolib: Allow page-relative aliases
Fixes #5757
2019-04-02 10:32:47 +02:00
Bjørn Erik Pedersen
a55640de8e
tpl: Allow the partial template func to return any type
This commit adds support for return values in partials.

This means that you can now do this and similar:

    {{ $v := add . 42 }}
    {{ return $v }}

Partials without a `return` statement will be rendered as before.

This works for both `partial` and `partialCached`.

Fixes #5783
2019-04-02 10:30:24 +02:00
Bjørn Erik Pedersen
9225db636e
releaser: Remove version replacement in docs config
Fixes #5665
2019-04-01 09:11:36 +02:00
Bjørn Erik Pedersen
f7ef7d3761
releaser: Adjust patch vs images logic
Fixes #5664
2019-04-01 09:07:19 +02:00
Bjørn Erik Pedersen
f9d6feca08
hugolib: Fix alias path for AMP and similar
Fixes #5760
2019-03-30 16:46:51 +01:00
Bjørn Erik Pedersen
439ab0339d resources: Fix image publish ordering issue
Fixes #5730
2019-03-30 10:17:25 +01:00
Bjørn Erik Pedersen
b6a60f718e
output: Add missing JSON tag 2019-03-28 20:59:09 +01:00
Bjørn Erik Pedersen
bfdc44964a
docs: Regenerate docshelper data
Closes #5799
2019-03-28 09:49:54 +01:00
Bjørn Erik Pedersen
cc8515f187
deps: Update Chroma
Closes #5780
2019-03-28 09:46:55 +01:00
Bjørn Erik Pedersen
8bfd3a54a4
hugolib: Add a simple test for jsonify of Site
Closes #5780
2019-03-28 09:45:25 +01:00
Bjørn Erik Pedersen
bb533ca5e1
docs: Regenerate CLI docs
Fixes #5779
2019-03-26 18:46:01 +01:00
Bjørn Erik Pedersen
876e5f67b1
Merge commit 'c2037f0c9a' 2019-03-26 18:41:36 +01:00
Bjørn Erik Pedersen
c2037f0c9a Squashed 'docs/' changes from 4f4d1f48c..acf70cdd9
acf70cdd9 Update CSS after removing Purge
74c0bb7f2 Remove purge from Webpack, temporarily
397b7284f Merge commit 'ccb1e38f3822e9b5e4fb89a296324daf3400f23b'
ccb1e38f3 Squashed 'themes/gohugoioTheme/' changes from 042112e2d..b7853ae70
bca84e914 Fix search box text being invisible in Safari
3f21d0957 FAQ: "this feature is not available in your current Hugo version"
d8b318f90 Remove Gulp from Victor Hugo description
09d9b4c24 Update contribute/development.md
4d0f6ba47 Theme Components Support on the Hugo Themes Site (#769)
f2ec3f2a6 Fix broken link 404
af82c56c5 config: Remove superflous param
8dc14f563 Update theme total on homepage (#765)
7838fd7e2 Update description of Atlas to reflect new changes
6abab23c6 update: total of hugo themes
1dba24fde Clarify: summaryLength uses words not characters
8c54f45d6 Add missing punctuation
d17000481 Remove Hugo Frontend caddy-plugin
a7094ae62 remove unneeded meta tags
f8b0f31c6 Fix typo in cross references
61781bab9 Fix: use gh shortcode correctly
357bfca43 Update files.md
d1d2406cc Updated Hugo convert to clarify for and not ..
86850f3c3 Fix typos in multilingual.md
b68d0d892 Fix typo
8cba70e28 Document disableAliases
00e440260 Remove extra whitespace
212d63e4c Update with latest Theme Submission Guidelines (#744)
c24ea638f Update frontends.md
942bc1972 Add one more video
2e1e1091d Update the rest of the videos
a7dc70f2b Add new installation video
1a78f8487 Hosting on AWS amplify
112420c46 Fix typo
f723425e4 Add fireship.io bio to showcase
574f43503 Fixed typo
88e0e0cb7 Release 0.54.0
303edf19e Merge branch 'temp54'
c38debebd releaser: Prepare repository for 0.55.0-DEV
5c6c56fa1 releaser: Add release notes to /docs for release of 0.54.0
f86e05950 releaser: Bump versions for release of 0.54.0
6a2684fe4 Add the default cache configuration
f75c0125a Merge commit 'f27faf9afd'
e440dc6a4 Merge commit '5e078383a7'
981bf53f8 Update _index.md
b54aea066 tpl: Fix reflect
41f8af5a6 Merge commit '978856e2ad'

git-subtree-dir: docs
git-subtree-split: acf70cdd9fe2a89413e13db29466e45629372343
2019-03-26 18:41:09 +01:00
Bjørn Erik Pedersen
9bc6187b83
hugolib: Do not fall back to site title if not set in content file
See #5784
2019-03-26 15:49:32 +01:00
Bjørn Erik Pedersen
10bb614a70
deps: Update Afero
Closes #5673
2019-03-26 13:12:58 +01:00
Bjørn Erik Pedersen
bceda1b288
hugolib: Add a test for home page with no title
See #5784
2019-03-26 10:28:02 +01:00
Bjørn Erik Pedersen
4dae52af68 Avoid nilpointer on no File on Page
Fixes #5781
2019-03-26 10:20:40 +01:00
Bjørn Erik Pedersen
794d4052b8
herrors/errors: Improve the "feature not available" error 2019-03-26 10:15:57 +01:00
Bjørn Erik Pedersen
a7ee9b0bb9
hugolib: Add String() to fileInfo
See #5784
2019-03-25 08:29:29 +01:00
Bjørn Erik Pedersen
91ef9655aa
resources/page: Re-introduce .Page.Page
It was removed in 597e418cb0 -- it's not documented, but it's used in too many real sites on the web.

See #5784
2019-03-25 07:55:46 +01:00
Bjørn Erik Pedersen
b5f39d23b8 all: Apply staticcheck recommendations 2019-03-24 16:14:51 +01:00
Bjørn Erik Pedersen
3011f36c27 hugolib: Remove unused slice 2019-03-24 16:14:51 +01:00
Bjørn Erik Pedersen
d30e845485
Run gofmt -s 2019-03-23 20:15:06 +01:00
Bjørn Erik Pedersen
597e418cb0
Make Page an interface
The main motivation of this commit is to add a `page.Page` interface to replace the very file-oriented `hugolib.Page` struct.
This is all a preparation step for issue  #5074, "pages from other data sources".

But this also fixes a set of annoying limitations, especially related to custom output formats, and shortcodes.

Most notable changes:

* The inner content of shortcodes using the `{{%` as the outer-most delimiter will now be sent to the content renderer, e.g. Blackfriday.
  This means that any markdown will partake in the global ToC and footnote context etc.
* The Custom Output formats are now "fully virtualized". This removes many of the current limitations.
* The taxonomy list type now has a reference to the `Page` object.
  This improves the taxonomy template `.Title` situation and make common template constructs much simpler.

See #5074
Fixes #5763
Fixes #5758
Fixes #5090
Fixes #5204
Fixes #4695
Fixes #5607
Fixes #5707
Fixes #5719
Fixes #3113
Fixes #5706
Fixes #5767
Fixes #5723
Fixes #5769
Fixes #5770
Fixes #5771
Fixes #5759
Fixes #5776
Fixes #5777
Fixes #5778
2019-03-23 18:51:22 +01:00
Daniel Compton
44f5c1c14c List future and expired dates in CSV format
It is useful to see the date that a post will be published, or the date
that it has expired, to build tooling around it. This commit writes
posts and their publish/expired date as CSV.

Fixes #5610
2019-03-19 00:33:02 +01:00
Bjørn Erik Pedersen
984a73af9e
Update to Go 1.12.1 and Go 1.11.6
Fixes #5755
2019-03-17 08:37:42 +01:00
Bjørn Erik Pedersen
e54213f525
tpl/tplimpl: Fix mutex unlock 2019-03-16 09:40:27 +01:00
Bjørn Erik Pedersen
4a2a8afff2
commands: Fix doLiveReload logic
Fixes #5754
2019-03-14 21:39:00 +01:00
Bjørn Erik Pedersen
79d517d86c
deps: Update Viper 2019-03-13 10:42:43 +01:00
Bjørn Erik Pedersen
34c49d788c
hugolib: Adjust site benchmark
Having all the pages with shortcodes isn't realistic.
2019-03-12 20:27:50 +01:00
Bjørn Erik Pedersen
b9e75afd6c
Update to Go 1.12
Fixes #5716
2019-03-07 10:26:26 +01:00
Bjørn Erik Pedersen
dfc72d61a5
Remove Gitter dev chat link
Almost every question we get there belong on https://discourse.gohugo.io/
2019-03-07 00:37:50 +01:00
Bjørn Erik Pedersen
02eaddc2fb
tpl/tplimpl: Fix template truth logic
Before this commit, due to a bug in Go's `text/template` package, this would print different output for typed nil interface values:

```
{{ if .AuthenticatedUser }}User is authenticated!{{ else }}{{ end }}
{{ if not .AuthenticatedUser }}{{ else }}}User is authenticated!{{ end }}
```

This commit works around this by wrapping every `if` and `with` with a custom `getif` template func with truth logic that matches `not`, `and` and `or`.

Those 3 template funcs from Go's stdlib are now pulled into Hugo's source tree and adjusted to support custom zero values, e.g. types that implement `IsZero`.

This means that you can now do:

```
{{ with .Date }}{{ . }}{{ end }}
```

And it would work as expected.

Fixes #5738
2019-03-06 22:52:38 +01:00
grahamjamesaddis
bdf47e8da8 Update Travis config to work for forked builds 2019-03-05 14:26:49 +01:00
arrtchiu
75904332f3 Add skipHTML option to blackfriday config 2019-03-04 11:27:18 +01:00
Elliott Sales de Andrade
60c0eb4e89 Update stretchr/testify to 1.3.0. 2019-03-02 10:24:21 +01:00
Berin Larson
c154c2f7b2 Rewrite relative action URLS
Fixes #5701
2019-02-26 11:31:34 +01:00
Anthony Metzidis
075b17ee1d
Support Docker args TAGS, WORKDIR, CGO; speed up repetitive builds 2019-02-22 11:53:17 -08:00
Bjørn Erik Pedersen
b4148cd1d9
hugolib: Adjust test for Go 1.12 2019-02-19 21:47:38 +01:00
Anton Harniakou
908692fae5 Support nested keys/fields with missing values with the where function
Before this commit `where` would produce an error and bail building the
site. Now, `where` simply skips an element of a collection and does not
add it to the final result.

Closes #5637
Closes #5416
2019-02-06 19:53:34 +01:00
Bjørn Erik Pedersen
7e4b18c5ae commands: Update debouncer version 2019-02-02 14:05:28 +01:00
Iskander (Alex) Sharipov
483cf19d5d common/herrors: Fix args order in strings.TrimPrefix
Old code always returned "." or "" (if filepath.Ext(filename) returned ".").
Now it properly trims the prefix.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-02 09:55:31 +01:00
Iskander (Alex) Sharipov
7201042946 tpl: Fix strings.HasPrefix args order 2019-02-02 01:26:05 +01:00
hugoreleaser
5383fe458c releaser: Prepare repository for 0.55.0-DEV
[ci skip]
2019-02-01 09:42:55 +00:00
hugoreleaser
b1a82c61ab releaser: Add release notes to /docs for release of 0.54.0
[ci skip]
2019-02-01 09:40:32 +00:00
hugoreleaser
6fe6b9c17f releaser: Bump versions for release of 0.54.0
[ci skip]
2019-02-01 09:40:32 +00:00
Bjørn Erik Pedersen
52cec0fb2d
Release 0.54.0 2019-02-01 10:34:37 +01:00
hugoreleaser
23e52ea4c8 releaser: Add release notes draft for 0.54.0
Rename to *-ready.md to continue. [ci skip]
2019-02-01 09:31:43 +00:00
Bjørn Erik Pedersen
9b619dc023
releaser: Adjust patch logic
See #5639
2019-02-01 10:09:14 +01:00
Bjørn Erik Pedersen
fab41f42d3
common/hugo: Use official semver even for main releases
Closes #5639
2019-02-01 09:44:12 +01:00
Bjørn Erik Pedersen
f27faf9afd Squashed 'docs/' changes from 49809a038..4f4d1f48c
4f4d1f48c Merge commit 'ccb3ee5c57a00d5d32c53c882cf9893181a6ec10'
ccb3ee5c5 Squashed 'themes/gohugoioTheme/' changes from dafc91ff1..042112e2d

git-subtree-dir: docs
git-subtree-split: 4f4d1f48cd3da268c108f1ea6c204dd30f516bb1
2019-02-01 09:08:24 +01:00
Bjørn Erik Pedersen
c7c66e664a
Merge commit 'f27faf9afd' 2019-02-01 09:08:24 +01:00
Bjørn Erik Pedersen
5e078383a7 Squashed 'docs/' changes from 785e375f..49809a03
49809a03 Merge commit '20a631b4964fc0ab9137cce1e41774cbc17de044'
20a631b4 Squashed 'themes/gohugoioTheme/' changes from b8202f539..dafc91ff1
8b58f565 Re-generate CLI docs
4653a724 Add Netlify deployment badge
2d6246bc Remove some deprecated site variables
e6777153 Improve Algolia Search Display Styling
1570999f Add missing "." in front of gitlab-ci.yaml example
b922ae7d This adds documentation to the new configDir/Environment logic from .53 (#729)
7cff379f Correctly escape multi-word taxonomy terms in example
2dfeeda4 fix typo by removing stray paren
0870bd9a Fix typo in `paginate` description
91e8be85 Fixes https://github.com/gohugoio/hugo/issues/5609
c1db65ec Make the dummy URL more obvious
b4589ff0 Fix a link
b73dcb9a Consistently use "posts" as section name in examples
7a56abbc Format definitions
a9c6fd9b Minor clarification over the last commit
5c86bdc8 Add alternative instructions for Quick Start for non-git users
dafe7ee9 Add Visual Studio Code plug-ins
110ed19e Update HUGO_VERSION
2abd031a Update page.md
b332f7b9 Update page.md
f5a8c9d4 Update static-files.md
6d0c155c Add note about relative protocol URLs
a13751ac Theme Warning: Remove note about unquoted URLs
4c8f7d68 Incorporate feedback
6f2b9cf0 Update Creating Themes Warning
40d88d98 Fix ToC example to use binary true/false
4a11f3f1 Fix typo
2dbfc0a4 Fix a typo in taxonomies
d63790ef Do not mark UndocumentedFeature issues as stale
d7aff095 Regenerate docs.json
71c0826f Update transform.Unmarshal.md

git-subtree-dir: docs
git-subtree-split: 49809a038b2691637bab7f3f2e385dde654a88b8
2019-02-01 09:01:04 +01:00
Bjørn Erik Pedersen
ddc15ed41b
Merge commit '5e078383a7' 2019-02-01 09:01:04 +01:00
Bjørn Erik Pedersen
ddc6d4e30f
tpl/data: Adjust tests
See #5643
2019-02-01 08:54:30 +01:00
Anthony Fok
6a2bfcbec8
tpl/data: Prevent getJSON and getCSV fetch failure from aborting build
Fixes #5643
2019-02-01 08:52:29 +01:00
Bjørn Erik Pedersen
59d87044a4
commands: Add test for --configDir
See #5662
2019-02-01 08:40:53 +01:00
Bjørn Erik Pedersen
3244cb3b31
Ignore unknown config files in config dir
Swap files etc.

Fixes #5646
2019-02-01 07:47:40 +01:00
Anton Harniakou
d9282cf98a Store supported config formats in a variable 2019-02-01 07:17:37 +01:00
Bjørn Erik Pedersen
c52045bbb3 Fix some inline shortcode issues
Fixes #5645
Fixes #5653
2019-01-31 19:08:19 +01:00
Bjørn Erik Pedersen
8ed2a1caa9 Bump to Go 1.11.5
Fixes #5654
2019-01-31 13:23:55 +01:00
Bjørn Erik Pedersen
e85961390a
Update Afero
Fixes #5650
2019-01-30 09:35:55 +01:00
Anthony Fok
2a9060a85c
hugolib: Expand TestPageWithEmoji to cover '+', '-' and '_' too
See #5635 and commit 3038464e
2019-01-29 13:03:42 -07:00
Anthony Fok
3038464ea6
Accept hyphen and plus sign in emoji detection
Fixes #5635
2019-01-29 05:38:36 -07:00
Elliot Murphy
526b5b1c49 Fix OpenGraph image fallback to site params
Signed-off-by: Elliot Murphy <statik@users.noreply.github.com>
2019-01-25 18:14:10 +01:00
Anton Harniakou
26f75edb7a Support numeric sort in ByParam
With this commit ByParam takes into account a type of a value under a
key. If both values are numeric then they're coerced into float64 and
then get compared.
If any value isn't numeric, for example it's nil or string, then both
values coerced into string and get compared as strings
(lexicographicaly)

Nil values are always sent to the end.

Numeric values confirm to any type listed below:
uint8, uint16, uint32, uint64, int, int8, int16, int32, int64, float32, float64

Closes #5305
2019-01-20 13:05:20 +00:00
Bjørn Erik Pedersen
e1a66c7343 Fix Params case handling in the new site global
Fixes #5615
2019-01-20 12:42:24 +00:00
Anton Harniakou
db3c49d049 Make hugo server -t work again
This commit solves an issue where hugo would ignore the cli -t flag
and only use a theme defined in config.toml.

Also allow -t flag to accept a string slice.

Closes #5569
Closes #5061
Related #4868
2019-01-13 20:13:59 +00:00
Anthony Fok
e3cb8e6c78
Add configFile(s) back to the watch list after RENAME event too
Alleviates #5205
2019-01-10 15:57:30 -07:00
mywaiting
55251aa890 Remove historical rssURI config 2019-01-10 18:24:38 +01:00
Anton Harniakou
843fcd19d4 Use subtests with server_test.go
Use Golang's subtests to provide a convenient way
to run specific tests.
Example:
go test -run=TestFixURL/Basic_production
2019-01-08 14:54:11 +01:00
Bjørn Erik Pedersen
ce8a09a4c0 resources: Move resource interfaces into its own package 2019-01-02 14:25:37 +01:00
Bjørn Erik Pedersen
669ada4367 resource: Move resource processors into sub-packages 2019-01-02 14:25:37 +01:00
Marc Robinson
507451229c Update _index.md
Corrects misspelling of sync (synch)
2019-01-02 09:58:39 +01:00
Bjørn Erik Pedersen
40ffb0484b hugolib: Restore 0.48 slash handling in taxonomies
Fixes #5571
2018-12-30 18:50:09 +01:00
Bjørn Erik Pedersen
4bae8b04aa Revert " Fix handling of taxonomy terms containing slashes"
See #4090
See #5571

This reverts commit fff132537b.
2018-12-30 18:50:09 +01:00
Bjørn Erik Pedersen
0584432b07
Update go.sum 2018-12-30 17:07:31 +01:00
Bjørn Erik Pedersen
65fa069271
Revert "hugolib: Restore taxonomy term path separation"
See #5571

This reverts commit 9ce0a1fb70.
2018-12-29 10:00:17 +01:00
Cameron Moore
9e4f9e0bb6 tpl: Fix reflect
Fixes #5564
2018-12-28 10:41:46 +01:00
Bjørn Erik Pedersen
3f3187de0f
cache/namedmemcache: Fix data race 2018-12-27 12:05:42 +01:00
Bjørn Erik Pedersen
cc351958e1
Update Chroma
Fixes #4993
2018-12-27 10:58:34 +01:00
Bjørn Erik Pedersen
c24f3ae22b
Make docshelper run again
Fixes #5568
2018-12-27 10:08:44 +01:00
Bjørn Erik Pedersen
214e9745b6
releaser: Use Git short commit in release binaries
Fixes #5562
2018-12-26 11:31:58 +01:00
Bjørn Erik Pedersen
ecc8922752
releaser: Bump Goreleaser version 2018-12-26 11:30:05 +01:00
Bjørn Erik Pedersen
22afe28047
Merge commit '978856e2ad' 2018-12-26 10:27:54 +01:00
Bjørn Erik Pedersen
978856e2ad Squashed 'docs/' changes from bd91d1cfd..785e375f5
785e375f5 Change 'my-another-post' to 'my-other-post'
ba9a69d25 Update reflect.IsSlice.md
806344258 Update reflect.IsMap.md
757c0dafa Update index.md
d3f20a2d5 Update index.md
9952e72a0 Formatting
70458ccf2 Formatting
7e0dd3969 Merge branch 'config-dir'
06a5c11fc Release 0.53
01c00229f releaser: Prepare repository for 0.54-DEV
29b223f78 releaser: Add release notes to /docs for release of 0.53
4f61d1194 releaser: Bump versions for release of 0.53
320a0ac68 Refactor config below /config
ec16b611e docs: Adjust CSV example
cecf97dfc Rename CSV option from comma to delimiter
18d06df58 docs: Document transform.Unmarshal
fdace78b5 docs: Regenerate CLI docs
b8f84ac59 hugolib: Add .Name as a shortcode variable
6612dd1b8 Merge commit '5a83bf314f'
9b211089f docs: Regenerate CLI docs
9af46af3c Merge commit 'eb16165694'
12f46f356 tpl: Add reflect namespace

git-subtree-dir: docs
git-subtree-split: 785e375f577394c6f782ef51796e2efe88d52cbb
2018-12-26 10:27:12 +01:00
hugoreleaser
8431871201 releaser: Prepare repository for 0.54-DEV
[ci skip]
2018-12-24 08:26:54 +00:00
hugoreleaser
8fc339dc25 releaser: Add release notes to /docs for release of 0.53
[ci skip]
2018-12-24 08:24:42 +00:00
hugoreleaser
5236cb8e9a releaser: Bump versions for release of 0.53
[ci skip]
2018-12-24 08:24:42 +00:00
Bjørn Erik Pedersen
a28865cfc3
release: Fix goreleaser config 2018-12-24 09:20:09 +01:00
hugoreleaser
cb6c77b813
Release 0.53 2018-12-24 09:05:26 +01:00
Bjørn Erik Pedersen
be58c7b9c8
tpl/transform: Include options in cache key
See #5555
2018-12-23 21:34:17 +01:00
Bjørn Erik Pedersen
62d031aedf
docs: Adjust CSV example
See #5555
2018-12-23 21:12:41 +01:00
Bjørn Erik Pedersen
ce06bdb16a
Rename CSV option from comma to delimiter
See #5555
2018-12-23 21:09:09 +01:00
Bjørn Erik Pedersen
2efc1a64c3
docs: Document transform.Unmarshal
Fixes #5556
2018-12-23 19:43:17 +01:00
Bjørn Erik Pedersen
25ddbb09fe
hugolib: Adjust test
See #5544
2018-12-23 19:42:51 +01:00
Bjørn Erik Pedersen
e691c48a5a
docs: Regenerate CLI docs
Fixes #5544
2018-12-23 19:05:40 +01:00
Bjørn Erik Pedersen
094709e105
tpl/transform: Simplify transform.Unmarshal func
See #5428
2018-12-23 16:43:04 +01:00
Bjørn Erik Pedersen
a574469797
Add CSV support to transform.Unmarshal
Fixes #5555
2018-12-23 16:33:21 +01:00
Bjørn Erik Pedersen
822dc627a1
tpl/transform: Add transform.Unmarshal func
Fixes #5428
2018-12-23 10:02:42 +01:00
Bjørn Erik Pedersen
43f9df0194 Prevent resource publishing for transformed inline resources
That is, if only `.Content` is accessed.

This means that, for a transformed resource to be published to `/public`, you need to access either `.RelPermalink` or `Permalink`.

Fixes #4944
2018-12-21 13:41:46 +01:00
Bjørn Erik Pedersen
1021714449
hugolib: Add .Name as a shortcode variable
Fixes #5546
2018-12-21 09:51:15 +01:00
Bjørn Erik Pedersen
5a83bf314f Squashed 'docs/' changes from d1cf9adc4..bd91d1cfd
bd91d1cfd Fix typo
0d45ea9cf Fix order of arguments in another strings.TrimLeft example
0982f65c1 Fix the order of arguments to strings.TrimRight
f1f9b7cd6 Arguments in example
5d9c7327f Fix shortcode example escape chars

git-subtree-dir: docs
git-subtree-split: bd91d1cfddf87fa693c1e2e7a2de555d2cee19f3
2018-12-21 09:45:41 +01:00
Bjørn Erik Pedersen
6f069e549b
Merge commit '5a83bf314f' 2018-12-21 09:45:41 +01:00
Cameron Moore
0483299bc0 hugolib: Improve logic of output path trimming
Fixes #4666
2018-12-21 09:42:37 +01:00
Anthony Fok
27b62a546c
snap: Revert build-snap to 1.11/stable channel for go
This is to fix the following snap build error:

    Failed to install or refresh a snap: 'go' does not exist
    or is not available on the desired channel '1.11.4/stable'.
    Use `snap info go` to get a list of channels the snap is available on.

`snap info go` reveals that the '1.11/stable' channel automatically
follows the latest minor point release as it becomes available.
2018-12-20 21:46:47 -07:00
Bjørn Erik Pedersen
35bfca3b14
commands: Remove the benchmark command
It's not particulary useful, and when we start to get bug reports about it, it is easier to remove it.

Closes #5543
2018-12-20 20:55:26 +01:00
Bjørn Erik Pedersen
9cd54cab20 Move the emoji parsing to pageparser
This avoids double parsing the page content when `enableEmoji=true`.

This commit also adds some general improvements to the parser, making it in general much faster:

```bash
benchmark                     old ns/op     new ns/op     delta
BenchmarkShortcodeLexer-4     90258         101730        +12.71%
BenchmarkParse-4              148940        15037         -89.90%

benchmark                     old allocs     new allocs     delta
BenchmarkShortcodeLexer-4     456            700            +53.51%
BenchmarkParse-4              28             33             +17.86%

benchmark                     old bytes     new bytes     delta
BenchmarkShortcodeLexer-4     69875         81014         +15.94%
BenchmarkParse-4              8128          8304          +2.17%
```

Running some site benchmarks with Emoji support turned on:

```bash
benchmark                                                                                     old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=3,num_pages=5000,tags_per_page=5,shortcodes,render-4     924556797     818115620     -11.51%

benchmark                                                                                     old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=3,num_pages=5000,tags_per_page=5,shortcodes,render-4     4112613        4133787        +0.51%

benchmark                                                                                     old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=3,num_pages=5000,tags_per_page=5,shortcodes,render-4     426982864     424363832     -0.61%
```

Fixes #5534
2018-12-20 20:08:01 +01:00
Bjørn Erik Pedersen
a8853f1c5a parser/pageparser: Split the page lexer into some more files
See #5534
2018-12-20 20:08:01 +01:00
Bjørn Erik Pedersen
4d93aca27d
hugolib: Enable Emoji in site benchmark 2018-12-20 17:24:51 +01:00
Bjørn Erik Pedersen
f2167de834
parser/pageparser: Add a benchmark 2018-12-19 20:08:22 +01:00
Bjørn Erik Pedersen
64b6b29075 tpl: Fix case handling in cast params
Fixes #5538
2018-12-19 13:19:22 +01:00
Bjørn Erik Pedersen
bb9c2988f8 Update to Go 1.11.4
Fixes #5524
2018-12-19 11:48:17 +01:00
Bjørn Erik Pedersen
c04030b14c
releaser: Get ldflags for build date etc. in line for all builds
Closes #5539
Closes ##5388
2018-12-19 10:01:26 +01:00
Bjørn Erik Pedersen
f7691fe965 transform/urlreplacers: Simplify implementation 2018-12-17 19:17:56 +01:00
Bjørn Erik Pedersen
efe0b4e5c0 transform/urlreplacers: Support unquoted URLs in canonifyURLs replacer
Fixes #5529
2018-12-17 19:17:56 +01:00
Bjørn Erik Pedersen
d5a0b6bbbc hugolib: Remove "double layout" lookup
Fixes #5390
2018-12-17 11:34:32 +01:00
Bjørn Erik Pedersen
5178cd13a7 Fix "failed to create file caches from configuration: file exists" on Windows
Fixes #5497
2018-12-17 10:36:52 +01:00
Bjørn Erik Pedersen
9ce0a1fb70 hugolib: Restore taxonomy term path separation
Fixes #5513
2018-12-14 10:29:32 +01:00
Jean-François YUEN
ab9214768d importer: fix jekyll import highlight options 2018-12-12 19:12:12 +01:00
Bjørn Erik Pedersen
5068681707
docs: Regenerate CLI docs
Fixes #5507
2018-12-12 09:09:45 +01:00
Bjørn Erik Pedersen
b17a61a605
Merge commit 'eb16165694' 2018-12-12 09:06:42 +01:00
Bjørn Erik Pedersen
eb16165694 Squashed 'docs/' changes from 37095d540..d1cf9adc4
d1cf9adc4 Fix typo
26e10a690 Fix the name and arg mismatch between partial defn and call
2db0e53cd Merge commit '9c36cff15224f6cbd19058ad61311229b7a23c83'
9c36cff15 Squashed 'themes/gohugoioTheme/' changes from 68ddff44..b8202f53
4b021eff8 Update lang.Merge.md
b37af2916 Add title to yaml
a9a281233 Fixed incorrect usage of the code-toggle shortcode
4560a0169 Update Warning for Theme Links (#676)
0305e3c6b Document .File.ContentBaseName
6d30c5aa1 Update configuration.md
158df174a Document .Sites and .Sites.First
0c0f583b8 Add stale config
e2531afd8 Document path template functions
4dd779057 Clarify that partialCached is per site/language
19e5bbe0c Update index.md
44b000857 Add missing dot
a41300cf9 Release 0.52
2d1d92b88 Merge branch 'temp52'
c5925250d releaser: Prepare repository for 0.53-DEV
d000b04a2 releaser: Add release notes to /docs for release of 0.52
4bb983a0a releaser: Bump versions for release of 0.52
36736ca28 tpl: Add "param" shortcode
378677aa6 Add Elasticsearch/bonsai.io to services doc.
4c3fd4fa4 docs: Document inline shortcodes
6c64c374c Whitelist CSS modules from purge
817a872b9 Improve search icon position
cf86ff1c7 Add minification and resource cache clear to build command
fd77e8df3 Update asset dependencies and adopt Hugo Pipes
cdbe97e8c Update render.md
b0e279220 git command to update submodule to latest
a1cb98c12 cache/filecache: Add a :project placeholder
07c1b2b46 cache/filecache: Use time.Duration for maxAge
ffa9b165e Add AND as a title
6e7733b40 Add OR as a sub title to make it easier to find in search
72b6791a1 docs: Document the new file cache
714d3ca91 Fix minification issues
cd1e961da Revert "Add Elasticsearch/bonsai.io to services doc."
15a0cda6e Add Elasticsearch/bonsai.io to services doc.
f931d86de Release 0.51
e2ffe867a Merge branch 'temp51'
423e7f5c8 releaser: Prepare repository for 0.52-DEV
c6f2d6ae1 releaser: Add release notes to /docs for release of 0.51
5bbb556dc releaser: Bump versions for release of 0.51
3b2b172b9 docs: Document shortcode error handling
b8672f3d4 docs: Document symdiff
4bc6071e6 docs: Document complement
d1baab752 docs: Re-generate CLI docs
9ea667e24 Revert "tpl: Update Jsonify to return pretty-print output"
ce5a1403d docs: Regenerate the docs helper
99a1f4a94 Fix note for reserved partial name(starting with -> including).
eba3cbc42 fix accidentally modification on paragraph.
3eebd98c3 Add note for reserved partial name.
40b881cc2 Document templates.Exists
b5c3bcd3b Update multilingual.md
61c59c67e Fix misspelling (#648)
f21d8c4a4 Correct minor typo (#5372)
e967001b9 Release 0.50
685fd6b08 releaser: Prepare repository for 0.51-DEV
f245a9faa releaser: Add release notes to /docs for release of 0.50
4354da30d releaser: Bump versions for release of 0.50
feaa05469 docs: Regenerate CLI docs
5c724200c Merge commit 'd6a4af7018'
2ddab36c2 Merge commit '74309fe569'
8cf296a7c docs: Regenerate CLI docs
9097683dd tpl: Update Jsonify to return pretty-print output

git-subtree-dir: docs
git-subtree-split: d1cf9adc412245c96d9d32592a903370d3972aef
2018-12-12 09:05:31 +01:00
Bjørn Erik Pedersen
7829474088
Add /config dir support
This commit adds support for a configuration directory (default `config`). The different pieces in this puzzle are:

* A new `--environment` (or `-e`) flag. This can also be set with the `HUGO_ENVIRONMENT` OS environment variable. The value for `environment` defaults to `production` when running `hugo` and `development` when running `hugo server`. You can set it to any value you want (e.g. `hugo server -e "Sensible Environment"`), but as it is used to load configuration from the file system, the letter case may be important. You can get this value in your templates with `{{ hugo.Environment }}`.
* A new `--configDir` flag (defaults to `config` below your project). This can also be set with `HUGO_CONFIGDIR` OS environment variable.

If the `configDir` exists, the configuration files will be read and merged on top of each other from left to right; the right-most value will win on duplicates.

Given the example tree below:

If `environment` is `production`, the left-most `config.toml` would be the one directly below the project (this can now be omitted if you want), and then `_default/config.toml` and finally `production/config.toml`. And since these will be merged, you can just provide the environment specific configuration setting in you production config, e.g. `enableGitInfo = true`. The order within the directories will be lexical (`config.toml` and then `params.toml`).

```bash
config
├── _default
│   ├── config.toml
│   ├── languages.toml
│   ├── menus
│   │   ├── menus.en.toml
│   │   └── menus.zh.toml
│   └── params.toml
├── development
│   └── params.toml
└── production
    ├── config.toml
    └── params.toml
```

Some configuration maps support the language code in the filename (e.g. `menus.en.toml`): `menus` (`menu` also works) and `params`.

Also note that the only folders with "a meaning" in the above listing is the top level directories below `config`. The `menus` sub folder is just added for better organization.

We use `TOML` in the example above, but Hugo also supports `JSON` and `YAML` as configuration formats. These can be mixed.

Fixes #5422
2018-12-11 13:08:36 +01:00
Iskander (Alex) Sharipov
256418917c resource/image: Fix "always false" condition
Found using gocritic linter.
2018-12-10 15:31:44 +01:00
Cameron Moore
c84f506f8e tpl: Add reflect namespace
Add a reflect namespace that offers a two boolean functions for
testing if a value is a map or slice.

Fixes #4081
2018-12-07 23:29:37 +01:00
Bjørn Erik Pedersen
4b5f743959
minifiers: Fixx CSS2 color code handling
Fixes #5506
2018-12-07 07:49:26 +01:00
Bjørn Erik Pedersen
931a132450
tpl/hugo: Use the correct Hugo var
See #5467
2018-12-06 14:57:56 +01:00
Bjørn Erik Pedersen
8378358857 hugolib: Add .Site.Sites
Fixes #5504
2018-12-06 14:37:25 +01:00
Bjørn Erik Pedersen
831d23cb4d Add tpl/site and tpl/hugo
This means that the current `.Site` and ´.Hugo` is available as a globals, so you can do `site.IsServer`, `hugo.Version` etc.

Fixes #5470
Fixes #5467
Fixes #5503
2018-12-06 14:37:25 +01:00
Bjørn Erik Pedersen
514e18dc27 cache/filecache: Simplify test
See #5497
2018-12-04 19:19:20 +01:00
Bjørn Erik Pedersen
b804a70881 cache/filecache: Use OS fs for test
See #5497
2018-12-04 18:03:49 +01:00
Cameron Moore
30a7c9ea37 tpl: Add godoc packages comments
Also fix package name in tpl/templates.
2018-11-30 08:56:30 +01:00
Christian Oliff
8346848109 common/collections: Fix defines typo 2018-11-29 09:57:51 +01:00
hugoreleaser
54ecade02f releaser: Prepare repository for 0.53-DEV
[ci skip]
2018-11-28 14:08:36 +00:00
hugoreleaser
9433cf5a92 releaser: Add release notes to /docs for release of 0.52
[ci skip]
2018-11-28 14:06:31 +00:00
hugoreleaser
3c909eb3f3 releaser: Bump versions for release of 0.52
[ci skip]
2018-11-28 14:06:31 +00:00
Bjørn Erik Pedersen
724b3e673b
Release 0.52 2018-11-28 14:59:48 +01:00
hugoreleaser
056c754771 releaser: Add release notes draft for 0.52
Rename to *-ready.md to continue. [ci skip]
2018-11-28 13:14:49 +00:00
Bjørn Erik Pedersen
a9a93d082d hugolib: Fall back to title in ByLinkTitle sort
Fixes #4953
2018-11-28 13:52:26 +01:00
Bjørn Erik Pedersen
b09a40333f
hugolib: Improve nil handling in IsDescendant and IsAncestor
Fixes #5461
2018-11-28 12:36:59 +01:00
Bjørn Erik Pedersen
7540a62834
parser/pageparser: Fix handling of commented out front matter
When the page parser was rewritten in 0.51, this was interpreted literally, but commented out front matter is used in the wild to "hide it from GitHub", e.g:

```
<!--
+++
title = "hello"
+++
-->
```

Fixes #5478
2018-11-28 10:28:50 +01:00
Bjørn Erik Pedersen
7e75aeca80
Remove duplicate mapstructure depdendency 2018-11-28 00:17:43 +01:00
Bjørn Erik Pedersen
e14e0b192f
Add dependency list to README 2018-11-28 00:08:27 +01:00
Cameron Moore
ed698e94c1 tpl/path: Add tests 2018-11-27 19:17:35 +01:00
Bjørn Erik Pedersen
89e2716d29
tpl: Regenerate templates 2018-11-27 18:15:55 +01:00
Max Arnold
aba2647c15 tpl: Fix whitespace issue
Introduced  in #5276.
2018-11-27 18:15:10 +01:00
Bjørn Erik Pedersen
f37c5a2567 tpl: Add "param" shortcode
Fixes #4010
2018-11-27 17:34:03 +01:00
Bjørn Erik Pedersen
aded0f25fd docs: Document inline shortcodes
See #4011
2018-11-27 16:14:09 +01:00
Bjørn Erik Pedersen
bc337e6ab5 Add inline shortcode support
An inline shortcode's name must end with `.inline`, all lowercase.

E.g.:

```bash
{{< time.inline >}}{{ now }}{{< /time.inline >}}
```

The above will print the current date and time.

Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template.

This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes".

The same inline shortcode can be reused later in the same content file, with different params if needed, using the self-closing syntax:

```
{{< time.inline />}}
```

Fixes #4011
2018-11-27 16:14:09 +01:00
Cameron Moore
112461fded tpl/collections: Add float64 support to where
Fixes #5466
2018-11-27 09:04:02 +01:00
Bjørn Erik Pedersen
94ab125b27 parser/pageparser: Fix when only shortcode and then summary
Fixes #5464
2018-11-24 18:23:23 +01:00
Bjørn Erik Pedersen
dcfeed35c6
commands: Include drafts in convert command
Fixes #5457
2018-11-24 13:11:14 +01:00
Bjørn Erik Pedersen
f9b4eb4f39 Handle themes in the new file cache (for images, assets)
In the newly consolidated file cache implementation, we forgot that we also look in the theme(s) for assets (SCSS transformations etc.), which is not good for Netlify and the demo sites.

Fixes #5460
2018-11-23 21:09:00 +01:00
Kris Budhram
e82b2dc8c1 Fix ignored --config flag with 'new' command 2018-11-18 19:09:28 +01:00
Bjørn Erik Pedersen
5df2b79dd2 Fix Permalink for resource, baseURL with path and canonifyURLs set
Fixes #5226
2018-11-15 16:37:11 +01:00
Bjørn Erik Pedersen
12742bac71 Add tests for permalink on Resource with baseURL with path
See #5226
2018-11-15 08:45:15 +01:00
Bjørn Erik Pedersen
fabf026f49
helpers: Add a comment about file mode for new files
See #5434
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
94f0f7e597
cache/filecache: Add a :project placeholder
This allows for "cache per Hugo project", making `hugo --gc` work as expected, even if you have several Hugo projects running on the same PC.

See #5439
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
3c29c5af8e
cache/filecache: Add a cache prune func
Fixes #5439
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
33502667fb
cache/filecache: Add a filecache root dir
This is just a safe guard to make sure we don't evict/remove files that do not belong to the cache.
2018-11-14 23:14:51 +01:00
Bjørn Erik Pedersen
d3489eba5d
cache/filecache: Use time.Duration for maxAge
Fixes #5438
2018-11-14 23:14:50 +01:00
Bjørn Erik Pedersen
17d7ecde2b
cache/filecache: Split implementation and config into separate files 2018-11-14 23:14:50 +01:00
Bjørn Erik Pedersen
e4b2572880 Update to LibSASS 3.5.5
Fixes #5432
See #5435
2018-11-14 17:47:08 +01:00
Bjørn Erik Pedersen
782dd15858
More spelling corrections 2018-11-13 18:28:40 +01:00
Bjørn Erik Pedersen
aff9c09166
cache/filecache: Spelling corrections 2018-11-13 18:16:53 +01:00
Bjørn Erik Pedersen
fdd4a768f0
Remove appveyor
We now build on Travis for all platforms.
2018-11-13 14:36:17 +01:00
Bjørn Erik Pedersen
abeeff1325
docs: Document the new file cache
See #5404
2018-11-13 14:29:45 +01:00
Bjørn Erik Pedersen
f7aeaa6129 Add a consolidated file cache
This commits reworks how file caching is performed in Hugo. Now there is only one way, and it can be configured.

This is the default configuration:

```toml
[caches]
[caches.getjson]
dir = ":cacheDir"
maxAge = -1
[caches.getcsv]
dir = ":cacheDir"
maxAge = -1
[caches.images]
dir = ":resourceDir/_gen"
maxAge = -1
[caches.assets]
dir = ":resourceDir/_gen"
maxAge = -1
```

You can override any of these cache setting in your own `config.toml`.

The placeholders explained:

`:cacheDir`: This is the value of the `cacheDir` config option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache` directory below the OS temp dir for the others.
`:resourceDir`: This is the value of the `resourceDir` config option.

`maxAge` is the time in seconds before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off.

This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see 6c3960a8f4/.circleci/config.yml

Fixes #5404
2018-11-13 14:19:42 +01:00
Emir Beganović
7d78a2afd3 Add Windows build config to Travis 2018-11-13 11:39:54 +01:00
Bjørn Erik Pedersen
5570a6e478
Revert "Add Elasticsearch/bonsai.io to services doc."
This reverts commit c0b3a1af03.
2018-11-09 23:12:27 +01:00
Allison Zadrozny
c0b3a1af03 Add Elasticsearch/bonsai.io to services doc.
Hip hip for OSS! 🙌
2018-11-09 22:56:38 +01:00
Ian Lance Taylor
a8cb1b07b4 tpl: Fix test to pass with gccgo
When run under gccgo, the test looks for the name that gccgo gives to
a thunk method.  This name is not normally visible, but can be seen
when using reflect.FuncForPC as this code does.  That name changed in
https://golang.org/cl/89555.  Change the test to work with both the
old name "$thunk0" and the new name "thunk0".

Fixes golang/go#28669
2018-11-09 08:54:08 +01:00
hugoreleaser
2900801acf releaser: Prepare repository for 0.52-DEV
[ci skip]
2018-11-07 10:11:48 +00:00
hugoreleaser
f3d5190793 releaser: Add release notes to /docs for release of 0.51
[ci skip]
2018-11-07 10:09:43 +00:00
hugoreleaser
1ccc0b79a2 releaser: Bump versions for release of 0.51
[ci skip]
2018-11-07 10:09:43 +00:00
Bjørn Erik Pedersen
cbed50e22b
Release 0.51 2018-11-07 11:00:25 +01:00
hugoreleaser
05ecd8111c releaser: Add release notes draft for 0.51
Rename to *-ready.md to continue. [ci skip]
2018-11-07 09:48:47 +00:00
Bjørn Erik Pedersen
e456e34bdb docs: Document shortcode error handling
Closes https://github.com/gohugoio/hugoDocs/issues/660
2018-11-07 10:38:58 +01:00
Bjørn Erik Pedersen
5d14d04ac6 docs: Document symdiff
Closes https://github.com/gohugoio/hugoDocs/issues/659
2018-11-07 10:38:58 +01:00
Bjørn Erik Pedersen
ddcb402859 docs: Document complement
Closes https://github.com/gohugoio/hugoDocs/issues/658
2018-11-07 10:38:58 +01:00
Bjørn Erik Pedersen
3a44920e79 hugolib: Improve error message on duplicate menu items 2018-11-07 10:38:58 +01:00
Bjørn Erik Pedersen
79a06aa4b6
tpl/collections: Properly handle pointer types in complement/symdiff
We cannot compare them by values, because that gets `hash of unhashable type` for the prime use case.
2018-11-07 09:29:13 +01:00
Bjørn Erik Pedersen
d212f60949 deps: Update minify
No functional changes, just support for Go Modules.
2018-11-07 00:23:08 +01:00
Bjørn Erik Pedersen
488776b649 tpl/collections: Add collections.SymDiff
Fixes #5410
2018-11-06 16:51:49 +01:00
Bjørn Erik Pedersen
b8b8436fcc hugolib: Fix changing paginators in lazy render
Fixes #5406
2018-11-06 11:04:10 +01:00
Bjørn Erik Pedersen
42d8dfc8c8 tpl/collections: Add collections.Complement
Fixes #5400
2018-11-06 08:48:58 +01:00
秦世成
47506d1644 commands: Fix spelling 2018-11-06 08:45:19 +01:00
Bjørn Erik Pedersen
2998fa0cd5
docs: Re-generate CLI docs 2018-11-05 14:18:45 +01:00
Bjørn Erik Pedersen
d16a7a33ff Fix shortcode directly following a shortcode delimiter
Fixes #5402
2018-11-05 14:14:28 +01:00
Bjørn Erik Pedersen
5b1edd281a
commands: Add --minify to hugo server 2018-11-04 18:39:14 +01:00
Bjørn Erik Pedersen
2bd9d9099d
commands: Fix recently broken error template
We need a test for this ...
2018-11-03 16:55:45 +01:00
Bjørn Erik Pedersen
4b7d3e57a4 Make WARN the new default log log level
This commit also pulls down the log level for a set of WARN statements to INFO. There should be no ERRORs or WARNINGs in a regular Hugo build. That is the story about the Boy Who Cried Wolf.

Since the WARN log is now more visible, this commit also improves on some of them, most notable the "layout not found", which now would look something like this:

```bash
WARN 2018/11/02 09:02:18 Found no layout for "home", language "en", output format "CSS": create a template below /layouts with one of these filenames: index.en.css.css, home.en.css.css, list.en.css.css, index.css.css, home.css.css, list.css.css, index.en.css, home.en.css, list.en.css, index.css, home.css, list.css, _default/index.en.css.css, _default/home.en.css.css, _default/list.en.css.css, _default/index.css.css, _default/home.css.css, _default/list.css.css, _default/index.en.css, _default/home.en.css, _default/list.en.css, _default/index.css, _default/home.css, _default/list.css
```

Fixes #5203
2018-11-03 12:06:23 +01:00
Bjørn Erik Pedersen
4f3c095963
Revert "tpl: Update Jsonify to return pretty-print output"
This reverts commit 5a52cd5f92.

Closes #5394
2018-11-02 19:03:48 +01:00
Bjørn Erik Pedersen
486bc46a52 docs: Regenerate the docs helper 2018-11-02 13:36:09 +01:00
Bjørn Erik Pedersen
61f210dd7a tpl: Fix the docshelper 2018-11-02 13:36:09 +01:00
Kris Budhram
f8446188db Skip watcher event files if matched in ignoreFiles 2018-11-02 09:50:31 +01:00
Bjørn Erik Pedersen
d523aa4bb0
deps: Update Chroma
Fixes #5392
2018-11-02 09:31:51 +01:00
Lorenz Cuno Klopfenstein
b8725f5181 Fix ANSI character output regression on Windows
Fixes #5377
2018-11-02 09:09:02 +01:00
Bjørn Erik Pedersen
0bc4b0246d
hugolib: Remove deprecated useModTimeAsFallback 2018-11-01 21:14:30 +01:00
Bjørn Erik Pedersen
faeb55c1d8
hugolib: Bump to ERROR for the deprecated Pages.Sort 2018-11-01 21:11:45 +01:00
Bjørn Erik Pedersen
6c6a6c87ec
hugolib: Deprecate .Site.Ref and .Site.RelRef
Fixes #5386
2018-11-01 21:08:12 +01:00
Bjørn Erik Pedersen
1d18eb0574 Add file (line/col) info to ref/relref errors
See #5371
2018-11-01 21:06:35 +01:00
Bjørn Erik Pedersen
33a7b36fd4 hugolib: Add .Position to shortcode
To allow for better error logging in shortcodes. Note that this may be expensive to calculate, so this is primarily for error situations.

See #5371
2018-11-01 21:06:35 +01:00
Bjørn Erik Pedersen
6180c85fb8 hugolib: Fix REF_NOT_FOUND logging to include page path
Fixes #5371
2018-11-01 21:06:35 +01:00
Bjørn Erik Pedersen
d3a98325c3
common/loggers: Improve log color regexp
To avoid coloring WARNING inside log errors.
2018-11-01 09:33:32 +01:00
Bjørn Erik Pedersen
b2a676f5f0 hugolib: Fix broken manual summary handling
Fixes #5381
2018-10-31 23:14:37 +01:00
Bjørn Erik Pedersen
3a786a248d tpl: Fix BOM issue in templates
Fixes #4895
2018-10-30 18:12:14 +01:00
Bjørn Erik Pedersen
729593c842 hugolib: Fix deadlock when content building times out
Fixes #5375
2018-10-30 12:18:29 +01:00
Christian Oliff
e65268f2c2 Correct minor typo (#5372)
> Errors will no show up

should be:

> Errors will now show up
2018-10-29 12:09:19 +01:00
hugoreleaser
f863b6a07e releaser: Prepare repository for 0.51-DEV
[ci skip]
2018-10-29 09:54:42 +00:00
hugoreleaser
f5be599204 releaser: Add release notes to /docs for release of 0.50
[ci skip]
2018-10-29 09:51:50 +00:00
hugoreleaser
b14c11b0e1 releaser: Bump versions for release of 0.50
[ci skip]
2018-10-29 09:51:50 +00:00
Bjørn Erik Pedersen
0addb2add6
Release 0.50 2018-10-29 10:39:51 +01:00
hugoreleaser
8bba85601f
releaser: Add release notes draft for 0.50
Rename to *-ready.md to continue. [ci skip]
2018-10-29 10:39:51 +01:00
Bjørn Erik Pedersen
7082a5d143
Update go.sum 2018-10-29 09:42:53 +01:00
Bjørn Erik Pedersen
aa281b5135 mod: Update minify
Closes #5261
2018-10-29 09:35:14 +01:00
Bjørn Erik Pedersen
3250198724
docs: Regenerate CLI docs 2018-10-29 09:29:27 +01:00
Bjørn Erik Pedersen
d6a4af7018 Squashed 'docs/' changes from 084804447..37095d540
37095d540 Fix shortcode example

git-subtree-dir: docs
git-subtree-split: 37095d5403cb96f1dc5288d9554e270367f5c449
2018-10-29 09:28:01 +01:00
Bjørn Erik Pedersen
27569275b1
Merge commit 'd6a4af7018' 2018-10-29 09:28:01 +01:00
Bjørn Erik Pedersen
4b2738d871
Merge commit '74309fe569' 2018-10-29 09:23:25 +01:00
Bjørn Erik Pedersen
74309fe569 Squashed 'docs/' changes from e5e98b950..084804447
084804447 Update shortcode-templates.md
c01b02434 Correct misspelling of 'default'
52a831cca Added missing parenthesis
59e8e660a Fix spelling typos
29ad53c9c Yes, HTML is a valid content format
c6b193c6f Update shortcode-templates.md
1f2846e6d Fix typo in output format README
5882f7a4c Fix typo
a90a00bb0 Update multilingual.md
62bf0f184 Documentation for Open Graph & Twitter Cards
f4d624da3 Document "images", "videos", etc. in front-matter
6a85b5df1 Document anchorize and Resources.Content
04c8a5b0e Fix minor typo in 0.49.2 release note
dbe77e948 Release 0.49.2
ea6c9658e Merge branch 'temp492'
85c45b725 Merge branch 'release-0.49.2'
7ad1fba29 releaser: Prepare repository for 0.50-DEV
b25bcc3f2 releaser: Add release notes to /docs for release of 0.49.2
78b751b91 releaser: Bump versions for release of 0.49.2
e3f09762c Release 0.49.1
bd5b94558 Merge branch 'temp491'
0007e0661 Merge branch 'release-0.49.1'
74d2f3a6f releaser: Prepare repository for 0.50-DEV
bbee7e9d3 releaser: Add release notes to /docs for release of 0.49.1
ae40c89c7 releaser: Bump versions for release of 0.49.1
11079fb48 Add draft statement to FAQ
069b9472f Addin Hokus CMS to frontends list.
6e8850670 Add MediaType docs
f3ca6209a Add `languageName` to configuration
fd1cde5ea tpl: Add a delimiter parameter to lang.NumFmt
c620ff78a Update doc to use proper variable
7317c339a add tools->hugo-elasticsearch description to docs
d758ef94a hugolib: Introduce Page.NextPage and Page.PrevPage
9c93ac031 Update installing.md
7c0b5b7f5 Use ISO 639-1 code for examples
9a9e40ba8 Fix spelling
9a6216c18 Hugo 0.49
55aa91185 Merge branch 'temp49'
e0a36421e releaser: Prepare repository for 0.50-DEV
c07b3b385 releaser: Add release notes to /docs for release of 0.49
c1175a12a releaser: Bump versions for release of 0.49
2966f6254 docs: Document directory based archetypes
73dcd02ed Add showcase archetype folder
0a55ad11b docs: Regenerate CLI docs
e09866c2d docs: Document group
ef986358a Merge commit '807c551922'
681f14fc9 tpl/collections: Allow first function to return an empty slice
f6dcc93bc docs: Add docs for append
aae528ca3 Merge commit '13e64d7276'
02b62294c tpl/strings: Add strings.FirstUpper
bf3e61ba3 hugolib: Do not FirstUpper taxonomy titles

git-subtree-dir: docs
git-subtree-split: 084804447402ab99b51bf49f0da809bee8c16339
2018-10-29 09:19:20 +01:00
Bjørn Erik Pedersen
9c88a8a55a
common/loggers: Make sure the global logger also gets colored labels
See #4414
2018-10-28 16:06:50 +01:00
Bjørn Erik Pedersen
95e72f5e8e
i18n: Avoid using the global logger
See #4414
2018-10-28 14:42:41 +01:00
Bjørn Erik Pedersen
1c7b7b4ef2 common/loggers: Add color to ERROR and WARN
Fixes #4414
2018-10-28 14:16:23 +01:00
Bjørn Erik Pedersen
1ad117cbe2 common/herrors: Make the file error log format configurable
Will check for an OS environment variable named `HUGO_FILE_LOG_FORMAT`.

The tokens available are `:file` (absolute filename), `:line` (line number) and `:col` (column number).

The default format is: \":file::line::col\"`

How to set OS environment variables is OS specific, but an example on Unix setting an alternative format when running Hugo:

```bash
env HUGO_FILE_LOG_FORMAT="\":file::line\"" hugo
```

The above will include filename and line number quoted.

Fixes #5352
2018-10-27 19:14:16 +02:00
Bjørn Erik Pedersen
dac7092a9c common/collections: Allow a mix of slice types in append/Scratch.Add
The type handling in these was improved in Hugo 0.49, but this also meant that it was no longer possible to start out with a string slice and later append `Page` etc. to it.

This commit makes sure that the old behaviour is now possible again by falling back to a `[]interface{}` as a last resort.

Fixes #5361
2018-10-27 15:05:40 +02:00
Bjørn Erik Pedersen
b27ccf34bf resource: Allow .Data.Integrity to be accessed on its own
Fixes #5296
2018-10-27 11:34:15 +02:00
Bjørn Erik Pedersen
286d0b7dc3
Revert "mod: Update minify"
This reverts commit 83c873ff37.
2018-10-26 19:30:01 +02:00
Bjørn Erik Pedersen
83c873ff37
mod: Update minify
Closes #5261
2018-10-26 17:16:01 +02:00
Bjørn Erik Pedersen
a2440dc0e2
mod: Update cast
Closes #5340
2018-10-26 17:13:22 +02:00
Bjørn Erik Pedersen
1e9ac3dcc2
commands: Truncate the error log on repeated config errors 2018-10-26 17:02:53 +02:00
Bjørn Erik Pedersen
40e99672b6
docs: Regenerate CLI docs
Closes #5354
2018-10-26 15:10:43 +02:00
Bjørn Erik Pedersen
3a3badfd1d resource: Serialize image processing
Fixes #5220
2018-10-26 14:40:05 +02:00
Bjørn Erik Pedersen
df021317a9
commands: Only show Ansi escape codes if in a terminal 2018-10-26 14:33:44 +02:00
Bjørn Erik Pedersen
78578632f5 Fix archetype handling of directories in theme
Fixes #5318
2018-10-26 12:16:28 +02:00
Bjørn Erik Pedersen
6b78b3810a
Revert "commands: Read disableFastRender from flag even if it's not changed"
On second thought, removing this isn't worth it.

This reverts commit 78a4c2e32e.
2018-10-24 22:15:57 +02:00
Bjørn Erik Pedersen
78a4c2e32e
commands: Read disableFastRender from flag even if it's not changed
Fixes #5353
2018-10-24 20:33:07 +02:00
Bjørn Erik Pedersen
d4ebfea1ff
comamnds: Use overflow-x: auto; for browser errors 2018-10-24 19:20:37 +02:00
Bjørn Erik Pedersen
93aa6261b4
common/loggers: Remove the ANSI color for the browser error version 2018-10-24 17:22:07 +02:00
Bjørn Erik Pedersen
acc14b4646 hugolib: Adjust error test to make it pass on Go tip 2018-10-24 15:19:49 +02:00
Bjørn Erik Pedersen
2d7709d155 tpl: Handle truncated identifiers in Go template errors
Long identifiers will give errors on the format:

```bash
 _default/single.html:5:14: executing "main" at <.ThisIsAVeryLongTitl...>: can't evaluate field ThisIsAVeryLongTitle
```

Hugo use this value to match the "base template or not", so we need to strip the "...".

Fixes #5346
2018-10-24 13:54:04 +02:00
Bjørn Erik Pedersen
deff9e154b Add some color to the relevant filenames in terminal log
Fixes #5344
2018-10-24 13:02:18 +02:00
Bjørn Erik Pedersen
889aca054a Run gofmt -s 2018-10-24 00:12:32 +02:00
Bjørn Erik Pedersen
e3ed4a83b8
hugolib: Rename some page_* files
To make it easier to see/work with the source files that is about the `Page` struct.
2018-10-23 22:21:21 +02:00
Bjørn Erik Pedersen
6636cf1bea
Resolve error handling/parser related TODOs
See #5324
2018-10-23 19:41:22 +02:00
Bjørn Erik Pedersen
f669ef6bec
herrors: Improve handling of JSON errors
`*json.UnmarshalTypeError` and `*json.SyntaxError` has a byte `Offset`, so use that.

This commit also reworks/simplifies the errror line matching logic. This also makes the file reading unbuffered, but that should be fine in this error case.

See #5324
2018-10-23 14:35:43 +02:00
Bjørn Erik Pedersen
ed7b3e2619
commands, hugolib: Get file context in "config parse failed" errors
Fixes #5325
2018-10-23 08:09:41 +02:00
Bjørn Erik Pedersen
2bf686ee21
hugolib: Improve errors in /i18n handlling
See #5324
2018-10-22 20:46:14 +02:00
Bjørn Erik Pedersen
9f74dc2a52
hugolib: Improve errors in /data handlling
See #5324
2018-10-22 20:46:14 +02:00
Bjørn Erik Pedersen
d1661b823a
hugolib: Continue the file context/line number errors work
See #5324
2018-10-22 20:46:14 +02:00
Bjørn Erik Pedersen
7930d2132a
hugolib: Remove the now superflous Source struct
See #5324
2018-10-22 20:46:14 +02:00
Bjørn Erik Pedersen
eb038cfa0a
Convert the rest to new page parser code paths
And remove some now unused code.

See #5324
2018-10-22 20:46:14 +02:00
Bjørn Erik Pedersen
129c27ee6e
parser/metadecoders: Consolidate the metadata decoders
See #5324
2018-10-22 20:46:13 +02:00
Bjørn Erik Pedersen
44da60d869
hugolib: Redo the summary delimiter logic
Now that we have a proper page parse tree, this can be greatly simplified.

See #5324
2018-10-22 20:46:13 +02:00
Bjørn Erik Pedersen
1e3e34002d
hugolib: Integrate new page parser
See #5324
2018-10-22 20:46:13 +02:00
Bjørn Erik Pedersen
1b7ecfc2e1
hugolib: Use []byte in shortcode parsing
See #5324
2018-10-22 19:57:44 +02:00
Bjørn Erik Pedersen
27f5a906a2
parser/pageparser: Use []byte in page lexer
See #5324
2018-10-22 19:57:44 +02:00
Bjørn Erik Pedersen
2fdc4a24d5
parser/pageparser: Add front matter etc. support
See #5324
2018-10-22 19:57:43 +02:00
Bjørn Erik Pedersen
f6863e1ef7
parser/pageparser: File renames and splitting
See #5324
2018-10-22 19:57:43 +02:00
Bjørn Erik Pedersen
d6c16afde0
Move the shortcode parser to the new pageparser package
See #5324
2018-10-22 19:57:43 +02:00
Bjørn Erik Pedersen
6f3716dc22
commands: Avoid panic in error handler on config errors 2018-10-22 19:51:59 +02:00
Sean Prashad
5a52cd5f92 tpl: Update Jsonify to return pretty-print output
Fixes #5040
2018-10-21 23:36:35 +02:00
Bjørn Erik Pedersen
4a366fcfee Prevent stale content in Fast Render Mode
We do that by re-render visited pages that is not already in the stack. This may potentially do some double work, but that small penalty should be well worth it.

Fixes #5281
2018-10-17 10:15:22 +02:00
Bjørn Erik Pedersen
083311d033
hugolib: Fix test on Windows 2018-10-17 08:37:02 +02:00
Bjørn Erik Pedersen
0fe4ff1875
tpl: Improve the Execute panic error message
See #5327
2018-10-17 08:25:57 +02:00
Janus
1f42e47e47 Allow date and slug from filename for leaf bundles
Fixes #4558
2018-10-16 23:51:48 +02:00
Bjørn Erik Pedersen
35fbfb19a1
commands: Show server error info in browser
The main item in this commit is showing of errors with a file context when running `hugo server`.

This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`).

But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files.

Fixes #5284
Fixes #5290
See #5325
See #5324
2018-10-16 22:10:56 +02:00
Kris Budhram
3a3089121b Simple doc fix in CONTRIBUTING.md 2018-10-16 13:30:00 +02:00
Akshay Raj Gollahalli
c21e5179ce tpl: Use .Lastmod in embedded schema template
Fixes #5320
2018-10-16 11:52:32 +02:00
Bjørn Erik Pedersen
a205f24ba5
Revert "commands: Add .gitignore "hugo new site""
This fails on Windows, so it needs to be reconsidered.

This reverts commit 92979d9288.
2018-10-16 08:43:38 +02:00
Nathaniel Peiffer
92979d9288 commands: Add .gitignore "hugo new site" 2018-10-16 08:36:27 +02:00
Cameron Moore
0a3340e952 resource: Optimize integrity string generation
Remove use of fmt.Sprintf for simple string concatenation.  A simple
change for a small perf boost.

```
name         old time/op    new time/op    delta
Integrity-4     525ns ± 2%     268ns ± 2%  -48.92%  (p=0.000 n=10+10)

name         old alloc/op   new alloc/op   delta
Integrity-4      144B ± 0%      112B ± 0%  -22.22%  (p=0.000 n=10+10)

name         old allocs/op  new allocs/op  delta
Integrity-4      5.00 ± 0%      3.00 ± 0%  -40.00%  (p=0.000 n=10+10)
```
2018-10-16 08:33:38 +02:00
Elliot Forbes
6b21ac3e67 commands: Add help text to "hugo new" 2018-10-15 17:48:19 +02:00
Anthony Fok
d14420539a
snap: Set "extended" tag based on build_url on Launchpad
Read build_url from $SNAPCRAFT_IMAGE_INFO to determine whether
to add the "extended" build tag or not.  This allows us to do away
with the extended-snap-master and extended-snap-stable branches.
2018-10-12 11:10:38 +08:00
Shreyansh Khajanchi
3d4a9882bf helpers: Call rst2html directly on *nix
Initially, rst2html was called via the python interpreter which would
fail if the script was wrapped in a launcher as on NixOS.
Ideally, on *nix, binaries should be invoked directly to ensure that
shebangs work properly as is being done now.
Handle the case of windows as it doesn't do shebangs.
2018-10-11 22:46:10 +02:00
Ben Abbott
bdca972794 Update URLs to stop 301 redirects 2018-10-11 22:44:06 +02:00
Bjørn Erik Pedersen
604ddb90c5
Merge branch 'release-0.49.2' 2018-10-11 12:01:51 +02:00
hugoreleaser
b09e495a71 releaser: Prepare repository for 0.50-DEV
[ci skip]
2018-10-11 09:49:59 +00:00
hugoreleaser
42cde66663 releaser: Add release notes to /docs for release of 0.49.2
[ci skip]
2018-10-11 09:47:57 +00:00
hugoreleaser
ad60948c46 releaser: Bump versions for release of 0.49.2
[ci skip]
2018-10-11 09:47:57 +00:00
Bjørn Erik Pedersen
c397f2c080
Release 0.49.2 2018-10-11 11:41:46 +02:00
hugoreleaser
b9e18e20c8 releaser: Add release notes draft for 0.49.2
Rename to *-ready.md to continue. [ci skip]
2018-10-11 09:39:29 +00:00
Bjørn Erik Pedersen
2159d77f36
common/collections: Fix type checking in Append
The fix introduced in Hugo `0.49.1` had an unintended side-effect in the `Append` func used in both `append` and `.Scratch.Add`.

This commit fixes that by loosen/fixing the type checking so concrete types can be appended to interface slices.

Fixes #5303
2018-10-11 11:30:17 +02:00
Bjørn Erik Pedersen
535755e4f8
common/collections: Fix type checking in Append
The fix introduced in Hugo `0.49.1` had an unintended side-effect in the `Append` func used in both `append` and `.Scratch.Add`.

This commit fixes that by loosen/fixing the type checking so concrete types can be appended to interface slices.

Fixes #5303
2018-10-11 11:24:10 +02:00
Bjørn Erik Pedersen
3583dd6d71
Merge branch 'release-0.49.1' 2018-10-10 13:00:01 +02:00
hugoreleaser
e5b4cb2419 releaser: Prepare repository for 0.50-DEV
[ci skip]
2018-10-10 10:38:45 +00:00
hugoreleaser
821adf3ae8 releaser: Add release notes to /docs for release of 0.49.1
[ci skip]
2018-10-10 10:36:37 +00:00
hugoreleaser
8ba9a27366 releaser: Bump versions for release of 0.49.1
[ci skip]
2018-10-10 10:36:37 +00:00
Bjørn Erik Pedersen
235acf2232
Relase 0.49.1 2018-10-10 12:31:46 +02:00
hugoreleaser
ac0fac9347 releaser: Add release notes draft for 0.49.1
Rename to *-ready.md to continue. [ci skip]
2018-10-10 10:28:25 +00:00
Bjørn Erik Pedersen
23f48c300c
common/maps: Improve append in Scratch
This commit consolidates the reflective collections handling in `.Scratch` vs the `tpl` package so they use the same code paths.

This commit also adds support for a corner case where a typed slice is appended to a nil or empty `[]interface{}`.

Fixes #5275
2018-10-10 12:21:51 +02:00
Bjørn Erik Pedersen
e2201ef15f
tpl/collections: Fix handling of different interface types in Slice
In Hugo `0.49` we improved type support in `slice`. This has an unfortunate side effect in that `resources.Concat` now expects something that can resolve to `resource.Resources`.

This worked for most situations, but when you try to `slice` different `Resource` objects, you would be getting `[]interface {}` and not `resource.Resources`. And `concat` would fail:

```bash
error calling Concat: slice []interface {} not supported in concat.
```

This commit fixes that by simplifying the type checking logic in `Slice`:

* If the first item implements the `Slicer` interface, we try that
* If the above fails or the first item does not implement `Slicer`, we just return the `[]interface {}`

Fixes #5269
2018-10-10 12:21:42 +02:00
Bjørn Erik Pedersen
b5e17f7c83
Add GOPATH Hugo building tip 2018-10-09 11:09:00 +02:00
Bjørn Erik Pedersen
31a8bb8c07 common/maps: Improve append in Scratch
This commit consolidates the reflective collections handling in `.Scratch` vs the `tpl` package so they use the same code paths.

This commit also adds support for a corner case where a typed slice is appended to a nil or empty `[]interface{}`.

Fixes #5275
2018-10-08 12:30:50 +02:00
Bjørn Erik Pedersen
8e825ddf5b
Revert "tpl: Fix baseof.html in error message"
I need to rethink this.

This reverts commit 646a52a5c5.
2018-10-07 21:08:41 +02:00
Bjørn Erik Pedersen
646a52a5c5
tpl: Fix baseof.html in error message
This fix should also make the template loadin slightly faster, as we avoid to reparse the baseof.html files more than one time.

Fixes #5288
2018-10-06 12:04:29 +02:00
Bjørn Erik Pedersen
e421696d02 helpers: Consolidate MakeSegment vs MakePathSanitized
In short:

* Avoid double tolower in MakeSegment
* Use MakePathSanitized for taxonomies in pageToPermalinkTitle; this matches what MakeSegment does.
* Move the "double hyphen and space" logic into UnicodeSanitize

The last bullet may be slightly breaking for some that now does not get the "--" in some URLs, but we need to reduce the amount of URL logic.

See #4926
2018-10-03 15:55:25 +02:00
Gregorio Martinez
4b4af2c52e hugolib: Use stdlib context package 2018-10-03 14:59:35 +02:00
Cameron Moore
fae48d7457 hugolib: Normalize permalink path segments
When constructing permalinks, ensure that most inputs used as path
segments are normalized with PathSpec.MakeSegment instead of
PathSpec.URLize.

The primary exception to that rule is with taxonomy titles in
pageToPermalinkTitle(). The approach taken here is to use URLize for
taxonomy pages. Everything else will use MakeSegment. The reason for
this exception is that people use taxonomies such as "s1/p1" to generate
URLs precisely they way they wish (see #5223). Tests have been added to
check for this case.

Fixes #4926
2018-10-03 11:02:15 +03:00
Gregorio Martinez
06d28a464d hugolib: Fix FuzzyWordCount test error message 2018-10-03 10:01:30 +03:00
Kaushal Modi
6818170308 Render Markdown in figure shortcode "caption" and "attr" params
Fixes https://github.com/gohugoio/hugo/issues/4406.
2018-10-03 09:55:53 +03:00
Kaushal Modi
c5279064df Re-organize the figure shortcode for better readability 2018-10-03 09:55:53 +03:00
Gregorio Martinez
152cffb13a Update README & CONTRIBUTING
Fix broken links for Dev Chat that point to broken gitter.im room.
Remove lines about `mage vendor` target that is no longer available.
Remove broken table of contents links for headings in CONTRIBUTING.md
Fix typo
2018-10-03 09:50:02 +03:00
Cameron Moore
0d5110d033 tpl: Cast IsSet key to int for indexed types
Don't assume that the user sends an int as the key when checking against
indexed types.

Fixes #3681
2018-10-03 09:36:27 +03:00
Cameron Moore
d3b81ee58e hugolib: Improve error message for bad taxonomy weights
Error is now "Unable to convert taxonomy weight []string{"40"} to int
for variables/files.md"
2018-10-03 09:34:45 +03:00
Cameron Moore
1fd30d462e hugolib: Cast taxonomy weight parameters to int
Fixes #4628
2018-10-03 09:34:45 +03:00
Cameron Moore
498d629958 hugolib: Allow nil to be unwrapped as *Page
Previously, calls to *Page.Eq(nil) would always return false because the
unwrapPage func didn't support the nil case.  Add support for unwrapping
nil to a *Page.

Fixes #5043
2018-10-03 09:33:42 +03:00
Bjørn Erik Pedersen
10ac2ec446 tpl/collections: Fix handling of different interface types in Slice
In Hugo `0.49` we improved type support in `slice`. This has an unfortunate side effect in that `resources.Concat` now expects something that can resolve to `resource.Resources`.

This worked for most situations, but when you try to `slice` different `Resource` objects, you would be getting `[]interface {}` and not `resource.Resources`. And `concat` would fail:

```bash
error calling Concat: slice []interface {} not supported in concat.
```

This commit fixes that by simplifying the type checking logic in `Slice`:

* If the first item implements the `Slicer` interface, we try that
* If the above fails or the first item does not implement `Slicer`, we just return the `[]interface {}`

Fixes #5269
2018-10-02 23:54:16 +03:00
Cameron Moore
ce264b936c tpl: Add a delimiter parameter to lang.NumFmt
The original implementation of NumFmt did not take into account that the
options delimiter (a space) could be a valid option.  Adding a delim
parameter seems like the simplest, safest, and most flexible way to
solve this oversight in a backwards-compatible way.

Fixes #5260
2018-10-02 17:41:48 +03:00
Anthony Fok
91f49c0700
snap: Add custom x-nodejs plugin to support ppc64el and s390x 2018-09-30 23:03:05 -06:00
Anthony Fok
a475bf125c
snap: Fetch mage with GO111MODULE=off 2018-09-30 23:03:01 -06:00
Anthony Fok
f1dede3708
snap: Revert 'Skip "mage -v test" due to build failure on Launchpad'
This reverts commit 52ac85fbc4.
2018-09-30 23:02:58 -06:00
Anthony Fok
fa873a6cb3
snap: Use build-snaps instead of building go from source
See https://forum.snapcraft.io/t/go-part-fails-with-go1-11-if-go-mod-exists-in-the-top-level-directory/7546/11
2018-09-30 23:02:34 -06:00
Bjørn Erik Pedersen
fb732d5322
hugolib: Be a litle more specific in NextPage TODO 2018-09-26 09:26:53 +02:00
Ricardo N Feliciano
ad705aac06 hugolib: Introduce Page.NextPage and Page.PrevPage
Introduce new page position variables in order to fix the ordering issue
of `.Next` and `.Prev` while also allowing an upgrade path via
deprecation.

`.NextInSection` becomes `.NextPageInSection`.
`.PrevInSection` becomes `.PrevPageInSection`.

`.Next` becomes a function returning `.PrevPage`.
`.Prev` becomes a function returning `.NextPage`.

Fixes #1061
2018-09-26 09:22:43 +02:00
Anthony Fok
52ac85fbc4
snap: Skip "mage -v test" due to build failure on Launchpad
The run "go test ./... -tags none" fails with multiple errors of

    use of internal package github.com/gohugoio/hugo/tpl/internal not allowed

See https://launchpadlibrarian.net/390252700/buildlog_snap_ubuntu_xenial_amd64_hugo-dev_BUILDING.txt.gz

I was unable to reproduce it with snapcraft in LXD
on my local Debian laptop, so this error is still a mystery to me.
2018-09-25 16:08:22 -06:00
Anthony Fok
048a64be1c
releaser: Update path to snap/snapcraft.yaml 2018-09-25 07:21:09 -06:00
Anthony Fok
3033a9a37e
snap: Fix go plugin build failure by renaming go.mod
as a temporary workaround.

See https://forum.snapcraft.io/t/go-plugin-go1-11-fails-if-go-mod-exists-in-the-top-level-directory/7546
and https://discourse.gohugo.io/t/hugo-0-48-released/13908/12
2018-09-25 07:05:55 -06:00
Anthony Fok
27d4211187
snap: Move snapcraft.yaml to snap/snapcraft.yaml 2018-09-25 07:03:51 -06:00
Anthony Fok
4730a78a76
snapcraft: Try installing postcss again
Revert "snap: Skip installing postcss due to failure on build server"

This reverts commit 66f688f712.
2018-09-24 22:20:45 -06:00
Anthony Fok
b7706d6aec
snapcraft: Set GO111MODULE=on in override-build script
Apparently, snapcraft's yet-to-be-documented environment declaration
feature is for run-time only.

See https://discourse.gohugo.io/t/hugo-0-48-released/13908/9
and https://forum.snapcraft.io/t/declaratively-defining-environment-variables/175/29
2018-09-24 22:15:42 -06:00
Bjørn Erik Pedersen
48413d76f4
build: Update the temp docker script 2018-09-24 12:41:12 +02:00
hugoreleaser
66b9e2bff2 releaser: Prepare repository for 0.50-DEV
[ci skip]
2018-09-24 10:04:24 +00:00
hugoreleaser
398996e8b0 releaser: Add release notes to /docs for release of 0.49
[ci skip]
2018-09-24 10:01:04 +00:00
hugoreleaser
7f005f5e98 releaser: Bump versions for release of 0.49
[ci skip]
2018-09-24 10:01:04 +00:00
Bjørn Erik Pedersen
011e3aaa9e
Release 0.49 2018-09-24 11:52:47 +02:00
Bjørn Erik Pedersen
3697448450
docs: Document directory based archetypes
See #4535
2018-09-24 11:52:25 +02:00
hugoreleaser
2638b04c62
releaser: Add release notes draft for 0.49
Rename to *-ready.md to continue. [ci skip]
2018-09-24 11:49:07 +02:00
Bjørn Erik Pedersen
cf47f43ff1
ci: Add "go mod download" to CI scripts
To hopefully make them less flaky.
2018-09-24 10:31:59 +02:00
Bjørn Erik Pedersen
3b6bd1210a
docs: Regenerate CLI docs 2018-09-24 10:11:41 +02:00
Bjørn Erik Pedersen
8388cd90e8
docs: Document group
Fixes https://github.com/gohugoio/hugoDocs/issues/597
2018-09-24 10:07:50 +02:00
Bjørn Erik Pedersen
807c551922 Squashed 'docs/' changes from 6b00298bb..e5e98b950
e5e98b950 Update code-toggle.md
340c9c623 Update 'Fetch from Github' installation instructions in line with Github README
d9f06c23c Add tip about clearing browser cache (#608)
7c9df4731 Adding Remark as additional Comments Alternatives for hugo (#607)
b1ce8bf02 Revert "Temp change of baseURL"
fdbc582ff Temp change of baseURL
5ec663bd6 Fix wrong date in frontmatter config example (#602)
0b3022eb1 Fix broken link to https://www.wercker.com (#603)
b4a7e31a6 Turn off minification
bfcc1ac21 Add a Tweet
8be09c0b4 Remove unused data file

git-subtree-dir: docs
git-subtree-split: e5e98b950ca631c3135ac2f4446c79d71d2196be
2018-09-23 23:48:53 +02:00
Bjørn Erik Pedersen
bc57f5c36e
Merge commit '807c551922' 2018-09-23 23:48:53 +02:00
Bjørn Erik Pedersen
fe6a6f2737
resource/integrity: Make Data.Integrity be of type template.HTMLAttr 2018-09-23 23:40:35 +02:00
Bjørn Erik Pedersen
2650fa772b Add directory based archetypes
Given this content:

```bash
archetypes
├── default.md
└── post-bundle
    ├── bio.md
    ├── images
    │   └── featured.jpg
    └── index.md
```

```bash
hugo new --kind post-bundle post/my-post
```

Will create a new folder in `/content/post/my-post` with the same set of files as in the `post-bundle` archetypes folder.

This commit also improves the archetype language detection, so, if you use template code in your content files, the `.Site` you get is for the correct language. This also means that it is now possible to translate strings defined in  the `i18n` bundles,  e.g. `{{ i18n "hello" }}`.

Fixes #4535
2018-09-23 19:27:23 +02:00
Ricardo N Feliciano
ef525b15d4 Build on CircleCI outside of GOPATH
Fixes #5135
2018-09-23 18:50:26 +02:00
Bjørn Erik Pedersen
f916814697 Prevent symbolic links from themes 2018-09-23 17:18:35 +02:00
Ricardo N Feliciano
cae07ce84b tpl/collections: Allow first function to return an empty slice
Fixes #5235
2018-09-22 20:58:46 +02:00
Ricardo N Feliciano
4f9c109dc5 tpl/opengraph: Use safeHTMLAttr instead of safeHTML for HTML attributes
Fixes #5236
2018-09-22 00:36:15 +02:00
Bjørn Erik Pedersen
f1a00b2069
hugolib: Remove deprecated rssURI 2018-09-21 14:30:57 +02:00
Bjørn Erik Pedersen
df4cbbd3bd
commands: Remove deprecated flags 2018-09-21 14:27:35 +02:00
Bjørn Erik Pedersen
2e2e34a935
hugolib: Deprecate Pages.Sort
In favour of ByWeight.
2018-09-21 14:23:00 +02:00
Bjørn Erik Pedersen
2eed35c826
hugolib: Minor cleaning in the sorting code 2018-09-21 14:13:45 +02:00
Bjørn Erik Pedersen
dd692c710a hugolib: Clear the page cache per render
This is a slight performance optimization with no functional effect.

See #5239
2018-09-21 11:21:15 +02:00
Bjørn Erik Pedersen
ed4f1edbd7 hugolib: Compare every element in pages cache
It is slightly slower, but correctnes is, of course, more important:

```bash
benchmark                             old ns/op     new ns/op     delta
BenchmarkSortByWeightAndReverse-4     367           645           +75.75%

benchmark                             old allocs     new allocs     delta
BenchmarkSortByWeightAndReverse-4     2              2              +0.00%

benchmark                             old bytes     new bytes     delta
BenchmarkSortByWeightAndReverse-4     64            64            +0.00%
```

Running the same benchmark without any cache (i.e. resorting the slice on every iteration) and then compare it to the current version shows that it still is plenty worth it:

```bash
▶ benchcmp 2.bench 1.bench
benchmark                             old ns/op     new ns/op     delta
BenchmarkSortByWeightAndReverse-4     1358757       645           -99.95%

benchmark                             old allocs     new allocs     delta
BenchmarkSortByWeightAndReverse-4     17159          2              -99.99%

benchmark                             old bytes     new bytes     delta
BenchmarkSortByWeightAndReverse-4     274573        64            -99.98%
```

Closes #5239
2018-09-21 11:21:15 +02:00
Bjørn Erik Pedersen
058cc6c2c3
Revert "hugolib: Normalize permalink path segments"
This reverts commit 06976ebb87.

Fixes #5223
2018-09-18 09:27:49 +02:00
Bjørn Erik Pedersen
4b82f74848
Update releasenotes_writer.go
Add @onedrawingperday to the release credit list. The activity on the theme repo is increasing and the work he and @digitalcraftsman 
 is doing is very much appreciated.
2018-09-14 23:25:54 +02:00
Cameron Moore
06976ebb87 hugolib: Normalize permalink path segments
When constructing permalinks, ensure that path segments are normalized
with PathSpec.MakeSegment instead of PathSpec.URLize.

Fixes #4926
2018-09-14 11:35:26 +02:00
Bjørn Erik Pedersen
555a5612b2 hugolib: Do not set RSS as Kind in RSS output
Before Hugo this commit  we set the pseudo page kind RSS on the page when output to RSS. This had some unintended side effects, esp. when the only output format for that page  was RSS.

For the page kinds that can have multiple output formats, the Kind should be one of the standard home, page etc.

Fixes #5138
2018-09-14 11:33:02 +02:00
Bjørn Erik Pedersen
75e54345f9 hugolib: Make sure ambiguous lookups in GetPage gets an error
See #5138
2018-09-14 11:33:02 +02:00
Bjørn Erik Pedersen
df50c108ba docs: Add docs for append
See #5190
2018-09-14 10:12:08 +02:00
Bjørn Erik Pedersen
e27fd4c1b8 tpl/collections: Add collections.Append
Before this commit you would typically use `.Scratch.Add` to manually create slices in a loop.

With variable overwrite in Go 1.11, we can do better. This commit adds the `append` template func.

A made-up example:

```bash
{{ $p1 := index .Site.RegularPages 0 }}{{ $p2 := index .Site.RegularPages 1 }}
{{ $pages := slice }}
{{ if true }}
  {{ $pages = $pages | append $p2 $p1 }}
{{ end }}
```

Note that with 2 slices as arguments, the two examples below will give the same result:

```bash
{{ $s1 := slice "a" "b" | append (slice "c" "d") }}
{{ $s2 := slice "a" "b" | append "c" "d" }}
```

Both of the above will give `[]string{a, b, c, d}`.

This commit also improves the type handling in the `slice` template function. Now `slice "a" "b"` will give a `[]string` slice. The old behaviour was to return a `[]interface{}`.

Fixes #5190
2018-09-14 10:12:08 +02:00
Bjørn Erik Pedersen
b7ca3e1b3a
Merge commit '13e64d7276' 2018-09-14 08:35:23 +02:00
Bjørn Erik Pedersen
13e64d7276 Squashed 'docs/' changes from 9b494a58c..6b00298bb
6b00298bb Remove outdated "related example"
987f1e1cd Fix dead links (#601)
96287a20a Add config option "summaryLength" (#600)
ced7f2085 Adjust Over showcase
e334a6354 Add new showcase: over
10435b502 Add warning about privacy options only work with internal templates (#525)
48c6b0e4d Minor grammatical fix
684670ebc Add quote
0e9fada52 Improvements to taxonomy template examples
e06c4bf73 Add syntax highlighting; consistent 4-space indentation
c1cb3f081 Remove dead links for custom permalinks
3e3aefd04 Fix 0a671bc3751479e74a0a9d2132736c61d239707c
d65888685 fix file name in 'Add Non-content Entries to a Menu' code toggle (#547)
1a0563857 Add Solus install guide (#590)
8a0d65b0d Update Windows Installation instructions (#564)
c4348636a Fix typo
0a671bc37 Add post to menu example
af14497c6 Add notes for `os.Stat` (Hugo 0.47) (#557)
e49f65bb3 Singular to plural
cb5608dbf Update introduction.md
30b060dff Add variable re-definition example (Hugo v0.48+)
21123967e Minor edits
fac3df043 Refresh the Go Templates introduction
4a9600e92 Updating URL to how-to-guide for hosting hugo site on firebase
bfaa7779c add missing word
c2cb5d09b Tweak 'name: weight' to 'name: date' in example (#582)
5ea938ad6 Remove some Scratch
2708dcd57 Release 0.48
e375d0f05 Merge branch 'temp48'
75e36c160 releaser: Prepare repository for 0.49-DEV
a6102f253 releaser: Add release notes to /docs for release of 0.48
41fc35db4 releaser: Bump versions for release of 0.48
64b9ecc74 Spell out the npm command for installing PostCSS
19e900a17 Improved Related Content doc
fe21600e7 Merge commit '844aef544c19e9d8f529b4f8144e089d0982bb34'
844aef544 Squashed 'themes/gohugoioTheme/' changes from 66249819..68ddff44
069828db8 Update git.md
d881d1433 Make default "related" behavior more explicit
60b9160eb Add docs for displaying 404 page on CloudFront
b72ebc760 Add .gitattributes to /resources
000cf85f4 Make the pros/cons styling consistent for summaries; use desc list
ebf1da97a Add note about outputStyle compressed
e3338ee91 Triple backquote syntax fix
361962a7c Add one more Blogger to Hugo tool for Windows (.NET Framework 4.5) (#540)
066606a21 Fix wrong link about Mmark Syntax Document
faee70757 Added exitwp-for-hugo
6b4108051 Add hugo-wrapper to starter-kits
4695dfba2 Added Utterances as Comments Alternatives.
c7ba9e3e1 Correct typo
beb850d9f Release 0.47.1
1cf417c8a Merge branch 'temp471'
0843bc46c releaser: Prepare repository for 0.48-DEV
8ff5c8b70 releaser: Add release notes to /docs for release of 0.47.1
e2353434d releaser: Bump versions for release of 0.47.1
ffb1300af Update development.md
c22234ea5 netlify: Minify output
5b9191c56 Release 0.47
bfd92cf52 releaser: Prepare repository for 0.48-DEV
ac7acf730 releaser: Add release notes to /docs for release of 0.47
b0096099d releaser: Bump versions for release of 0.47
86a7ae459 docs: Regenerate CLI docs
d2c8b72bc Merge commit 'a95896878f'
84de7ef59 Merge commit '3a44bf182f'

git-subtree-dir: docs
git-subtree-split: 6b00298bb26b700281df28817b6556e7480cdd1e
2018-09-14 08:34:58 +02:00
Alexandros
9b26b5487b minifiers: Set minifier to KeepEndTags
See: 948b6490cf/README.md (L171)
2018-09-13 08:16:20 +02:00
James Kiefer
3dafe206e3 minifiers: Make JSON minification more generic
Add a regex matcher for json types. Specifically support LD+JSON which
allows for google seo minification out of the box. Expanded JS/JSON
minification testing.
2018-09-12 19:33:14 +02:00
Bjørn Erik Pedersen
37d6463479 Update Mage 2018-09-12 09:01:36 +02:00
Bjørn Erik Pedersen
43d446522a tpl/data: Revise error handling in getJSON and getCSV
The most important part being: Log ERROR, but do not stop the build on remote errors.

Fixes #5076
2018-09-11 16:46:25 +02:00
Cameron Moore
4f72e79120 tpl: Show error on union or intersect of uncomparable types
Fixes #3820
2018-09-11 14:09:29 +02:00
Bjørn Erik Pedersen
fe6676c775 tpl/collections: Improve type handling in collections.Slice
Fixes #5188
2018-09-10 09:19:01 +02:00
Bjørn Erik Pedersen
7a97d3e6bc
tpl/collections: Allow pointer receiver in Group
See #4865
2018-09-08 21:56:36 +02:00
Bjørn Erik Pedersen
6667c6d743 tpl/collections: Add group template func
This extends the page grouping in Hugo with a template function that allows for ad-hoc grouping.

A made-up example:

```
{{ $cool := where .Site.RegularPages "Params.cool" true | group "cool" }}
{{ $blue := where .Site.RegularPages "Params.blue" true | group "blue" }}
{{ $paginator := .Paginate (slice $cool $blue) }}
```

Closes #4865
2018-09-08 20:20:26 +02:00
Vincent Danjean
cfda13b363 hugolib: Allow creating page groups from any page collection
This also adjusts the pagination logic to allow for these new collections.

Note that we will follow up with a template function named `group` that will be the end user API. The `.Group` method on `Page` should be considered as internal.

Updates #4865
2018-09-08 11:14:09 +02:00
Bjørn Erik Pedersen
bb2fe814c2 Update dependencies 2018-09-07 16:06:34 +02:00
Bjørn Erik Pedersen
e5d66074ce
tpl/strings: Add strings.FirstUpper
Fixes #5174
2018-09-07 09:08:14 +02:00
Cameron Moore
d970327d7b hugofs: Fix filepath issue in test 2018-09-07 08:25:51 +02:00
Cameron Moore
0013bea901 resource: Fix golint issues
Fix godoc comments and the following:

resource/image.go:33:2: a blank import should be only in a main or test package, or have a comment justifying it
resource/image.go:35:2: a blank import should be only in a main or test package, or have a comment justifying it
resource/image.go:41:2: a blank import should be only in a main or test package, or have a comment justifying it
resource/image.go:538:10: if block ends with a return statement, so drop this else and outdent its block
resource/resource.go:54:7: exported const DefaultResourceType should have comment or be unexported
resource/resource.go:233:1: receiver name r1 should be consistent with previous receiver name r for Resources
resource/resource.go:254:1: receiver name r1 should be consistent with previous receiver name r for Resources
2018-09-07 08:25:51 +02:00
Cameron Moore
30bc4ed0a0 Improve some godoc comments 2018-09-07 08:25:51 +02:00
Cameron Moore
f6f22ad944 tpl: Fix golint godoc issues 2018-09-07 08:25:51 +02:00
Cameron Moore
400fe96aee media: Fix golint issues
Fix godoc issues and the following:

media/mediaType.go:228:1: receiver name t should be consistent with previous receiver name m for Type
2018-09-07 08:25:51 +02:00
Cameron Moore
3f45e729f4 output: Fix golint godoc issues 2018-09-07 08:25:51 +02:00
Cameron Moore
ffaa73dc8a publisher: Fix golint godoc issue 2018-09-07 08:25:51 +02:00
Cameron Moore
f8d8c85428 langs: Fix golint godoc issue 2018-09-07 08:25:51 +02:00
Cameron Moore
10dc87bf86 i18n: Fix golint issue
i18n/translationProvider.go:48:21: error strings should not be capitalized or end with punctuation or a newline
2018-09-07 08:25:51 +02:00
Cameron Moore
7231869ba8 related: Fix golint issues
related/inverted_index.go:76:1: exported method Config.Add should have comment or be unexported
related/inverted_index.go:255:1: exported method IndexConfig.ToKeywords should have comment or be unexported
2018-09-07 08:25:51 +02:00
Cameron Moore
ccd3285484 releaser: Fix golint issues
struct field HtmlURL should be HTMLURL
2018-09-07 08:25:51 +02:00
Cameron Moore
600047ff1c source: Fix golint godoc issues 2018-09-07 08:25:51 +02:00
Cameron Moore
5f2e1cb896 hugofs: Fix golint issues
Fix godoc issues and the following:

hugofs/noop_fs.go:25:2: error var noOpErr should have name of the form errFoo
2018-09-07 08:25:51 +02:00
Cameron Moore
c8ce65046d helpers: Fix golint issues
helpers/general.go:448:1: comment on exported function DiffStrings should be of the form "DiffStrings ..."
helpers/hugo.go:42:6: exported type HugoVersionString should have comment or be unexported
helpers/hugo.go:48:1: exported method HugoVersion.Version should have comment or be unexported
helpers/hugo.go:56:1: comment on exported method HugoVersionString.Compare should be of the form "Compare ..."
helpers/hugo.go:62:1: comment on exported method HugoVersionString.Eq should be of the form "Eq ..."
helpers/path.go:548:1: comment on exported function OpenFilesForWriting should be of the form "OpenFilesForWriting ..."
helpers/processing_stats.go:24:6: exported type ProcessingStats should have comment or be unexported
helpers/processing_stats.go:55:1: exported function NewProcessingStats should have comment or be unexported
helpers/processing_stats.go:59:1: exported method ProcessingStats.Incr should have comment or be unexported
helpers/processing_stats.go:63:1: exported method ProcessingStats.Add should have comment or be unexported
helpers/processing_stats.go:67:1: exported method ProcessingStats.Table should have comment or be unexported
helpers/processing_stats.go:83:1: exported function ProcessingStatsTable should have comment or be unexported
2018-09-07 08:25:51 +02:00
Cameron Moore
a53f962312 deps: Fix most golint issues
deps/deps.go:79:6: exported type Listeners should have comment or be unexported
deps/deps.go:86:1: exported method Listeners.Add should have comment or be unexported
deps/deps.go:92:1: exported method Listeners.Notify should have comment or be unexported
2018-09-07 08:25:51 +02:00
Cameron Moore
daffeec30d config: Fix golint issues
config/configProvider.go:54:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
config/privacy/privacyConfig.go:99:1: exported function DecodeConfig should have comment or be unexported
config/services/servicesConfig.go:64:1: exported function DecodeConfig should have comment or be unexported
2018-09-07 08:25:51 +02:00
Cameron Moore
b8b91f5506 common: Fix golint errors
common/errors/errors.go:21:1: comment on exported var FeatureNotAvailableErr should be of the form "FeatureNotAvailableErr ..."
common/errors/errors.go:23:5: error var FeatureNotAvailableErr should have name of the form ErrFoo
common/maps/scratch.go:76:1: comment on exported method Scratch.Delete should be of the form "Delete ..."
common/maps/scratch.go:133:1: exported function NewScratch should have comment or be unexported
common/types/types.go:44:1: exported function NewKeyValuesStrings should have comment or be unexported
2018-09-07 08:25:51 +02:00
Cameron Moore
f0effac804 commands: Fix golint issues
commands/hugo.go:65:1: exported method Response.IsUserError should have comment or be unexported
commands/import_jekyll.go💯21: error strings should not be capitalized or end with punctuation or a newline
commands/server.go:417:1: receiver name sc should be consistent with previous receiver name s for serverCmd
2018-09-07 08:25:51 +02:00
Thomas Jost
be3ae3ec92 hugolib: Do not FirstUpper taxonomy titles
Doing so was probably a mistake. This may be a breaking change for some people,
but it's easy to restore the previous behaviour in the layouts.

Fixes #5172
2018-09-06 20:29:21 +02:00
Bjørn Erik Pedersen
2cf8fe2ea2 Fix broken Travis config
See https://github.com/magefile/mage/issues/79
2018-09-06 13:42:41 +02:00
Bjørn Erik Pedersen
3b103cb7b7 Update to latest Mage
And run the Appveyor tests without GOPATH.

Fixes https://github.com/magefile/mage/issues/79
2018-09-03 10:18:59 +02:00
Bjørn Erik Pedersen
0cc936583b
resource: Fix broken build 2018-09-03 09:22:42 +02:00
Bjørn Erik Pedersen
c15c7da42a
resource: Remove some duplicate code 2018-09-02 23:57:42 +02:00
zyfdegh
bcbe57c6e9 Update Dockerfile to Go 1.11
Fixes #5145
2018-08-31 09:05:52 +02:00
Cameron Moore
e38e881248 hugolib: Simplify some code 2018-08-30 22:31:29 +02:00
Cameron Moore
0665a3951b hugolib: Add missing error checks 2018-08-30 22:31:29 +02:00
Cameron Moore
1ed8c36336 hugolib: Remove extraneous createStaticFs call
This looks like a copy+paste error.  We have the same line a few lines
below this call and we actually handle the err value there.
2018-08-30 22:31:29 +02:00
Cameron Moore
e03eb90a36 hugolib: Fix godoc comment 2018-08-30 22:31:29 +02:00
Cameron Moore
c915d0d325 hugolib: Fix typo in private func name 2018-08-30 22:31:29 +02:00
Michael Henderson
47d4edce60 Fix error message for go vet 2018-08-30 22:30:49 +02:00
Bjørn Erik Pedersen
ea8ef573c6 mage: Init packages once
`go list ./...` fails when run in parallel on Windows. This also applies to running `go test ./...` and `go list/...` so we serialize tests.
2018-08-30 13:36:33 +02:00
Bjørn Erik Pedersen
293e12355d appveyor: Update script to Go 1.11
Fixes #5127
2018-08-30 13:36:33 +02:00
Bjørn Erik Pedersen
fdf3c3b823 build: Remove the remains of Go Dep
Appveyor is now Go 1.11 ready, so we can go all "Go Modules".

Closes #5115
2018-08-30 13:36:33 +02:00
Bjørn Erik Pedersen
312d2252be
Update CONTRIBUTING.md 2018-08-29 14:21:20 +02:00
Bjørn Erik Pedersen
f627903efa
Update README.md 2018-08-29 14:17:47 +02:00
Bjørn Erik Pedersen
a2f0f9d475
snapcraft: Update to work with Go Modules 2018-08-29 09:37:26 +02:00
hugoreleaser
1ff54ab3d9 releaser: Prepare repository for 0.49-DEV
[ci skip]
2018-08-29 06:36:18 +00:00
hugoreleaser
456f5476cf releaser: Add release notes to /docs for release of 0.48
[ci skip]
2018-08-29 06:33:03 +00:00
hugoreleaser
09811d0bee releaser: Bump versions for release of 0.48
[ci skip]
2018-08-29 06:33:03 +00:00
Bjørn Erik Pedersen
d351ac2e69
Release 0.48 2018-08-28 23:17:01 +02:00
hugoreleaser
59f57900a4 releaser: Add release notes draft for 0.48
Rename to *-ready.md to continue. [ci skip]
2018-08-28 20:26:28 +00:00
Bjørn Erik Pedersen
59cdad325a
release: Fix CircleCI script 2018-08-28 22:17:35 +02:00
Bjørn Erik Pedersen
6022f219f1
hugolib: Only run variable variable overwrite test on Go 1.11 2018-08-28 18:00:19 +02:00
Bjørn Erik Pedersen
0c8a415483
hugolib: Add a test for template variable overwrite
New in Go 1.11.
2018-08-28 17:35:33 +02:00
Bjørn Erik Pedersen
f4675fa0f0
helpers: Fix permissions when creating new folders
This was mistakingly changed from 07777 (rwx, rw, r before umask) to 0755 in Hugo 0.37. This commit reverts to the old value.

Fixes #5128
2018-08-28 17:14:56 +02:00
Bjørn Erik Pedersen
ebb56e8bdb Improve minifier MIME type resolution
This commit also removes the deprecated `Suffix` from MediaType. Now use `Suffixes` and put the MIME type suffix in the type, e.g. `application/svg+xml`.

Fixes #5093
2018-08-28 17:00:53 +02:00
Bjørn Erik Pedersen
6b9934a266 circleci: Update to Go 1.11
See #5115
2018-08-28 11:22:50 +02:00
Bjørn Erik Pedersen
c7f057797c travis: Set GO111MODULE=on for mage install
See #5115
2018-08-28 11:22:50 +02:00
Anthony Fok
08d14113b6 resource: Add instruction to install PostCSS when missing
Fixes #5111
2018-08-26 15:22:58 +02:00
Bjørn Erik Pedersen
94d6d6780f
Update snapcraft build config to Go 1.11
See #5115
2018-08-26 10:43:53 +02:00
Bjørn Erik Pedersen
45c9c45d1d Use Go 1.11 modules with Mage
See #5115
2018-08-25 20:50:58 +02:00
Bjørn Erik Pedersen
fce32c07fb Add go.mod
See #5115
2018-08-25 20:50:58 +02:00
Bjørn Erik Pedersen
d32ff16fd6 Update Travis to Go 1.11 and Go 1.10.4
See #5115
2018-08-25 17:37:42 +02:00
vsopvsop
e6eda2a370 minfiers: Keep end tags
Fixes  #5112
2018-08-25 10:49:15 +02:00
Anthony Fok
66f688f712
snap: Skip installing postcss due to failure on build server
npm running on fails to fetch postcss-cli on build.snapcraft.io
due to network proxy issue.

See https://forum.snapcraft.io/t/build-fails-behind-proxy-on-build-snapcraft-io/6951/3
2018-08-24 10:08:56 -06:00
Anthony Fok
2c934be8ab
snap: Refactor, fix bin/node, and add bin/postcss 2018-08-24 09:35:06 -06:00
Bjørn Erik Pedersen
94d0e79d33
hugolib: Include language code in REF_NOT_FOUND errors
Fixes #5110
2018-08-24 09:23:01 +02:00
Bjørn Erik Pedersen
b9a503febb
tpl/tplimpl: Make the autogenerated templates collapsed in PRs 2018-08-23 22:03:43 +02:00
Cameron Moore
fff132537b Fix handling of taxonomy terms containing slashes
Fixes #4090
2018-08-22 07:18:37 +02:00
Carlos Alexandro Becker
8999de193c Fix build on armv7
Closes #5101
2018-08-20 19:44:00 +02:00
hugoreleaser
a81c64e43e releaser: Prepare repository for 0.48-DEV
[ci skip]
2018-08-20 08:19:37 +00:00
hugoreleaser
7ef5096257 releaser: Add release notes to /docs for release of 0.47.1
[ci skip]
2018-08-20 08:16:49 +00:00
hugoreleaser
16b691a875 releaser: Bump versions for release of 0.47.1
[ci skip]
2018-08-20 08:16:49 +00:00
Bjørn Erik Pedersen
aefd9a80a6
Release 0.47.1 2018-08-20 10:10:38 +02:00
hugoreleaser
57ace857aa releaser: Add release notes draft for 0.47.1
Rename to *-ready.md to continue. [ci skip]
2018-08-20 08:06:27 +00:00
Bjørn Erik Pedersen
fdff0d3af4 tpl/tplimpl: Fix .Site.Params case regression
Fixes #5094
2018-08-19 14:30:37 +02:00
Anthony Fok
834617f9f8
snap: Remove unused files from Git, Perl, etc.
Snap size reduced from 46MB to 26MB.
2018-08-18 06:26:54 -06:00
Anthony Fok
ef20ec1fba
snap: Add nodejs to allow PostCSS to work
See https://discourse.gohugo.io/t/snap-pipeline-error-with-postcss-environment-issue/13583
2018-08-18 05:04:52 -06:00
Bjørn Erik Pedersen
5a0ee2b934
minifiers: Do not strip IE conditional statements
Fixes #5089
2018-08-18 11:16:34 +02:00
hugoreleaser
6746826689 releaser: Prepare repository for 0.48-DEV
[ci skip]
2018-08-17 09:17:44 +00:00
hugoreleaser
caf608d566 releaser: Add release notes to /docs for release of 0.47
[ci skip]
2018-08-17 09:15:18 +00:00
hugoreleaser
6711dacded releaser: Bump versions for release of 0.47
[ci skip]
2018-08-17 09:15:18 +00:00
Bjørn Erik Pedersen
de23293486
releaser: Work around a Goreleaser bug
Closes #4918
2018-08-17 11:03:28 +02:00
Bjørn Erik Pedersen
918177ac25
Release 0.47 2018-08-17 10:38:31 +02:00
hugoreleaser
83a980d290 releaser: Add release notes draft for 0.47
Rename to *-ready.md to continue. [ci skip]
2018-08-17 08:19:47 +00:00
Bjørn Erik Pedersen
4a16b5f4b0
docs: Regenerate CLI docs 2018-08-17 10:12:19 +02:00
Bjørn Erik Pedersen
a95896878f Squashed 'docs/' changes from d88477eb3..9b494a58c
9b494a58c Add comma in example config
1c24f672d Update multilingual.md
8bf85bfe4 Cosmetic change to test GitInfo
3b53b54f9 Update installing.md
e3b8eb941 Get arolla-cocoon showcase ready for publishing
7b7931e59 Add  "Cocoon Arolla showcase"
c9cc7852c Add "scoop install hugo" for quick install on Windows
3037527fe Update Directory Structure following Hugo Pipes
dbecb967d Add `assetDir` key to config list
488d1d034 Remove alias.txt

git-subtree-dir: docs
git-subtree-split: 9b494a58cd96ec42a4fc63c389c01523d144e03f
2018-08-17 10:09:42 +02:00
Bjørn Erik Pedersen
873f8805cb
Merge commit 'a95896878f' 2018-08-17 10:09:42 +02:00
Steven Allen
3743875778 tpl/tplimpl: Fix compiling Amber templates that import other templates
Without this patch, amber would try to load templates from the OS filesystem
instead of the layouts virtual filesystem.
2018-08-17 10:04:07 +02:00
Bjørn Erik Pedersen
baa62d0abb
hugolib: Adjust tests for shortcode p-issue
See #1642
2018-08-17 09:13:39 +02:00
gllera
78c99463fd
hugolib: Fix shortcode output wrapped in p
Fixes #1642
2018-08-17 09:13:30 +02:00
Anthony Fok
abc54080ec Add configFile(s) back to the watch list after REMOVE event
Fixes #4701
2018-08-16 16:11:57 +02:00
Bjørn Erik Pedersen
a655e00d70 commands: Gracefully handle typos in server config when running the server
Fixes #5081
2018-08-16 12:54:59 +02:00
Bjørn Erik Pedersen
9d973004f5 hugolib: Fix image cache-clearing for sub-languages
Fixes #5084
2018-08-16 12:54:59 +02:00
Bjørn Erik Pedersen
2247546017 hugolib: Force render of any changed page, even in Fast Render Mode
Fixes #5083
2018-08-16 12:54:59 +02:00
Bjørn Erik Pedersen
d139a037d9 hugoblib: Fix "adding a bundle" in server mode
Before this commit, the live reload logic in `hugo server` got confused when you dropped a new bundle into the project while the server was running. The workaround was to restart the server.

This commit fixes the "live reload bundle detection" in server mode, and also makes sure that the bundle headers are always processed first.

Fixes #5075
2018-08-16 12:54:59 +02:00
Bjørn Erik Pedersen
0a88741fe8 hugolib: Fix error when deleting a bundle in server mode
Fixes #5077
2018-08-16 12:54:59 +02:00
Bjørn Erik Pedersen
d999b4e82b
Revert "releaser: Revert to the old versions of the release pipeline"
This reverts commit 659917a002.
2018-08-15 09:34:36 +02:00
Carlos Alexandro Becker
20148345aa releaser: Fix goreleaser config
* fix: goreleaser nfpm artifact names
* fix: replacements
* fix: make both goreleaser yaml files more similar

Closes #5022
2018-08-15 09:31:56 +02:00
Bjørn Erik Pedersen
e5052f4e09
commands: Include theme name in version mismatch error
Fixes #5044
2018-08-14 21:21:39 +02:00
Bjørn Erik Pedersen
c81fbf4625
minifiers: Make the JS minifier matcher less specific
Fixes #5073
2018-08-14 19:24:33 +02:00
Bjørn Erik Pedersen
a6f199f7a6
hugolib: Use the interface value when doing Related search
Currently it makes no practical difference, but this is more a protection if we in the future creates index from the content related fields. That will not work from a shortcode.

See #5071
2018-08-14 18:19:45 +02:00
Bjørn Erik Pedersen
0dd06bdac0
hugolib: Fix Related when called from shortcode
Fixes #5071
2018-08-14 18:11:36 +02:00
Bjørn Erik Pedersen
5c5384916e tpl/tplimpl: Reimplement the ".Params tolower" template transformer
All `.Params` are stored lowercase, but it should work to access them `.Page.camelCase` etc. There was, however, some holes in the logic with the old transformer.

This commit fixes that by applying a blacklist instead of the old whitelist logic. `.Param` is a very distinct key. The original case will be kept in `.Data.Params.myParam`, but other than that it will be lowercased.

Fixes #5068
2018-08-14 17:54:48 +02:00
Bjørn Erik Pedersen
56c61559b2
Only duplicate resource output in multihost mode
Yesterday's commit was a little too agressive.

This commit makes sure that the duplication of resources to public/en etc. is only performed in multihost mode.

See #5058
2018-08-14 12:04:17 +02:00
Bjørn Erik Pedersen
78f8475a05 Fix Resource output in multihost setups
In Hugo 0.46 we made the output of what you get from resources.Get and similar static, i.e. language agnostic. This makes total sense, as it is wasteful and time-consuming to do SASS/SCSS/PostCSS processing for lots of languages when the output is lots of duplicates with different filenames.

But since we now output the result once only, this had a negative side effect for multihost setups: We publish the resource once only to the root folder (i.e. not to the language "domain folder").

This commit removes the language code from the processed image keys. This creates less duplication in the file cache, but it means that you should do a `hugo --gc` to clean up stale files.

Fixes #5058
2018-08-13 19:00:51 +02:00
Anthony Fok
c09ee78fd2
tpl: Suppress blank lines from opengraph internal template 2018-08-12 12:27:38 -06:00
Bjørn Erik Pedersen
f6ae436c58
publisher: Close file when done
Fixes #5062
2018-08-11 20:19:07 +02:00
Bjørn Erik Pedersen
2182ecfd34 hugolib: Fix GitInfo when multiple content dirs
Fixes #5054
2018-08-11 19:51:19 +02:00
Bjørn Erik Pedersen
e85833d868 hugolib: Add multiple content dirs to GitInfo test site
See #5054
2018-08-11 19:51:19 +02:00
Bjørn Erik Pedersen
43a5aaa778
Fix broken tests 2018-08-09 20:58:31 +02:00
Bjørn Erik Pedersen
1639fd20d8
Merge commit '3a44bf182f' 2018-08-08 13:54:42 +02:00
Bjørn Erik Pedersen
3a44bf182f Squashed 'docs/' changes from 81847981f..d88477eb3
d88477eb3 Fix some more redirect alias loops
209735670 Update features.md
d4ec6ef87 Remove redirect loop from functions/default
ce14da435 Fix the AlternativeOutputFormats/OutputFormats examples
f64a22469 Update cond.md
357a70a32 Remove redirect loop from templates/404
4ad7b01ba Remove some aliases that were causing infinite redirect loops
fd378e66a Fix alias redirect loop
ec3629f6f Revert "Set code background to white"
ffc56b880 Revert "Make inline code gray"
2a964e261 Make inline code gray
44069e09c Set code background to white
d39c790d0 Linked my own blog2md migration script
3e55267be Release 0.46
7b6cfdd8b releaser: Prepare repository for 0.47-DEV
d4cb54806 releaser: Add release notes to /docs for release of 0.46
6518ac7e7 releaser: Bump versions for release of 0.46
e54334d5c Merge commit '766085c2dc'

git-subtree-dir: docs
git-subtree-split: d88477eb3a1959e2764d6025f5aa7a57a4a611e7
2018-08-08 13:54:28 +02:00
Christian Oliff
c2a6741394 readme: https links to 3rd party sites 2018-08-08 10:07:31 +02:00
Christian Oliff
06bd013641 Update alias.go
less markup :-)
2018-08-07 09:42:49 +02:00
Bjørn Erik Pedersen
755d1ffe7a
tpl/tmplimpl: Add MIME type to embedded JS
So they get minified correctly.

See #5042
2018-08-06 23:11:53 +02:00
Bjørn Erik Pedersen
fb3cb05cc3
resource: Remove test debug 2018-08-06 22:51:30 +02:00
Bjørn Erik Pedersen
d07882dfb7
Update dependencies 2018-08-06 21:38:58 +02:00
Bjørn Erik Pedersen
7f5356717d
Update Chroma
Fixes #5025
2018-08-06 21:21:32 +02:00
Bjørn Erik Pedersen
789ef8c639
Add support for minification of final output
Hugo Pipes added minification support for resources fetched via ´resources.Get` and similar.

This also adds support for minification of the final output for supported output formats: HTML, XML, SVG, CSS, JavaScript, JSON.

To enable, run Hugo with the `--minify` flag:

```bash
hugo --minify
```

This commit is also a major spring cleaning of the `transform` package to allow the new minification step fit into that processing chain.

Fixes #1251
2018-08-06 19:58:41 +02:00
satotake
71931b30b1 Remove alias of os.Stat 2018-08-06 09:54:26 +02:00
satotake
d40116e5f9 Renmae FileStat Stat 2018-08-06 09:54:26 +02:00
satotake
c362634b7d Fix typo 2018-08-06 09:54:26 +02:00
satotake
d71120852a Add fileStat to tpl/os/os 2018-08-06 09:54:26 +02:00
Bjørn Erik Pedersen
a6b1eb1e91
transform: Reduce allocation in the benchmark itself 2018-08-05 17:27:16 +02:00
Bjørn Erik Pedersen
27110133ff
transform: Simplify the 0 transformer case 2018-08-05 11:24:16 +02:00
hugoreleaser
31faf98ce3 releaser: Prepare repository for 0.47-DEV
[ci skip]
2018-08-01 09:03:22 +00:00
hugoreleaser
f14d773841 releaser: Add release notes to /docs for release of 0.46
[ci skip]
2018-08-01 09:00:52 +00:00
hugoreleaser
3aa838cf2b releaser: Bump versions for release of 0.46
[ci skip]
2018-08-01 09:00:52 +00:00
Bjørn Erik Pedersen
a3a26597cf
Release 0.46 2018-08-01 10:52:45 +02:00
hugoreleaser
92d776b0df releaser: Add release notes draft for 0.46
Rename to *-ready.md to continue. [ci skip]
2018-08-01 08:10:57 +00:00
Bjørn Erik Pedersen
e6dd54943f
Merge commit '766085c2dc' 2018-08-01 10:01:49 +02:00
Bjørn Erik Pedersen
766085c2dc Squashed 'docs/' changes from a4fa0d1d6..81847981f
81847981f Add notes for installing "extended" Sass/SCSS version
02da3bb58 Include usage of disqus internal template
9b53380c4 Update sitemap-template.md
f3417dd52 Update sitemap-template.md
aae33d9a8 Update sitemap-template.md
834edc205 Release 0.45.1
fb93ab905 Merge branch 'temp451'
79f350906 releaser: Prepare repository for 0.46-DEV
25cd2352c releaser: Add release notes to /docs for release of 0.45.1
e60377c71 releaser: Bump versions for release of 0.45.1
873f6dce2 Update features.md
ecc116642 Update link for Azure
cb88c3185 Added .Site.Home to Site Variiables (#541)
975a88791 Document includePaths
56c4e332f Release Hugo 0.45
c22b25210 Merge branch 'temp45'
0ffad3ada releaser: Prepare repository for 0.46-DEV
08d494cc3 releaser: Add release notes to /docs for release of 0.45
ad546ba45 releaser: Bump versions for release of 0.45
971c46bb2 Fixed "Sratch" to become "Scratch" on line 44
a28255bf3 Clarify the meaning of .Pages vs .Site.Pages
127aeee09 docs: Update ref, relref, GetPage docs
350d674ec resources.Concat doesn't have an alias
1fd1219b0 docs: Document refLinksErrorLevel and refLinksNotFoundURL
af2252ff6 Merge commit 'a3535c8486'
a11486805 Merge commit 'b6b37a1f00'
1c8896cb1 Fix addkit link to account for i18n
468aef3fc releaser: Prepare repository for 0.45-DEV
c6f4b97a2 releaser: Add release notes to /docs for release of 0.44
d3985afb7 releaser: Bump versions for release of 0.44
2c59a330c Adjust release notes
83966769a releaser: Prepare repository for 0.44-DEV
e539613f7 releaser: Add release notes to /docs for release of 0.43
2bf648944 releaser: Bump versions for release of 0.43
d9d6e4bf7 Fix typos
d6798afda Merge commit '98293eaa15'
37cc52261 Add a newScratch template func
1f7f09613 Merge branch 'release-0.42.2'
857b0b26a releaser: Prepare repository for 0.43-DEV

git-subtree-dir: docs
git-subtree-split: 81847981f1f2cb1ebc83d42d275a2afb2bb22df1
2018-08-01 10:01:05 +02:00
Bjørn Erik Pedersen
b5d13ca16b Update Chroma
And since I have updated Dep locally, I get a bunch of other totally unrelated diffs. Which looks innocent enough.

Fixes #5019
2018-08-01 09:34:28 +02:00
Bjørn Erik Pedersen
6b02f5c0f4 Make resources fetched via resources.Get and similar language agnostic
With the newly released Hugo Pipes, resources fetched and processed via `resources.Get` and similar was published to the relevant language sub folder when in multilingual mode.

The thought behind that was maximum flexibility with support for `assetDir` per language.

In practice this was a bad idea:

* You get duplication of identical content, with added processing time
* You end up with path issues that seem to be hard to find a way around (`@fa-font-path` is one example)

This commit changes that. Now there is only one `assetDir` and if you, as one example, need to generate a CSS per langugage, you need to set the paths yourself.

Fixes #5017
2018-07-31 23:33:04 +02:00
Bjørn Erik Pedersen
88e447c449
tocss/scss: Improve _ prefix handling in SCSS imports
See #5008
2018-07-31 16:53:03 +02:00
Rob Jackson
b718d743b7 Fix file paths for uncached transformed images
This commit also fixes an existing test to work according to the correct logic. The test was written based on erroneous behavior. We resize the image to 300x200px, and are now trying to fit it within a 50px square. The longest edge is 300 pixels, so we need to divide it by 6 (300 / 50 == 6). And then scale the shortest edge with the same proportion (200 / 6 == 33.33).

The original test was transforming the original source image, hence the previous values:

900 x 562
900 / 50 == 18
562 / 18 == 31.22

Fixes #5012
2018-07-31 13:31:35 +02:00
Bjørn Erik Pedersen
0ba19c57f1 tpl/partials: Add templates.Exists
Fixes #5010
2018-07-31 13:28:15 +02:00
Bjørn Erik Pedersen
0afa2897a0 tpl/partials: Remove superflous loop
No need to check the themes template prefix.
2018-07-31 13:28:15 +02:00
Bjørn Erik Pedersen
f219ac09f6 tocss/scss: Improve SCSS project vs themes import resolution
Before this commit, only SASS/SCSS  components imported from main.scss at first level can be overwritten by homonymous files in projects or over-preceding theme components.

This commit fixes that by implementing a custom import resolver which will be tried first. This resolver will make sure that the project/theme hierarchy is always respected.

Fixes #5008
2018-07-31 10:54:10 +02:00
Bjørn Erik Pedersen
786f72302f
Fix image cache eviction for sites with subdir in baseURL
Fixes #5006
2018-07-29 14:26:45 +02:00
hugoreleaser
0cae1cf828 releaser: Prepare repository for 0.46-DEV
[ci skip]
2018-07-25 08:58:54 +00:00
hugoreleaser
3b18042ee6 releaser: Add release notes to /docs for release of 0.45.1
[ci skip]
2018-07-25 08:56:21 +00:00
hugoreleaser
e38843f4bf releaser: Bump versions for release of 0.45.1
[ci skip]
2018-07-25 08:56:21 +00:00
Bjørn Erik Pedersen
87f0dc14ab
Release 0.45.1 2018-07-25 10:51:27 +02:00
hugoreleaser
b7d9ab136d releaser: Add release notes draft for 0.45.1
Rename to *-ready.md to continue. [ci skip]
2018-07-25 08:37:50 +00:00
Bjørn Erik Pedersen
04d4c08dbc hugolib: Fix .Site.GetPage regression
In Hugo 0.44 we simplified the `.Site.GetPage` API and added code to handle the old-style syntax in most cases.

This logic did not handle the lookup of the home page via `.Site.GetPage "section" ""` and similar. This commit fixes that.

Fixes #4989
2018-07-24 11:37:59 +02:00
Bjørn Erik Pedersen
016dd4a69a
Add Page.FirstSection
It was added and then removed by accident some time ago. Let us add it again, as it is useful.
2018-07-23 20:20:19 +02:00
Bjørn Erik Pedersen
c6b599a06d hugolib: Fix "borrow content from another language" issue
If a content file contains shortcode(s), we have logic in place to re-render it per output format.

We also have logic in place that avoids making a copy of the content used for this process if we don't need it.

This was before this commit limited to server mode and if the page should be output to multiple formats.

But there is a third case: If a site (language) borrows and renders `.Content` from another language. This would, before this commit, behave oddly for content with shortcodes.

Fixes #4986
2018-07-23 20:12:41 +02:00
hugoreleaser
3a6784b162 releaser: Prepare repository for 0.46-DEV
[ci skip]
2018-07-22 12:12:08 +00:00
hugoreleaser
48d7a641d0 releaser: Add release notes to /docs for release of 0.45
[ci skip]
2018-07-22 12:09:26 +00:00
hugoreleaser
2c5a036def releaser: Bump versions for release of 0.45
[ci skip]
2018-07-22 12:09:26 +00:00
Bjørn Erik Pedersen
592c5b3072
Update release notes 0.45 2018-07-22 14:04:01 +02:00
hugoreleaser
a0c4a3660e releaser: Add release notes draft for 0.45
Rename to *-ready.md to continue. [ci skip]
2018-07-22 10:07:03 +00:00
Bjørn Erik Pedersen
062510cf1f
Get rid of the utils package 2018-07-22 00:35:09 +02:00
Bjørn Erik Pedersen
4e1d0cd9f1
Update hugo_windows.go 2018-07-22 00:09:46 +02:00
Bjørn Erik Pedersen
a451c49fde hugolib: Print a WARNING about relative non-relative ref/relref matches
Fixes #4973
2018-07-21 11:42:07 +02:00
Bjørn Erik Pedersen
ff16c42ed0
hugolib: Allow untyped nil to be merged in lang.Merge
Fixes #4977
2018-07-21 11:41:23 +02:00
Bjørn Erik Pedersen
166483fe12 resource/scss: Add IncludePaths config option
Takes paths relative to the current working dir.

Fixes #4921
2018-07-20 17:50:44 +02:00
Bjørn Erik Pedersen
f01505c910
resource/scss: Fix source maps on Windows
I have tested this OK on

* Windows 10 (it did not work before this commit)
* MacOS

Fixes #4968
2018-07-20 08:00:26 +02:00
Vas Sudanagunta
8278384b96 Increase refLinker test coverage 2018-07-20 07:02:41 +02:00
Bjørn Erik Pedersen
65e610e161
hugolib: Avoid nilpointer in absoluteSourceRef 2018-07-19 22:39:24 +02:00
Vas Sudanagunta
b56d9a1294 Fix typo-logic bug in GetPage 2018-07-19 21:36:10 +02:00
Vas Sudanagunta
d6fde8fa13 Enable test case fixed by commit 501543d4 2018-07-19 20:40:50 +02:00
Vas Sudanagunta
2bac371544
Add test coverage for recent ref overhaul
Closes #4969
2018-07-19 18:32:23 +02:00
Bjørn Erik Pedersen
9b4b97a722
hugolib: Create an adapter from old to new getPage
To make sure we confirm that the existing tests run the correct code path.

Updates #4969
2018-07-19 18:26:10 +02:00
Bjørn Erik Pedersen
501543d4b6
hugolib: Only do page-relative getPage for relative paths
Updates #4969
2018-07-19 17:47:05 +02:00
Bjørn Erik Pedersen
6ffa882349
hugolib: Improve error handling in refLink 2018-07-19 17:17:35 +02:00
Bjørn Erik Pedersen
1eb8b36b38
docs: Update ref, relref, GetPage docs 2018-07-19 17:02:03 +02:00
Bjørn Erik Pedersen
00c74ee7ff
docs: Document refLinksErrorLevel and refLinksNotFoundURL
See #4964
2018-07-19 15:04:00 +02:00
Bjørn Erik Pedersen
e25aa655f4 Add configurable ref/relref error handling and notFoundURL
Two new settings:

* refLinksErrorLevel: ERROR (default) or WARNING. ERROR will fail the build.
* refLinksNotFoundURL: Used as a placeholder when page references cannot be found.

Fixes #4964
2018-07-19 14:32:43 +02:00
Bjørn Erik Pedersen
12679b4083 hugolib: Mark shortcode changes as content changes in server mode
This is unfortunate, but is needed to re-create the taxonomies collections etc. that may be referenced from them.

Fixes #4965
2018-07-19 13:58:18 +02:00
Bjørn Erik Pedersen
c39ac5738d
Revert "hugolib: Fix potential server panic with drafts/future enabled"
This had a side-effect. I have understand this better to apply the correct fix. Will come soon.

This reverts commit 1ab4658c0d.
2018-07-19 12:20:01 +02:00
Bjørn Erik Pedersen
a3535c8486 Squashed 'docs/' changes from cfe89ecbc..a4fa0d1d6
a4fa0d1d6 Typos and grammatical changes
513884600 Add hugo pipes documentation

git-subtree-dir: docs
git-subtree-split: a4fa0d1d641b2b3e27a91ae8b1a0a29be3c42ddf
2018-07-19 09:18:11 +02:00
Bjørn Erik Pedersen
9da617912b
Merge commit 'a3535c8486' 2018-07-19 09:18:11 +02:00
Bjørn Erik Pedersen
1ab4658c0d
hugolib: Fix potential server panic with drafts/future enabled
Fixes #4965
2018-07-18 17:01:50 +02:00
Bjørn Erik Pedersen
75acff5f20
hugolib: Avoid server panic on TOML mistake in i18n
Fixes #4942
2018-07-18 11:53:04 +02:00
Bjørn Erik Pedersen
5c9d5413a4 hugolib/filesystems: Fix theme config for Work Fs
Which was the reason why `PostCSS´ from theme(s) was not picked up.

Fixes #4951
2018-07-18 11:39:04 +02:00
Bjørn Erik Pedersen
59ebc83d72
Merge commit 'b6b37a1f00' 2018-07-18 11:05:58 +02:00
Bjørn Erik Pedersen
b6b37a1f00 Squashed 'docs/' changes from f59b3ab06..cfe89ecbc
cfe89ecbc Set all *.png files under static/images to mode 0644
d847ccd8b More spelling error fixes
bf1405d92 Correction: .Pages on homepage is same as .Site.RegularPages
7efa41ff5 Merge commit 'd137efe0222269e09b427325176f0044558e3cc5'
d137efe02 Squashed 'themes/gohugoioTheme/' changes from f31a3dc8..66249819
50df8bfb8 Replace .Data.Pages with .Pages
85d3712d0 Mention the newScratch template func
1c234db1b Release 0.44
a51cb3e36 Merge branch 'temp44'
ec424a5e2 releaser: Prepare repository for 0.45-DEV
425e85574 releaser: Add release notes to /docs for release of 0.44
e6f9c65a2 releaser: Bump versions for release of 0.44
45548a5c9 Arch Linux: Partial upgrades are unsupported
c0430f8f9 Update MenuEntry properties documentation
79109b685 Refresh the documentation on staticDir config parameter
80ed4592b Remove duplicate links; also sort them alphabetically
f00a4e232 HTTPS links to third-party sites
2f6f682ba Fixed a typo
4be105202 add openbsd howto install
39808f50a Fix typo
b55c0f3a0 Fix URL to hugotest
2fb157237 Release Hugo 0.43
e8af6a970 Merge branch 'temp43'
563dd4173 Adjust release notes
50aed2e52 releaser: Prepare repository for 0.44-DEV
363b363ff releaser: Add release notes to /docs for release of 0.43
93bfbef62 releaser: Bump versions for release of 0.43
893a27d33 Fix typos
fe5908257 Celebrate: a few typo and grammar fixes
bb20442df Merge commit '98293eaa15'
ef3d63936 Add a newScratch template func
bf100a3cd Merge branch 'release-0.42.2'
f1133c544 releaser: Prepare repository for 0.43-DEV
2ce058057 releaser: Add release notes to /docs for release of 0.42.2
6073927c6 releaser: Bump versions for release of 0.42.2
3bafddd52 releaser: Prepare repository for 0.43-DEV
8b9f805bd releaser: Add release notes to /docs for release of 0.42.1
efb6638ba releaser: Bump versions for release of 0.42.1
1e74ffbe0 releaser: Prepare repository for 0.43-DEV
2d2d0f8ab releaser: Add release notes to /docs for release of 0.42
17f685813 releaser: Bump versions for release of 0.42
67ef1a0e1 docs: Update theme documentation
d74874e1e docs: Remove some files now moved
771d50cf3 Merge commit 'b239595af5'
f9b5fd2d2 tplimpl: Remove speakerdeck shortcode
523206579 tpl/strings: strings.RuneCount
b389efc88 tpl: Add strings.Repeat
a41ad0254 Add a BlackFriday option for rel="noreferrer" on external links
a6e279362 Add a BlackFriday option for rel="nofollow" on external links
7e2c9846e releaser: Prepare repository for 0.42-DEV
b4f81c38a releaser: Add release notes to /docs for release of 0.41
55667b3a1 releaser: Bump versions for release of 0.41
afceb02d3 docs: Document the GDPR Privacy Config
8b8289027 Merge commit 'd2b1030060'
be04a8886 Merge branch 'release-0.40.3'
33ca0b8da releaser: Prepare repository for 0.41-DEV
8c9a5a850 releaser: Add release notes to /docs for release of 0.40.3
85845a4fd releaser: Bump versions for release of 0.40.3
9af79e531 Merge commit '83bef6955e'
c4200dd0e Fix typo
8f8323336 releaser: Prepare repository for 0.41-DEV
9fab87505 releaser: Add release notes to /docs for release of 0.40.2
83648c666 releaser: Bump versions for release of 0.40.2
e6434d104 releaser: Prepare repository for 0.41-DEV
9389b2973 releaser: Add release notes to /docs for release of 0.40.1
32979e28a releaser: Bump versions for release of 0.40.1
196174a76 releaser: Prepare repository for 0.41-DEV
490a997bb releaser: Add release notes to /docs for release of 0.40
018aa6471 releaser: Bump versions for release of 0.40
92221934c Merge commit 'a215abf70e'
0a58ef56e Merge commit 'd2ec1a06df'
312ab58c6 Improve .Get docs
e43e8cee3 .Get function: fix syntax signature
bb16150bc releaser: Prepare repository for 0.40-DEV
8cc80fed9 releaser: Add release notes to /docs for release of 0.39
f7aa0d1c5 releaser: Bump versions for release of 0.39
42e48706a Merge commit '047c4188df'
76acab68b releaser: Prepare repository for 0.39-DEV
d270600b0 releaser: Add release notes to /docs for release of 0.38.2
97be36992 releaser: Bump versions for release of 0.38.2
cd29b8b79 releaser: Prepare repository for 0.39-DEV
9983a4bdf releaser: Add release notes to /docs for release of 0.38.1
7774afd01 releaser: Bump versions for release of 0.38.1
b89157f20 releaser: Prepare repository for 0.39-DEV
af4d0bf62 releaser: Add release notes to /docs for release of 0.38
ca98e7d4f releaser: Bump versions for release of 0.38
8b773833a Merge commit 'ed8bf081fd'
24202bb71 docs: Generate docshelper data
43d15975d Add .Site.IsServer
6f99d3d65 Merge commit '0a23baa6a9'
17487ccdd hugolib: Add Reset method to delete key from Scratch
ccbf7a05c docs: Add docs for lang.Merge
5ad46d78e Merge commit '3886fc1fef'
ac403c280 docs: Add docs on the new front matter configuration
6066c60e6 Merge commit 'c029065582'
ee605c7ae releaser: Prepare repository for 0.38-DEV
31a4de966 releaser: Add release notes to /docs for release of 0.37.1
9dd3dafe1 releaser: Bump versions for release of 0.37.1
141750aec releaser: Prepare repository for 0.38-DEV
c9bb39bc3 releaser: Add release notes to /docs for release of 0.37
c7009f064 releaser: Bump versions for release of 0.37
9f727d916 Merge commit '900b5f6cfe'
87fd97853 Merge commit '374d184e67'
244deafc2 Fix typos in development contribution doc
608c80f72 Merge branch 'release-0.36.1'
0f8ffbd5c releaser: Prepare repository for 0.37-DEV
5028ee849 releaser: Add release notes to /docs for release of 0.36.1
9ccc7cb11 releaser: Bump versions for release of 0.36.1
3db31be07 Merge commit '9cc9bab462'
9468246c5 Add "target" and "rel" parameters to figure shortcode
6d7fa89f9 releaser: Prepare repository for 0.37-DEV
1aec7ad81 releaser: Add release notes to /docs for release of 0.36
b522da389 releaser: Bump versions for release of 0.36
bb78bea13 docs: Add documentation for smart cropping etc.
930f16cae Merge commit 'c305e44f5f'
0e4c80ab9 releaser: Prepare repository for 0.36-DEV
e0d4c6bcd releaser: Add release notes to /docs for release of 0.35
f4ac67eb3 releaser: Bump versions for release of 0.35
229a50b1f docs: Regenerate CLI docs
72958eb9c Merge commit '337d0c5f51'
d998ca4c0 command: Remove undraft command
34a0052ef docs: Re-generate CLI docs
fa04ff331 releaser: Prepare repository for 0.35-DEV
55e595720 releaser: Add release notes to /docs for release of 0.34
bf4d0e8fb releaser: Bump versions for release of 0.34
07673370e releaser: Prepare repository for 0.34-DEV
921ea8920 releaser: Add release notes to /docs for release of 0.33
3307f61bd releaser: Bump versions for release of 0.33
792a4410d Merge commit '3cf4300097'
6d8a9f657 releaser: Prepare repository for 0.33-DEV
e3afccf6f releaser: Add release notes to /docs for release of 0.32.4
7f29cb196 releaser: Bump versions for release of 0.32.4
baa364436 releaser: Prepare repository for 0.33-DEV
60c775166 releaser: Add release notes to /docs for release of 0.32.3
9cbab1803 releaser: Bump versions for release of 0.32.3
51823efee releaser: Prepare repository for 0.33-DEV
71e03684c releaser: Add release notes to /docs for release of 0.32.2
e18bf56fb releaser: Bump versions for release of 0.32.2
54aa93927 Merge commit 'eb738cd35c'
5e8123994 releaser: Prepare repository for 0.33-DEV
a55b78124 releaser: Add release notes to /docs for release of 0.32.1
7de53ff41 releaser: Bump versions for release of 0.32.1
e6e58785d releaser: Prepare repository for 0.33-DEV
58cf5009d releaser: Add release notes to /docs for release of 0.32
031719821 Merge commit 'f3cd083961'
b9183604b Add Pandoc support, refactor external helpers
3f9b9474c releaser: Prepare repository for 0.32-DEV
11e4ce514 releaser: Add release notes to /docs for release of 0.31.1
aebb1504b releaser: Bump versions for release of 0.31.1
d70b54d4a releaser: Prepare repository for 0.32-DEV
cdc10468e releaser: Add release notes to /docs for release of 0.31
38bd41cab releaser: Bump versions for release of 0.31
1c581a11d Merge commit '30c0d485ea'
b88e46d02 Merge commit '05e42bc643'
a45ab174e Handle Taxonomy permalinks
9f27354f6 Add support for height argument to figure shortcode
acc8e49c1 releaser: Prepare repository for 0.31-DEV
977266b19 releaser: Add release notes to /docs for release of 0.30.2
31b672844 releaser: Bump versions for release of 0.30.2
b8f6b72a8 Merge commit '325009c3fd'
c6e3dae71 releaser: Prepare repository for 0.31-DEV
2a3c7c7d9 releaser: Add release notes to /docs for release of 0.30.1
4c014117a releaser: Bump versions for release of 0.30.1
1da61da06 releaser: Prepare repository for 0.31-DEV
24864a46b releaser: Add release notes to /docs for release of 0.30
3011aa44a releaser: Bump versions for release of 0.30
bcbf3237b Merge commit 'ecf5e081b5'
ab68b99ed Merge commit 'dae5a7c61c'
0ae435725 tpl: Add errorf template function
ac3fb3808 Change SummaryLength to be configurable (#3924)
3c0e4fa70 tpl: Add os.fileExists template function
9290f3983 Merge commit '9d68f695e7'
394e8b3f6 tpl: Add float template function
c0c48c2ea releaser: Prepare repository for 0.30-DEV
0806d910b releaser: Add release notes to /docs for release of 0.29
0d1101836 releaser: Bump versions for release of 0.29
5d92b552b releaser: Prepare repository for 0.29-DEV
1ef521182 releaser: Add release notes to /docs for release of 0.28
c5441cff1 releaser: Bump versions for release of 0.28
46c2786f1 Merge commit '61c27b58b3'
6fed4008f Merge commit '30694a133a'
595752e2f Merge commit '7a89dce53b'
af14cae0c Merge commit 'ba45da9d03'
d0bb30963 releaser: Prepare repository for 0.28-DEV
469bf26aa releaser: Add release notes to /docs for release of 0.27.1
06ea00c12 releaser: Bump versions for release of 0.27.1
0668af58e releaser: Prepare repository for 0.28-DEV
4ce00c84d releaser: Add release notes to /docs for release of 0.27
68f318d0b releaser: Bump versions for release of 0.27
509ad6cc0 docs: Merge commit '1b4319be62'
c625ae1ce docs: Document Related Content
ecd5c24f5 docs: Merge commit '7d63a23b0c'
b97b84f9d Update docs versiona and README
2238f7a4a Merge commit 'ec4e6f9df2' as 'docs'

git-subtree-dir: docs
git-subtree-split: cfe89ecbc2288a7270c23dbcc179733c8d978c4c
2018-07-18 11:04:57 +02:00
Bjørn Erik Pedersen
ebe4d39f17
resource/postcss: Try node_modules/postcss-cli/bin/postcss first
Fixes #4952
2018-07-18 10:00:50 +02:00
Bjørn Erik Pedersen
1b0aeeaaf0
commands: Disable flaky server tests on Windows CI 2018-07-18 09:43:31 +02:00
Bjørn Erik Pedersen
a4c513caeb
commands: Increase sleep in server teset to make it less shaky on Windows 2018-07-18 00:35:42 +02:00
Bjørn Erik Pedersen
d741064beb Add optional lang as argument to rel/relref
Fixes #4956
2018-07-18 00:07:20 +02:00
Bjørn Erik Pedersen
3eb313fef4 Simplify .Site.GetPage etc.
This commit is a follow up to a recent overhaul of the GetPage/ref/relref implemenation.

The most important change in this commit is the update to `.Site.GetPage`:

* To reduce the amount of breakage in the wild to its minimum, I have reworked .Site.GetPage with some rules:

* We cannot support more than 2 arguments, i.e. .Site.GetPage "page" "posts" "mypage.md" will now throw an error. I think this is the most uncommon syntax and should be OK. It is an easy fix to change the above to .Site.GetPage "/posts/mypage.md" or similar.
* .Site.GetPage "home", .Site.GetPage "home" "" and .Site.GetPage "home" "/" will give you the home page. This means that if you have page in root with the name home.md you need to do .Site.GetPage "/home.md" or similar

This commit also fixes some multilingual issues, most notable it is now possible to do cross-language ref/relref lookups by prepending the language code to the path, e.g. `/jp/posts/mypage.md`.

This commit also reverts the site building tests related to this to "Hugo 0.44 state", to get better control of the changes made.

Closes #4147
Closes #4727
Closes #4728
Closes #4728
Closes #4726
Closes #4652
2018-07-18 00:07:20 +02:00
Vas Sudanagunta
b93417aa1d Unify page lookups
This commit unifies the core internal page index for all page kinds.

This enables the `ref` and `relref` shortcodes to support all pages kinds, and adds a new page-relative  `.GetPage` method with simplified signature.

See #4147
See #4727
See #4728
See #4728
See #4726
See #4652
2018-07-18 00:07:20 +02:00
Lucas Bickel
fd1f4a7860 Fix addkit link to account for i18n 2018-07-16 21:23:27 +02:00
Bjørn Erik Pedersen
4c240800a4
resource/bundler: Improve error message 2018-07-16 10:42:07 +02:00
Garry McNulty
38204c4ab6 hugolib: Only set 'allThemes' if there are themes in the config file
When the 'allThemes' configuration setting is read, it will panic if
there are no themes. This was a regression introduced in Hugo 0.42.

Also updated a unit test to check for this.

Fixes #4851
2018-07-15 16:13:48 +02:00
Bjørn Erik Pedersen
2f2bc7ff70
resource/integrity: Remove unused code 2018-07-14 11:17:48 +02:00
Bjørn Erik Pedersen
242b297f57
releaser: Remove flag on Windows build 2018-07-13 08:40:09 +02:00
hugoreleaser
f44c9ab9cd releaser: Prepare repository for 0.45-DEV
[ci skip]
2018-07-13 06:05:41 +00:00
hugoreleaser
9f9695cf7b releaser: Add release notes to /docs for release of 0.44
[ci skip]
2018-07-13 06:03:09 +00:00
hugoreleaser
0831d8ccaf releaser: Bump versions for release of 0.44
[ci skip]
2018-07-13 06:03:09 +00:00
Bjørn Erik Pedersen
1d4ff024ca
Finish release notes 0.44 2018-07-13 07:53:33 +02:00
hugoreleaser
521e63ac7c releaser: Add release notes draft for 0.44
Rename to *-ready.md to continue. [ci skip]
2018-07-13 05:27:58 +00:00
Bjørn Erik Pedersen
47d38628ec resource: Clean up the in-memory Resource reader usage
Turns out `strings.Reader` implements both `io.Reader` and `io.Seeker`, so we don't need anything special.

Updates #4936
2018-07-12 21:32:52 +02:00
Bjørn Erik Pedersen
0024dcfe3e resource: Move opening of the transformed resources after cache check
The old version should be functionally the same, but opening up these readers (potentially files) every time is wasteful if we don't read from them.
2018-07-12 19:36:12 +02:00
Bjørn Erik Pedersen
beec1fc98e resource: Fix resources.Concat for transformed resources
Fixes #4936
2018-07-12 19:36:12 +02:00
Bjørn Erik Pedersen
306573def0 Improve type support in resources.Concat
This allows the result of `.Resources.Match` and similar to be concatenated.

Fixes #4934
2018-07-12 13:43:27 +02:00
Bjørn Erik Pedersen
80c8f3b81a hugolib: Fix static filesystem for themed multihost sites
Multihost is where each language has its own `baseURL`. In this configuration, static files from the theme was not picked up.

This was a regression in Hugo `0.42`. This commit also adds proper tests for this, so that does not happen again.

Fixes #4929
2018-07-12 12:18:56 +02:00
Bjørn Erik Pedersen
6b6dcb44a0 Flush partialCached cache on rebuilds
Fixes #4931
2018-07-11 20:40:04 +02:00
Bjørn Erik Pedersen
d96f2a460f
resource: Include the transformation step in the error message
Fixes #4924
2018-07-11 11:03:15 +02:00
Bjørn Erik Pedersen
ac53035030
media: Only show deprecation warning when needed
Fixes #4927
2018-07-10 23:21:48 +02:00
Bjørn Erik Pedersen
b874a1ba7a media: Allow multiple file suffixes per media type
Before this commit, `Suffix` on `MediaType` was used both to set a custom file suffix and as a way to augment the mediatype definition (what you see after the "+", e.g. "image/svg+xml").

This had its limitations. For one, it was only possible with one file extension per MIME type.

Now you can specify multiple file suffixes using "suffixes", but you need to specify the full MIME type
identifier:

[mediaTypes]
[mediaTypes."image/svg+xml"]
suffixes = ["svg", "abc ]

In most cases, it will be enough to just change:

[mediaTypes]
[mediaTypes."my/custom-mediatype"]
suffix = "txt"

To:

[mediaTypes]
[mediaTypes."my/custom-mediatype"]
suffixes = ["txt"]

Hugo will still respect values set in "suffix" if no value for "suffixes" is provided, but this will be removed in a future release.

Note that you can still get the Media Type's suffix from a template: {{ $mediaType.Suffix }}. But this will now map to the MIME type filename.

Fixes #4920
2018-07-10 22:13:52 +02:00
Anthony Fok
4108705934 hugolib: Remove empty resources/ dir after TestNewSiteDefaultLang 2018-07-10 09:01:54 +02:00
Anthony Fok
9c1e82085e
.gitattributes: Exclude *.svg from CRLF/LF conversion
I ran into trouble after importing the Hugo v0.43 release tarball
into the Debian packaging git repository...
2018-07-09 21:06:15 -06:00
Anthony Fok
2b73e89d6d
tpl: Set permission of embedded templates to 0644 2018-07-09 12:57:08 -06:00
Bjørn Erik Pedersen
febf0aec8b
Build a fully static Windows extended binary 2018-07-09 20:42:08 +02:00
Bjørn Erik Pedersen
a4fad5be6b
Adjust release notes
[ci skip]
2018-07-09 12:11:57 +02:00
hugoreleaser
6084f0433c releaser: Prepare repository for 0.44-DEV
[ci skip]
2018-07-09 10:03:30 +00:00
hugoreleaser
cbb7214b6c releaser: Add release notes to /docs for release of 0.43
[ci skip]
2018-07-09 10:00:04 +00:00
hugoreleaser
e6136b36f3 releaser: Bump versions for release of 0.43
[ci skip]
2018-07-09 10:00:04 +00:00
Bjørn Erik Pedersen
659917a002
releaser: Revert to the old versions of the release pipeline 2018-07-09 11:54:10 +02:00
hugoreleaser
9d194ab904
releaser: Add release for 0.43 2018-07-09 10:52:02 +02:00
Anthony Fok
a305609e18
snap: Migrate from deprecated keywords to "override-build"
Also add verbosity and echo messages to aid debugging.

See #4908
2018-07-09 02:41:10 -06:00
Bjørn Erik Pedersen
179de5f5bc
Revert "Consider root and current section's content type if set in front matter"
This reverts commit c790029e1d.
2018-07-09 10:29:18 +02:00
Bjørn Erik Pedersen
5dc1f95b63
Revert "Restrict the new type layout resolution to page and section kinds"
This reverts commit 78e8a744b3.
2018-07-09 10:29:16 +02:00
Bjørn Erik Pedersen
6bc892fc24
Revert "output: gofmt -l -w output/layout.go"
This reverts commit f465571b33.
2018-07-09 10:29:13 +02:00
Bjørn Erik Pedersen
5f06dbf779
Revert "snap: Build both hugo and hugo.extended for 0.43"
This reverts commit e1027c5846.
2018-07-09 09:45:18 +02:00
Bjørn Erik Pedersen
0850e97984
Revert "Revert "Add Goreleaser extended config""
I reverted the wrong commit.

This reverts commit a3b4b10f65.
2018-07-09 09:44:51 +02:00
Bjørn Erik Pedersen
a3b4b10f65
Revert "Add Goreleaser extended config"
@anthonyfok we need to discuss how we want the Snap build to look before we implement it. I don't think this is how.

People who want SCSS builds can download from the release page for this release.

This reverts commit 626afc9825.
2018-07-09 09:30:10 +02:00
Bjørn Erik Pedersen
e3df6478f0
Bump CircleCI image 2018-07-09 09:24:34 +02:00
Bjørn Erik Pedersen
626afc9825
Add Goreleaser extended config
See #4908
2018-07-09 09:24:34 +02:00
Anthony Fok
e1027c5846
snap: Build both hugo and hugo.extended for 0.43
Due to snap's design, the name "hugo_extended" needs to be created
via an automatic alias request, see
https://forum.snapcraft.io/t/hugo-auto-alias-request-for-hugo-extended-hugo-extended/6297

Also migrate from deprecated "prepare", "build" and "install" keywords
to "override-build".

See #4908
2018-07-09 01:15:21 -06:00
Carlos Alexandro Becker
e1a052ecb8 fix: nfpm replacements
refs https://github.com/goreleaser/goreleaser/issues/715
2018-07-09 08:06:13 +02:00
Bjørn Erik Pedersen
bfc3488b8e
Add temporary build script 2018-07-08 16:08:22 +02:00
Anthony Fok
ce84b524f4 Add "extended" to "hugo version"
Fixes #4913
2018-07-08 11:08:54 +02:00
Yang Li
3cea2932e1 Fix typos 2018-07-07 12:29:56 +02:00
Bjørn Erik Pedersen
0efd374805
Merge commit '98293eaa15' 2018-07-06 17:53:17 +02:00
Bjørn Erik Pedersen
98293eaa15 Squashed 'docs/' changes from 501c6e233..f59b3ab06
f59b3ab06 Fix typo in template lookup order
1e5536d6c Mutlilingual: Document "content directory per language" system (#509)
849a86048 Update index.md
0c24d229b Polish Hugo Next
a4c9b0ee2 Polish
bbec2c76e Some more in birthday post
fc9681e21 More on contributors
09fe3ea31 Some more on the birthday post
8da357240 Content and images for the 5th birthday blog post
fb45bb8dc Add draft for anniversary blog post
4666d0a18 Release 0.42.2
9b74d286a Merge branch 'temp422'
354e7b66b releaser: Add release notes to /docs for release of 0.42.2
57a617f34 releaser: Bump versions for release of 0.42.2
ccc3ac1b8 Update errorf.md
35706c21a Update errorf.md
1c0f35fd1 Update errorf.md
b6170774b Add syntax highlighting gallery links for Chroma
f91d9da47 Update usage.md
c9a8f0190 Improve theme components documentation
3c4e39ddd Release 0.42.1
b45eb453f Merge branch 'temp421'
c74682a10 releaser: Prepare repository for 0.43-DEV
321e07fa5 releaser: Add release notes to /docs for release of 0.42.1
7154271e0 releaser: Bump versions for release of 0.42.1
360d8244f Add link to Privacy Config
1f2454247 Fix typo
a8f5f994e Fix typo
d9f3f078c Update simple variants documentation (#500)
f5cfd44e0 Release 0.42
fe604b321 releaser: Prepare repository for 0.43-DEV
c3e5b3ca0 releaser: Add release notes to /docs for release of 0.42
3174d1b37 releaser: Bump versions for release of 0.42
48cc2d51f docs: Update theme documentation
1922fb1a6 docs: Remove some files now moved
d7e4c453a Merge commit 'b239595af5'
c40964c1b tplimpl: Remove speakerdeck shortcode
081f8a0f9 tpl/strings: strings.RuneCount
828ea5f15 tpl: Add strings.Repeat
a6b9f654a Add a BlackFriday option for rel="noreferrer" on external links
edb786516 Add a BlackFriday option for rel="nofollow" on external links
e4374971f releaser: Prepare repository for 0.42-DEV

git-subtree-dir: docs
git-subtree-split: f59b3ab06f282c26bce07263c8be6672cf8f7969
2018-07-06 17:52:13 +02:00
Bjørn Erik Pedersen
2b8d907ab7 Add a newScratch template func
Fixes #4685
2018-07-06 17:51:38 +02:00
Bjørn Erik Pedersen
43338c3a99 hugolib: Do not create paginator pages for the other output formats
This is a recent regression in Hugo, where we have started to produce `/page/30/index.json` when the main output format (usually `HTML`) is set up with pagination.

For JSON this is potentially lot of superflous work and hurts performance.

This commit reinstates the earlier behaviour: We only create paginators if in use in the main output format.

And add a test for it to prevent this from happening again.

Fixes #4890
2018-07-06 14:01:27 +02:00
Bjørn Erik Pedersen
dea71670c0
Add Hugo Piper with SCSS support and much more
Before this commit, you would have to use page bundles to do image processing etc. in Hugo.

This commit adds

* A new `/assets` top-level project or theme dir (configurable via `assetDir`)
* A new template func, `resources.Get` which can be used to "get a resource" that can be further processed.

This means that you can now do this in your templates (or shortcodes):

```bash
{{ $sunset := (resources.Get "images/sunset.jpg").Fill "300x200" }}
```

This also adds a new `extended` build tag that enables powerful SCSS/SASS support with source maps. To compile this from source, you will also need a C compiler installed:

```
HUGO_BUILD_TAGS=extended mage install
```

Note that you can use output of the SCSS processing later in a non-SCSSS-enabled Hugo.

The `SCSS` processor is a _Resource transformation step_ and it can be chained with the many others in a pipeline:

```bash
{{ $css := resources.Get "styles.scss" | resources.ToCSS | resources.PostCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Digest }}" media="screen">
```

The transformation funcs above have aliases, so it can be shortened to:

```bash
{{ $css := resources.Get "styles.scss" | toCSS | postCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Digest }}" media="screen">
```

A quick tip would be to avoid the fingerprinting part, and possibly also the not-superfast `postCSS` when you're doing development, as it allows Hugo to be smarter about the rebuilding.

Documentation will follow, but have a look at the demo repo in https://github.com/bep/hugo-sass-test

New functions to create `Resource` objects:

* `resources.Get` (see above)
* `resources.FromString`: Create a Resource from a string.

New `Resource` transformation funcs:

* `resources.ToCSS`: Compile `SCSS` or `SASS` into `CSS`.
* `resources.PostCSS`: Process your CSS with PostCSS. Config file support (project or theme or passed as an option).
* `resources.Minify`: Currently supports `css`, `js`, `json`, `html`, `svg`, `xml`.
* `resources.Fingerprint`: Creates a fingerprinted version of the given Resource with Subresource Integrity..
* `resources.Concat`: Concatenates a list of Resource objects. Think of this as a poor man's bundler.
* `resources.ExecuteAsTemplate`: Parses and executes the given Resource and data context (e.g. .Site) as a Go template.

Fixes #4381
Fixes #4903
Fixes #4858
2018-07-06 11:46:12 +02:00
Bjørn Erik Pedersen
a5d0a57e6b
output: Fix the shortcodes/partials vs base template detection
Fixes #4897
2018-07-02 10:34:38 +02:00
Anthony Fok
f465571b33
output: gofmt -l -w output/layout.go 2018-07-02 00:08:43 -06:00
Bjørn Erik Pedersen
f8212d2000
tpl/collections: Return en empty slice in after instead of error
When the given index is out of bounds. So it can safely be used with `with` etc. without extra length checking.

Fixes #4894
2018-07-01 20:34:02 +02:00
Bjørn Erik Pedersen
78e8a744b3
Restrict the new type layout resolution to page and section kinds
Will have to test and evaluate this a little.

See  #4891
2018-06-30 16:50:02 +02:00
Bjørn Erik Pedersen
c790029e1d
Consider root and current section's content type if set in front matter
This should allow for less duplication of templates. Before this commit it was possible to override the content page of a given page/section, but only one page at a time.

Full "template sets" can now be inherited by setting `type: blog` etc. in the section content page's front matter, and that type will be considered when looking for layouts for all pages in that section.

For nested sections, it will use consider both `type` set in the current section first, then `type` set in the first section below home, e.g. `/docs`.

This commit also adds a new Page method: `FirstSection`. This navigates up to the first section below home (e.g. `/docs`). For the home page it will return itself.

Fixes #4891
2018-06-30 13:10:04 +02:00
Bjørn Erik Pedersen
554553c09c
circleci: Update docker image
With Go 10.3 and newest Goreleaser and Mage.
2018-06-29 10:46:21 +02:00
Bjørn Erik Pedersen
de37455ec7
hugolib: Allow forward slash in shortcode names
Fixes #4886
2018-06-28 16:06:16 +02:00
Bjørn Erik Pedersen
282f6035e7
Merge branch 'release-0.42.2' 2018-06-28 14:40:23 +02:00
hugoreleaser
360fa12213 releaser: Prepare repository for 0.43-DEV
[ci skip]
2018-06-28 12:38:48 +00:00
hugoreleaser
02aa320030 releaser: Add release notes to /docs for release of 0.42.2
[ci skip]
2018-06-28 12:36:15 +00:00
hugoreleaser
d2640fbc19 releaser: Bump versions for release of 0.42.2
[ci skip]
2018-06-28 12:36:15 +00:00
hugoreleaser
1637d12e37
Release 0.42.2 2018-06-28 14:32:27 +02:00
Bjørn Erik Pedersen
3a7706b069
commands: Fix broken server-reload on config changes
This was accidently broken in Hugo 0.42.

Fixes #4878
2018-06-28 14:08:52 +02:00
Bjørn Erik Pedersen
2955f93fc6
commands: Fix broken server-reload on config changes
This was accidently broken in Hugo 0.42.

Fixes #4878
2018-06-28 12:22:00 +02:00
Carlos Alexandro Becker
1f0c4e1fb3 Update GoReleaser config 2018-06-28 07:54:18 +02:00
Bjørn Erik Pedersen
91ab455d84
tpl: Remove some "debug info"
See #4881
2018-06-26 11:33:12 +02:00
Bjørn Erik Pedersen
ca1e46efb9
tpl: Update internal pagination template to support Bootstrap 4
Fixes #4881
2018-06-26 11:31:46 +02:00
openscript
fd71fa89bd Create missing head.html partial on new theme generation 2018-06-25 12:06:45 -06:00
openscript
b5a3aa7082 Add html doctype to baseof.html template for new themes 2018-06-25 12:06:45 -06:00
Anthony Fok
3d5928889a
Revert "tpl: Support text/template/parse API change in go1.11"
Go developers have undone the breaking API changes
in the following commit:

commit bedfa4e1c37bd08063865da628f242d27ca06ec4
Author: Daniel Theophanes <kardianos@gmail.com>
Date:   Thu Jun 21 10:41:26 2018 -0700

    text/template/parse: undo breaking API changes

    golang.org/cl/84480 altered the API for the parse package for
    clarity and consistency. However, the changes also broke the
    API for consumers of the package. This CL reverts the API
    to the previous spelling, adding only a single new exported
    symbol.

    Fixes #25968

    Change-Id: Ieb81054b61eeac7df3bc3864ef446df43c26b80f
    Reviewed-on: https://go-review.googlesource.com/120355
    Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
    Reviewed-by: Rob Pike <r@golang.org>
    Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
    TryBot-Result: Gobot Gobot <gobot@golang.org>

See https://github.com/golang/go/issues/25968

This reverts commit 9f27091e10.

Closes #4784
Fixes #4873
2018-06-23 15:07:52 -06:00
Bjørn Erik Pedersen
dc7bc7b4d2
appveyor: Disable asciidoctor for now
It fails on installation.
2018-06-23 21:42:21 +02:00
Anthony Fok
42ed602580 hugolib: Replace deprecated {Get,}ByPrefix with {Get,}Match 2018-06-15 09:03:56 +02:00
Brian Fitzgerald
6a2968fd5c Adds .gitattributes to force Go files to LF
Even on Windows machines, we want *.go files to have LF line
endings (go fmt insists). This leaves other files as auto, but
makes *.go files always be LF on Windows machines. With this
change, running go fmt will be a pleasant operation, not a
painful one.

Note that changing .gitattributes only affects files at initial
checkout. To update an entire working directory after making a
change like this, do this (but only after committing all work in
progress, this will destroy uncommitted changes):

$ git rm --cached -r .
$ git reset --hard

Again - do not do this to a working directory with uncommitted
work in it.
2018-06-14 16:08:34 -06:00
Anthony Fok
23d5fc82ee
Update to Go 1.9.7 and Go 1.10.3
for Travis CI, Docker and Snap
2018-06-14 15:50:25 -06:00
Ryan Skoblenick
8531ec7ca3 Update Dockerfile to a multi-stage build
- Hugo container is based on SCRATCH to further reduce the footprint
  and the vulnerability surface
- Update Alpine image to 3.7 in the build container
- Update Go Lang to 1.10 in the build container
- Add .dockerignore file per the Docker best practices

Closes #4154, #4155, #4157
2018-06-14 15:47:04 -06:00
Anthony Fok
9f27091e10 tpl: Support text/template/parse API change in go1.11
Thanks to @rjoleary for the investigation.

Fixes #4784
2018-06-14 08:58:42 +02:00
hugoreleaser
187621ae24 releaser: Prepare repository for 0.43-DEV
[ci skip]
2018-06-13 10:19:00 +00:00
hugoreleaser
4172a835e5 releaser: Add release notes to /docs for release of 0.42.1
[ci skip]
2018-06-13 10:16:33 +00:00
hugoreleaser
fc97388968 releaser: Bump versions for release of 0.42.1
[ci skip]
2018-06-13 10:16:33 +00:00
Bjørn Erik Pedersen
d67e843c12
Release 0.42.1 2018-06-13 12:11:30 +02:00
hugoreleaser
6e33c557b0 releaser: Add release notes draft for 0.42.1
Rename to *-ready.md to continue. [ci skip]
2018-06-13 10:09:45 +00:00
Bjørn Erik Pedersen
128f14efad hugolib: Reset the global pages cache on server rebuilds
In Hugo 0.42, this could lead to errors of type `runtime error: invalid memory address or nil pointer dereference` in some rare situations.

Note that this was also an issue before 0.42, but the symptom was then potentially stale list content on rebuilds on content changes.

This commit also improves the above error message.

Fixes #4845
2018-06-13 12:00:30 +02:00
Bjørn Erik Pedersen
34ee27a78b
commands: Do not fail server build when /static is missing
This was a un-intended change in Hugo 0.42. Most sites will have a static directory so this should not be a big issue, but this commit will revert back to old behaviour.

Fixes #4846
2018-06-13 08:48:20 +02:00
hugoreleaser
0f1fc01ef2
releaser: Prepare repository for 0.43-DEV
[ci skip]
2018-06-12 08:45:06 +02:00
Bjørn Erik Pedersen
f32ccd018f
Merge tag 'v0.42'
releaser: 0.42 [ci skip]
2018-06-12 08:42:25 +02:00
hugoreleaser
ffb609f4ab releaser: Add release notes to /docs for release of 0.42
[ci skip]
2018-06-12 06:37:19 +00:00
hugoreleaser
19d91abc92 releaser: Bump versions for release of 0.42
[ci skip]
2018-06-12 06:37:19 +00:00
Bjørn Erik Pedersen
f5c0a2b4b2
Release 0.42 2018-06-12 08:32:10 +02:00
hugoreleaser
31828026a1 releaser: Add release notes draft for 0.42
Rename to *-ready.md to continue. [ci skip]
2018-06-12 05:50:33 +00:00
Bjørn Erik Pedersen
c74b0f8f9b
docs: Update theme documentation
See #4460
2018-06-12 07:38:41 +02:00
Bjørn Erik Pedersen
80949dc73f
docs: Remove some files now moved 2018-06-12 06:43:21 +02:00
Bjørn Erik Pedersen
e02629f81a
Merge commit 'b239595af5' 2018-06-11 22:32:19 +02:00
Bjørn Erik Pedersen
b239595af5 Squashed 'docs/' changes from 0fd7b4169..501c6e233
501c6e233 Remoe speakerdeck example
9529bd27d Fix typos
530f22cd3 Remove language assuming knowledge of GitHub OAuth
c618809e7 Refer to Go by its proper name, not its domain name
06e23168b Add timeout parameter to configuration docs
034fa62a7 Update shortcodes.md
10ea79335 Document .Ordinal on shortcode
0bfd85fb9 Formatting
e44f80fdf Release 0.41
76164258c releaser: Add release notes to /docs for release of 0.41
8d87505eb releaser: Bump versions for release of 0.41
2bbc003ee docs: Document the GDPR Privacy Config
e2d11564d Merge commit 'd2b1030060'

git-subtree-dir: docs
git-subtree-split: 501c6e23370fae21e2110e0d7ea0db6731b31779
2018-06-11 22:31:02 +02:00
Anthony Fok
ed4a345efe commands: Create LICENSE rather than LICENSE.md in "new theme"
See also #4623
2018-06-11 10:40:22 +02:00
Anthony Fok
9717ac7dce commands: Create _default/baseof.html in "new theme"
Thanks to @digitalcraftsman, @bep and @rdwatters for providing the
actual content of the default baseof.html file.

Fixes #3576
2018-06-11 10:40:22 +02:00
Anthony Fok
692ec00872 commands: Make "new theme" feedback more intuitive 2018-06-11 10:40:22 +02:00
Anthony Fok
d3dd74fd65 commands: Move nextStepsText() to new_site.go 2018-06-11 10:40:22 +02:00
Bjørn Erik Pedersen
80230f26a3
Add support for theme composition and inheritance
This commit adds support for theme composition and inheritance in Hugo.

With this, it helps thinking about a theme as a set of ordered components:

```toml
theme = ["my-shortcodes", "base-theme", "hyde"]
```

The theme definition example above in `config.toml` creates a theme with the 3 components with presedence from left to right.

So, Hugo will, for any given file, data entry etc., look first in the project, and then in `my-shortcode`, `base-theme` and lastly `hyde`.

Hugo uses two different algorithms to merge the filesystems, depending on the file type:

* For `i18n` and `data` files, Hugo merges deeply using the translation id and data key inside the files.
* For `static`, `layouts` (templates) and `archetypes` files, these are merged on file level. So the left-most file will be chosen.

The name used in the `theme` definition above must match a folder in `/your-site/themes`, e.g. `/your-site/themes/my-shortcodes`. There are  plans to improve on this and get a URL scheme so this can be resolved automatically.

Also note that a component that is part of a theme can have its own configuration file, e.g. `config.toml`. There are currently some restrictions to what a theme component can configure:

* `params` (global and per language)
* `menu` (global and per language)
* `outputformats` and `mediatypes`

The same rules apply here: The left-most param/menu etc. with the same ID will win. There are some hidden and experimental namespace support in the above, which we will work to improve in the future, but theme authors are encouraged to create their own namespaces to avoid naming conflicts.

A final note: Themes/components can also have a `theme` definition in their `config.toml` and similar, which is the "inheritance" part of this commit's title. This is currently not supported by the Hugo theme site. We will have to wait for some "auto dependency" feature to be implemented for that to happen, but this can be a powerful feature if you want to create your own theme-variant based on others.

Fixes #4460
Fixes #4450
2018-06-10 23:55:20 +02:00
Bjørn Erik Pedersen
6464981adb
hugolib: Make sure that .Site.Taxonomies is always set on rebuilds
Fixes #4838
2018-06-10 20:55:17 +02:00
Christian Oliff
2e6712e281 tpl: Always load GA script over HTTPS 2018-06-09 23:47:44 +02:00
Alexandros
65deb72dc4 tplimpl: Remove speakerdeck shortcode
Fixes #4830
2018-06-09 11:13:36 +02:00
Bjørn Erik Pedersen
dc4226a8b2 hugolib: Reset Page's main output on server rebuilds
Not doing so prevents the paginators to be rebuilt on changes.

Fixes #4819
2018-06-05 10:45:24 +03:00
Bjørn Erik Pedersen
bf5f10faa9 Reset the "distinct error logger" on rebuilds
Fixes #4818
2018-06-05 10:45:24 +03:00
David E. Wheeler
019bd5576b tpl/strings: strings.RuneCount 2018-06-04 20:47:03 +03:00
Anthony Fok
c3115292a7 tpl: Prevent isBaseTemplate() from matching "baseof" in dir
Fixes #4809
2018-06-04 10:09:55 +03:00
Bjørn Erik Pedersen
0c6c98e401
tpl/strings: Remove overflow check in strings.Repeat
The test fails on 32 bit systems. Let it panic instead.
2018-06-03 23:23:48 +03:00
Bjørn Erik Pedersen
90c7749085
tpl/strings: Adjust the overflow validation in strings.Repeat
This now matches the validation in the stdlib, but we return an error instead.
2018-06-03 10:35:45 +03:00
David E. Wheeler
13435a6f60 tpl: Add strings.Repeat 2018-06-03 09:55:37 +03:00
Alex
07b96d16e8 Fixes #4798 2018-05-31 18:05:38 +02:00
Alex
ceaff7cafc tpl: Remove frameborder attr YT iframe + CSS fixes 2018-05-30 14:06:32 +02:00
Alex
b84389c5e0 Fix vimeo_simple thumb scaling 2018-05-30 11:30:28 +02:00
Alexandros
8de5324479 Add vimeo_simple
Fixes #4749
2018-05-30 00:48:36 +02:00
Stefan Neuhaus
20cbc2c785 Add a BlackFriday option for rel="noreferrer" on external links
Add a configuration option "noreferrerLinks". When set to "true" the "HTML_NOREFERRER_LINKS" flag is being passed to Blackfriday. Thereby all *absolute* links will get a "noreferrer" value for their "rel" attribute.

See #4722
2018-05-29 16:54:43 +02:00
Bjørn Erik Pedersen
2174525cec
hugolib: A little more on shortcode ordinal 2018-05-28 10:29:48 +02:00
Stefan Neuhaus
7a6192647a Add a BlackFriday option for rel="nofollow" on external links
Add a configuration option "nofollowLinks". When set to "true" the "HTML_NOFOLLOW_LINKS" flag is being passed to Blackfriday. Thereby all *absolute* links will get a "nofollow" value for the "rel" attribute.

Fixes #4722
2018-05-28 01:21:36 +02:00
Alex
d68367cbe7 fix typo instagram_simple 2018-05-27 11:06:40 +02:00
hugoreleaser
5241f0baee
releaser: Prepare repository for 0.42-DEV
[ci skip]
2018-05-27 10:30:06 +02:00
Bjørn Erik Pedersen
b5b36e3200
dep: Update Chroma
And be explicit about the revision. Chroma seem to be a little bit lazy with tagging.

Fixes #4779
2018-05-26 15:26:49 +02:00
Vas Sudanagunta
4f0665f476 Enhance Page and Resource String() 2018-05-26 09:43:47 +02:00
Bjørn Erik Pedersen
fc8c5ad824
Merge tag 'v0.41'
releaser: 0.41 [ci skip]
2018-05-25 19:07:52 +02:00
hugoreleaser
171caf28a9 releaser: Add release notes to /docs for release of 0.41
[ci skip]
2018-05-25 16:57:18 +00:00
hugoreleaser
0e77f5d4e7 releaser: Bump versions for release of 0.41
[ci skip]
2018-05-25 16:57:17 +00:00
Bjørn Erik Pedersen
9e7e322ded
Release 0.41 2018-05-25 18:46:45 +02:00
hugoreleaser
06827398f9 releaser: Add release notes draft for 0.41
Rename to *-ready.md to continue. [ci skip]
2018-05-25 16:01:30 +00:00
Bjørn Erik Pedersen
cfc5096e83
releaser: Put release notes below /en
Fixes #4712
2018-05-25 17:53:03 +02:00
Bjørn Erik Pedersen
ab02594e09
create: Provide the correct .Site object to archetype templates
Fixes #4732
2018-05-25 17:35:06 +02:00
Bjørn Erik Pedersen
c71f201fd9
docs: Document the GDPR Privacy Config
See #4751
2018-05-25 17:25:33 +02:00
Bjørn Erik Pedersen
4ed1228d55
Fix GA anonymizeIp order 2018-05-25 16:05:45 +02:00
Bjørn Erik Pedersen
a51945ea4b Add no-cookie variants of the Google Analytics templates
The current full set of options for GA is now:

```toml
[privacy]
[privacy.googleAnalytics]
disable = false
respectDoNotTrack = true
anonymizeIP = true
useSessionStorage = true
```

Fixes #4775
2018-05-25 15:56:10 +02:00
Bjørn Erik Pedersen
7b9dbef41a
Merge commit 'd2b1030060' 2018-05-25 15:05:23 +02:00
Bjørn Erik Pedersen
d2b1030060 Squashed 'docs/' changes from e161ea09d..0fd7b4169
0fd7b4169 Fix typo: pygmentsUseClasses -> pygmentsUseClassic
9a3e1c19a Clarify that lower weight gets higher precedence
820d8b581 Clarify the true behavior of hrefTargetBlank #blackfriday
eb3aa5e46 Fix typo
9aedb9269 Add examples for removing default taxonomies
772a26f84 Fix source link on maintainance
975c215ae Minor edits.
2bdb1a150 Fix invalid iink
991d2e139 Fix misspelling
60af8dfb0 Update eSolia link
d7426b76e Release 0.40.3
4977bd9cf Merge branch 'release-0.40.3'
9946f7108 releaser: Prepare repository for 0.41-DEV
beef16b01 releaser: Add release notes to /docs for release of 0.40.3
80c51c55a releaser: Bump versions for release of 0.40.3
21e2934c5 rename `taxonomies.html` to `taxonomy.html`
34a02c289 Add release notes from Hugo 0.7 to 0.15 for completeness
b593f512e Update related.md
7c2bf528b Fix the "edit this page" link
e8fbc163e Add warning about cond
ae15a8831 Add link to Markdown Guide
e077dfd65 Added documentation for a new migration tool: BlogMl2Hugo
957bfb6a8 Add Talkayrd, a new commenting system, & fix txtpen link
86acea7f8 Tomango showcase
3c2fc32f1 Fix snap classic command in installing.md
9a76f1737 Merge commit '83bef6955e'
a4b71fb84 Fix typo

git-subtree-dir: docs
git-subtree-split: 0fd7b416997bf76cd99e3ae2dfae406cb8b6724a
2018-05-25 15:04:07 +02:00
Bjørn Erik Pedersen
0bf0e1972d
tpl: Remove the shortcode assets for now
Not in use.
2018-05-25 14:34:40 +02:00
Bjørn Erik Pedersen
1f244b802e
tpl: Adjust instagram_simple margins 2018-05-25 12:38:25 +02:00
Bjørn Erik Pedersen
448081b840
Remove youtube_simple for now
We need to revisit and complete that.

See #4751
2018-05-25 11:16:23 +02:00
Bjørn Erik Pedersen
1f1d955b56
Add anonymizeIP to GA privacy config
See #4751
2018-05-25 10:53:39 +02:00
Bjørn Erik Pedersen
ffcf26e68c
Fix broken test 2018-05-24 13:03:23 +02:00
Bjørn Erik Pedersen
9753cb59f1
Support DNT in Twitter shortcode for GDPR
Fixes #4765
2018-05-24 12:25:52 +02:00
Bjørn Erik Pedersen
3bfe8f4be6
tpl: Alias tweet shortode to twitter
See #4765
2018-05-24 11:40:47 +02:00
Bjørn Erik Pedersen
6aa2c38507
Regenerate embedded templates
See #4761
2018-05-23 21:25:04 +02:00
Alexandros
6d69dac9da Fix youtube_simple thumb scaling
Fixes #4761
2018-05-23 21:22:25 +02:00
Bjørn Erik Pedersen
9ad46a2035 Add instagram_simple shortcode
Fixes #4748
2018-05-23 16:52:08 +02:00
Bjørn Erik Pedersen
4256de3392
deps: Go fmt 2018-05-23 16:33:11 +02:00
Bjørn Erik Pedersen
bed7a0faff
Remove the id from youtube_simple
For now, anyway.

See #4751
2018-05-23 10:24:01 +02:00
Bjørn Erik Pedersen
35ccf06dae
Fix some recently broken embedded templates
And add tests for them.

Fixes #4757
2018-05-23 10:03:11 +02:00
Bjørn Erik Pedersen
4ddcf52ccc Add an unified .Site.Config with a services section
Fixes #4751
2018-05-22 18:11:03 +02:00
Bjørn Erik Pedersen
353148c2bc Move the privacy config into a parent
See #4751
2018-05-22 18:11:03 +02:00
Lorenz Cuno Klopfenstein
568b4335c2 commands: Avoid ANSI character output on Windows
Fixes #4462
2018-05-22 17:15:19 +02:00
Bjørn Erik Pedersen
14705ecead
tpl: Add another class and an id to youtube_simple
To provide some more styling options.

See #4616
2018-05-22 09:11:34 +02:00
Bjørn Erik Pedersen
69ee6b41e3
Make the simple mode YouTube links schemaless
See #4616
2018-05-21 22:25:04 +02:00
Bjørn Erik Pedersen
88e3568680 Add YouTube shortcode simple mode
Adapted from the work of @onedrawingperday.

See #4616
2018-05-21 21:56:42 +02:00
Bjørn Erik Pedersen
2f17f9378a Do not return error on .Get "class" and vice versa in shortcodes
The current error handling makes parameter checking in shortcodes too verbose for no good reason.

Fixes #4745
2018-05-21 18:52:13 +02:00
Christian Oliff
0a7027e2a8 Create SUPPORT.md
To help cut down on the number of general questions, it'd be good to add a `SUPPORT.md` to the `.github` folder.

A link to this would then be displayed automatically when a user opens a New Issue (https://github.com/gohugoio/hugo/issues/new).

To see an example of this take a look at: https://github.com/twbs/bootstrap/issues/new
2018-05-21 16:56:30 +02:00
Bjørn Erik Pedersen
5f24a2c047 Add PrivacyEnhanced mode for YouTube to the GDPR Policy
See #4616
2018-05-21 16:49:00 +02:00
Bjørn Erik Pedersen
710142016b Add RespectDoNotTrack to GDPR privacy policy for Google Analytics
See #4616
2018-05-21 13:16:43 +02:00
Bjørn Erik Pedersen
f45b522ebf
tpl/tplimpl: Adjust GA templates
See #4616
2018-05-21 10:21:36 +02:00
Bjørn Erik Pedersen
6789207347 tpl/tplimpl/embedded: Wrap the relevant templates with the privacy policy disable check
See #4616
2018-05-21 00:41:42 +02:00
Bjørn Erik Pedersen
0bbdef986d config: Add the foundation for GDPR privacy configuration
See #4616
2018-05-21 00:41:42 +02:00
Anthony Fok
9bd4236e1b
Show site build warning in TestPageBundlerSiteRegular
So that a timeout warning does appear if it does happen
especially on a slow machine with soft floating-point CPU.

Special thanks to @bep for the solution.

See #4672
2018-05-14 00:09:39 -06:00
Anthony Fok
4eedb377b6
commands: Do not show empty BuildDate in version 2018-05-14 00:08:12 -06:00
Anthony Fok
b2b500f563
hugolib: Use double quotes instead of back quotes
so that '\n' is interpreted in the timeout warning.
2018-05-14 00:03:03 -06:00
Vas Sudanagunta
2fb9af59c1 Improve markup determination logic
Sets Page.markup earlier (as early as possible, when the page is
loaded). Sets it once and only once, removing many redundant calls
to determineMarkupType().

This kills a sleeping bug that was avoided by the parts of the
code depending on this value making those redundant calls.
2018-05-12 20:16:26 +02:00
Bjørn Erik Pedersen
00e36a4164
Merge branch 'release-0.40.3' 2018-05-09 09:54:25 +02:00
hugoreleaser
bfb7744902 releaser: Prepare repository for 0.41-DEV
[ci skip]
2018-05-09 07:48:57 +00:00
hugoreleaser
ecae2106b9 releaser: Add release notes to /docs for release of 0.40.3
[ci skip]
2018-05-09 07:46:30 +00:00
hugoreleaser
315a73c9fe releaser: Bump versions for release of 0.40.3
[ci skip]
2018-05-09 07:46:30 +00:00
Bjørn Erik Pedersen
46dc006f17
Release 0.40.3 2018-05-09 09:42:15 +02:00
hugoreleaser
d089e9d45a releaser: Add release notes draft for 0.40.3
Rename to *-ready.md to continue. [ci skip]
2018-05-09 07:16:28 +00:00
Bjørn Erik Pedersen
90d0d83097
hugolib: Fix possible .Content cut
There have been one report of a site with truncated `.Content` after the Hugo `0.40.1` release.

This commit fixes this so that race should not be possible anymore. It also adds a stress test with focus on content rendering and multiple output formats.

Fixes #4706
2018-05-09 09:07:30 +02:00
Bjørn Erik Pedersen
086ae81a98
hugolib: Fix possible .Content cut
There have been one report of a site with truncated `.Content` after the Hugo `0.40.1` release.

This commit fixes this so that race should not be possible anymore. It also adds a stress test with focus on content rendering and multiple output formats.

Fixes #4706
2018-05-08 16:52:51 +02:00
Bjørn Erik Pedersen
c2bb62d63e
tpl/tplimpl: Move README one level up 2018-05-05 11:00:39 +02:00
Bjørn Erik Pedersen
34ad9a4f17
tpl/tplimpl: Extract internal templates
Having them in separate files should make maintainance easier.

When adding new or making changes to the templates:

```bash
mage generate
```

This will get the Go code in sync.

Fixes #4457
2018-05-04 23:12:10 +02:00
Bjørn Erik Pedersen
914cc85e22
Merge commit '83bef6955e' 2018-05-04 09:44:59 +02:00
Bjørn Erik Pedersen
83bef6955e Squashed 'docs/' changes from 896bad9f4..e161ea09d
e161ea09d Add one more Chinese file to workaround reflect: Zero(nil)
b595b3a21 Add more Chinese translation
56e4e95d9 Use lang.Merge to "fill in the gaps" for untranslated pages
ef079406c Merge commit '650fac3a4e7d256f4505402ab44cfc3c804b8dea'
650fac3a4 Squashed 'themes/gohugoioTheme/' changes from a1768ebb..f31a3dc8
322eff899 Add Chinese language for menus
d90b886e0 Fix Markdown table syntax in previous commit
737f3dfca Update the leaf bundle vs branch bundle table
09fa1bc4e Clarify that `.Now` is obsolete
879ea3f6a Make release notes somewhat more consistent
0113e2051 Move 0.40.2-relnotes into content/en/news
77578f5bf Move content/ into new contentDir content/en/
4dcf7c709 Fix "reflect: Zero(nil)" error in showcase
63dd25505 Release 0.40.2
2076c0d56 releaser: Prepare repository for 0.41-DEV
070fe565e releaser: Add release notes to /docs for release of 0.40.2
4ce52e913 releaser: Bump versions for release of 0.40.2
41907c487 Fix typos in syntax-highlighting.md
91753ef3d Add missing backtick
b77274301 Remove duplicate release notes (0.27, 0.27.1, 0.35)
6e00da316 Remove obsolete content/release-notes/ directory
00a6d8c02 Change en dash back to `--` in 0.38.2-relnotes
51b32dc00 Update archetypes.md
d0e5c2307 Release 0.40.1
4538a6d5b releaser: Prepare repository for 0.41-DEV
91b391d70 releaser: Add release notes to /docs for release of 0.40.1
e0979d143 releaser: Bump versions for release of 0.40.1
7983967c2 Clean images
fe3fdd77d Polish showcase for Flesland Flis
e6dde3989 Showcase - Flesland Flis AS by Absoluttweb
73aa62290 Revive @spf13's special Hugo font
add67b335 Release Hugo 0.40
c0a26e5a6 Merge branch 'temp40'
beeabaaae releaser: Prepare repository for 0.41-DEV
e67d5e985 releaser: Add release notes to /docs for release of 0.40
6cdd95273 releaser: Bump versions for release of 0.40
bee21fb9b Revive the other Hugo logos too
4f45e8fe1 Fix the link type attribute for RSS in examples
8c67dc89a Fix example in delimit doc
e7f6c00d5 Revive the logo used on the forum
82b0cd26e Merge commit 'a215abf70e'
119c8ca58 Merge commit 'd2ec1a06df'
db4683bd2 Improve .Get docs
05260b886 .Get function: fix syntax signature

git-subtree-dir: docs
git-subtree-split: e161ea09d33e3199f4998e4d2e9068d5a850f042
2018-05-04 09:44:21 +02:00
Hélène Martin
a6816db775 Fix typo
This could either be "check out Hugo's themes" or "check out the Hugo themes". I think the latter reads better.
2018-05-03 07:05:35 +02:00
Adam Jones
b6ededf059 Update CONTRIBUTING.md
Fix typos, simplify language
2018-05-01 18:02:08 +02:00
hugoreleaser
8b03c51eae releaser: Prepare repository for 0.41-DEV
[ci skip]
2018-04-30 06:50:00 +00:00
hugoreleaser
5a9d1324d8 releaser: Add release notes to /docs for release of 0.40.2
[ci skip]
2018-04-30 06:47:41 +00:00
hugoreleaser
f1269a6d00 releaser: Bump versions for release of 0.40.2
[ci skip]
2018-04-30 06:47:41 +00:00
Bjørn Erik Pedersen
669b3d3a99
Release 0.40.2 2018-04-30 08:42:04 +02:00
hugoreleaser
317d81ec48 releaser: Add release notes draft for 0.40.2
Rename to *-ready.md to continue. [ci skip]
2018-04-30 06:39:05 +00:00
Bjørn Erik Pedersen
655983a22d Reset .Page.Scratch on live-reload
Fixes #4683
2018-04-30 08:21:22 +02:00
Bjørn Erik Pedersen
001a28c2f9 Fix .WordCount, .FuzzyWordCount, .ReadingTime when summary marker is set
This bug was introduced in Hugo 0.40. It is when you use the `<!--more-->` summary marker.

Note that this affects the word stats only. The related `PlainWords`, `Plain`, `Content` all return correct values.

Fixes #4675
Fixes #4682
2018-04-29 10:58:58 +02:00
hugoreleaser
391f59f996 releaser: Prepare repository for 0.41-DEV
[ci skip]
2018-04-25 13:23:15 +00:00
hugoreleaser
459935b291 releaser: Add release notes to /docs for release of 0.40.1
[ci skip]
2018-04-25 13:20:44 +00:00
hugoreleaser
b5dafb0f23 releaser: Bump versions for release of 0.40.1
[ci skip]
2018-04-25 13:20:44 +00:00
Bjørn Erik Pedersen
88cb2697e2
Release 0.40.1 2018-04-25 15:17:21 +02:00
hugoreleaser
6fb2d30d21 releaser: Add release notes draft for 0.40.1
Rename to *-ready.md to continue. [ci skip]
2018-04-25 12:58:03 +00:00
Bjørn Erik Pedersen
288c396439
hugolib: Fix some shortcode vs .Content corner cases
This is a follow-up to #4632. There were some assumptions in that implementation that did not hold water in all situations.

This commit simplifies the content lazy initalization making it more robust.

Fixes #4664
2018-04-25 08:56:46 +02:00
hugoreleaser
44e47478d0 releaser: Prepare repository for 0.41-DEV
[ci skip]
2018-04-23 07:43:27 +00:00
hugoreleaser
c7e59367d8 releaser: Add release notes to /docs for release of 0.40
[ci skip]
2018-04-23 07:40:57 +00:00
hugoreleaser
3aed268379 releaser: Bump versions for release of 0.40
[ci skip]
2018-04-23 07:40:57 +00:00
Bjørn Erik Pedersen
7ef118392a
Release 0.40 2018-04-23 09:37:32 +02:00
hugoreleaser
2e77cc07a2
releaser: Add release notes draft for 0.40
Rename to *-ready.md to continue. [ci skip]
2018-04-23 09:37:32 +02:00
Bjørn Erik Pedersen
402f6788ee
hugolib: Add .Page.BundleType
I eturn either:

1. leaf
2. branch
3. empty string

The above sits well with constructs like:

```
{{ with .BundleType }}
// Now we know it is a bundle
{{ end }}
```

Fixes #4662
2018-04-23 08:41:19 +02:00
Bjørn Erik Pedersen
3decf4a327
hugolib: Add zero-based Ordinal to shortcode
The count starts at 0 relative to the shortcode's parent: Either the page or the surrounding shortcode.

Access it in a shortcode like this:

```bash
Ordinal is {{ .Ordinal }}
```

Note that this is a shared ordinal for all shortcodes in the relevant context, so, as an example, you have this in a content page:

```markdown
This is a shortcode:

{{< hello >}}

This is another shortcode:

{{< hugo >}}

The `.Ordinal` you get in the two shortcodes above is 0 and 1.
```

See #3359
2018-04-23 08:09:56 +02:00
Bjørn Erik Pedersen
24c662ce6b
hugolib: Defer the unlock in orderedMap.Add
Just in case someone tries to recover from the potential panic.
2018-04-22 21:32:05 +02:00
Bjørn Erik Pedersen
a215abf70e Squashed 'docs/' changes from 76e881257..896bad9f4
896bad9f4 Remove unused files below /static

git-subtree-dir: docs
git-subtree-split: 896bad9f4f7ed487b357e2842bccc55fb8d090cd
2018-04-22 17:57:24 +02:00
Bjørn Erik Pedersen
474bad34ca
Merge commit 'a215abf70e' 2018-04-22 17:57:24 +02:00
Bjørn Erik Pedersen
85535084de
hugolib: Process and render shortcodes in their order of appearance
Fixes #3359
2018-04-22 17:40:51 +02:00
Bjørn Erik Pedersen
19084eaf74 hugolib: Init the content and shortcodes early
In most cases we could delay the content init until rendering time, but there could be use cases where the templates would depend on state set in the shortcodes (.Page.Scratch.Set), so we  need to do this early.

See #4632
2018-04-22 12:03:01 +02:00
Bjørn Erik Pedersen
47e7788b3c tpl/path: Add path.Ext, path.Dir and path.Base 2018-04-22 10:57:37 +02:00
Bjørn Erik Pedersen
51af1d2ead
tpl/os: Make fileExist use the same filesystem as readFile
Fixes #4633
2018-04-21 23:46:34 +02:00
Bjørn Erik Pedersen
1b9dc52ef5
Merge commit 'd2ec1a06df' 2018-04-21 23:02:48 +02:00
Bjørn Erik Pedersen
d2ec1a06df Squashed 'docs/' changes from f9a5dc59b..76e881257
76e881257 Improve .Scratch entry (#454)
37ed09702 Remove zero-byte .gitmodules file altogether
943f21619 Add a note about valid values for taxonomies in front-matter
ebcfa30d7 Update definition list formatting
46050042a Corrected formatting
87c539101 Updated readFile documentation
8fd130395 commands: Regenerate the CLI docs
6ce0ce8d6 data: Regenereate the docshelper
9fe78fabd Release 0.39
33039c6ba releaser: Prepare repository for 0.40-DEV
e3a780907 releaser: Add release notes to /docs for release of 0.39
54406e3fa releaser: Bump versions for release of 0.39
21017660b Merge commit '047c4188df'

git-subtree-dir: docs
git-subtree-split: 76e88125760c140541edab2061aed31c6db2d800
2018-04-21 23:01:55 +02:00
Bjørn Erik Pedersen
4d26ab33dc
Make .Content (almost) always available in shortcodes
This resolves some surprising behaviour when reading other pages' content from shortcodes. Before this commit, that behaviour was undefined. Note that this has never been an issue from regular templates.

It will still not be possible to get **the current shortcode's  page's rendered content**. That would have impressed Einstein.

The new and well defined rules are:

* `.Page.Content` from a shortcode will be empty. The related `.Page.Truncated` `.Page.Summary`, `.Page.WordCount`, `.Page.ReadingTime`, `.Page.Plain` and `.Page.PlainWords` will also have empty values.
* For _other pages_ (retrieved via `.Page.Site.GetPage`, `.Site.Pages` etc.) the `.Content` is there to use as you please as long as you don't have infinite content recursion in your shortcode/content setup. See below.
* `.Page.TableOfContents` is good to go (but does not support shortcodes in headlines; this is unchanged)

If you get into a situation of infinite recursion, the `.Content` will be empty. Run `hugo -v` for more information.

Fixes #4632
Fixes #4653
Fixes #4655
2018-04-21 22:02:56 +02:00
Bjørn Erik Pedersen
d6a2024e6b
Revert "Improve .Content vs shortcodes"
This reverts commit e590cc26eb.
2018-04-19 17:40:57 +02:00
Bjørn Erik Pedersen
d6982ac0ac
Revert "hugolib: Prepare child page resources before the page itself"
This reverts commit 3238e14fdf.
2018-04-19 17:40:54 +02:00
Bjørn Erik Pedersen
3238e14fdf
hugolib: Prepare child page resources before the page itself
To make sure that the child resources' content is ready before any shortcode is processed in their owner.

See #4632
2018-04-19 16:35:21 +02:00
Bjørn Erik Pedersen
47c05c47e0 Add language merge support for Pages in resource.Resources
Fixes #4644
2018-04-19 16:23:00 +02:00
Bjørn Erik Pedersen
e590cc26eb
Improve .Content vs shortcodes
For the content from other pages in shortcodes there are some chicken and
egg dependencies that is hard to get around. But we can improve on this  by preparing the pages in a certain order:

 1. The headless bundles goes first. These are page typically page and image collections..
 2. Leaf bundles
 3. Regular single pages
 4. Branch bundles

Fixes #4632
2018-04-19 14:46:50 +02:00
cmal
74520d2cfd Improve .Get docs 2018-04-17 15:39:33 +02:00
cmal
e2b277bba5 Update missing positional parameter test for .Get 2018-04-17 15:39:33 +02:00
cmal
236f0c840b .Get doesn't crash on missing positional param
fixes #4619
2018-04-17 15:39:33 +02:00
cmal
cd6a261242 .Get function: fix syntax signature 2018-04-17 15:39:33 +02:00
Bjørn Erik Pedersen
d681ea55a0
Improve error message in metadata parse
Fixes #3696
2018-04-17 15:37:05 +02:00
Bjørn Erik Pedersen
a96ad5c211
hugolib: Fix broken test 2018-04-17 10:28:32 +02:00
Bjørn Erik Pedersen
159bed34c3
parser: Add some context to front matter parse error
Fixes #4638
2018-04-17 10:20:38 +02:00
Lucas Liberacki
5cc944ffd7 Updated GetCSV error message (#4636) 2018-04-17 07:20:14 +02:00
hugoreleaser
89d2cf49ac releaser: Prepare repository for 0.40-DEV
[ci skip]
2018-04-16 07:33:49 +00:00
hugoreleaser
933a16b109 releaser: Add release notes to /docs for release of 0.39
[ci skip]
2018-04-16 07:31:26 +00:00
hugoreleaser
60845a5a0e releaser: Bump versions for release of 0.39
[ci skip]
2018-04-16 07:31:26 +00:00
Bjørn Erik Pedersen
9a39146edf
releaser: Fix LICENSE vs LICENSE.md
Fixes #4631
2018-04-16 09:27:39 +02:00
Bjørn Erik Pedersen
1a6a0fa6f2
Release 0.39 2018-04-16 09:08:36 +02:00
hugoreleaser
936fc76ad6 releaser: Add release notes draft for 0.39
Rename to *-ready.md to continue. [ci skip]
2018-04-16 06:27:26 +00:00
Bjørn Erik Pedersen
f21b827f7b
commands: Re-add the missing releaser command 2018-04-16 08:23:32 +02:00
Bjørn Erik Pedersen
7c597c7d75
Merge commit '047c4188df' 2018-04-16 07:45:38 +02:00
Bjørn Erik Pedersen
047c4188df Squashed 'docs/' changes from d9c8fc220..f9a5dc59b
f9a5dc59b Code Toggle block added to doc site final batch Templates  Variables 
4d4107968 Add eSolia as new sponsor
000fed94e Add missing closing tags for li in menu template example
f462b620f Clarify that local CSV files cannot be inside data dir
ae083641a Added hugo-search-index to list of search tools
e2b64d0b7 Remove extra link
2fb4c9af5 Release 0.38.2
59b1c9853 releaser: Prepare repository for 0.39-DEV
92f6a05ea releaser: Add release notes to /docs for release of 0.38.2
76244729e releaser: Bump versions for release of 0.38.2
0960c5fb3 Adjust gray color of tab vs pane in code-toggle.
8ae3aadd7 use code-toggle shortcode when relevant Content Management 
455b8b53b Update related.md
6e8d19090 Release 0.38.1
079ba044c releaser: Prepare repository for 0.39-DEV
6f23e6ec1 releaser: Add release notes to /docs for release of 0.38.1
c51692ceb releaser: Bump versions for release of 0.38.1
d37ea6a5e Update related.md
faa2707d0 Update index.md
9ce901dcb Add a forgotten language tag (go-html-template) for code
b05aaed14 Update where.md
4d4760819 Fix typo in code-toggle.md
c5a5250a1 Use the new go-html-template Chroma lexer
2de831f4b Add the full list of Chroma lexers
18114d4b4 Update Output Formats
b069d7f84 Release 0.38
caaa8355a releaser: Prepare repository for 0.39-DEV
e45b7cc9f releaser: Add release notes to /docs for release of 0.38
40f40906e releaser: Bump versions for release of 0.38
2d52e2e4e Merge commit 'ed8bf081fd'
1439f64a0 docs: Generate docshelper data
5b0edfd79 Add .Site.IsServer
fdb579ad1 Merge commit '0a23baa6a9'
7b71da1f8 hugolib: Add Reset method to delete key from Scratch
63a131664 docs: Add docs for lang.Merge
55cba056d Merge commit '3886fc1fef'
6f301ebcc docs: Add docs on the new front matter configuration
7ba35ef56 Merge commit 'c029065582'
3d2cab754 releaser: Prepare repository for 0.38-DEV
095e888e1 releaser: Add release notes to /docs for release of 0.37.1
593fa0dcb releaser: Bump versions for release of 0.37.1
c18c1df54 releaser: Prepare repository for 0.38-DEV

git-subtree-dir: docs
git-subtree-split: f9a5dc59b77d15cc2c7534e10bcd90bcfeda7bb4
2018-04-16 07:43:59 +02:00
Bjørn Erik Pedersen
e136c26d0c
Remove old LICENSE.md
Closes #4623
2018-04-16 00:03:56 +02:00
Bjørn Erik Pedersen
dd48277497
Add a GitHub compatible Apache 2 license text 2018-04-16 00:03:30 +02:00
Bjørn Erik Pedersen
4dba6ce15a
tpl/urls: Add anchorize template func 2018-04-15 23:17:50 +02:00
Bjørn Erik Pedersen
880ca19f20 tpl/path: Add path.Join 2018-04-15 22:19:12 +02:00
Bjørn Erik Pedersen
01b72eb592 tpl: Add path.Split template func 2018-04-15 22:19:12 +02:00
Bjørn Erik Pedersen
61d52f1462
hugolib: Do not reset .Page.Scratch on rebuilds
Fixes #4627
2018-04-15 19:31:42 +02:00
Bjørn Erik Pedersen
0e7716a424 resource: Implement Resource.Content
Fixes #4622
2018-04-15 18:08:06 +02:00
Bjørn Erik Pedersen
417c5e2b67 Make Page.Content a method that returns interface{}
To prepare for a `Resource.Content` method.

See #4622
2018-04-15 18:08:06 +02:00
Bjørn Erik Pedersen
94c8b29c39
source: Remove deprecated File.Bytes 2018-04-15 14:34:34 +02:00
Bjørn Erik Pedersen
1b4e0c4161 commands: Remove accidental and breaking space in baseURL flag
And added key-trimming to prevent future mishaps.

See #4607
2018-04-15 11:20:04 +02:00
Bjørn Erik Pedersen
27a524b090 commands: Properly handle CLI slice arguments
Like `--disableKinds` -- this handling was kind of broken when we recently moved this from global vars

See #4607
2018-04-14 11:32:25 +02:00
Bjørn Erik Pedersen
bede93de00 commands: Correctly handle destination and i18n-warnings
And add some more CLI tests.

See #4607
2018-04-14 11:32:25 +02:00
Bjørn Erik Pedersen
2aab6dee85 commands: Fix handling of persistent CLI flags
See #4607
2018-04-13 09:08:49 +02:00
Bjørn Erik Pedersen
f3775877c6
hugolib: Fix livereload of bundled pages
Fixes #4607
2018-04-12 12:19:46 +02:00
Bjørn Erik Pedersen
9c782d5147
commands: Fix failing Travis server test 2018-04-12 09:31:53 +02:00
Bjørn Erik Pedersen
14c35c8a56
Allow "*/" inside commented out shortcodes
Fixes #4608
2018-04-11 22:41:48 +02:00
Bjørn Erik Pedersen
96689a5c31
commands: Make commands.Execute return a Response object
We have no global `Hugo` object no more (yay!), and there are some external tools that depends on that value.

These tools need to use get that value from `Response.Result`.

Note that `commands.Execute` now also takes the arguments as a string slice. This should also make it easier to use, not having to modify `os.Args`.

This commit also wraps up this particular issue. Phew!

Test coverage in /commands before: 14.4%
Now:  53.5%

Still work to do, now it is at least possible.

Closes #4598
2018-04-11 20:37:08 +02:00
Bjørn Erik Pedersen
e7010c1b62
commands: Remove some TODOs
See #4598
2018-04-11 10:16:30 +02:00
Bjørn Erik Pedersen
f396cffa23
commands: Fix the config command
It now also accepts the `-s` (source) flag.

See #4598
2018-04-11 10:09:45 +02:00
Bjørn Erik Pedersen
24d5c21942
commands: Fix some flag diff
The CLI docs output is now identical with the master version.

See #4598
2018-04-11 09:57:43 +02:00
Bjørn Erik Pedersen
a7d00fc39e
commands: Add basic server test
See #4598
2018-04-11 09:51:07 +02:00
Bjørn Erik Pedersen
1e233b1c45
commands: Fix TestFixURL
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
b110d0ae04
commands: Remove the Hugo global
There are still some cleaning to do, but that felt good.

See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
73825cfc1c
commands: Make the limit command work again
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
a8f7fbbb10
commands: Move the commands related logic to its own file
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
e8d6ca9531
commands: Add CLI tests
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
4d32f2fa89
commands: Make the hugo command non-global
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
018602c46d
commands: Extract some common types into its own file
See #4598
2018-04-11 09:50:19 +02:00
Bjørn Erik Pedersen
2f0d98a19b
commands: Make the server command non-global
See #4598
2018-04-11 09:50:18 +02:00
Bjørn Erik Pedersen
e0621d207c
commands: Make the gen commands non-global
See #4598
2018-04-11 09:50:18 +02:00
Bjørn Erik Pedersen
e26a8b242a
commands: Make the list commands non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
2a2c983867
commands: Make the import commands non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
15b1e269ad
comands: Make the config command non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
56a1308044
commands: Make the new commands non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
4b780ca778
commands: Make convert command non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
7bc5e89fba
commands: Make more commands non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
fdf1d94ebc
commands: Make benchmark non-global
See #4598
2018-04-11 09:48:56 +02:00
Bjørn Erik Pedersen
1157fef859
commands: Start of flag cleaning
See #4598
2018-04-11 09:48:55 +02:00
Bjørn Erik Pedersen
e614d8a57c
commands: Use short date format in CLI docs
To make it possible to compare the output.

See #4598
2018-04-11 09:48:34 +02:00
Hudson Muff
fca49d6c60 Update README.md
I discovered an inconsistency between the website documentation (https://gohugo.io/getting-started/installing/#source) and this README, for installing from source. I checked them both and the website seems to be newer so I would like to propose updating this README to install Hugo using mage (unless it doesn't really matter).
2018-04-09 18:06:21 +02:00
Bjørn Erik Pedersen
0e8b3cbcd2
Sync dependencies 2018-04-09 11:12:05 +02:00
Bjørn Erik Pedersen
230f2b8c4f
Bump Go versions
Fixes #4545
2018-04-09 11:01:01 +02:00
hugoreleaser
d7f47b780c releaser: Prepare repository for 0.39-DEV
[ci skip]
2018-04-09 08:19:32 +00:00
hugoreleaser
712c0fdfe6 releaser: Add release notes to /docs for release of 0.38.2
[ci skip]
2018-04-09 08:17:15 +00:00
hugoreleaser
62e7588262 releaser: Bump versions for release of 0.38.2
[ci skip]
2018-04-09 08:17:14 +00:00
Bjørn Erik Pedersen
47da0dca52
Release 0.38.2 2018-04-09 10:08:33 +02:00
hugoreleaser
8d87bfd5ee releaser: Add release notes draft for 0.38.2
Rename to *-ready.md to continue. [ci skip]
2018-04-09 08:00:48 +00:00
Bjørn Erik Pedersen
719251c1af
Bump the debouncer dependency
No practical difference.
2018-04-08 10:20:39 +02:00
Bjørn Erik Pedersen
8b2ef83bb1
Use a versioned debounce dependency 2018-04-07 18:09:31 +02:00
Bjørn Erik Pedersen
080302eb87
Fix handling of --contentDir etc. flag
We need to revisit the commands package re globals and tests, but this should fix the init order of flags and languages.

Fixes #4589
2018-04-07 16:40:45 +02:00
Anthony Fok
094ec17142
travis: Disable shallow clone to fix TestPageWithLastmodFromGitInfo
Fixes #4584
2018-04-07 06:54:24 -06:00
Anthony Fok
e84b7ade65
Revert "Disable failing test on Travis"
This reverts commit 2170943ae6
and commit 623c9afa84.
2018-04-07 06:53:47 -06:00
Bjørn Erik Pedersen
2817e84240 Fix handling of content files with "." in them
As in, more dots than just to separate the extension and any language indicator.

Fixes #4559
2018-04-07 10:57:29 +02:00
Bjørn Erik Pedersen
623c9afa84
And now really disable failing test on Travis
See #4584
2018-04-06 18:14:11 +02:00
Bjørn Erik Pedersen
2170943ae6
Disable failing test on Travis
See #4584
2018-04-06 17:31:13 +02:00
Bjørn Erik Pedersen
9cd4d35977
Revert "Try an older GitMap version"
This reverts commit 3a3261a3b9.
2018-04-06 12:01:38 +02:00
Bjørn Erik Pedersen
3a3261a3b9
Try an older GitMap version
To test if the test failures goes away.
2018-04-06 10:59:47 +02:00
Bjørn Erik Pedersen
6792d86ad0
hugolib: Set .Parent in bundled pages to its owner
Fixes #4582
2018-04-06 10:41:28 +02:00
hugoreleaser
e7d87e2410 releaser: Prepare repository for 0.39-DEV
[ci skip]
2018-04-05 16:39:05 +00:00
hugoreleaser
c475eab474 releaser: Add release notes to /docs for release of 0.38.1
[ci skip]
2018-04-05 16:35:25 +00:00
hugoreleaser
3a96fa40bf releaser: Bump versions for release of 0.38.1
[ci skip]
2018-04-05 16:35:25 +00:00
Bjørn Erik Pedersen
c356f1d417
Release 0.38.1 2018-04-05 18:31:17 +02:00
hugoreleaser
30c2c2f8ec releaser: Add release notes draft for 0.38.1
Rename to *-ready.md to continue. [ci skip]
2018-04-05 16:27:24 +00:00
Bjørn Erik Pedersen
f87239e4ca
Fix livereload for the home page bundle
Fixes #4576
2018-04-05 18:03:33 +02:00
Anthony Fok
db0633c1a4
snap: Revert to "mage test" because "mage check" fails
"mage check", which runs "go test", gofmt, "go vet", and
"go test -race", fails one way or another especially on
on non-amd64 architectures, and sometimes even on amd64 too.

Partially reverting my undocumented change in commit 294c0f8.

Fixes #4578
2018-04-05 09:35:47 -06:00
Anthony Fok
874159b543 snap: Add bash completion 2018-04-05 15:51:11 +02:00
Anthony Fok
294c0f8001 snap: Fix empty BuildDate in "hugo version"
Previously, "snap run hugo version" returns an empty BuildDate like so:

    Hugo Static Site Generator v0.38 linux/amd64 BuildDate:

Fix by overriding the default build target of snapcraft's go plugin.
2018-04-05 15:51:11 +02:00
Bjørn Erik Pedersen
a4deaeff0c
Fix some livereload content regressions
Introduced in Hugo 0.38.

Fixes #4566
2018-04-05 14:28:45 +02:00
Anthony Fok
4d115c56fa Update github.com/bep/gitmap to fix snap build
Fixes #4538
2018-04-05 14:20:39 +02:00
Brian Fitzgerald
26f34fd59d Fix two tests that are broken on Windows
Put guards around TestPageBundlerCaptureSymlinks and
TestPageBundlerSiteWitSymbolicLinksInContent so that they aren't
run on Windows (they both use symbolic links and the Go library
implementation requires administrator mode on Windows).
2018-04-05 08:35:06 +02:00
Bjørn Erik Pedersen
730b66b652
commands: Handle mass content etc. edits in server mode
Fixes #4563
2018-04-04 09:29:59 +02:00
hugoreleaser
4f639d6bd5 releaser: Prepare repository for 0.39-DEV
[ci skip]
2018-04-02 11:06:04 +00:00
hugoreleaser
f7bc28c529 releaser: Add release notes to /docs for release of 0.38
[ci skip]
2018-04-02 11:03:32 +00:00
hugoreleaser
20e9c08e1f releaser: Bump versions for release of 0.38
[ci skip]
2018-04-02 11:03:32 +00:00
Bjørn Erik Pedersen
37140a093b
Release 0.38 2018-04-02 12:58:13 +02:00
hugoreleaser
da80163c75
releaser: Add release notes draft for 0.38
Rename to *-ready.md to continue. [ci skip]
2018-04-02 12:58:13 +02:00
Anthony Fok
60e66d12ea travis: Clean up and increase verbosity 2018-04-02 09:20:58 +02:00
Bjørn Erik Pedersen
ed8bf081fd Squashed 'docs/' changes from 3068989b9..d9c8fc220
d9c8fc220 Rebuild Chroma CSS
a9168b106 Adds missing word
ebaa172af Remove note about enabling custom GitLab domains
2ef3918b2 Add code toggler
41878b6ca Clarify the use of .GetPage with page bundles
ffcb26270 Fix broken link for configuration.md
1e72e2b3e Fixed typo in heading - Hightlighter
72b2db77c Change "on the form" to "of the form"
e15e6966f Fix example GitHub url

git-subtree-dir: docs
git-subtree-split: d9c8fc220710fe2bdcc2c61afd9e40e7233953cf
2018-04-02 08:53:34 +02:00
Bjørn Erik Pedersen
558825cc20
Merge commit 'ed8bf081fd' 2018-04-02 08:53:34 +02:00
Bjørn Erik Pedersen
10c33c17cd
docs: Generate docshelper data
And fix build ...
2018-04-02 08:52:42 +02:00
Bjørn Erik Pedersen
2c54f1ad48
docshelper: List Chroma lexers
Fixes #4554
2018-04-02 08:50:42 +02:00
Anthony Fok
eb15ac37ef travis: Run "gem install" without sudo
Running "sudo gem install" was causing random errors like the following:

ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /home/travis/.rvm/gems/ruby-2.4.1/cache/asciidoctor-1.5.6.2.gem

Perhaps sudo is no longer necessary, even on OS X?  :-)
2018-04-02 08:15:35 +02:00
Bjørn Erik Pedersen
eb42774e58
Add support for a content dir set per language
A sample config:

```toml
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true

[Languages]
[Languages.en]
weight = 10
title = "In English"
languageName = "English"
contentDir = "content/english"

[Languages.nn]
weight = 20
title = "På Norsk"
languageName = "Norsk"
contentDir = "content/norwegian"
```

The value of `contentDir` can be any valid path, even absolute path references. The only restriction is that the content dirs cannot overlap.

The content files will be assigned a language by

1. The placement: `content/norwegian/post/my-post.md` will be read as Norwegian content.
2. The filename: `content/english/post/my-post.nn.md` will be read as Norwegian even if it lives in the English content folder.

The content directories will be merged into a big virtual filesystem with one simple rule: The most specific language file will win.
This means that if both `content/norwegian/post/my-post.md` and `content/english/post/my-post.nn.md` exists, they will be considered duplicates and the version inside `content/norwegian` will win.

Note that translations will be automatically assigned by Hugo by the content file's relative placement, so `content/norwegian/post/my-post.md` will be a translation of `content/english/post/my-post.md`.

If this does not work for you, you can connect the translations together by setting a `translationKey` in the content files' front matter.

Fixes #4523
Fixes #4552
Fixes #4553
2018-04-02 08:06:21 +02:00
Bjørn Erik Pedersen
f27977809c
Update stale.yml 2018-04-01 21:36:00 +02:00
Bjørn Erik Pedersen
7a634898c3
Update Chroma
Fixes #4549
2018-03-31 10:51:01 +02:00
Ricardo N Feliciano
1823c053c8 Add .Site.IsServer
Fixes #4478
2018-03-30 20:15:22 +02:00
Anthony Fok
511d5d3b76 travis: Move to Ubuntu Trusty image 2018-03-26 09:09:58 -06:00
Anthony Fok
8299fa885c snap: Remove "make" from build-packages because we use mage now 2018-03-26 07:02:45 -06:00
Anthony Fok
06495f713b snapcraft.yaml: Call mage with "-v" for debugging
See #4538
2018-03-26 04:56:15 -06:00
Bjørn Erik Pedersen
93e24a03ce
hugolib: Fix freeze in invalid front matter error case
Fixes #4526
2018-03-24 10:06:58 +01:00
Bjørn Erik Pedersen
e9c7b6205f
Allow themes to define output formats, media types and params
This allows a `config.toml` (or `yaml`, ´yml`, or `json`)  in the theme to set:

1) `params` (but cannot override params in project. Will also get its own "namespace", i.e. `{{ .Site.Params.mytheme.my_param }}` will be the same as `{{ .Site.Params.my_param }}` providing that the main project does not define a param with that key.
2) `menu` -- but cannot redefine/add menus in the project. Must create its own menus with its own identifiers.
3) `languages` -- only `params` and `menu`. Same rules as above.
4) **new** `outputFormats`
5) **new** `mediaTypes`

This should help with the "theme portability" issue and people having to copy and paste lots of setting into their projects.

Fixes #4490
2018-03-21 09:22:19 +01:00
Bjørn Erik Pedersen
3d1a6e109c
hugolib: Add ConfigSourceDescriptor
To prepare for config in themes

See #4490
2018-03-20 21:30:43 +01:00
Bjørn Erik Pedersen
b6798ee867
Bump some deprecations 2018-03-20 21:13:44 +01:00
Bjørn Erik Pedersen
0a23baa6a9 Squashed 'docs/' changes from 211a3c613..3068989b9
3068989b9 Merge commit '7ae9cf2ccb3eecc1ff50f686925249d01cf37c6c'
7ae9cf2cc Squashed 'themes/gohugoioTheme/' changes from d7a475e7..a1768ebb
b55157fae Revert "Anchorify headings up to h4"
b63dd5566 Anchorify headings up to h4
edfe36a19 Test out trac as highlighter style
98dc8d269 Update multilingual.md
a6e4d92c0 Update multilingual.md
86a90edf9 Fix typo 'If will' to 'It will' line 41
6b626fac6 Add a tip for testing custom 404.html on hugo server
6bfc17cfc Update few links to now point to gohugoio organization repos
f66bad971 Remove unintended alias
3bc56e9ec Fix shortcode name in example: image -> img
251142388 Fix broken link
27245af6a Fix the minimum required git version for GH Pages flow
aefc87b4d Fix link in Forestry showcase
489ec5ea0 Squashed 'themes/gohugoioTheme/' changes from 6f3a8bf5..d7a475e7
308a616fd Merge commit '489ec5ea03799fa092d891838c1655e60b34f337'
a80859814 Adjust showcase description

git-subtree-dir: docs
git-subtree-split: 3068989b9c601146e8e6be8c4e8e2b2c679e5230
2018-03-20 21:11:45 +01:00
Bjørn Erik Pedersen
84f4b731d2
Merge commit '0a23baa6a9' 2018-03-20 21:11:45 +01:00
Bjørn Erik Pedersen
61f6e9f63b
tpl/transform: Add a comments test for Remarshal
See #4521
2018-03-20 18:23:32 +01:00
Bjørn Erik Pedersen
904a3d9ddf
Update Chroma to get Go template support
Fixes #4515
2018-03-19 09:19:47 +01:00
Bjørn Erik Pedersen
f0052b6d0f
commands: Recover from error in server
Issue introduced some days ago.

Fixes #4516
2018-03-18 12:54:06 +01:00
Bjørn Erik Pedersen
da88015776
Spring test cleaning, take 2 2018-03-18 09:54:32 +01:00
Bjørn Erik Pedersen
debd3663dd hugolib: Test cleaning #1 2018-03-17 18:59:07 +01:00
Bjørn Erik Pedersen
af67ad8af1 hugolib: Trim some now superflous tests
These were written as a development aid in some kind of structural change at some point.

They served their purpose then, but these are tests covered elsewhere and is deleted to reduce maintainance.

The reported test covrage is not reduced because of this.
2018-03-17 18:59:07 +01:00
cmal
e46ab29bd2 hugolib: Add Reset method to delete key from Scratch 2018-03-17 00:13:23 +01:00
Bjørn Erik Pedersen
10fef32de6
releaser: Adjust the "thank you" section 2018-03-16 20:56:28 +01:00
Bjørn Erik Pedersen
70005364a2
docs: Add docs for lang.Merge
See https://github.com/gohugoio/hugo/issues/4463
2018-03-16 10:10:01 +01:00
Bjørn Erik Pedersen
ffaec4ca8c
Add a way to merge pages by language
As an example:

```html
{{ $pages := .Site.RegularPages | lang.Merge $frSite.RegularPages | lang.Merge $enSite.RegularPages }}
```

Will "fill in the gaps" in the current site with, from left to right, content from the French site, and lastly the English.

Fixes #4463
2018-03-16 10:10:01 +01:00
Bjørn Erik Pedersen
3886fc1fef Squashed 'docs/' changes from 4e7e1815b..211a3c613
211a3c613 Prepare the forestry.io article for release
23995d6b4 Add forestry.io to showcase
3f177c94e Fix some typos (found by codespell)
dc26e0a5a Clarify the default for site config files and multiple config files
c87c9c62e Review and update the Site config documentation for consistency
a29edc50c Fix the default value of rssLimit site config
83f3c46b0 Minor style fix
4f860d1a2 Typo capitalization fixes
7851345c8 Add docs about comments within templates
d129b4a28 Make the recommendation to use partial over template consistent
6cd260a41 Update index.md
a2787e1a4 Add Let’s Encrypt showcase
7e664f69e Update configuration.md
8002120f1 Update multilingual.md
702b46a62 Add documentation for the disableLanguages setting
cb3d395de Fix content type reference
d33226924 Update Page Kinds documentation
8203f649d Fix misformed markdown link
19e99c957 Add Section definition

git-subtree-dir: docs
git-subtree-split: 211a3c6136c69f49baeae6cd35e5a8853cddf710
2018-03-16 09:44:54 +01:00
Bjørn Erik Pedersen
91fb8f1b59
Merge commit '3886fc1fef' 2018-03-16 09:44:54 +01:00
Bjørn Erik Pedersen
ac12d51e7e
create: Remove archetype title/date warning
Closes #4504
2018-03-15 08:52:20 +01:00
Bjørn Erik Pedersen
3fbc75534d
resource: Fix path duplication/flattening in processed images
Fixes #4502
Closes #4501
2018-03-14 17:04:14 +01:00
Bjørn Erik Pedersen
e427ba4268
hugolib: Remove superflous debug file 2018-03-12 23:36:20 +01:00
Bjørn Erik Pedersen
79dd7cb31a
hugolib: Simplify Prev/Next 2018-03-12 22:13:25 +01:00
Bjørn Erik Pedersen
0dbf79c2f8
docs: Add docs on the new front matter configuration
See #4495
2018-03-11 22:51:11 +01:00
Bjørn Erik Pedersen
f12ad7d56a
hugolib: Adjust GitInfo author date test
Now that we have a commit to assert against.

See #4495
2018-03-11 21:32:15 +01:00
Bjørn Erik Pedersen
ce6e4310fe
Refactor the GitInfo into the date handlers
Fixes #4495
2018-03-11 21:32:05 +01:00
Bjørn Erik Pedersen
95d62004a0
Merge commit 'c029065582' 2018-03-11 20:40:26 +01:00
Bjørn Erik Pedersen
c029065582 Squashed 'docs/' changes from 715741f73..4e7e1815b
4e7e1815b Fix some typos
d23d8f5c4 Remove 'fundamentals' category from function pages
52fa65e15 Mention Chroma as the preferred syntax highlighter
64ca535db Merge commit '8762aee8afe30bec6f1fbc9560749983dc44d60b'
8762aee8a Squashed 'themes/gohugoioTheme/' changes from 396b859f..6f3a8bf5
03f0673a9 Move the gopher to the theme
320e268cd Spelling
e45b640f7 More layout lookup work
fe0ad9d9d Sync the YAML config menu example with TOML's
b9505fc70 Remove template reference to ordinal numbers
0fa2532d3 Remove deprecated Hugoidx, add native hugo solution
2152b907c Fix a link in the last commit
47614f416 Manually specifying heading anchors in Markdown content
9d6770d2a Release notes 0.37.1
e1eed8b27 Remove some unused images
e960046f5 releaser: Prepare repository for 0.38-DEV
4fa83a4ee releaser: Add release notes to /docs for release of 0.37.1
46c879995 releaser: Bump versions for release of 0.37.1
fb3ac5a3e releaser: Prepare repository for 0.38-DEV
4870c8e7b Update archetypes.md
232c0b578 Merge commit '2b18014fd0aa99e9f1a5610ba875101351a90de3'
2b18014fd Squashed 'themes/gohugoioTheme/' changes from fe71e360..396b859f
62567e9aa Add some "writing guidelines"
7cfd530d2 Revise the archetype docs
5d4c3c03c Update data-templates.md
e5fee3099 Update page-bundles.md
ca7f03c8d Update page-bundles.md
2a7fdc269 Fix typo 'vailable' to 'available' line 53
999b75201 LastMod should be Lastmod?
099f46ca5 Fix spacing in content-management/types.md
6bcdc58ef Word choice improvements
20e8a21f6 update rss linking docs
7ef44d262 Add some missing configuration entries
f1c7aa568 Sort config list
5cb8ceade Create a proper definition list for the configuration settings
25dffe4ac Send custom dimensions in GA
55df01a34 Fix broken gtag
6c8772aad Add site to GA config
e63acb894 Remove conflicting release note for 0.35
f30083a23 Add branch to GA config
99caedb96 Set the small-multiples to draft
4a33c70ab Polish the Small Multiples showcase
7b2f1ea2e Add small multiples showcase
e78e96bae Add new sponsor
c42943041 updated to new Forestry logo
e07eda273 Add OS env to faq
414f0dbc6 Release Hugo 0.37
85f0cc324 Merge branch 'temp37'
1e6da9497 Rebuild images
75e97adfc releaser: Add release notes to /docs for release of 0.37
50b887cb0 releaser: Bump versions for release of 0.37
7acf73ba3 Merge commit '900b5f6cfe'
819d02c30 Merge commit '374d184e67'
c7eacf018 Fix typos in development contribution doc

git-subtree-dir: docs
git-subtree-split: 4e7e1815b742659dec1c8f59a1896a3396c7b6e9
2018-03-11 20:39:20 +01:00
Bjørn Erik Pedersen
68bf1511f2
hugolib: Extract date and slug from filename
This commit makes it possible to extract the date from the content filename. Also, the filenames in these cases will make for very poor permalinks, so we will also use the remaining part as the page `slug` if that value is not set in front matter.

This should make it easier to move content from Jekyll to Hugo.

To enable, put this in your `config.toml`:

```toml
[frontmatter]
date  = [":filename", ":default"]
```

This commit is also a spring cleaning of how the different dates are configured in Hugo. Hugo will check for dates following the configuration from left to right, starting with `:filename` etc.

So, if you want to use the `file modification time`, this can be a good configuration:

 ```toml
[frontmatter]
date = [ "date",":fileModTime", ":default"]
lastmod = ["lastmod" ,":fileModTime", ":default"]
```

The current `:default` values for the different dates are

```toml
[frontmatter]
date = ["date","publishDate", "lastmod"]
lastmod = ["lastmod", "date","publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]
```

The above will now be the same as:

```toml
[frontmatter]
date = [":default"]
lastmod = [":default"]
publishDate = [":default"]
expiryDate = [":default"]
```

Note:

* We have some built-in aliases to the above: lastmod => modified, publishDate => pubdate, published and expiryDate => unpublishdate.
* If you want a new configuration for, say, `date`, you can provide only that line, and the rest will be preserved.
* All the keywords to the right that does not start with a ":" maps to front matter parameters, and can be any date param (e.g. `myCustomDateParam`).
* The keywords to the left are the **4 predefined dates in Hugo**, i.e. they are constant values.
* The current "special date handlers" are `:fileModTime` and `:filename`. We will soon add `:git` to that list.

Fixes #285
Closes #3310
Closes #3762
Closes #4340
2018-03-11 18:26:18 +01:00
Bjørn Erik Pedersen
f8dc47eeff Allow partial redefinition of the ouputs config
Fixes #4487
2018-03-10 16:57:25 +01:00
Bjørn Erik Pedersen
ae3fa349de
output: Fix build
See #4484
2018-03-09 17:28:20 +01:00
Bjørn Erik Pedersen
64cec07293
outputs: Adjust the layout examples 2018-03-09 13:26:28 +01:00
hugoreleaser
9ac6206584 releaser: Prepare repository for 0.38-DEV
[ci skip]
2018-03-07 17:58:48 +00:00
hugoreleaser
f414966b94 releaser: Add release notes to /docs for release of 0.37.1
[ci skip]
2018-03-07 17:56:23 +00:00
hugoreleaser
c29a2ed2f5 releaser: Bump versions for release of 0.37.1
[ci skip]
2018-03-07 17:56:23 +00:00
Bjørn Erik Pedersen
dfb6484a41
Release 0.37.1 2018-03-07 18:52:14 +01:00
hugoreleaser
8a02968393 releaser: Add release notes draft for 0.37.1
Rename to *-ready.md to continue. [ci skip]
2018-03-07 17:45:56 +00:00
Bjørn Erik Pedersen
e7fda289b1
Remove defaultLayout config
Not in use.
2018-03-01 17:19:49 +01:00
Bjørn Erik Pedersen
50a03a5acc
commands: Do not print build total when --quiet is set
Fixes #4456
2018-02-27 21:04:39 +01:00
Bjørn Erik Pedersen
ba94abbf5d
resource: Fix SVG and similar resource handling
The validation of if we could process the image (resize etc.) was moved up in Hugo 0.37, which meant SVG and other "non-processable" images would fail.

This commit fixes that by creating a regular resource for these image formats. They will not have `.Resize` or any of the other image methods.

Fixes #4455
2018-02-27 18:29:15 +01:00
Bjørn Erik Pedersen
55fb0eac20
releaser: Remove suplerflous release notes slug 2018-02-27 10:33:35 +01:00
hugoreleaser
06e5ee6526 releaser: Prepare repository for 0.38-DEV
[ci skip]
2018-02-27 09:17:53 +00:00
hugoreleaser
956a2dce8d releaser: Add release notes to /docs for release of 0.37
[ci skip]
2018-02-27 09:15:23 +00:00
hugoreleaser
1f1c562b9c releaser: Bump versions for release of 0.37
[ci skip]
2018-02-27 09:15:23 +00:00
Bjørn Erik Pedersen
3e1a6ebc11
Release 0.37 2018-02-27 10:06:15 +01:00
hugoreleaser
8915cb83f4 releaser: Add release notes draft for 0.37
Rename to *-ready.md to continue. [ci skip]
2018-02-27 08:43:18 +00:00
Bjørn Erik Pedersen
900b5f6cfe Squashed 'docs/' changes from 1dc05a16b..715741f73
715741f73 Add Netlify config for a split testin branch
4917f0636 Mention that math add/sub/mul/div functions can do float math too
31632beeb Document .Site.Params.mainSections
3416ba80d Update sectionvars.md
295ccb463 Update sections.md
15b5a0342 Fix duplicated paragraph
eb13db670 Fix text highlight
fa46cafdf Get 1password-support ready
979bb5698 Add 1password support showcase
ceb94d1e1 Fix readDir function links

git-subtree-dir: docs
git-subtree-split: 715741f7393cec2a9b34254bda6e815e9391a632
2018-02-27 09:36:36 +01:00
Bjørn Erik Pedersen
57637d89ec
Merge commit '900b5f6cfe' 2018-02-27 09:36:36 +01:00
Bjørn Erik Pedersen
13ea1e7c35 resource: Use Floyd-Steinberg dithering for PNGs
Fixes #4453
2018-02-26 19:44:36 +01:00
Bjørn Erik Pedersen
9f740b37cf
hugolib: Fix paginator URL for sections with URL in front matter
Fixes #4415
2018-02-26 17:45:51 +01:00
Bjørn Erik Pedersen
e39797fa72
hugolib: Avoid scanning entire site to find the home
See #4447
2018-02-25 10:50:44 +01:00
Vas Sudanagunta
00868081f6 Fix bug in Site.assembleSections method
Site.assembleSections logic assumes that the the home page would always be the first in the Site's list of pages. This is not in fact guaranteed to be true. When it is not, the method can fail to set the parent for some or all root-level pages. 

Fixes #4447
2018-02-25 10:34:24 +01:00
Bjørn Erik Pedersen
e9750d831f
hugolib: Continue GitInfo lookup on error
The current logic stops looking after the first failure to connect a page with a Git commit. This implies a fatal error, but that may not be the case.
2018-02-22 17:21:09 +01:00
Bjørn Erik Pedersen
19d9a46f63
Properly handle -DEV suffix when comparing Hugo versions
See #4443
2018-02-22 17:16:42 +01:00
Bjørn Erik Pedersen
0602135fd4
Make ge, le etc. work with the Hugo Version number
This means that you can do something ala:

```html
{{ if ge .Hugo.Version "0.36" }}Reasonable new Hugo version!{{ end }}
```

The intented use is feature toggling, but please note that it will take some time and Hugo versions until this can be trusted. It does not work in older Hugo versions.

Fixes #4443
2018-02-22 09:15:12 +01:00
Bjørn Erik Pedersen
55bd46a633
commands: Remove ERROR on missing baseURL
That logic fails in multi-host mode when no baseURL is set on top level.

Fixes #4397
2018-02-21 10:30:00 +01:00
Bjørn Erik Pedersen
8dc77b84a5
releaser: Create bundles for the release notes
Fixes #4413
2018-02-21 10:22:08 +01:00
Bjørn Erik Pedersen
4560261b58
Merge commit '374d184e67' 2018-02-21 10:02:51 +01:00
Bjørn Erik Pedersen
374d184e67 Squashed 'docs/' changes from f97826a17..1dc05a16b
1dc05a16b Update index.md
d73a9b3b4 Added StackImpact showcase
b0e82b3a5 Fix uglyURLs example
cf8a93728 GA track outgoing sponsor clikcs
aca59ac66 Move the sponsor banners up a little
5571673f0 Migrate from analytics.js to gtag.js
64a29b6cb Update faq.md
84704aa84 Use GOPATH variable if defined in installation from source
5f70e6ee2 Remove disableRSS etc. from the documentation
4945e7937 Remove superflous asterisks
39f6c9c28 showcase: Add 1password.com
fe0f82610 Add GitLab warning
9f26f21d2 Fix URL typo
83a91fc99 Remove duplicate release notes
133cdd313 Release 0.36.1
fbe2a2dc7 Clean images
1b02f9193 Merge branch 'temp361'
c430d2d58 Merge branch 'release-0.36.1'
dd7370fc4 releaser: Prepare repository for 0.37-DEV
72534f9ec releaser: Add release notes to /docs for release of 0.36.1
845b2cacb releaser: Bump versions for release of 0.36.1
78790fcb1 Add fluid type to showcase details box
4ef59e008 Adjust column widths to handle a wider variety of copy width
6d2e68521 Always show the latest showcase item on front page
665b1eb5e showcase: Shuffle the news items
5fef1f9b7 Escape quote
d680f0c16 Add some quotes
1722f0d5a showcase: Make the description more about Hugo
a9d43db0a Add Quiply Employee Communications App
7aaa464ec Add Quiply Employee Communications App
fad6a25dd maintenance: Show last 30
7afcfdced showcase: Set Linode date to today
0c31f481a New showcase for Linode
6c7687c2d Minor edits to the `apply` documentation
04bbff8b3 Update apply.md
f543032e3 Fix clunky sentence
218ba2a65 Some more Netlify improvements
0bd512125 Improve the Netlify versioning docs
7a708d60e Clarify Netlify's Hugo versions handling
8f86342cd Add some space
d68d4ff37 Remove now superflous warning
bf93a46ea maintenance: Add TODO list
3b5f27835 maintenance: Remove a superflous prefix
8f29ba2fb maintenance: Adjust order
105d53610 maintenance: Add TOC
29e86396b maintenance: Fix page list selection
ba51fe66d Finish the Maintenance  section
e9b0c710c Add latest changes in new spotlight section
8ccd79f61 Fix broken sentence
c77643c37 Spelling
919f2faef Remove some old troubleshooting articles
09e467f06 Add a new FAQ
ac2b25bb5 Hartwell showcase typos
5bf766993 Trim "www." from shocase URLs in title
a180cd5cb Make the inline showcase template names unique
6886982fd Merge commit '9cc9bab462'
09728efbf Add "target" and "rel" parameters to figure shortcode

git-subtree-dir: docs
git-subtree-split: 1dc05a16bd6b99809d97daeda743d914297f908c
2018-02-21 10:00:31 +01:00
Bjørn Erik Pedersen
772128485a Run gofmt -s with Go 1.10
See #4434
2018-02-21 09:59:33 +01:00
Bjørn Erik Pedersen
c2c4cb1f9f
hugolib: Fix broken footnote test
See #4433
2018-02-21 09:25:32 +01:00
Bjørn Erik Pedersen
492fea7cd2
Update Blackfriday to fix footnote HTML5 validation error
Fixes #4433
2018-02-21 09:18:17 +01:00
Bjørn Erik Pedersen
5ed11edf5a
releaser: Update to Go 1.10 2018-02-21 08:52:44 +01:00
Bjørn Erik Pedersen
799c654b0d resource: Preserve color palette for PNG images
This commit will force a reprocessing of PNG images with new names, so it is adviced to run a `hugo --gc` to remove stale files.

Fixes #4416
2018-02-19 20:15:58 +01:00
Curtis Timson
faa3159e5e Fix typos in development contribution doc 2018-02-18 20:47:18 +01:00
Bjørn Erik Pedersen
eaf573a277
Update dependencies
Closes #4418
2018-02-17 10:46:38 +01:00
Bjørn Erik Pedersen
3ced6f8d47
magefile: Disable Go 1.10 gofmt check for now 2018-02-17 01:24:07 +01:00
Bjørn Erik Pedersen
a3f26e5636
Second try: Update to Go 1.10 (!) 2018-02-17 00:35:22 +01:00
Bjørn Erik Pedersen
0c452c6e7d
Revert "Update to Go 1.10 (!)"
This reverts commit ff10c15a93.
2018-02-16 23:42:42 +01:00
Bjørn Erik Pedersen
ff10c15a93
Update to Go 1.10 (!)
See https://blog.golang.org/go1.10
2018-02-16 23:29:51 +01:00
Bjørn Erik Pedersen
efd506314a
Merge branch 'release-0.36.1' 2018-02-15 10:13:09 +01:00
hugoreleaser
8de91da74f releaser: Prepare repository for 0.37-DEV
[ci skip]
2018-02-15 09:10:09 +00:00
hugoreleaser
25e88ccabe releaser: Add release notes to /docs for release of 0.36.1
[ci skip]
2018-02-15 09:07:43 +00:00
hugoreleaser
19228ed83c releaser: Bump versions for release of 0.36.1
[ci skip]
2018-02-15 09:07:43 +00:00
Bjørn Erik Pedersen
a1f40084f9
Release 0.36.1 2018-02-15 10:03:24 +01:00
hugoreleaser
d7bf9d4daa releaser: Add release notes draft for 0.36.1
Rename to *-ready.md to continue. [ci skip]
2018-02-15 08:51:22 +00:00
Bjørn Erik Pedersen
53e661e7c9
releaser: Update to Go 1.9.4 2018-02-15 09:43:03 +01:00
Bjørn Erik Pedersen
fc23a80ffd
Bump Travis/Snapcraft to Go 1.9.4 2018-02-15 09:43:03 +01:00
Bjørn Erik Pedersen
d8fdffb552
resource: Fix multi-threaded image processing issue
When doing something like this with the same image from a partial used in, say, both the home page and the single page:

```bash
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := $big.Resize "512x" }}
{{ end }}
```

There would be timing issues making Hugo in some cases try to process the same image with the same instructions in parallel.

You would experience errors of type:

```bash
png: invalid format: not enough pixel data
```

This commit works around that by adding a mutex per image. This should also improve the performance, sligthly, as it avoids duplicate work.

The current workaround before this fix is to always operate on the original:

```bash
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := .Fill "512x256 top" }}
{{ end }}
```

Fixes #4404
2018-02-15 09:41:29 +01:00
Bjørn Erik Pedersen
2851af0225
resource: Improve error processing error message 2018-02-15 09:41:29 +01:00
Bjørn Erik Pedersen
08521dac83
hugolib: Improve error message in .Render 2018-02-15 09:41:29 +01:00
Bjørn Erik Pedersen
58382e9572 resource: Fix multi-threaded image processing issue
When doing something like this with the same image from a partial used in, say, both the home page and the single page:

```bash
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := $big.Resize "512x" }}
{{ end }}
```

There would be timing issues making Hugo in some cases try to process the same image with the same instructions in parallel.

You would experience errors of type:

```bash
png: invalid format: not enough pixel data
```

This commit works around that by adding a mutex per image. This should also improve the performance, sligthly, as it avoids duplicate work.

The current workaround before this fix is to always operate on the original:

```bash
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := .Fill "512x256 top" }}
{{ end }}
```

Fixes #4404
2018-02-14 20:59:02 +01:00
Bjørn Erik Pedersen
53dac9a506
resource: Improve error processing error message 2018-02-13 09:14:44 +01:00
Bjørn Erik Pedersen
4edb4bcc65
hugolib: Improve error message in .Render 2018-02-13 09:01:47 +01:00
Bjørn Erik Pedersen
0816a97a46
parser: Add WARNING for integer YAML keys
```bash
benchmark                                               old ns/op     new ns/op     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     3053          2015          -34.00%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        5.23          5.18          -0.96%
BenchmarkStringifyMapKeysIntegers-4                     2320          5177          +123.15%

benchmark                                               old allocs     new allocs     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     6              6              +0.00%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        0              0              +0.00%
BenchmarkStringifyMapKeysIntegers-4                     6              14             +133.33%

benchmark                                               old bytes     new bytes     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     1008          1008          +0.00%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        0             0             +0.00%
BenchmarkStringifyMapKeysIntegers-4                     1008          1776          +76.19%
```
Closes #4393
2018-02-12 19:16:12 +01:00
Bjørn Erik Pedersen
10a917dfdc
parser: Tune stringifyMapKeys
```bash
benchmark                                               old ns/op     new ns/op     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     3269          3053          -6.61%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        4.79          5.23          +9.19%
BenchmarkStringifyMapKeysIntegers-4                     2707          2320          -14.30%

benchmark                                               old allocs     new allocs     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     16             6              -62.50%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        0              0              +0.00%
BenchmarkStringifyMapKeysIntegers-4                     16             6              -62.50%

benchmark                                               old bytes     new bytes     delta
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4     1080          1008          -6.67%
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        0             0             +0.00%
BenchmarkStringifyMapKeysIntegers-4                     1080          1008          -6.67%
```
2018-02-12 19:14:02 +01:00
Bjørn Erik Pedersen
d4beef0d2b
parser: Rename stringifyYAMLMapKeys to stringifyMapKeys 2018-02-12 18:17:25 +01:00
Bjørn Erik Pedersen
51213e0be1
parser: Add benchmarks for stringifyYAMLMapKeys
```bash
BenchmarkStringifyMapKeysStringsOnlyInterfaceMaps-4       500000              3269 ns/op            1080 B/op         16 allocs/op
BenchmarkStringifyMapKeysStringsOnlyStringMaps-4        300000000                4.79 ns/op            0 B/op          0 allocs/op
BenchmarkStringifyMapKeysIntegers-4                       500000              2707 ns/op            1080 B/op         16 allocs/op
```
2018-02-12 18:16:48 +01:00
Vas Sudanagunta
1fa2417777 Add support for YAML array data files
* Unmarshaled YAML arrays indistinguishable from JSON arrays.
* Fixes #3890
2018-02-12 17:14:40 +01:00
Vas Sudanagunta
bb549a0d57 Account for array type data in data dir merge/override logic
* Fixes #4366

* Error message to console for unsupported data types
2018-02-12 17:14:40 +01:00
Vas Sudanagunta
82eefded13 hugolib: Refactor tests for JSON, YAML and TOML equivalency, add coverage
The same code now cycles through equivalent JSON, YAML and TOML data sets,
verifying output both proper and identical. Coverage increased by applying
previous tests for one format to the others.

More DRY. Added tests for numeric and bool value types.
2018-02-12 17:14:40 +01:00
Vas Sudanagunta
e172834993 hugolib: Re-enable YAML data tests disabled in f554503f
Also gave basic tests for JSON, YAML and TOML identical inputs and expected outputs, a step toward JSON, YAML and TOML equivalency (see https://github.com/gohugoio/hugo/issues/4393#issuecomment-364437785).
2018-02-12 17:14:40 +01:00
Bjørn Erik Pedersen
b5cb8866e9
Merge commit '9cc9bab462' 2018-02-10 12:52:31 +01:00
Bjørn Erik Pedersen
9cc9bab462 Squashed 'docs/' changes from 2fc775dec..f97826a17
f97826a17 Merge commit '12ecbf4a1b05c2794281f47909c836b1a005bc19'
12ecbf4a1 Squashed 'themes/gohugoioTheme/' changes from ecad8247..fe71e360
aaa7ac214 Ignore .DS_Store files
0e023ca12 Remove comments in showcase front matter
f3ba5ac87 Hartwell Insurance showcase
47aefdbda Remove unnecessary duplicated words
612693b4f Some minor language fixes
a833ba15b Spelling
5972e70a9 Revert "showcase: Even smaller file"
3479b975e showcase: Even smaller file
2272e0b83 showcase: Reduce image size
718c3c3e5 Spelling
0b954eccb showcase: Pace copy-edits
baded8064 showcase: Pace
842c1cedf Add a Showcase copyright notice
c5963edaa Update installing
4fa0b0d73 Add link to showcase template
d0f303916 Add some showcase guide content
c809789b1 Add srcset to the showcase screenshots
49d875904 Start of a template
1153de221 Clean resouerces
69f00df4c Remove the showcases
653ad5bcd Add a simple byline
c5342b5e5 Regenerate image after rebase
b80669b34 Bump version in config.toml
cd5c79c67 Fix an issue where whitespace wrap caused scrollbars on some browsers
f00547e98 Add section to the title element
aa10defed Iterating on Showcase (#330)
76a0bfbc3 Add some dummy content to some of the showcase pages
66f68964d Standardize showcase metadata
627ffa6d4 Adjust showcase image size on front page
cbc3efece Redo some showcase images
054b54cb6 Use .RelPermalink and not .URL
82ba5f1c6 Add resources
d1415795b Move showcase items in list view to a template in the layout
f34620e90 Tweak details box for mobile
df6a0bf24 Include images that changed from the column shift
02036581f Improve showcase single layout
5f7730c89 Improve styling of showcase prev/next buttons
a2b2f7731 Remove extra div that was breaking mobile layout of the showcase
b172fe5f4 Add block class to to images on mobile so they behave as expected
a4ebfec86 Add a proper RSS feed to home page
0524479e0 Move showcase images to proper Resources
0544b57df Convert showcase pages to bundles
8febaab2b Add Showcase to Home page and internal pages
26d1f4542 Fix baseURL in Netlify deploy previews
046497616 Revert "Try to fix the Netlify preview baseURL setup"
80dce17ca Revert "Add some temporary baseURL debug"
8617e8692 Add some temporary baseURL debug
371e56bce Try to fix the Netlify preview baseURL setup
1b70b3f18 Add Netlify CMS to Frontends list
d6184e71d Fix menu for "What is Hugo" page
1ae83ad3e Fix mobile menu display so it shows on mid-size displays
f60e1f750 Edited slight typo, added "of"
56b906667 Fix typo
c5bea5cbd Release 0.36
00539094e releaser: Prepare repository for 0.37-DEV
b222cbdf2 releaser: Add release notes to /docs for release of 0.36
e59d1d766 releaser: Bump versions for release of 0.36
9620aa002 docs: Add documentation for smart cropping etc.
91c3801f1 Merge commit 'c305e44f5f'
8e71ff60b releaser: Prepare repository for 0.36-DEV

git-subtree-dir: docs
git-subtree-split: f97826a17209fe3e153b7f5bbf69c511e4e13203
2018-02-10 12:51:31 +01:00
Bjørn Erik Pedersen
d382502d6d tpl/transform: Add template func for TOML/JSON/YAML docs examples conversion
Usage:

```html
{{ "title = \"Hello World\"" | transform.Remarshal "json" | safeHTML }}
```

Fixes #4389
2018-02-10 12:36:31 +01:00
Kaushal Modi
2e95ec6844 Add "target" and "rel" parameters to figure shortcode
Also:

- Remove unnecessary space from `figure` tag if no class is specified.
  - Update related tests.
- Add test cases for the changes made to the figure shortcode.
- Document the newly added target and rel parameters
- Add more detail to the documentation of all figure shortcode parameters.
2018-02-09 22:27:58 +01:00
Kaushal Modi
76d38d5e53 Use more canonical "twitter:image" property, not "twitter:image:src"
This change is made in the "twitter_cards" internal template.

References:

- https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary-card-with-large-image
- https://twittercommunity.com/t/twitter-image-src-or-twitter-image/16085/7
2018-02-09 20:27:09 +01:00
Bjørn Erik Pedersen
f554503fef
hugolib: Temp. disable some YAML data tests
They fail.

We will have to think about this.

See #4393
2018-02-09 12:32:45 +01:00
Dawid Gaweł
16a5c74519 parser: Fix YAML maps key type
Recurse through result of yaml package parsing and change all
maps from map[interface{}]interface{} to map[string]interface{}
making them jsonable and sortable.

Fixes #2441, #4083
2018-02-09 10:27:17 +01:00
Bjørn Erik Pedersen
49b98975be
releaser: Update to Go 1.9.4 2018-02-08 19:25:02 +01:00
Bjørn Erik Pedersen
0de375a7e7
Bump Travis/Snapcraft to Go 1.9.4 2018-02-07 21:45:53 +01:00
hugoreleaser
e02ee7d6ad releaser: Prepare repository for 0.37-DEV
[ci skip]
2018-02-05 15:24:52 +00:00
hugoreleaser
18e3657a2a releaser: Add release notes to /docs for release of 0.36
[ci skip]
2018-02-05 15:22:26 +00:00
hugoreleaser
4bc8727fc6 releaser: Bump versions for release of 0.36
[ci skip]
2018-02-05 15:22:26 +00:00
Bjørn Erik Pedersen
a9a0190b13
Release 0.336 2018-02-05 16:16:46 +01:00
hugoreleaser
742deaa3d0 releaser: Add release notes draft for 0.36
Rename to *-ready.md to continue. [ci skip]
2018-02-05 14:56:39 +00:00
Bjørn Erik Pedersen
694c0fd763
docs: Add documentation for smart cropping etc. 2018-02-05 15:04:07 +01:00
Bjørn Erik Pedersen
15ff076572
Merge commit 'c305e44f5f' 2018-02-05 14:24:24 +01:00
Bjørn Erik Pedersen
c305e44f5f Squashed 'docs/' changes from dce236ad1..2fc775dec
2fc775dec Fix allLanguages code
dc6bfbedb Fix header level
6d652458c Fixed typo in docs.
2da6518be Fix broken build in previous commit
eabe7a40b Move some release notes to bundles to test the resource setup
34f2a41f2 Add featured image to news articles
bba1104b8 Update index.md
62bb8d826 Bundless > bundles
afea67773 Release notes spelling
f66d13af2 Release Hugo 0.35
613c50cdd releaser: Add release notes to /docs for release of 0.35
c9f7fd637 releaser: Bump versions for release of 0.35
360296c34 docs: Regenerate CLI docs
0d688633f Merge commit '337d0c5f51'
8fc9e325b command: Remove undraft command
f8cc6d51f docs: Re-generate CLI docs
556ea887a releaser: Prepare repository for 0.35-DEV

git-subtree-dir: docs
git-subtree-split: 2fc775dece2c5a76aaa3855b6dd054fd74c8738d
2018-02-05 14:24:00 +01:00
Bjørn Erik Pedersen
722086b4ed
resource: Add smart cropping
This commit `smart` as a new and default anchor in `Fill`.

So:

```html
{{ $image.Fill "200x200" }}
```

Is, with default configuration, the same as:

```html
{{ $image.Fill "200x200" "smart" }}
```

You can change this default in your `config.toml`:

```toml
[imaging]
[imaging]
resampleFilter = "box"

quality = 68

anchor = "Smart"
```

Fixes #4375
2018-02-05 13:59:15 +01:00
Cameron Moore
084cf4191b tpl: Ensure site templates can override theme templates
The tplimpl package was misusing the TemplateLookupDescriptor.WorkingDir
field from the output package. By incorrectly setting it to the theme
directory instead of the site root, the user is unable to override theme
templates in some situations.

Fixes #3505
2018-02-05 08:38:04 +01:00
Cameron Moore
fc06d5c18b hugolib: Add additional test to TestTemplateLookupOrder
Add an additional test to "Variant 4, theme, use site base" to also test
for the index.html base (from by testing of #3505).  Also add a "name"
field to the test cases to make it easier to know which test is failing
versus just getting a slice index.
2018-02-05 08:38:04 +01:00
Cameron Moore
9a367d9d06 hugolib: Fix broken TestTemplateLookupOrder
It looks like we left some debugging code in place that caused all but
one test case to run.
2018-02-05 08:38:04 +01:00
Vas Sudanagunta
4402c07775 Fix JSON array-based data file handling regression
This bug was introduced in Hugo 0.35.

Fixes #4361
2018-02-02 09:14:37 +01:00
Vas Sudanagunta
4743de0d3c Increase data directory test coverage
*  Adds retro-coverage for #4361
*  Verifies open issues #4138, #3890, #4366, 4083
*  Removes test reliance on the very code it is testing (hugo/parser package).
   Expected results are now all built manually / are more precise.
   Tests can run against different versions (no linkage errs)
2018-02-02 09:14:37 +01:00
hugoreleaser
19e26cb4eb releaser: Prepare repository for 0.36-DEV
[ci skip]
2018-01-31 10:47:09 +00:00
hugoreleaser
0283db6c60 releaser: Add release notes to /docs for release of 0.35
[ci skip]
2018-01-31 10:44:41 +00:00
hugoreleaser
58188807aa releaser: Bump versions for release of 0.35
[ci skip]
2018-01-31 10:44:41 +00:00
Bjørn Erik Pedersen
51d5c5421e
Release 0.35 2018-01-31 11:41:19 +01:00
Bjørn Erik Pedersen
a9a5b1e094
docs: Regenerate CLI docs 2018-01-31 11:40:30 +01:00
hugoreleaser
cf5c2df81c
releaser: Add release notes draft for 0.35
Rename to *-ready.md to continue. [ci skip]
2018-01-31 11:40:03 +01:00
Bjørn Erik Pedersen
158e1151cd
Merge commit '337d0c5f51' 2018-01-31 11:08:08 +01:00
Bjørn Erik Pedersen
337d0c5f51 Squashed 'docs/' changes from 56c34962c..dce236ad1
dce236ad1 Wrap up the bundle etc. edits for now
27d058566 Add the bundle tree to the organization bundle
a83f750dd Move organization.md to its own bundle
01ec4f462 Make the image docs a bundle
60de1e090 Some more resources copy-edits
05d763c0c Some resource copy-edits
6299d6dbb Update the imgproc shortcode
59e0fc209 Add headless bundle documentation
a3bbf60bf Link Page Resources page from Front Matter page
830576f86 Update order significance section, add counter section
3b1836509 Revert the recent change made to default list template
886ed0e10 Page Bundles draft rev 2
f530d1a7a image processing and page resources made into regular .md
ec47cecda Finalised Page Resources and Image Processing Moved Page Resources and Impage Processing out of the Bundle section and at the root of the Content Management section
253092335 Modified front matter metadata exemple. Added yaml version.
da5e4f476 Adding date in the front-matter; missed in previous commit
6bc3ced13 Add rough draft for page and section bundles
a0e44458f Image processing first draft, Resources second read/fix
2367f0b78 data: Remove duplicate layouts in table
c2f179839 First draft of bundles/resources (covers resources and metadata)
2a3f9a613 Add weights to pages in Bundles branch
9a0146cc0 Switch front-matter format of Bundles doc to yaml; add front-matter
1295fc083 First draft for Bundles documentation organization structure
5a2e52231 Fix archetype paths
9c2e5c063 Merge commit '22cced34fc608256f8271ad591a5ccca991bb164'
22cced34f Squashed 'themes/gohugoioTheme/' changes from 75da2f6b..ecad8247
55d16c9a1 Fix broken sentence in multilingual sections
a76895ad2 Replace the outdated Emacs package with new one
e6cf1dec0 Remove obsolete link to hugo roadmap
dd2fd145b Add GitLab Pages to mentioned hosters (#309)
a05ce6bf6 Add 0.34 release notes poster
5c0ebdfca Release 0.34
13c2f3dc8 Merge branch 'temp34'
e6b5ffa04 Add 0.34 poster
1e1960496 releaser: Add release notes to /docs for release of 0.34
ac3efe182 releaser: Bump versions for release of 0.34
8f91f62d8 Fixes #222
cca35dbe4 Fix example
eaaa21ca1 Add missing params key
00d0b0363 Adding new Blogger utility to tools/migrations
7d36d579e Updated the line number for Dockerfile pointer
852188f85 Update installing.md with Fedora instructions
4d151a3ab Update search.md
4c2750bfb Update deployment-with-nanobox.md
c3cc9cd49 configuration: Remove defaultExtension from docs
f7c96b4b5 Update GitHub Pages documentation
55787f09a Merge branch 'rmetzler-menu-link-title'
2abbd9bd9 Merge branch 'master' into menu-link-title
e1fd710b7 Bring archetypes in from theme.
daf6f51c0 Mention the significance of leading 0 in int fn string input
07f498755 Add documentation for `cond` function.
050ccd12b Add documentation for the .HasShortcode function
919af9071 Correct anchor under 'Add custom metadata to a Taxonomy Term'
55600b4ff More layouts work
201cf4f67 Add some more single page layout variants
d5e7c03e2 Rework the layouts doc
84622e67c Cleans up the code sample
c231c9bd5 Add a new note to 0.33 relnotes
328ec9930 Release 0.33
b108fcc7b Merge branch 'temp33' into next
ab9d9ee65 releaser: Prepare repository for 0.34-DEV
e20c75320 releaser: Add release notes to /docs for release of 0.33
49f24dcd1 releaser: Bump versions for release of 0.33
9c8e5e207 Update 0.33 poster
7655603c8 Regenerate the docshelper data
16dc99583 Add Hugo 0.33 poster
ce40cc197 Merge commit '3cf4300097'
9a3085523 releaser: Prepare repository for 0.33-DEV
a52db97d8 fixing typos and syntax for consistency
64525670f ádd title to some menu entries. This needs hugo >= v0.32
85d415ab2 ádd examples for menu .Title and .Page

git-subtree-dir: docs
git-subtree-split: dce236ad1258a9d9a0ee209f02b2e1f65b46f0fb
2018-01-31 11:07:47 +01:00
Anthony Fok
f0c0ece44d Add "removable-media" interface to snapcraft.yaml
Closes #3837
2018-01-31 02:00:16 -07:00
Ryan Skoblenick
a34213f0b5 Fix Docker build
The present Dockerfile in master does not build a Hugo container. The
build container prematurely exits because `dep ensure` can not locate
`Gopkg.toml` due to the source files not being copied/added to the
container prior to running this command. The minimal change require
to resolve the issue is merely move the ADD source before the RUN dep.

Fixes #4076
Resolves #4077
2018-01-31 09:16:28 +01:00
Bjørn Erik Pedersen
fe40823de0
readme: Update list of "builders" to include myself 2018-01-30 19:56:29 +01:00
Bjørn Erik Pedersen
ae742cb1bd Fix language params handling
This fixes some issues with language params handling by separating params from configuration values per language.

This means that you can now do this:

```toml
[languages]
[languages.en]
languageName = "English"
weight = 1
title = "My Cool Site"
[languages.en.params]
myParam = "Hi!"
```

This is not a breaking change, but the above is a less suprising way of configuring custom params.

It also fixes some hard-to-debug corner-cases in multilingual sites.

Fixes #4356
Fixes #4352
2018-01-30 18:53:07 +01:00
Bjørn Erik Pedersen
feeed073c3
commands: Remove some now superflous Fast Render Mode code
Updates #4339
2018-01-30 10:49:24 +01:00
Bjørn Erik Pedersen
94e736c5e1
hugolib: Extract the Fast Render Mode logic into a method
This also improves on the previous commit as it takes pages without content files into account.

Closes #4339
2018-01-30 10:49:24 +01:00
Alexey Grachov
1707dae8d3
hugolib: Handle newly created files in Fast Render Mode
Updates #4339
2018-01-30 10:49:24 +01:00
Robert Basic
2fa70c9344 command: Remove undraft command
According to @bep, it is easier to undraft content by
editing manually the frontmatter of said content by
setting the draft flag to `false`, or removing it completely,
than to rely on the undraft command which is a source of
many bugs.

Fixes #4353
2018-01-29 16:56:35 +01:00
Bjørn Erik Pedersen
b6f3f087aa
commands: Mark deprecated flags in the CLI help
See #4347
2018-01-29 14:07:46 +01:00
Bjørn Erik Pedersen
adfd4370b6
hugolib: Deprecate useModTimeAsFallback
Fixes #4351
2018-01-29 13:52:04 +01:00
Bjørn Erik Pedersen
25d691daff
tpl: Update Twitter card to also consider images in .Resources
The new lookup order:

1) Page.Params.images if set
2) Image resources: images with name "feature" (priority), "cover", "thumbnail"
3) Site.Params.images if set

Fixes #4349
2018-01-29 11:44:41 +01:00
Bjørn Erik Pedersen
df20b05463
resource: Make resource counters for name and title independent
This is the most flexible with the current syntax, and probably what most people would expcect.

Updates #4335
2018-01-29 10:44:09 +01:00
Bjørn Erik Pedersen
863a812e07
create: Provide .Name to the archetype templates
This value will have a better suited value to base the titles on in your archetype templates when creating bundle ´index.md` type of files.

The internal template is updates, but you will have to update any custom archetype template to use the new `.Name` variable:

```bash
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
```

Fixes #4348
2018-01-28 19:41:55 +01:00
Bjørn Erik Pedersen
f08ea02d24
commands: Deprecate CLI flags canonifyURLs, pluralizeListTitles, preserveTaxonomyNames, uglyURLs
You can of course still set them in site config.

Fixes #4347
2018-01-28 17:22:08 +01:00
Bjørn Erik Pedersen
016398ffe2
hugolib: Fix --uglyURLs from comand line regression
This bug was introduced in Hugo 0.33.

Fixes #4343
2018-01-28 17:03:10 +01:00
Colin Seymour
3752348ef1 Only set 'url' if permalink in metadata and remove duplicate confirm msg
The current behaviour addes a `url` attribute to the frontmatter of all posts imported from Jeklly and assumes the desired permalink structure is /:year/:month/:day/:title/. This may be the case for most peeps, but poses a problem for those that don't use this permalink structure as the `url` attribute takes precedence over the `permalink` attribute in the site-wide configuration meaning it can't be overruled.

This changes the behaviour to only set the `url` attribute if the `permalink` attribute is set in the Jekyll frontmatter.

The duplication of the confirmation message is also removed.

Tests have been updated to reflect this change in behaviour.

Fixes #1887
2018-01-28 11:24:31 +01:00
Bjørn Erik Pedersen
4eb2fec67c Fix handling of top-level page bundles
Fixes #4332
2018-01-27 19:13:34 +01:00
liguoqinjim
83c761b71a tpl/collections: Seed random on init only 2018-01-27 18:51:12 +01:00
Bjørn Erik Pedersen
ed4a00e46f
commands: Fix baseURL server regression for multilingual sites
This was introduced in 6413559f75 a couple of days ago, and demonstrates that we really need better tests for the server/commands package.

Fixes #4333
2018-01-27 10:58:30 +01:00
Bjørn Erik Pedersen
7b472e4608
resource: Start Resources :counter first time they're used
This is less surprising and more flexible than the original implementation.

Given:

```toml
[[resources]]
  src = "documents/photo_specs.pdf"
  title = "Photo Specifications"
[[resources]]
  src = "**.pdf"
  name = "pdf-file-:counter"
```

Every `pdf` in the bundle will have an unique counter, but the `photo_specs.pdf` is still allowed to have its specific `title`.

If you change the above example to:

```toml
[[resources]]
  src = "documents/*specs.pdf"
  title = "Photo Specifications #:conter"
[[resources]]
  src = "**.pdf"
  name = "pdf-file-:counter"
```

We are talking about two different groups of documents, each with its own counters starting at 1.

Fixes #4335
2018-01-27 10:22:42 +01:00
Bjørn Erik Pedersen
96e3fbcf23
travis: Re-enable macOS builds 2018-01-26 17:08:32 +01:00
Bjørn Erik Pedersen
a91aba1c15
Update to Go 1.9.3
Fixes #4328
2018-01-26 17:07:08 +01:00
Bjørn Erik Pedersen
6413559f75 Add a way to disable one or more languages
This commit adds a new config setting:

```toml
disableLanguages = ["fr"]
```

If this is a multilingual site:

* No site for the French language will be created
* French content pages will be ignored/not read
* The French language configuration (menus etc.) will also be ignored

This makes it possible to start translating new languages and turn it on when you're happy etc.

Fixes #4297
Fixed #4329
2018-01-26 14:04:14 +01:00
Vas Sudanagunta
322c567220 Fix "date" page param
Add test coverage for all date type page params that shadow date type page variables.

Fixes #4323
2018-01-26 09:17:27 +01:00
Vas Sudanagunta
91bb774ae4 Support pages without front matter
* Page without front matter now treated same as a page with empty front matter.
* Test cases added to cover this and repro issue #4320.
* Type safety of front matter code improved.

Fixes #4320
2018-01-26 09:17:27 +01:00
Vas Sudanagunta
3f0379adb7 Add page metadata dates tests 2018-01-26 09:17:27 +01:00
Bjørn Erik Pedersen
ae5a45be6f
hugolib: Remove unused code 2018-01-25 17:14:03 +01:00
Bjørn Erik Pedersen
4d912e2aad
hugolib, output: Fix robots.txt in multihost mode
Fixes #4193
2018-01-25 10:36:53 +01:00
Bjørn Erik Pedersen
1e27d05891
docs: Re-generate CLI docs 2018-01-25 10:24:59 +01:00
Bjørn Erik Pedersen
d418c2c2ea
Remove and update deprecation status 2018-01-25 10:22:11 +01:00
Bjørn Erik Pedersen
b2fcbb1f97
output: Remove duplicate layout lookup layouts
This can happen for sections if Type and Section are equal.

Of no real practical difference, but it makes the docs less confusing.

Fixes #4319
2018-01-25 09:37:05 +01:00
Bjørn Erik Pedersen
3446fe9b89
hugolib: Add the last lookup variant for the GetPage index
Now, even for nun-bundles it is possible to do lookup without path or extension.

So, given `blog/my-blog-post.en.md` these lookups will succeed:

* `blog/my-blog-post.en.md`
* `blog/my-blog-post`
* `my-blog-post.en.md`
* `my-blog-post`

See #4312
See https://github.com/gohugoio/hugoDocs/issues/307
2018-01-24 13:36:06 +01:00
Bjørn Erik Pedersen
4a7c2b3695
github: Shorten the stale setup 2018-01-24 13:10:44 +01:00
Alexey Grachov
912147ab89 resource: Fix typo in comment 2018-01-24 10:24:21 +01:00
Bjørn Erik Pedersen
517b6b6238 hugolib: Simplify bundle lookup via .Site.GetPage, ref, relref
Given a bundle in `blog/my-bundle/index.en.md` all of these will now worK:

* `blog/my-bundle/index.en.md`
* `blog/my-bundle/index`
* `blog/my-bundle`
* `my-bundle`

The last one is potentially ambigous.

Fixes #4312
2018-01-24 10:05:20 +01:00
Bjørn Erik Pedersen
a19563910e
Add a GetPage to the site benchmarks 2018-01-24 09:08:26 +01:00
Bjørn Erik Pedersen
0432c64dd2 Add headless bundle support
This commit adds  support for `headless bundles` for the `index` bundle type.

So:

```toml
headless = true
```

In front matter means that

* 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 ...`

The use cases are many:

* Shared media galleries
* Reusable page content "snippets"
* ...

Fixes #4311
2018-01-24 09:00:21 +01:00
Bjørn Erik Pedersen
5a0819b9b5 Merge matching resources params maps
This allows setting default params values in the more general resource matchers. I also allows override with more specific values if needed.

```toml
[[resources]]
src = "documents/photo_specs.pdf"
title = "Photo Specifications"
[resources.params]
ref = 90564687
icon = "photo"
[[resources]]
src = "documents/guide.pdf"
title = "Instruction Guide"
[resources.params]
ref = 90564568
[[resources]]
src = "documents/checklist.pdf"
title = "Document Checklist"
[resources.params]
ref = 90564572
[[resources]]
src = "documents/payment.docx"
title = "Proof of Payment"
[[resources]]
src = "documents/*.pdf"
title = "PDF file"
[resources.params]
icon = "pdf"
[[resources]]
src = "documents/*.docx"
title = "Word document"
[resources.params]
icon = "word"

```

In the above `TOML` example, `photo_specs.pdf` will get the `photo` icon, the other pdf files will get the default `pdf` icon.

Note that in the example above, the order matters: It will take the first value for a given params key, title or name that it finds.

Fixes #4315
2018-01-23 17:11:38 +01:00
Bjørn Erik Pedersen
78c863305f
Add some general code contribution criterias 2018-01-23 13:33:51 +01:00
Bjørn Erik Pedersen
22ad1ebdbb
travis: Disable macOS builds for now
Travis have not been able to build those the last week or so.
2018-01-23 12:59:40 +01:00
Bjørn Erik Pedersen
ebdd8cba3f
helpers: Avoid unescape in highlight
Fixes #4219
2018-01-23 09:48:04 +01:00
Vas Sudanagunta
8125b4b03d Tighten page kind logic, introduce tests 2018-01-22 13:55:08 +01:00
hugoreleaser
87217d1d0a releaser: Prepare repository for 0.35-DEV
[ci skip]
2018-01-22 12:08:54 +00:00
hugoreleaser
ffd7dc396e releaser: Add release notes to /docs for release of 0.34
[ci skip]
2018-01-22 12:06:38 +00:00
hugoreleaser
2228d3e289 releaser: Bump versions for release of 0.34
[ci skip]
2018-01-22 12:06:38 +00:00
Bjørn Erik Pedersen
5903a9ce10
Release 0.34 2018-01-22 13:02:01 +01:00
hugoreleaser
4d644c9d68 releaser: Add release notes draft for 0.34
Rename to *-ready.md to continue. [ci skip]
2018-01-22 10:40:52 +00:00
Bjørn Erik Pedersen
34a216fe67
resource: Avoid some strings.ToLower in globbing
See #4301
2018-01-22 11:29:33 +01:00
Bjørn Erik Pedersen
adee04f4b4
releaser: Fix BuildDate in release binaries
Fixes #4299
2018-01-22 11:21:58 +01:00
Bjørn Erik Pedersen
9421380168
resource: Add Match and GetMatch
These methods takes a glob pattern as argument:

* by default matching from the bundle root
* matching is case insensitive and the separator is Unix style slashes: "/"
* the bundle root does (by default) not start with a leading slash
* if you renames the `Name` for the rsource in front matter (`src=...`), then that is the value used in `Match`.
* double asterisk matches beyond directory borders, so "**.jpg" will match any JPEG image in the bundle

See https://github.com/gobwas/glob

This commit also deprecates `ByPrefix` and `GetByPrefix`.

This should also be more effective, given a fair amount of reuse of the glob patterns:

```bash
BenchmarkResourcesByPrefix-4         300000          4284 ns/op        1130 B/op           7 allocs/op
BenchmarkResourcesMatch-4            300000          5220 ns/op         505 B/op           3 allocs/op
```

Fixes #4301
2018-01-22 10:28:12 +01:00
Bjørn Erik Pedersen
5d03086981 hugolib: Fix handling of pages bundled in sub-folders in ByPrefix etc.
Fixes #4295
2018-01-21 14:42:54 +01:00
Bjørn Erik Pedersen
07700aab0d
output: Add some more layout docshelper variants 2018-01-19 11:39:34 +01:00
Bjørn Erik Pedersen
4d5e4f379a
hugolib: Add validation for defaultContentLanguage
When `languages` are defined, then `defaultContentLanguage` must match one of those.

Fixes #4298
2018-01-19 08:24:10 +01:00
hugoreleaser
cd77968284 releaser: Prepare repository for 0.34-DEV
[ci skip]
2018-01-18 10:16:12 +00:00
hugoreleaser
c7b9347be0 releaser: Add release notes to /docs for release of 0.33
[ci skip]
2018-01-18 10:13:30 +00:00
hugoreleaser
c6b9037294 releaser: Bump versions for release of 0.33
[ci skip]
2018-01-18 10:13:30 +00:00
Bjørn Erik Pedersen
09a934b321
Release 0.33 2018-01-18 11:09:11 +01:00
hugoreleaser
e6cc2a6551 releaser: Add release notes draft for 0.33
Rename to *-ready.md to continue. [ci skip]
2018-01-18 09:24:11 +00:00
Bjørn Erik Pedersen
a39ae4bb07
output: Redo the docshelper layouts examples 2018-01-18 10:16:21 +01:00
Bjørn Erik Pedersen
b3eeb97642
Merge commit '3cf4300097' 2018-01-17 22:33:07 +01:00
Bjørn Erik Pedersen
3cf4300097 Squashed 'docs/' changes from ddb7d8fae..56c34962c
56c34962c Fix multilingual config examples
14fa0b4ed Release 0.32.4
18779d54a releaser: Add release notes to /docs for release of 0.32.4
0d47d0673 releaser: Bump versions for release of 0.32.4
424acf02e Release 0.32.3
f6f04e084 releaser: Prepare repository for 0.33-DEV
1a9b36286 releaser: Add release notes to /docs for release of 0.32.3
9284c3284 releaser: Bump versions for release of 0.32.3
796082289 Fix min Go version in installing
74625a654 Add alias to multilingual.md
bf65732b4 Add some new tweets to the front page
7f263353e Bump Netlify to 0.32.2
cbb3a4f1c Update 0.32.2 release notes
e90ae4b4e releaser: Prepare repository for 0.33-DEV
ee74a8f4f releaser: Add release notes to /docs for release of 0.32.2
d889c4fa4 releaser: Bump versions for release of 0.32.2
4a46d3aca Merge commit 'eb738cd35c'
b98d95ff2 releaser: Prepare repository for 0.33-DEV

git-subtree-dir: docs
git-subtree-split: 56c34962c92706792231fd5056d33186b11c4e33
2018-01-17 22:31:25 +01:00
Bjørn Erik Pedersen
9409bc0f79 Improve .Site.GetPage for regular translated pages
You can still use the full path with extensions, but to get the current language version:

* If the content file lives in `/content/blog/mypost.en.md`
* Use `.Site.GetPage "page" "blog/mypost"`

Fixes #4285
2018-01-17 22:27:25 +01:00
Bjørn Erik Pedersen
4eb1650bec
resource: Use path.Match instead of filepath.Match
They behave similar, but it is a path we're matching.

See #4244
2018-01-17 20:48:31 +01:00
Bjørn Erik Pedersen
20c9b6ec81
resource: Add front matter metadata to Resource
This commit expands the Resource interface with 3 new methods:

* Name
* Title
* Params

All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods.

Fixes #4244
2018-01-17 16:22:33 +01:00
Bjørn Erik Pedersen
f8a119b606
Update Afero to avoid panic on "file name is too long"
Fixes #4240
2018-01-15 20:33:03 +01:00
Bjørn Erik Pedersen
ecaf14514e
resource: Fix handling of very long image file names
Fixes #4261
2018-01-15 20:22:14 +01:00
Bjørn Erik Pedersen
d4f8f88e67
commands: And now really fix the server watch logic
See #4275
2018-01-15 10:02:17 +01:00
Bjørn Erik Pedersen
4e524ffcff
commands: Fix server without watch
This was broken in Hugo 0.30.

Fixes #4275
2018-01-14 20:58:52 +01:00
Bjørn Erik Pedersen
64f0e9d1c1
Update Chroma and other third-party deps
Fixes #4267
2018-01-14 20:32:42 +01:00
Bjørn Erik Pedersen
13d53b31f1
commands: Remove superflous BuildDate logic
Fixes #4272
2018-01-14 20:08:28 +01:00
Bjørn Erik Pedersen
51dd462c39 layout: Respect Type and Layout for list template selection
This commit also has some other nice side-effects:

* The layout logic is unified for all page types, which should make it less surprising
* Page.Render now supports all types
* The legacy "indexes" type is removed from the template lookup order. This is an undocumented type from early Hugo days. This means that having a template in, say, `/layouts/indexes/list.html` will no longer work.
* The theme override logic is improved. As an example, an `index.html` in theme will now wn over a `_default/list.html` in the project, which most will expect.

Fixes #3005
Fixes #3245
2018-01-14 19:59:51 +01:00
Bjørn Erik Pedersen
b6ea6d07d0
Run benchmarks 3 times 2018-01-14 00:49:01 +01:00
Bjørn Erik Pedersen
4dac1781e3
resource: Add some GoDoc 2018-01-13 00:08:21 +01:00
Bjørn Erik Pedersen
8a409894bd hugolib: Allow url in front matter for list type pages
This enables some potential foot-shooting, but is needed for some special URL requirements.

Fixes #4263
2018-01-12 18:10:40 +01:00
Bjørn Erik Pedersen
46db900dab
resource: Implement Resources.ByPrefix
Fixes #4266
2018-01-12 18:06:35 +01:00
Bjørn Erik Pedersen
60c9f3b1c3
resource: Make GetByPrefix work for Page resources
Fixes #4264
2018-01-12 17:46:50 +01:00
Bjørn Erik Pedersen
57e10f174e Support uglyURLs per section
Fixes #4256
2018-01-12 10:39:09 +01:00
Bjørn Erik Pedersen
db85e83403
resource: Make .Resources.GetByPrefix case insensitive
Fixes #4258
2018-01-11 18:58:53 +01:00
Vas Sudanagunta
1046e9363f Update CONTRIBUTING.md 2018-01-11 17:22:12 +01:00
Vas Sudanagunta
d5803da1be Support offline builds 2018-01-11 17:22:12 +01:00
hugoreleaser
27c77e1ab9 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-11 09:00:51 +00:00
hugoreleaser
218773a82b releaser: Add release notes to /docs for release of 0.32.4
[ci skip]
2018-01-11 08:58:01 +00:00
hugoreleaser
a97ef61bad releaser: Bump versions for release of 0.32.4
[ci skip]
2018-01-11 08:58:01 +00:00
Bjørn Erik Pedersen
4aaf27dc55
Release 0.32.4 2018-01-11 09:52:32 +01:00
hugoreleaser
f7d0b05f93 releaser: Add release notes draft for 0.32.4
Rename to *-ready.md to continue. [ci skip]
2018-01-11 08:48:10 +00:00
Bjørn Erik Pedersen
f82428d2e0
releaser: Git info bounds checking 2018-01-11 09:39:42 +01:00
Bjørn Erik Pedersen
50fb49c3d9
resource: Remove superflous comment 2018-01-11 09:17:48 +01:00
Alexander Borsuk
5235a5bf5e Correct fix for --cleanDestinationDir flag
Fixes #4246
Fixes #4248
2018-01-10 18:26:42 +01:00
Alexander Borsuk
1921a70ab1 Revert "Remove the --cleanDestinationDir flag", there is a better fix.
This reverts commit 768ec5df9f.
2018-01-10 18:26:42 +01:00
Bjørn Erik Pedersen
f0eecc6a4f Fix non-ASCII path handling for Page resources
Fixes #4241
2018-01-10 18:23:41 +01:00
Bjørn Erik Pedersen
768ec5df9f
Remove the --cleanDestinationDir flag
This is no longer supported. Since Hugo 0.32 we do static sync and build in parallel.

Closes #4246
2018-01-10 09:34:40 +01:00
hugoreleaser
238e7f7fbe releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-08 11:12:41 +00:00
hugoreleaser
0aaa38544d releaser: Add release notes to /docs for release of 0.32.3
[ci skip]
2018-01-08 11:10:08 +00:00
hugoreleaser
fdec5e3084 releaser: Bump versions for release of 0.32.3
[ci skip]
2018-01-08 11:10:08 +00:00
Bjørn Erik Pedersen
71abb53fff
Release 0.32.2 2018-01-08 12:05:52 +01:00
hugoreleaser
db5d79862b releaser: Add release notes draft for 0.32.3
Rename to *-ready.md to continue. [ci skip]
2018-01-08 10:57:07 +00:00
Bjørn Erik Pedersen
2d3189b227 hugolib: Fix handling of mixed-case taxonomy folders with content file
* We match by path vs taxonomy to determine if we have a content page for that taxonomy
* The taxonomy name is (if `preserveTaxonomyNames` is not set) normalized to `maxmustermann` while you have the disk folder called `MaxMustermann`.
* This isn't a new issue, but I suspect most people will just name the folder `authors/maxmustermann` and it will just work.
* The inconsistent behaviour you see here is that you will end up with two pages with the same target filename, so it is a little random who will win.

This fixes that by also normalizing the taxonomy path when doing the comparison.

Fixes #4238
2018-01-08 11:47:26 +01:00
Bjørn Erik Pedersen
4b04db0f08 resource: Avoid processing and storing same image for each language
Fixes #4231
2018-01-07 11:58:16 +01:00
Bjørn Erik Pedersen
97c1866e32
resource: Resources.ByType should return Resources
Currently it returns []Resource.

This way the invocations can be nested.

Fixes #4234
2018-01-07 10:53:45 +01:00
Bjørn Erik Pedersen
8969331f5b Fix multihost detection for sites without language definition
Static content was wrongly put into the lang-code subfolder.

Fixes #4221
2018-01-06 19:14:31 +01:00
Bjørn Erik Pedersen
6feb138785
commands: Report build time on config.toml change
Fixes #4232
See #4224
2018-01-06 10:54:16 +01:00
Bjørn Erik Pedersen
059e8458d6
Fix hugo benchmark --renderToMemory
Fixes #4218
2018-01-06 10:37:04 +01:00
Bjørn Erik Pedersen
ab82a27d05 Fix URLs for bundle resources in multihost mode
Fixes #4217
2018-01-06 10:29:13 +01:00
Bjørn Erik Pedersen
f25d8a9e17 Fix sub-folder baseURL handling for Page resources
I.e. images etc.

Fixes #4228
2018-01-06 10:29:13 +01:00
hugoreleaser
54a89cde69 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-03 09:56:18 +00:00
hugoreleaser
2cd962233f releaser: Add release notes to /docs for release of 0.32.2
[ci skip]
2018-01-03 09:54:04 +00:00
hugoreleaser
865877cd05 releaser: Bump versions for release of 0.32.2
[ci skip]
2018-01-03 09:54:04 +00:00
Bjørn Erik Pedersen
1ff80a8bbe
Release 0.32.2 2018-01-03 10:50:57 +01:00
hugoreleaser
956ef40978 releaser: Add release notes draft for 0.32.2
Rename to *-ready.md to continue. [ci skip]
2018-01-03 09:49:11 +00:00
Bjørn Erik Pedersen
196da49c9d
resource: Handle publish to /public on fresh build
Fixes #4213
2018-01-03 10:28:16 +01:00
Bjørn Erik Pedersen
2aa4c009ee
Merge commit 'eb738cd35c' 2018-01-03 10:19:56 +01:00
Bjørn Erik Pedersen
eb738cd35c Squashed 'docs/' changes from fc61378a3..ddb7d8fae
ddb7d8fae Fix spelling in error message
84f7e09ff Add an "sharing image" to the 0.32 doc
a6d39884c Add image processing examples
717e25400 Release 0.32.1
07a4fc1c1 Merge branch 'temp321'
401ed894b releaser: Add release notes to /docs for release of 0.32.1
aa040d965 releaser: Bump versions for release of 0.32.1
6d22558ec Close shortcode
442afa7f5 Add a link to the 0.32 HOWTO with a searchable title
9a9a7e475 Add a note about the shortcode issue
76d731ce2 Add title etc. to release notes
eac596de8 Release v0.32
ede3e25dc Merge branch 'tmp32'
c92f1701b releaser: Prepare repository for 0.33-DEV
e498e97f9 releaser: Add release notes to /docs for release of 0.32
1d476fc59 Fix typo
9bac78a2f Merge commit 'f3cd083961'
7d8c78391 Add Pandoc support, refactor external helpers

git-subtree-dir: docs
git-subtree-split: ddb7d8fae07ee8813652d20829d606dd6637f0a9
2018-01-03 10:16:56 +01:00
hugoreleaser
3dd8c1c026 releaser: Prepare repository for 0.33-DEV
[ci skip]
2018-01-02 09:10:11 +00:00
hugoreleaser
fd301c3c05 releaser: Add release notes to /docs for release of 0.32.1
[ci skip]
2018-01-02 09:07:55 +00:00
hugoreleaser
54ef60b03a releaser: Bump versions for release of 0.32.1
[ci skip]
2018-01-02 09:07:55 +00:00
Bjørn Erik Pedersen
14a758ff24
Release Hugo 0.32.1 2018-01-02 10:04:51 +01:00
hugoreleaser
e64eb5ec2b releaser: Add release notes draft for 0.32.1
Rename to *-ready.md to continue. [ci skip]
2018-01-02 08:59:40 +00:00
Bjørn Erik Pedersen
d36d71edd3
commands: Fix broken hugo --renderToMemory
The `--renderToMemory` flag stopped working on `hugo` in 0.32.

Note that this is only useful for benchmark testing, as there is no easy way to actually view the result.

Fixes #4212
2018-01-02 09:40:58 +01:00
Bjørn Erik Pedersen
a54fd7df21
resource: Use the correct Destination FS
Source and destination will be the same when this happens, but it should be correct.

See #4202
2018-01-01 14:28:19 +01:00
Bjørn Erik Pedersen
16e1d99c6d
resource: Create target dir if not exists
This is the case where image processing is triggered from shortcodes, i.e. before the target page's folder in /public is created.

Fixes #4202
2018-01-01 14:23:51 +01:00
Bjørn Erik Pedersen
bf8a61fde5
hugolib: Add test for image processing from shortcodes
See #4202
2018-01-01 12:11:36 +01:00
hugoreleaser
72158ab2e8 releaser: Prepare repository for 0.33-DEV
[ci skip]
2017-12-31 09:26:48 +00:00
hugoreleaser
cb359a75c1 releaser: Add release notes to /docs for release of 0.32
[ci skip]
2017-12-31 09:24:45 +00:00
hugoreleaser
82db039436 releaser: Bump versions for release of 0.32
[ci skip]
2017-12-31 09:24:45 +00:00
Bjørn Erik Pedersen
2d2289c79b
Release v0.32 2017-12-31 10:17:39 +01:00
hugoreleaser
6894f121b7
releaser: Add release notes draft for 0.32
Rename to *-ready.md to continue. [ci skip]
2017-12-31 10:16:17 +01:00
Bjørn Erik Pedersen
245212a5b7
Merge commit 'f3cd083961' 2017-12-30 09:17:23 +01:00
Bjørn Erik Pedersen
f3cd083961 Squashed 'docs/' changes from 3e663efb2..fc61378a3
fc61378a3 Add Hugo 0.32 related docs
77edf7fd7 commands: Regenerate
af9d25458 Fix Blackfriday's Markdown extension name
1223dd63a Remove roadmap
b8bcb2fb8 Include note to allow hugo write permissions outside home dir
7dbccb936 Fix typo in roadmap
3a38da6f5 Fix spelling
94ebe50ff Merge branch 'master' of github.com:gohugoio/hugoDocs
89376e21d Clarify Hugo Roadmap
03d191fec Mention Reverse function in taxonomy tpl page.
a4ea3402d Fix ref and relref function pages.
b36632b31 Remove non-existing source variable
a638160dc Update Content Organization to match the world
47eb431ca Correct one link in templates/output-formats.md
8bf933629 Spell fix
ce2d48728 Add docs for .AllTranslations
de94b4942 Move sponsor data to theme data
41fe75254 Merge commit 'f463ef99ed2862e4042557e28aece7ca858e1d0a'
f463ef99e Squashed 'themes/gohugoioTheme/' changes from bc851da9..75da2f6b
532c65f2a Move sponsor logo to theme
899e2defe Add sponsor logos to home page and footer
3ca53db97 Release 0.31.1
bb9876ce2 Merge branch 'temp0311'
c7c3ee7e5 releaser: Prepare repository for 0.32-DEV
4ac554792 releaser: Add release notes to /docs for release of 0.31.1
52bfb5c15 releaser: Bump versions for release of 0.31.1
cfdc2e4ea Fix output formats example
5746c10c2 More on output format
de2ee0fe0 Improve suffix redefinition example
c9997839e Update gitlab CI submodule management
82d74e306 Add Bootstrap styling to breadcrumb example
c8c9601a8 Use the code shortcode for the breadcrumb example
16be43e7d Clean up formatting in variable definition lists
149c2c157 Add nested section docs
783c3d636 Sync theme
60a220bbd Squashed 'themes/gohugoioTheme/' changes from 6b632895..bc851da9
4b33a04d0 Fix typo
94cffc43c Fix little typo
a5d4f762f Fix typo
36c5a0b43 Add a note about the 2 in staticDir2
087bd9a9f Add KeyCDN to menu
4ac8aae38 Hugo 0.31 Released
8fdd995e7 releaser: Prepare repository for 0.32-DEV
eb0f38fbb releaser: Add release notes to /docs for release of 0.31
60efdfff7 releaser: Bump versions for release of 0.31
44dafb10b Merge commit '30c0d485ea'
e6b847b95 Merge commit '05e42bc643'
15d86a525 Handle Taxonomy permalinks
5c3c18d7f Add support for height argument to figure shortcode

git-subtree-dir: docs
git-subtree-split: fc61378a3227c14883a2942d67c806014e7bb6cb
2017-12-30 09:15:31 +01:00
Bjørn Erik Pedersen
407c24020e
hugolib: Add test for homepage content for all rendering engines
Update #4166
2017-12-29 10:16:50 +01:00
Bjørn Erik Pedersen
c067f34558
tpl/transform: Do not unescape input to highlight
Fixes #4179
2017-12-29 09:52:43 +01:00
Bjørn Erik Pedersen
72903be587
commands: Make sure all language homes are always re-rendered in fast render mode
Fixes #4125
2017-12-29 09:37:37 +01:00
Bjørn Erik Pedersen
1c114d539b
hugolib: Do not tolower result from Page.GetParam
We still do lowering of the param strings in some internal use of this, but the exported `GetParam` method is changed to a more sensible default.

This was used for the `disqus_title` etc. in the internal Disqus template, which was obviously not right.

If you really want to lowercase your params, do it with `.GetParam "myparam" | lower` or similar.

Fixes #4187
2017-12-29 08:58:38 +01:00
Bjørn Erik Pedersen
e141294619
resource: Avoid potential case issue in image names 2017-12-28 22:56:48 +01:00
Bjørn Erik Pedersen
612dcc1944
helpers: Avoid writing the last MD5 buff part twice 2017-12-28 22:52:27 +01:00
Bjørn Erik Pedersen
e50a8c7a14 resource: Use MD5 to identify image files
But only a set of byte chunks spread around in the image file to calculate the fingerprint, which is much faster than reading the whole file:

```bash
BenchmarkMD5FromFileFast/full=false-4         	  300000	      4356 ns/op	     240 B/op	       5 allocs/op
BenchmarkMD5FromFileFast/full=true-4          	   30000	     42899 ns/op	   32944 B/op	       5 allocs/op
```

Fixes #4186
2017-12-28 17:41:51 +01:00
Bjørn Erik Pedersen
7e76a6fd3b
source: Fix test on Windows 2017-12-28 13:54:23 +01:00
Bjørn Erik Pedersen
1b0780dbeb
source: Make sure .File.Dir() ends with a slash
Updates #4190
2017-12-28 11:32:02 +01:00
Bjørn Erik Pedersen
3cdf19e9b7
Implement Page bundling and image handling
This commit is not the smallest in Hugo's history.

Some hightlights include:

* Page bundles (for complete articles, keeping images and content together etc.).
* Bundled images can be processed in as many versions/sizes as you need with the three methods `Resize`, `Fill` and `Fit`.
* Processed images are cached inside `resources/_gen/images` (default) in your project.
* Symbolic links (both files and dirs) are now allowed anywhere inside /content
* A new table based build summary
* The "Total in nn ms" now reports the total including the handling of the files inside /static. So if it now reports more than you're used to, it is just **more real** and probably faster than before (see below).

A site building  benchmark run compared to `v0.31.1` shows that this should be slightly faster and use less memory:

```bash
▶ ./benchSite.sh "TOML,num_langs=.*,num_root_sections=5,num_pages=(500|1000),tags_per_page=5,shortcodes,render"

benchmark                                                                                                         old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      101785785     78067944      -23.30%
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     185481057     149159919     -19.58%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      103149918     85679409      -16.94%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     203515478     169208775     -16.86%

benchmark                                                                                                         old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      532464         391539         -26.47%
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     1056549        772702         -26.87%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      555974         406630         -26.86%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     1086545        789922         -27.30%

benchmark                                                                                                         old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      53243246      43598155      -18.12%
BenchmarkSiteBuilding/TOML,num_langs=1,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     105811617     86087116      -18.64%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=500,tags_per_page=5,shortcodes,render-4      54558852      44545097      -18.35%
BenchmarkSiteBuilding/TOML,num_langs=3,num_root_sections=5,num_pages=1000,tags_per_page=5,shortcodes,render-4     106903858     86978413      -18.64%
```

Fixes #3651
Closes #3158
Fixes #1014
Closes #2021
Fixes #1240
Updates #3757
2017-12-27 18:44:47 +01:00
Bjørn Erik Pedersen
02f2735f68
tpl/strings: Fix broken test 2017-12-17 18:06:55 +01:00
Victor Kropp
22cd89adc4 Make chomp return the type it receives
fixes #2187
2017-12-16 23:59:36 +01:00
Bjørn Erik Pedersen
db4b7a5c67 Reuse the BlackFriday instance when possible
This is in heavy use in rendering, so this makes a difference:

```bash
benchmark                                                                                    old ns/op     new ns/op     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     124551144     107743429     -13.49%

benchmark                                                                                    old allocs     new allocs     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     528684         435118         -17.70%

benchmark                                                                                    old bytes     new bytes     delta
BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4     53306848      45147832      -15.31%
```
2017-12-16 19:44:33 +01:00
Ivan Vyshnevskyi
2511498608 livereload: Fix host comparison when ports aren't present
Compare the original hosts from 'Origin' and 'Host' headers before
attempting to do a port-less comparison.  This helps in the case when
hugo server was started with a '--port=80' so both headers do not
contain a port.

Fixes #4141
2017-12-16 19:06:00 +01:00
Richard Metzler
9df3736fec Add .Title and .Page to MenuEntry
It uses `title` if configured on the menu entry. If not, it uses the `Page.Title` when possible.

Fixes #2784
2017-12-15 18:49:21 +01:00
Bjørn Erik Pedersen
243694102a Remove the goroutines from the shortcode lexer
It was clever, but storing the items in a slice is faster -- and it gives room to more goroutines in other places.

```bash
benchmark                     old ns/op     new ns/op     delta
BenchmarkShortcodeLexer-4     180173        79614         -55.81%

benchmark                     old allocs     new allocs     delta
BenchmarkShortcodeLexer-4     309            328            +6.15%

benchmark                     old bytes     new bytes     delta
BenchmarkShortcodeLexer-4     35456         47008         +32.58%
```
2017-12-07 23:08:25 +01:00
Bjørn Erik Pedersen
3153526161
mage: Do not run Go Fmt check on Go tip 2017-12-07 22:38:54 +01:00
Bjørn Erik Pedersen
fdbef2a81c
Adjust the stale setup 2017-12-06 14:03:04 +01:00
Bjørn Erik Pedersen
426ac9c18e
Add Github stale bot config 2017-12-06 10:03:25 +01:00
Bjørn Erik Pedersen
84805a68ca
Use StopTimer in site benchmarks 2017-12-05 16:17:11 +01:00
Bjørn Erik Pedersen
a2d81ce983
Add output formats definition to benchmarks 2017-12-02 12:05:12 +01:00
Bjørn Erik Pedersen
051fa343d0
Improve site benchmarks 2017-12-02 11:44:36 +01:00
Christian Nolte
23f69efb39 Fix context of opengraph video range
Fixes #4136
2017-12-01 20:59:11 +01:00
Brian Chen
e69da7a4cb Add Pandoc support, refactor external helpers
Recognize the Pandoc format under the file extension .pandoc or .pdc,
and shell out to pandoc as an external helper to format Pandoc content.

Refactor out repeated code with external helpers. Change the error
output formatting. I did not see any of the external helpers print the
string "<input>" to represent stdin as a file; just prepending the file
name to error output is more general and doesn't sacrifice that much in
terms of readability.

Closes #234
2017-11-30 12:15:52 +01:00
Bjørn Erik Pedersen
e7652180a1
vendor: Fix Humanize for multi-byte runes
Fixes #4133
2017-11-28 21:16:01 +01:00
Bjørn Erik Pedersen
7989210120
vendor: Update Chroma to v0.2.0
Closes #4087
2017-11-27 17:16:42 +01:00
Chase Adams
7f2ae3ef39 vendor: update goorgeous@v1.1.0 2017-11-27 17:12:22 +01:00
hugoreleaser
8a8ba63c7e releaser: Prepare repository for 0.32-DEV
[ci skip]
2017-11-27 11:27:33 +00:00
hugoreleaser
c1c04d74a0 releaser: Add release notes to /docs for release of 0.31.1
[ci skip]
2017-11-27 11:26:08 +00:00
hugoreleaser
aa68205d16 releaser: Bump versions for release of 0.31.1
[ci skip]
2017-11-27 11:26:08 +00:00
Bjørn Erik Pedersen
94115888e3
Release 0.31.1 2017-11-27 12:18:44 +01:00
hugoreleaser
bf8aa4ac5a releaser: Add release notes draft for 0.31.1
Rename to *-ready.md to continue. [ci skip]
2017-11-27 10:33:13 +00:00
Bjørn Erik Pedersen
6d79beb5f6
tpl/images: Close image file 2017-11-25 18:38:33 +01:00
Bjørn Erik Pedersen
8afd7d9ceb commands: Fix broken --appendPort=false
Also make sure to log the correct server URL to the console.

Fixes #4111
2017-11-24 11:29:01 +01:00
hugoreleaser
42fbf15fb7 releaser: Prepare repository for 0.32-DEV
[ci skip]
2017-11-20 10:30:09 +00:00
hugoreleaser
288723a049 releaser: Add release notes to /docs for release of 0.31
[ci skip]
2017-11-20 10:28:21 +00:00
hugoreleaser
f4b416bbef releaser: Bump versions for release of 0.31
[ci skip]
2017-11-20 10:28:21 +00:00
Bjørn Erik Pedersen
058f25146c
Release 0.31 2017-11-20 11:24:19 +01:00
hugoreleaser
3dd7e8b7a7
releaser: Add release notes draft for 0.31
Rename to *-ready.md to continue. [ci skip]
2017-11-20 11:22:36 +01:00
Bjørn Erik Pedersen
30c0d485ea Squashed 'docs/' changes from a042b67b5..3e663efb2
3e663efb2 Add poster for Hugo 0.31 release
b3c98ba65 Add doc about the new static dir support
2e62e4bdf Update multilingual docs for Hugo 0.31
8eff394b3 commands: Regenerate

git-subtree-dir: docs
git-subtree-split: 3e663efb2b149e243b6ecfdc439a2a2be573987f
2017-11-20 11:19:16 +01:00
Bjørn Erik Pedersen
14786c4d8f
Merge commit '30c0d485ea' 2017-11-20 11:19:16 +01:00
Bjørn Erik Pedersen
089fe49309 hugolib: Make sure everything ends up in its lang root in multihost mode
Fixes #4105
2017-11-20 11:17:46 +01:00
Bjørn Erik Pedersen
118b83d74b
helpers: Properly handle []interface{} as staticDir
And now with a proper integration test ...
2017-11-19 15:44:20 +01:00
Bjørn Erik Pedersen
adbd5bc47f
source: Enable disabled test 2017-11-19 14:35:49 +01:00
Bjørn Erik Pedersen
c1d325934e helpers: Remove (now) unused GetStaticDir
* In Hugo there is no single static dir
* It was used as a filter in the content dir, which makes no sense since any overlap here is impossible
2017-11-19 14:03:21 +01:00
Bjørn Erik Pedersen
d99db71ab5
livereload: Fix recently broken window.location.reload logic
Closes #4100
2017-11-18 10:54:07 +01:00
Bjørn Erik Pedersen
503ca6de6c Fix broken shortcodes for Ace and Amber
Fixes #4051
2017-11-18 10:41:31 +01:00
Bjørn Erik Pedersen
b3daa1f4bf hugolib: Fix .IsTranslated with identical filenames
This commit refines the key used to map translations:

* Use `translationKey` set in front matter
* Fall back to path + base filename (i.e. the filename without extension and language code)

Note that the Page Kinde will be prepended to both cases above. It does not make sense to have a section as translation for the home page.

Fixes #2699
2017-11-17 19:46:32 +01:00
Bjørn Erik Pedersen
df1677a6e8
Merge commit '05e42bc643' 2017-11-17 13:48:33 +01:00
Bjørn Erik Pedersen
05e42bc643 Squashed 'docs/' changes from e65df1059..a042b67b5
a042b67b5 Update installation instructions for Fedora, CentOS, Red Hat
e99dcb0b5 Document `:sections` placeholder for permalinks
f33c88a27 Fix and clarify documentation about Blackfriday extensions (mask)
5cab109c2 Add .Page.File documentation
62df7bb80 Add .Page.CurrentSection and .Page.Sections documentation
60b4414de Add .Page.Dir documentation
22038d1a8 shortcode-templates.md: Update year example
850d5ca41 Add note about theme versions in hosting-on-netlify.md
0509b8055 Update permalink example URL
c68d61d3a Mention the available 'width' argument in 'figure' shortcode
ed83b483a Update Nanobox deployment tutorial
a7422f35d shortcode-templates.md: Remove stray period
af2905fe4 Fix order of releases in news section
19d3ea064 Bump to 0.30.2
bbfa10343 Merge branch 'next'
36ed7cbe4 releaser: Prepare repository for 0.31-DEV
f689770f6 releaser: Add release notes to /docs for release of 0.30.2
0045e712a releaser: Bump versions for release of 0.30.2
a9efc3bbd Add slug to 0.30.1 relnotes
9cf47a4a1 Release 0.30.1
1fa0bb23d releaser: Prepare repository for 0.31-DEV
5582208b6 releaser: Add release notes to /docs for release of 0.30.1
09693d155 releaser: Bump versions for release of 0.30.1
58adf5d0d Merge commit '325009c3fd'
4ef5dcb9b releaser: Prepare repository for 0.31-DEV
02938a788 releaser: Add release notes to /docs for release of 0.30.1
7cfd01fc6 releaser: Bump versions for release of 0.30.1
db3a68e24 Fix typo
95a5d8b46 Fix format of summaryLength in TOML example config
2ad649a92 Make terms in taxonomy examples more coherent
1fac1e662 Make a link specifically point to Pygments HTML Formatter docs
11ae6be03 Fix minor typos in v0.30 release notes

git-subtree-dir: docs
git-subtree-split: a042b67b5b8834ee8292849708cba724f5d6644e
2017-11-17 13:46:40 +01:00
Bjørn Erik Pedersen
0a81a6b4ba output: Fall back to unstranslated base template
Fixes #3893
2017-11-17 13:08:18 +01:00
Bjørn Erik Pedersen
60dfb9a6e0 Add support for multiple staticDirs
This commit adds support for multiple statDirs both on the global and language level.

A simple `config.toml` example:

```bash
staticDir = ["static1", "static2"]
[languages]
[languages.no]
staticDir = ["staticDir_override", "static_no"]
baseURL = "https://example.no"
languageName = "Norsk"
weight = 1
title = "På norsk"

[languages.en]
staticDir2 = "static_en"
baseURL = "https://example.com"
languageName = "English"
weight = 2
title = "In English"
```

In the above, with no theme used:

the English site will get its static files as a union of "static1", "static2" and "static_en". On file duplicates, the right-most version will win.
the Norwegian site will get its static files as a union of "staticDir_override" and "static_no".

This commit also concludes the Multihost support in #4027.

Fixes #36
Closes #4027
2017-11-17 11:01:46 +01:00
Bjørn Erik Pedersen
2e0465764b Add multilingual multihost support
This commit adds multihost support when more than one language is configured and `baseURL` is set per language.

Updates #4027
2017-11-17 11:01:46 +01:00
Bjørn Erik Pedersen
6233ddf9d1
tpl/partials: Fix the lock contention in cached partial
Fixes #4086
2017-11-16 11:59:45 +01:00
Bjørn Erik Pedersen
e66d813bcb
gopkg: Update Chroma to get SVG support 2017-11-16 08:30:51 +01:00
Bjørn Erik Pedersen
f5ed04bd4a
tpl/partials: Fix cache locking
To make sure a cached partial is ony executed  exactly once.

Performance same:

```bash
name                         old time/op    new time/op    delta
TemplateParamsKeysToLower-4    17.2µs ± 0%    16.5µs ± 0%   ~     (p=1.000 n=1+1)
Partial-4                      18.6µs ± 0%    19.4µs ± 0%   ~     (p=1.000 n=1+1)
PartialCached-4                64.2ns ± 0%    63.7ns ± 0%   ~     (p=1.000 n=1+1)

name                         old alloc/op   new alloc/op   delta
TemplateParamsKeysToLower-4    2.66kB ± 0%    2.66kB ± 0%   ~     (all equal)
Partial-4                      1.31kB ± 0%    1.31kB ± 0%   ~     (all equal)
PartialCached-4                 0.00B          0.00B        ~     (all equal)

name                         old allocs/op  new allocs/op  delta
TemplateParamsKeysToLower-4      92.0 ± 0%      92.0 ± 0%   ~     (all equal)
Partial-4                        41.0 ± 0%      41.0 ± 0%   ~     (all equal)
```
2017-11-16 01:23:37 +01:00
Bjørn Erik Pedersen
7730d683e8
tplimpl: Make partial benchmarks use RunParallel
See #4086
2017-11-16 01:13:07 +01:00
Bjørn Erik Pedersen
bb048d811d
Use ms precision for static change logging 2017-11-15 08:52:29 +01:00
Bjørn Erik Pedersen
9299a16c99
circleci: Bump to Go 1.9.2
Closes #4064
2017-11-11 09:46:35 +01:00
Bjørn Erik Pedersen
a9be687b81
hugolib: Pre-allocate some slices 2017-11-11 09:39:43 +01:00
Bjørn Erik Pedersen
b32ffed6ab
Update Chroma to get the latest SASS lexer
Fixes #4069
2017-11-09 14:15:12 +01:00
Bjørn Erik Pedersen
77cbd001ff
Update Travis and snapcraft to Go 1.9.2
See #4064
2017-11-08 00:37:59 +01:00
Bjørn Erik Pedersen
764f1304e1
hugolib: Add some more taxonomy permalinks test cases
See #1208
2017-11-07 23:42:47 +01:00
Brian Chen
d9a78b61ad Handle Taxonomy permalinks
Return the correct virtual Section for Taxonomy and TaxonomyTerm.
Restrict permalink expansion to only Pages and Taxonomies, but then
actually use expanded permalinks even for non-Pages.

Fixes #1208.
2017-11-07 23:05:48 +01:00
Bjørn Erik Pedersen
23ba779fab i18n: Support unknown language codes
Fixes #3564
2017-11-06 20:27:41 +01:00
Bjørn Erik Pedersen
550cec0b1f gopkg: Bump go-i18n version
See #3564
2017-11-06 20:27:41 +01:00
Bjørn Erik Pedersen
b88a105a7c
Revert "i18n: Allow custom language codes"
This reverts commit bb04010cbf.
2017-11-05 10:20:39 +01:00
Bjørn Erik Pedersen
b3443b3d0c
Revert "i18n: Prevent data race in lang code handling"
This reverts commit c97216e4f0.
2017-11-05 10:20:30 +01:00
Bjørn Erik Pedersen
c97216e4f0 i18n: Prevent data race in lang code handling
See #3564
2017-11-04 10:48:29 +01:00
Kevin Gimbel
bb04010cbf i18n: Allow custom language codes
Use the new `RegisterPluralSpec` function to register all defined
languages. This allows the usage of language identifiers which are not
part of the Unicode CLDR standard.

Closes #3564
2017-11-04 10:48:29 +01:00
Artem Sidorenko
76dc811c65 tpl/math: Refactor Mod with cast
It makes the code smaller
2017-10-30 21:55:36 +01:00
Kaushal Modi
488631fe0a Add support for height argument to figure shortcode
Fixes #4014
2017-10-29 20:46:57 +01:00
Rizky Agung
fdd62eb4c3 Add linebreak to README.md for better readability 2017-10-28 12:57:15 +02:00
Kaushal Modi
b6f2e3b438 Update toml dependency revision in Gopkg.lock too
Part 2 of
c61998d3ac

Related: #3998
2017-10-23 21:15:44 +02:00
Kaushal Modi
c61998d3ac Update toml dep to fetch its latest master branch instead of v0.3.0
toml v0.3.0 was released in March 2017 and is missing few fixes made in toml
package after the fact. So use the master branch instead.

This fixes a regression when switch was made from govendor vendor.json dep
management to Go dep.

Fixes #3998
2017-10-23 19:44:41 +02:00
Bjørn Erik Pedersen
45ad8ac381
vendor: Lock mage to v1
Dep insists on adding a dependency for it, so we might as well lock it to the correct version.

Fixes #3997
2017-10-23 13:37:59 +02:00
Bjørn Erik Pedersen
133cfd1710 mage: Skip Check on Go 1.8
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
db1a5af15d Gopk.toml cleanup
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
9ccc958ce7 Update Dockerfile and Snap build to reflect move to dep
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
30e471b8c6 Update CONTRIBUTING to reflect Go Dep
Closes #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
f711b170e4 Update magefile to use Go Dep
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
9536f7cd05 Adjust some deps versions
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
1ac47cd88a Run dep init
See #3988
2017-10-21 19:30:23 +02:00
Bjørn Erik Pedersen
ba0b22ef44 vendor: Remove to prepare for dep
See #3988
2017-10-21 19:30:23 +02:00
Nate Finch
c9c19d7945 Fix error handling in mage build
* print gofmt errors
* don't error on lint failures
* explanatory comments and fix an error text
2017-10-21 17:37:00 +02:00
hugoreleaser
1d52bfbb47 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 11:35:38 +00:00
hugoreleaser
142ebba2c5 releaser: Add release notes to /docs for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
hugoreleaser
bf633ea2f2 releaser: Bump versions for release of 0.30.2
[ci skip]
2017-10-19 11:34:09 +00:00
Bjørn Erik Pedersen
6faf47e8dd
0.30.2 Release 2017-10-19 13:30:39 +02:00
hugoreleaser
7954bc0f0f releaser: Add release notes draft for 0.30.2
Rename to *-ready.md to continue. [ci skip]
2017-10-19 11:28:20 +00:00
Bjørn Erik Pedersen
c4bf03a558
releaser: Improve release notes front matter 2017-10-19 12:34:03 +02:00
Bjørn Erik Pedersen
3164103310
commands: Support Fast Render mode with sub-path in baseURL
Fixes #3981
2017-10-19 10:09:04 +02:00
Bjørn Erik Pedersen
6a5170116c
Merge commit '325009c3fd' 2017-10-19 07:59:48 +02:00
Bjørn Erik Pedersen
325009c3fd Squashed 'docs/' changes from 4628b9ec2..e65df1059
e65df1059 Bump to v0.30
e9e118730 releaser: Prepare repository for 0.31-DEV
e6f2508d4 releaser: Add release notes to /docs for release of 0.30
9c5d6a65b releaser: Bump versions for release of 0.30
88bf0e663 Merge commit 'ecf5e081b5'
6c7191331 Merge commit 'dae5a7c61c'
efd1821bd tpl: Add errorf template function
0cf8dc046 Change SummaryLength to be configurable (#3924)
9e8c09652 tpl: Add os.fileExists template function
e969cfcd7 Merge commit '9d68f695e7'
1a2d516a0 tpl: Add float template function
5310162dc releaser: Prepare repository for 0.30-DEV
648fdf2d0 releaser: Add release notes to /docs for release of 0.29
b2f46992c releaser: Bump versions for release of 0.29
ec447e043 releaser: Prepare repository for 0.29-DEV
9f469e93a releaser: Add release notes to /docs for release of 0.28
c91c18ebc releaser: Bump versions for release of 0.28
253d2ede2 Merge commit '61c27b58b3'
e35b93cc7 Merge commit '30694a133a'
9fad59f66 Merge commit '7a89dce53b'
4221c2855 Merge commit 'ba45da9d03'
0010b6743 releaser: Prepare repository for 0.28-DEV
9e71765cd releaser: Add release notes to /docs for release of 0.27.1
56206b90d releaser: Bump versions for release of 0.27.1
59522fca0 releaser: Prepare repository for 0.28-DEV
4686686d2 releaser: Add release notes to /docs for release of 0.27
0cd9a5d58 releaser: Bump versions for release of 0.27
d21a59d2d docs: Merge commit '1b4319be62'
9c4ff2d8e docs: Document Related Content
887fb1af7 docs: Merge commit '7d63a23b0c'
c8163b51b Update docs versiona and README
f782c9959 Merge commit 'ec4e6f9df2' as 'docs'
d384c661f docs: Re-integrate
9a2eb0f1d Revert "Squashed 'docs/' changes from 35abbc86..f887bd7b"
0373e4310 Squashed 'docs/' changes from 35abbc86..f887bd7b
ea2cc26b3 Remove the theme submodule from /docs
0f9f73cce Add support for multiple config files via --config a.toml,b.toml,c.toml
c8257f8b7 Render task list item inside label for correct accessibility
0abdeeef6 source: Normalize UniqueID between Windows & Linux
e2f8664ef hugolib: More spelling
46ac74537 all: Fix spelling
4b54fb070 all: gofmt -s
40d7d3baa releaser: Prepare repository for 0.27-DEV
f090c2711 releaser: Add release notes to /docs for release of 0.26
b36f6e31e releaser: Bump versions for release of 0.26
0f51e4926 releaser: Add release notes draft for 0.26
62583db50 vendor: Update checksum for inflect
0d495d537 releaser: Update to new release notes location
22b213b1a Merge commit 'e81208265b'
e81208265 Squashed 'docs/' changes from ef02e34e..35abbc86
11e5d456e releaser: Include stats from hugoDocs
f768c27f0 helpers: Remove some unused funcs
81c13171a Add some missing doc comments
9891c0fb0 Remove sourceRelativeLinks
481924b34 helpers: Fix broken TaskList in Markdown
09907d36a Switch from fork bep/inflect to markbates/inflect
8fb594bfb Make the title case style guide configurable
9b4170ce7 Remove unused dependencies from vendor.json
6acbe41f0 media: Add missing JSON tags to Type
e321306c6 media: Add JSON tags to Type
9c1977872 output: Add JSON tags to Format
50ec65fbe Squashed 'docs/' changes from 73f355ce..ef02e34e
1c18f3fc4 Merge commit '50ec65fbe1'
cb9dfc261 helpers: Add support for French Guillemets
c4a0b6e8a vendor: Add support for French Guillemets
a8080c084 Remove CODEOWNERS
84710eb3e Add -u flag for go get govendor in CONTRIBUTING.md
555a9bc80 tpl: Accommodate gccgo in TestMethodToName
55d0b8941 tpl/collections: Fix intersect on []interface{} handling
aee2b0678 Add --debug option to be improved on over time
c1a5da977 vendor: Update dependencies for 0.26-DEV
9ed48c1c9 Dockerfile: Run go install with -ldflags '-s -w'
bfe0bfbbd Dockerfile: Reduce image size from 277MB to 27MB
606d6a8c9 Dockerfile: Optimize Docker image size
12e049520 docs: Add RSS template lookup example
6cd33f695 tpl: Use hash for cache key
dbe63970e hugolib: Support reflinks starting with a slash
0c90e6d71 Change "hugodocs" to "hugoDocs" to match GitHub's default URL
b60aa1a50 helpers: Add --trace to asciidoctor args
ff433f981 Add script to pull in docs changes
2c0d1ccdc Squashed 'docs/' changes from b0470688..73f355ce
f387cb1b3 doc: Merge commit '2c0d1ccdcd'
40566ec98 Remove ^M from file to make line-endings consistent
7759a98f7 Clarify the repo choice in the contribution guidelines
720786cd3 Add note about doc-related pull requests in contribution guide
214e16eca appveyor: Update submodules
a2fb8150c Add some README info about the docs repo
73273d4e8 Add the docs theme to .gitmodules
4c220c4ac Merge commit '6dbde8d731'
6dbde8d73 Squashed 'docs/' changes from f3c88b08..b0470688
deccc5400 hubolib: Add HasShortcode
00b590d7a Improve the twitter card template
ea5e9e346 Add GOEXE to support building with different versions of `go`
61bb3ccab hugolib: Improve panic handling in layout rendering
794ea21e9 hugolib: Make template panics into nice error messages
91f410ea9 Bump versions to 0.26-DEV
0e25f1e96 Revert "Revert "vendor: Update dependencies for 0.26-DEV""
aded65b71 releaser: Prepare repository for 0.25-DEV
bbd33dbf5 releaser: Add release notes to /docs for release of 0.25.1
0e09be7b3 releaser: Bump versions for release of 0.25.1
195f94575 releaser: Ignore openbsd/arm
44b8f740e releaser: Add release notes draft for 0.25.1
a48e13234 Revert "vendor: Update dependencies for 0.26-DEV"
7f82b41a2 parser: Final (!) fix for issue with escaped JSON front matter
84db6c74a parser: Fix issue with escaped JSON front matter
e0cf2e05b tpl/collections: Add some empty slice tests to intersect
dbbc5c481 tpl/collections: Fix union when the first slice is empty
7bcc1ce65 commands: Navigate to changed on CREATE When working with content from IntelliJ IDE, like WebStorm, every file save is followed by two events: "RENAME" and then "CREATE".
fd41e70cf Add first draft of CODEOWNERS
4ec8ee7fb vendor: Update dependencies for 0.26-DEV
1e19a9845 releaser: Prepare repository for 0.26-DEV
6fb556367 releaser: Add release notes to /docs for release of 0.25
51bcd5083 releaser: Fix tag push
6e086e3d0 releaser: Bump versions for release of 0.25
5895e32b0 releaser: Add release notes draft for 0.25
b2dcd867f Revert "vendor: Update dependencies"
d2c24baaf vendor: Update dependencies
4989950d4 releaser: Use real theme count in template
a358b33f2 docs: Regenerate the docs helpers
a392fca96 docs: Regenerate commands doc
75f782f03 Revert "commands: Adjust docs path"
37c69054e Squashed 'docs/' changes from 5d9a6703..f3c88b08
e00f5c9c0 docs: Merge docs commit '37c69054e2'
477684022 releaser: Adjustments
70d8ddcb6 releaser: Revise the docs handling to match new subtree
5f831a622 releaser: Replace the magic version handling
e7a54e7af releaser: Add --try flag to ease testing
aa6b1b9be output: Support templates per site/language
a1d260b41 hugolib: Extend the sections API
dd9b1baab hugolib: Make .Site.Sections return the top level sections
1039356ed commands: Support human-readable YAML boolean values in undraft
ccdd08d57 tpl/collections: Add Pages support to Intersect and Union
d12cf5a25 tpl/collections: Fix In function for JSON arrays
e10e51a00 parser: Fix handling of JSON front matter with escaped quotes
34c566773 tpl/math: Add log function
41805dca9 hugolib: Render 404.html for all languages
7ee1f25e9 hugo import jekyll support nested _posts directories
3aa0e16d0 cache: Add even more concurrency to test
b3c8056de cache: Add concurrent cache test
fe132e1c3 vendor: Add missing WebP dependencies
8431c8d39 tpl: Add WebP images support
da72805a4 tpl: Only show post's own keywords in schema.org
72fd87171 hugolib: Add more summary test
118f8f7cf Dockerfile: Update Dockerfile and add Docker optimizations
56d82aa02 hugofs: Fix typo in code comment
eccb06478 tpl: Simplify the Disqus template a little bit (#3655)
2e1e4934b tpl: Improve the built-in Disqus template (#3639)
a54404968 helpers: Add Blackfriday 'joinLines' extension support (#3574)
bfce30d85 helpers: add --initial-header-level=2 to rst2html (#3528)
30e14cc31 Make `--navigateToChanged` more robust on Windows
c825a7312 Support open "current content page" in browser
7198ea8a1 Revert "Remove docs building from CI builds"
dd78d5b23 Squashed 'docs/' content from commit 5d9a6703
a7765bb3c Merge commit 'dd78d5b23f' as 'docs'

git-subtree-dir: docs
git-subtree-split: e65df1059549d951a45853576374be4088ded1d3
2017-10-19 07:58:46 +02:00
hugoreleaser
bc53cd7b15 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-19 05:43:34 +00:00
hugoreleaser
4e07b4144f releaser: Add release notes to /docs for release of 0.30.1
[ci skip]
2017-10-19 05:41:50 +00:00
hugoreleaser
89a3f47a21 releaser: Bump versions for release of 0.30.1
[ci skip]
2017-10-19 05:41:50 +00:00
Bjørn Erik Pedersen
35be07f7c8
Release 0.30.1 2017-10-19 07:38:49 +02:00
hugoreleaser
6f84570d8f releaser: Add release notes draft for 0.30.1
Rename to *-ready.md to continue. [ci skip]
2017-10-19 05:30:23 +00:00
Bjørn Erik Pedersen
8964162573
circleci: Must go get mage
See https://github.com/magefile/mage/issues/79
2017-10-19 07:26:27 +02:00
Bjørn Erik Pedersen
e939aaed8b
releaser: Correctly set final version on patch releases 2017-10-19 07:12:23 +02:00
Bjørn Erik Pedersen
d2b3f00df7
Bump Snap to go1.9.1 2017-10-19 07:06:38 +02:00
Bjørn Erik Pedersen
fa53b13ca0
Fix hugo -w
Fixes #3980
2017-10-18 18:35:25 +02:00
Bjørn Erik Pedersen
c3c10f2c7c
Simplify Site benchmarks
Now running `./benchSite.sh` should give a good baseline.
2017-10-18 16:46:55 +02:00
Bjørn Erik Pedersen
ad5ef43838
Fix mage vs make issues
And remove Makefile ... for good.

Fixes #3969
2017-10-18 07:56:10 +02:00
Bjørn Erik Pedersen
5109ed520f
Revert "tplimpl: Output xmlns:xhtml only if there are translations available"
This reverts commit 0859d9dfe6.

Fixes #3978
2017-10-17 20:56:50 +02:00
hugoreleaser
45e0908b86 releaser: Prepare repository for 0.31-DEV
[ci skip]
2017-10-16 08:40:34 +00:00
hugoreleaser
41180c51e1 releaser: Add release notes to /docs for release of 0.30
[ci skip]
2017-10-16 08:39:00 +00:00
hugoreleaser
811f381e23 releaser: Bump versions for release of 0.30
[ci skip]
2017-10-16 08:39:00 +00:00
Bjørn Erik Pedersen
7d783a1c0e
Release Hugo 0.30 2017-10-16 10:30:08 +02:00
Bjørn Erik Pedersen
49d5e7da42
Use Make for the release for now
[ci skip]
2017-10-16 10:22:39 +02:00
hugoreleaser
190508ae1e
releaser: Add release notes draft for 0.30 2017-10-16 10:22:39 +02:00
Bjørn Erik Pedersen
04bdb596ad
Fix CircleCI build issue 2017-10-15 13:41:26 +02:00
Bjørn Erik Pedersen
fe71cb6f5f
Replace make with mage in CircleCI build
Updates #3969
2017-10-15 11:08:25 +02:00
Bjørn Erik Pedersen
68ace43431
Update CircleCI build to use Mage
Fixes #3969
2017-10-15 10:59:16 +02:00
Bjørn Erik Pedersen
ecf5e081b5 Squashed 'docs/' changes from 000ab7c42..4628b9ec2
4628b9ec2 commands: Regen CLI doc
2525f2ed0 data: Regenerate docs helper
6f5a0eb19 Add Hugo 0.30 poster image
72c3fac9e Merge branch 'chroma-next2' into next
364973d3f Fix typo in syntax highlighting.
ce10cc02e Update Chroma highlighting docs
9dcc4d4dd Update robots.md
1e64cb483 Rename title of cross references' page
d6dfbbc51 Add warning about MMark and TOCs
e8d259d32 Fix link to subsection in page
6adead19d Merge commit '040d8d2833c26c53cf9f0e035910821ed50e3863'
040d8d283 Squashed 'themes/gohugoioTheme/' changes from cdaa89c8..6b632895
bde95d890 Add Atlas starter kit
fc40d078d Remove page arg from examples of relref shortcode
c578620b5 Remove page arg from examples of ref shortcode
ee81931a4 Remove delimiters in YAML and TOML config examples
62d7b269f Clarify that .Lastmod automatically uses .GitInfo.AuthorDate (#226)

git-subtree-dir: docs
git-subtree-split: 4628b9ec2c52df4de673a4d6b9621a65d8e8f5a4
2017-10-15 10:20:55 +02:00
Bjørn Erik Pedersen
5c31e0c341
Merge commit 'ecf5e081b5' 2017-10-15 10:20:55 +02:00
Bjørn Erik Pedersen
7c30e2cbb0 Add table linenos support for Chroma highlighter
Fixes #3915
2017-10-14 16:00:27 +02:00
Bjørn Erik Pedersen
60bd332c1f Only re-render the view(s) you're working on
Hugo already, in its server mode,  support partial rebuilds. To put it simply: If you change `about.md`, only that content page is read and processed, then Hugo does some processing (taxonomies etc.) and the full site is rendered.
This commit covers the rendering part: We now only re-render the pages you work on, i.e. the last n pages you watched in the browser (which obviously also includes the  page in the example above).

To be more specific: When you are running the hugo server in watch (aka. livereload) mode, and change a template or a content file, then we do a partial re-rendering of the following:

* The current content page (if it is a content change)
* The home page
* Up to the last 10 pages you visited on the site.

This should in most cases be enough, but if you navigate to something completely different, you may see stale content. Doing an edit will then refresh that page.

Note that this feature is enabled by default. To turn it off, run `hugo server --disableFastRender`.

Fixes #3962
See  #1643
2017-10-14 13:40:43 +02:00
Bjørn Erik Pedersen
6a30874f19 Make sure Date and PublishDate is always set to a value if one is available
Fixes #3854
2017-10-13 13:18:23 +02:00
Michael Henderson
15ec031d98 Add correct config file name to verbose server log
Server logging uses the wrong variable when displaying
the configuration file name. This update changes the
log to use the `config` variable.
2017-10-10 07:47:35 +02:00
Bjørn Erik Pedersen
01e54609e7
metrics: Reset benchmark timer 2017-10-07 20:41:25 +02:00
Bjørn Erik Pedersen
5800a20a25 metrics: Detect partialCached candidates
This commit adds a "cache potential" column when running `hugo --templateMetrics --templateMetricsHints`.

This is only calculated when `--templateMetricsHints` is set, as these calculations has an negative effect on the other timings.

This gives a value for partials only, and is a number between 0-100 that indicates if `partial` can be replaced with `partialCached`.

100 means that all execution of the same partial resulted in the same output.

You should do  some manual research before going "all cache".
2017-10-07 18:00:07 +02:00
Bjørn Erik Pedersen
e2e8bcbec3
tpl: Rework the partial test and benchmarks 2017-10-07 16:53:01 +02:00
Cameron Moore
66a169a249 Simplify HugoNoGitInfo in magefile 2017-10-07 14:42:54 +02:00
digitalcraftsman
2cc4765670 Add mage installation step to CONTRIBUTING.md 2017-10-05 20:09:21 +02:00
Bjørn Erik Pedersen
856fc445da
Bump Go versions in Travis config 2017-10-05 18:50:36 +02:00
Hallgeir Holien
a6ed645a34 Change last 'make' statements to 'mage' 2017-10-05 17:03:34 +02:00
Steve Divskinsy
23488f874c Minor README changes 2017-10-05 12:44:43 +02:00
Bjørn Erik Pedersen
8d2580f07c Replace make with mage
Fixes #3937
2017-10-05 10:53:02 +02:00
Bjørn Erik Pedersen
06e5633400 Merge commit 'dae5a7c61c' 2017-10-04 09:27:30 +02:00
Bjørn Erik Pedersen
dae5a7c61c Squashed 'docs/' changes from 36d7e22f5..000ab7c42
000ab7c42 Fix `ref` and `relref` shortcode usage patterns
4e7123d20 Add som code fence lang tags
21d4f97d1 Update homepage for ox-hugo tool
668969fc4 Remove superflous back ticks
f78cf6490 Fix code example
05aaee8ce Remove background color from code shortcode
dcb0998d0 Add a Build Performance page draft
50e04593a Document templateMetrics usage
67ad36691 Merge commit 'f66d59b8991c264c3366895b5e148ea810a184cd'
f66d59b89 Squashed 'themes/gohugoioTheme/' changes from ca53082d..cdaa89c8

git-subtree-dir: docs
git-subtree-split: 000ab7c423341bb215d4ccb4a9e54d3d64957e24
2017-10-04 09:27:29 +02:00
Bjørn Erik Pedersen
a58741a172 helpers: Fix broken test 2017-10-04 09:27:15 +02:00
Bjørn Erik Pedersen
d32fd8e328 vendor: Update deps 2017-10-04 08:46:11 +02:00
Jamie Connolly
0859d9dfe6 tplimpl: Output xmlns:xhtml only if there are translations available 2017-10-03 23:46:18 +02:00
Nate Finch
384a6ac4bd Create magefile from Makefile
This commit makes a magefile.go that should be functionally equivalent to
the current Makefile.
2017-10-03 23:23:10 +02:00
Brendan Roy
4fc67fe44a tpl: Add errorf template function
Add template function that will build a string from the given format
string and arguments, then log it to ERROR. This has an intended
side-effect of causing the build to fail, when executed.

Resolves #3817
2017-10-03 07:59:51 +02:00
Cameron Moore
47fdfd5196 Clean up lint in various packages
Changes fall into one of the following:

- gofmt -s
- receiver name is inconsistent
- omit unused 2nd value from range
- godoc comment formed incorrectly
- err assigned and not used
- if block ends with a return statement followed by else
2017-09-29 16:23:16 +02:00
Bjørn Erik Pedersen
d45e358a05 helpers: Fix broken Chroma test 2017-09-29 10:40:56 +02:00
Bjørn Erik Pedersen
24fab99841 hugolib: Fix broken hightlighter smoke test 2017-09-29 10:10:13 +02:00
Bjørn Erik Pedersen
6a986b7c07 vendor: Update dependencies 2017-09-29 09:54:03 +02:00
Bjørn Erik Pedersen
8cf55aff00 vendor: Update Chroma 2017-09-29 09:10:55 +02:00
Brendan Roy
8717a60cc0 Change SummaryLength to be configurable (#3924)
Move SummaryLength into the ContentSpec struct and refactor the
relevant summary functions to be methods of ContentSpec. The new
summaryLength struct member is configurable by the summaryLength config
value, and the default remains 70. Also updates hugolib/page to use the
refactored methods.

Resolves #3734
2017-09-29 09:04:55 +02:00
digitalcraftsman
2818878994 tpl: Add os.fileExists template function
Fixes #3839
2017-09-28 19:52:34 +02:00
Bjørn Erik Pedersen
b6a30283f0 Merge commit '9d68f695e7' 2017-09-28 17:22:55 +02:00
Bjørn Erik Pedersen
9d68f695e7 Squashed 'docs/' changes from 20959c7b..36d7e22f
36d7e22f Document fmt.{print, println} template functions
79a72fce Fix link to page variables
00342ca9 Fix broken link on highlight page
15f44952 Fix link in v0.28 release notes
0100df73 Fix code examples for math.{Ceil, Floor, Round}
a354a69b Fix broken netlify.toml
4995e5df Merge branch 'master' of github.com:gohugoio/hugoDocs
9cdd990a Hugo 0.29
463558f9 Document math.Log template function
588499af Add nohup.out to .gitignore
db8ddcf7 Change name of post files in example to use post prefix
296ec01f Add ox-hugo Emacs package to the tools section
f060d6d1 Fix math.Ceil, Floor, and Round naming
a2262d24 Document strings.TrimPrefix and TrimSuffix template functions
80c1ce63 Document strings.TrimLeft and TrimRight template functions
2921088d Document urls.Parse template function
f0133079 Document math.{ceil, floor, round} template functions
82863808 Fix typo in migration tools section
d5215d61 Add link to syntax hl docs in release notes
541f0686 Update versions
275ce2b4 Update 0.28 release notes
886713a1 Add release notes for 0.28
bed02e5f Merge branch 'next'
8e3b1ac4 Add a note about branches
1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 36d7e22f5c21c550bd87782d2ddca666178fe1ff
2017-09-28 17:20:10 +02:00
Lucas Jenss
57adc539fc tpl: Add float template function
Add a template function that allows conversion to float. This is
useful, for example, when passing aspect ratios into templates,
which tend to not be integers.

Fixes #3307
2017-09-28 16:53:18 +02:00
Cameron Moore
b277cb33e4 hugolib: Move metrics output to the end of the site build 2017-09-27 21:26:08 +02:00
Cameron Moore
a354d130dc examples: Fix now usage in footer 2017-09-27 08:42:44 +02:00
hugoreleaser
f806e951fd releaser: Prepare repository for 0.30-DEV
[ci skip]
2017-09-26 19:24:34 +00:00
hugoreleaser
524c67107a releaser: Add release notes to /docs for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
hugoreleaser
396759a09b releaser: Bump versions for release of 0.29
[ci skip]
2017-09-26 19:23:15 +00:00
hugoreleaser
e6079a9c04 releaser: Add release notes for 0.29 2017-09-26 21:12:49 +02:00
Bjørn Erik Pedersen
b5e1dc5892 tpl: Set Metrics at creation time 2017-09-26 20:42:40 +02:00
Bjørn Erik Pedersen
d3681f51c0 metrics: Fix sort order
Highest first.
2017-09-26 20:31:40 +02:00
Bjørn Erik Pedersen
4f576e1c08 Revert "vendor: Update Chroma"
This reverts commit cb8eb47260.
2017-09-26 20:06:58 +02:00
Cameron Moore
b4a14c25fe metrics: Add simple template metrics feature 2017-09-26 20:03:04 +02:00
Bjørn Erik Pedersen
cb8eb47260 vendor: Update Chroma 2017-09-26 20:00:39 +02:00
Bjørn Erik Pedersen
e94d4f0177 commands: Make noHTTPCache default false
The other way was a mistake.
2017-09-26 19:59:15 +02:00
Cameron Moore
8a69d23567 tpl: Add math.Ceil, Floor, and Round to method mappings 2017-09-26 08:16:24 +02:00
Thibault Jamet
d9697e275e Split go build in Dockerfile
To maximize the usage of cache, split the govendor get in steps:
- govendor fetch to get the pinned versions of dependencies
- go install to actually build the binary

Doing so allows not to re-download the whole dependencies when changing
lines in hugo repository

The current Dockerfile generates an image of 16.6MB

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Thibault Jamet
09d960f173 Update Dockerfile to benefit build cache
Docker has recently introduces buikld-stages (as of version 17.05)

Build stages allows to benefit the docker build cache as well as
reducing the size of the resulting image c.f.
https://docs.docker.com/engine/userguide/eng-image/multistage-build/

This change allows to have faster builds when running `docker build`
several times after changing some little code

Signed-off-by: Thibault Jamet <tjamet@users.noreply.github.com>
2017-09-25 10:28:13 -06:00
Guy Halse
a3a3f5b861 snap: Add git to snap package for GitInfo
Add git into the staged packages, so that the git binary is available
and hugo --enableGitInfo works for users of the snap package.

Fixes gohugoio/hugo#3896
2017-09-25 14:24:51 +02:00
hugoreleaser
404e2994e5 releaser: Prepare repository for 0.29-DEV
[ci skip]
2017-09-25 08:00:38 +00:00
hugoreleaser
2a7f6dda12 releaser: Add release notes to /docs for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
hugoreleaser
9e850c1f64 releaser: Bump versions for release of 0.28
[ci skip]
2017-09-25 07:59:12 +00:00
Bjørn Erik Pedersen
ab86851a1e releaser: Add final 0.28 release notes 2017-09-25 09:56:20 +02:00
hugoreleaser
53b6235bb4 releaser: Add release notes draft for 0.28
Rename to *-ready.md to continue. [ci skip]
2017-09-25 09:53:56 +02:00
Bjørn Erik Pedersen
61c27b58b3 Squashed 'docs/' changes from 1662b9d0..20959c7b
20959c7b Rewrite the syntax highlighter docs etc.
92435459 Add a note about branches
REVERT: 1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 20959c7b9124341dfc4d139748244818b9cb3641
2017-09-25 09:02:42 +02:00
Bjørn Erik Pedersen
932ae52709 Merge commit '61c27b58b3' 2017-09-25 09:02:42 +02:00
Bjørn Erik Pedersen
30694a133a Squashed 'docs/' changes from 5be6fef0..1662b9d0
1662b9d0 Add missing Disqus links in templates/internal.md

git-subtree-dir: docs
git-subtree-split: 1662b9d0bcb6b8ebdb665f7a477d38c93c5f8faf
2017-09-25 09:02:34 +02:00
Bjørn Erik Pedersen
23ba0edf71 Merge commit '30694a133a' 2017-09-25 09:02:34 +02:00
Bjørn Erik Pedersen
fb33d8286d Use Chroma as new default syntax highlighter
If you want to use Pygments, set `pygmentsUseClassic=true` in your site config.

Fixes #3888
2017-09-25 08:59:02 +02:00
Cameron Moore
81ed564793 tpl: Add urls.Parse function
Add a urls.Parse template function that front-ends url.Parse from the Go
stdlib.

Fixes #3849
2017-09-24 10:07:35 +02:00
Cameron Moore
19c5910485 tpl: Add math.Ceil, Floor, and Round
Ceil and Floor are frontends for the stdlib math functions. The Round
implementation is essentially the same thing except that the Go stdlib
doesn't include a Round implementation in a stable release yet.  I've
included the Round function slated for Go 1.10.

Fixes #3883
2017-09-24 10:06:14 +02:00
Bjørn Erik Pedersen
80c7ea60a0 Make noHTTPCache default on
This is a development server, so that makes the most sense.

See #3897
2017-09-23 21:17:51 +02:00
Bjørn Erik Pedersen
0d29a0f781 Trim newlines in the hightlight shortcode
Fixes #3898
2017-09-23 18:14:07 +02:00
Bjørn Erik Pedersen
b8fabce217 vendor: Update goorgeous
Fixes #3899
2017-09-23 17:15:25 +02:00
Bjørn Erik Pedersen
b180477631 Add liveReloadPort flag to server
This makes live reloading behind a HTTPS proxy working, as in the example below using the service from https://ngrok.com:

```
hugo server -b https://ba6sdfe72.ngrok.io --appendPort=false --liveReloadPort=443 --navigateToChanged
```

Fixes #3882
2017-09-23 17:08:48 +02:00
Bjørn Erik Pedersen
c31e083ead Fix the docs helper tool 2017-09-23 10:20:11 +02:00
Bjørn Erik Pedersen
9436f0b0c3 Allow the pull-docs script to pull other than master 2017-09-23 10:13:40 +02:00
Bjørn Erik Pedersen
7a89dce53b Squashed 'docs/' changes from 32356e4e..5be6fef0
5be6fef0 Fix typo, {{Content} should be {{.Content}}

git-subtree-dir: docs
git-subtree-split: 5be6fef0b00d06a0c780397c4f4ac8db31b56456
2017-09-23 10:08:55 +02:00
Bjørn Erik Pedersen
f8fd5796bb Merge commit '7a89dce53b' 2017-09-23 10:08:55 +02:00
Bjørn Erik Pedersen
173b544982 commands: Remove superflous space 2017-09-22 20:05:19 +02:00
Bjørn Erik Pedersen
df411ec81a commands: Rename noHttpCache to noHTTPCache 2017-09-22 17:23:15 +02:00
Bjørn Erik Pedersen
0b34af2161 Add noHttpCache to hugo server
Fixes #3897
2017-09-22 17:13:21 +02:00
Bjørn Erik Pedersen
c0370e0ee3 Merge commit 'ba45da9d03' 2017-09-21 19:05:40 +02:00
Bjørn Erik Pedersen
ba45da9d03 Squashed 'docs/' changes from 44fe0285..32356e4e
32356e4e Fix typo in header of shortcode-templates.md
c8f1a2d2 Correct code example for index template function
bfa6a55d Escape code fencing
ff8b2f99 Fix typos in deployment with wercker tutorial
557c36e8 theme: Merge commit '7fbb4bed25001182bfeb91f79db0f0c1936582ee'
7fbb4bed Squashed 'themes/gohugoioTheme/' changes from 7dd8a302..ca53082d
ce31cee0 Add "See Also" config
158cee1b Make the tags into keywords
61600be6 Add a note to the related section
49edb5a2 Relase 0.27.1
c9bbc001 releaser: Add release notes to /docs for release of 0.27.1
213c6c3b Add bugs poster
8b4590cd Add KeyCDN integration tutorial
2b277859 Add tutorial videos to several docs pages
950fef1f Update roadmap to link to the correct milestones page
496f5bf6 Rename relnotes
d6f9378d Bump Netlify versions to 0.27
087fde7f Update 0.27 release notes
603f94ae docs: Document Related Content
3790f6a3 releaser: Bump versions for release of 0.27
0948868c releaser: Add release notes to /docs for release of 0.27

git-subtree-dir: docs
git-subtree-split: 32356e4eabe357ae914f4d1d59e8ae31ce936723
2017-09-21 19:03:00 +02:00
hugoreleaser
5c3b210368 releaser: Prepare repository for 0.28-DEV
[ci skip]
2017-09-13 13:13:28 +02:00
hugoreleaser
5a4002bc89 releaser: Add release notes to /docs for release of 0.27.1
[ci skip]
2017-09-13 11:03:59 +00:00
hugoreleaser
18126434f1 releaser: Bump versions for release of 0.27.1
[ci skip]
2017-09-13 11:03:59 +00:00
hugoreleaser
dda269f175 releaser: Add release notes for 0.27.1 2017-09-13 13:01:03 +02:00
Bjørn Erik Pedersen
2d613dd905 tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880)
Fixes #3876
2017-09-13 12:32:06 +02:00
Bjørn Erik Pedersen
642ba6cab2 snap: Bump to 1.9 2017-09-13 11:25:57 +02:00
Bjørn Erik Pedersen
d1d6aa6340 Remove .goxc.json
Not in use
2017-09-11 13:18:36 +02:00
hugoreleaser
0375cbd025 releaser: Prepare repository for 0.28-DEV
[ci skip]
2017-09-11 05:33:02 +00:00
hugoreleaser
01fdf6d26c releaser: Add release notes to /docs for release of 0.27
[ci skip]
2017-09-11 05:32:02 +00:00
hugoreleaser
828eb70fa6 releaser: Bump versions for release of 0.27
[ci skip]
2017-09-11 05:32:02 +00:00
Bjørn Erik Pedersen
f4ea433984 Release of 0.27 2017-09-11 07:27:02 +02:00
hugoreleaser
457048634f releaser: Add release notes draft for 0.27
Rename to *-ready.md to continue. [ci skip]
2017-09-11 07:26:21 +02:00
Bjørn Erik Pedersen
1b4319be62 Squashed 'docs/' changes from 1d052b16..44fe0285
44fe0285 Fix links to JSON spec

git-subtree-dir: docs
git-subtree-split: 44fe0285a09f6b21cd00091fb0900b9797e81f72
2017-09-10 17:27:23 +02:00
Bjørn Erik Pedersen
58245a29df docs: Merge commit '1b4319be62' 2017-09-10 17:27:23 +02:00
Bjørn Erik Pedersen
d2249c5099 Set up Hugo release flow on CircleCI
This rewrites the release logic to use CircleCI 2.0 and its approve workflow in combination with the state of the release notes to determine what to do next.

Fixes #3779
2017-09-10 17:14:02 +02:00
Bjørn Erik Pedersen
f4bf214137 tpl/time: Add time.Duration and time.ParseDuration template funcs
And with time.Duration with the convenient alias `duration`:

```
{{ mul 60 60 | duration "second" }}
```

Fixes #3828
2017-09-09 09:43:00 +02:00
Bjørn Erik Pedersen
0462c96a5a tpl/compare: Add cond (ternary) template func
Fixes #3860
2017-09-08 16:59:43 +02:00
Bjørn Erik Pedersen
202510fdc9 hugolib: Fix "published" front matter handling
Also related:

* support "modified" as an optional way to signal "last modified"
* make sure all relevant page dates are also added to params

Fixes #3867
2017-09-08 12:28:15 +02:00
Fiisio
573deca089 hugolib: Fix typo in aquired
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 16:21:33 +02:00
Bjørn Erik Pedersen
eeb057f222 docs: Document Related Content
See https://github.com/gohugoio/hugo/issues/98
2017-09-06 00:20:02 +02:00
Bjørn Erik Pedersen
3b4f17bbc9 hugolib: Implement "related content"
This closes #98, even if this commit does not do full content text search.

We may revisit that problem in the future, but that deserves its own issue.

Fixes #98
2017-09-06 00:20:02 +02:00
Bjørn Erik Pedersen
7d63a23b0c Squashed 'docs/' changes from f887bd7b..1d052b16
1d052b16 Update hosting-on-netlify.md
28b96bec Remove double brackets in Netlify hosting tutorial
373ed38b Update deployment instructions from hugo > 0.20 on Netlify
1bbb41ca Generate static assets on deploy in Nanobox tutorial
816d207f Add missing backtick in templates/views.md
bf88e772 Add nanobox as a deployment option
9c37b4cc Change config's syntax order matching description
d3cb05a7 Fix wrongly named default value of publishDir
4be85c54 Add link to showcase a theme setup via config file
46837195 Init and update of submodules in .gitlab-ci.yml
9e7c2827 Add CSS lang argument to code block
85aad56e Abstract the type in the lookup order
4e1e43e9 Fix broken Pygments url
65b4e79b Correct GitLab project pipelines URL
94af72b5 Fix .Data.Terms usage in taxonomy template example
eb371e52 functions: Fix lang.NumFmt docs
a745cd6c Fix layouts' folder name in template primer
e181e637 Correct typo on GitHub pages guide (#151)
28698500 Remove HTML special chars from Windows install example
96b1f5b5 Remove not needed escape slashes in urls.md
2e05043f Add upgrade instructions using homebrew
2a14624d Fix alias in countrunes.md
5e26bb97 Update docker image for build/publish
01424887 List the internal templates
a3ef5be9 Remove string concatenation from add (math) sample
43d12b44 Fix typo
89bafa49 Change to Asciidoc URI
4e14071e Removes an extra bracket (>) in single-page-templates.md
0938e423 Fix typo in http2 server push blog
fac55121 Fix typo in deployment with rsync tutorial

git-subtree-dir: docs
git-subtree-split: 1d052b16a1290ada12f1e28c7c0c373f86741071
2017-09-05 18:09:40 +02:00
Bjørn Erik Pedersen
16c9127663 docs: Merge commit '7d63a23b0c' 2017-09-05 18:09:40 +02:00
Bjørn Erik Pedersen
f88fe312cb output: Fix taxonomy term base template lookup
To make sure it uses the base templates in _default as a last resort.

Fixes #3856
2017-09-03 11:32:26 +02:00
Bjørn Erik Pedersen
d33563b5d7 release: CGO_ENABLED=0 2017-08-28 11:46:03 +02:00
Bjørn Erik Pedersen
fc4a0d1704 Update Travis build to Go 1.9!
Just released: https://blog.golang.org/go1.9
2017-08-25 08:08:17 +02:00
Yihui Xie
7231d5a829 livereload: Maintain the scroll position if possible
This fixes #3824: when the current pathname is the same as the one to be loaded, just call location.reload() so that the current scroll position can be preserved, instead of assigning to location.href, which will cause the scroll position to be lost.
2017-08-22 20:26:33 +02:00
oneleaftea
88e1bca92c Update template_embedded.go
Changed disqus urls from http to https. This fixes mixed content warnings on browsers when viewing Hugo websites over SSL (https).
2017-08-22 20:26:04 +02:00
Bjørn Erik Pedersen
d000cf6050 tpl: Prepare for template metrics 2017-08-19 09:57:37 +02:00
Cameron Moore
29a2da0593 tpl: Cleanup strings.TrimPrefix and TrimSuffix
These funcs were added during the move to namespaces but were
undocumented.  This commit fixes the order of the arguments and adds the
funcs to the method mapping.
2017-08-18 14:21:58 +02:00
Cameron Moore
7674ad7382 tpl: Add strings.TrimLeft and TrimRight 2017-08-18 09:12:04 +02:00
Bjørn Erik Pedersen
08f48b91d6 compare, hugolib, tpl: Add Eqer interface
And use it in `eq` and `ne` so `Page` values can be compared directly in the templates without thinking about it being a `Page` or a `PageOutput` wrapper.

Fixes #3807
2017-08-18 07:36:32 +02:00
Bjørn Erik Pedersen
2fc121ce23 appveyor: Simplify 2017-08-17 10:37:42 +02:00
Bjørn Erik Pedersen
2a2e690707 hugolib: Simplify Page.Eq 2017-08-17 09:43:39 +02:00
Bjørn Erik Pedersen
a7555c5431 hugolib: Do not return error in Eq on type mismatch 2017-08-17 08:32:47 +02:00
Bjørn Erik Pedersen
c265c102ae hugolib: Rename Page.Equals to Page.Eq
To get the name in line with the template func `eq`.
2017-08-16 10:01:16 +02:00
Bjørn Erik Pedersen
f0f49ed9b0 hugolib: Add Page.Equals 2017-08-16 09:59:42 +02:00
Bjørn Erik Pedersen
71ae9b4533 hugolib: Rewrite replaceDivider to reduce memory allocation
```bash
name              old time/op    new time/op    delta
ReplaceDivider-4   9.76µs ±105%    7.96µs ±24%     ~     (p=0.690 n=5+5)

name              old alloc/op   new alloc/op   delta
ReplaceDivider-4    3.46kB ± 0%    1.54kB ± 0%  -55.56%  (p=0.008 n=5+5)

name              old allocs/op  new allocs/op  delta
ReplaceDivider-4      6.00 ± 0%      1.00 ± 0%  -83.33%  (p=0.008 n=5+5)
```
2017-08-14 09:42:55 +02:00
Bjørn Erik Pedersen
199816fddd hugolib: Extract replaceDivider logic
To its own function and add a test and a benchmark for it.
2017-08-14 09:42:55 +02:00
Nic Raboy
919bc9210a Add an iFrame title to the YouTube shortcode
To accommodate modern web accessibility as outlined here https://dequeuniversity.com/tips/provide-iframe-titles
2017-08-12 00:36:40 +02:00
Bjørn Erik Pedersen
07f6e1499c travis: Pull docutils out into requirements.txt 2017-08-11 18:39:04 +02:00
Bjørn Erik Pedersen
e8468a9852 travis: Fix docutils setup 2017-08-11 17:23:40 +02:00
Bjørn Erik Pedersen
359af563a1 travis: Try to fix docutils setup on Linux 2017-08-11 14:21:21 +02:00
Bjørn Erik Pedersen
0019ce0024 output: Improve the base template identification
See https://discourse.gohugo.io/t/main-block-not-rendered-in-custom-archetypes-layout/7917/3
2017-08-11 09:34:31 +02:00
Bjørn Erik Pedersen
33ae10b6ad tpl/transform: Only strip p tag in markdownify if only one paragraph
Fixes #3040
2017-08-10 19:52:41 +02:00
Bjørn Erik Pedersen
2d1bd876cd Update docs versiona and README
Closes #3791
2017-08-10 17:22:32 +02:00
Bjørn Erik Pedersen
ec4e6f9df2 Squashed 'docs/' content from commit f887bd7b
git-subtree-dir: docs
git-subtree-split: f887bd7b4e3e7c7e76cd63951e5b0d37d8fe0ac7
2017-08-10 17:18:22 +02:00
Bjørn Erik Pedersen
a1900826b9 Merge commit 'ec4e6f9df2' as 'docs' 2017-08-10 17:18:22 +02:00
Bjørn Erik Pedersen
d384c661fe docs: Re-integrate 2017-08-10 17:17:07 +02:00
Bjørn Erik Pedersen
9a2eb0f1d3 Revert "Squashed 'docs/' changes from 35abbc86..f887bd7b"
That did not go well...

This reverts commit 0373e43102.
2017-08-10 15:00:30 +02:00
Bjørn Erik Pedersen
0373e43102 Squashed 'docs/' changes from 35abbc86..f887bd7b
f887bd7b Add script to pull theme changes
e89bbb2f Update README
78155dec Merge commit '9301947b25099dd402065104b340b1a480906a74' as 'themes/gohugoioTheme'
9301947b Squashed 'themes/gohugoioTheme/' content from commit 7dd8a302
e7557a34 Remove gohugoioTheme submodule
a78bbe22 Add link to Go issue
31d1ef40 Add example for taxonomy terms with metadata
da978cc7 Fix links in Blackfriday extension documentation
950ad115 Fix reference to Blackfriday Extensions section
12d1d026 Add documentation for Blackfriday Extensions
8c2b8fb5 Fix explaination for uglyURLs config option
378aded7 Use community repository for Arch Linux installation guide
56455e7e Improve 0.26 release notes
be7db03a netlify: Build with the new 0.26
d430b2d3 Bump version to 0.26
61adaca0 releaser: Prepare repository for 0.27-DEV
abef29a6 releaser: Add release notes to /docs for release of 0.26
5937fe41 releaser: Bump versions for release of 0.26
033752f1 Merge commit 'e81208265b'
bec2bd12 Make the title case style guide configurable
f1739a44 Merge commit '50ec65fbe1'
a1aac0e5 helpers: Add support for French Guillemets
b8dc1592 doc: Merge commit '2c0d1ccdcd'
7b3e31b8 Merge commit '6dbde8d731'
a37e7201 Bump versions to 0.26-DEV

git-subtree-dir: docs
git-subtree-split: f887bd7b4e3e7c7e76cd63951e5b0d37d8fe0ac7
2017-08-10 14:58:09 +02:00
Bjørn Erik Pedersen
ea2cc26b39 Remove the theme submodule from /docs
See #3791
2017-08-10 14:54:19 +02:00
Johan Gielstra
0f9f73cce5 Add support for multiple config files via --config a.toml,b.toml,c.toml 2017-08-09 20:13:02 +02:00
Daniel Karlsson
c8257f8b72 Render task list item inside label for correct accessibility
Fixes #3303
2017-08-09 20:09:43 +02:00
Matthieu Harlé
0abdeeef67 source: Normalize UniqueID between Windows & Linux 2017-08-09 19:35:40 +02:00
Bjørn Erik Pedersen
e2f8664ef4 hugolib: More spelling 2017-08-08 10:54:35 +02:00
Bjørn Erik Pedersen
46ac745374 all: Fix spelling
And some other minor issues.
2017-08-07 20:19:24 +02:00
Bjørn Erik Pedersen
4b54fb0701 all: gofmt -s 2017-08-07 20:03:15 +02:00
Bjørn Erik Pedersen
40d7d3baa8 releaser: Prepare repository for 0.27-DEV
[ci skip]
2017-08-07 09:13:50 +02:00
Bjørn Erik Pedersen
f090c2711c releaser: Add release notes to /docs for release of 0.26
[ci skip]
2017-08-07 09:09:19 +02:00
Bjørn Erik Pedersen
b36f6e31e0 releaser: Bump versions for release of 0.26
[ci skip]
2017-08-07 09:05:07 +02:00
Bjørn Erik Pedersen
0f51e49269 releaser: Add release notes draft for 0.26 2017-08-07 09:02:04 +02:00
Bjørn Erik Pedersen
62583db503 vendor: Update checksum for inflect
Yes, I double checked.
2017-08-07 09:00:04 +02:00
Bjørn Erik Pedersen
0d495d5373 releaser: Update to new release notes location 2017-08-07 08:54:40 +02:00
Bjørn Erik Pedersen
22b213b1a4 Merge commit 'e81208265b' 2017-08-06 17:24:51 +02:00
Bjørn Erik Pedersen
e81208265b Squashed 'docs/' changes from ef02e34e..35abbc86
35abbc86 Add example with taxonomy for title template func
85e28c10 Remove comment from variable in front matter example
eee8543b Remove comment from variable in front matter example
13a8e0b7 Add missing closing and opening comment tags
83531772 Replace http://example.{com,org}/ with https://example.{com,org}/
6727d820 Update gh repo for issues in config
3a58818e Add note to install Testify
19f13e61 Fix YAML examples in taxonomies.md
dc4b90db Replace old RSS template with new embedded version (#116)
00f39bd7 camelCase output format options
902a14a1 Add missing word to pretty URLs explanation

git-subtree-dir: docs
git-subtree-split: 35abbc869199b852922c024a29e2370272a7c1c8
2017-08-06 17:24:51 +02:00
Bjørn Erik Pedersen
11e5d456e8 releaser: Include stats from hugoDocs
Fixes #3727
2017-08-06 11:18:19 +02:00
Bjørn Erik Pedersen
f768c27f0d helpers: Remove some unused funcs 2017-08-03 15:59:10 +02:00
Jorin Vogel
81c13171a9 Add some missing doc comments
As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
2017-08-03 15:57:51 +02:00
Bjørn Erik Pedersen
9891c0fb0e Remove sourceRelativeLinks
Fixes #3766
2017-08-02 22:04:38 +02:00
Abdullah Diab
481924b34d helpers: Fix broken TaskList in Markdown
As per the referenced issue, if the task list in Markdown has
nothing before it, it will be rendered wrongly:

```
---
title: "My First Post"
date: 2017-07-29T20:21:57+02:00
draft: true
---

* [ ] TaskList

```

is rendered as:

```
<ul> class="task-list"
<li><input type="checkbox" disabled class="task-list-item"> TaskList</li>
</ul>
```

The problem lies in the `List` function of `HugoHTMLRenderer`, it had
a hardocded index of `4` for the first `>` of the list, it is used to
insert the class into the text before the closing bracket, but that
hardcoded index is only right when there is a newline before the
opening bracket, which is the case when there is anything in the
document before the task list, but if there is nothing, then there is
no newline, and the correct index of the first `>` will be `3`.

To fix that we're changing the hardcoded index to be dynamic by using
`bytes.Index` to find it properly. We're also adding a test case to
make sure this is tested against.

Fixes #3710
2017-08-02 00:33:37 +02:00
Jorin Vogel
09907d36af Switch from fork bep/inflect to markbates/inflect
Original package has received updates the fork hasn't.
Without fork updates are easier to maintain.
2017-08-01 13:05:09 +02:00
Bjørn Erik Pedersen
8fb594bfb0 Make the title case style guide configurable
This works for the `title` func and the other places where Hugo makes title case.

* AP style (new default)
* Chicago style
* Go style (what we have today)

Fixes #989
2017-07-31 22:16:46 +02:00
Jorin Vogel
9b4170ce76 Remove unused dependencies from vendor.json 2017-07-31 21:04:37 +02:00
Bjørn Erik Pedersen
6acbe41f0a media: Add missing JSON tags to Type
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-31 16:53:13 +02:00
Bjørn Erik Pedersen
e321306c68 media: Add JSON tags to Type
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-31 16:41:10 +02:00
Bjørn Erik Pedersen
9c1977872c output: Add JSON tags to Format
See https://github.com/gohugoio/hugoDocs/issues/114
2017-07-31 16:38:02 +02:00
Bjørn Erik Pedersen
50ec65fbe1 Squashed 'docs/' changes from 73f355ce..ef02e34e
ef02e34e Correct the mmark example frontmatter parameter
6e91e900 SectionPagesMenu > sectionPagesMenu
1a0db1a6 Adjust sectionPagesMenu
f9f87d9d Fix extension's missing period.
7062ae07 Remove Press and Articles page
771f2b38 Remove outdated and redudant content file for release notes
64cf47c3 Remove outdated note in docs contribution guide
bdb11b89 Fix typo
8324af70 Fixes broken link on Roadmap
d93f0992 functions: Add all missing binary comparison operators
fb7ae80a Fix typo in usage.md
fbdae08b Fix typo in content-management/taxonomies.md
66fab8d2 Make <title> less stuttery
b3cd4c22 Remove old temp release notes
5589ba96 Fix typos in templates/lists.md
af3a0807 http > HTTP
b2af90ae Remove formatting in description of blog article
6e2e60a9 Add blog article about Netlify files
0bb6f2f2 Use title in archetype file
7b2490ff Get the Archetypes up to new spec
f401d69b Load CSS and JS via HTTP/2 server push
4aef4944 Adjust titles
362acdb2 Fix typo in quickstart
c2440560 Remove inline icons from installation guide
d2edcbc3 Revert "Fix links to Disqus template documentation"
622f49cf Add a full commands section at the quick start end
752f065b Fix server command in README
93e08e19 Fix links to Disqus template documentation
5e0cfaa9 Adjust Linux install
d51397c2 Fix broken link in Quick Start
1fb39846 Add /quickstart alias to quickstart
7440616b Add new and simpler quickstart
b3ec6986 Let page title correspond to function name replaceRE
b44499c9 Add YouTube tutorial about taxonomies
88b9eb0e Add RSS templates example
6c0bde3f Update slice.md
6c212ea6 Reorder to match the following content order
d2122992 Complete "content" spelling under theme components
e4824eb3 Fix the output shortcode and its usage
0adfc945 Add archetypes YouTube video
638e9d9b Fix double "your" typo in taxonomies.md

git-subtree-dir: docs
git-subtree-split: ef02e34eaf296c3f94b4446b3c3347771e786057
2017-07-31 09:21:24 +02:00
Bjørn Erik Pedersen
1c18f3fc49 Merge commit '50ec65fbe1' 2017-07-31 09:21:24 +02:00
Bjørn Erik Pedersen
cb9dfc2613 helpers: Add support for French Guillemets
Fixes #3725
2017-07-29 10:10:40 +02:00
Bjørn Erik Pedersen
c4a0b6e8ab vendor: Add support for French Guillemets
Fixes #3725
2017-07-28 19:59:58 +02:00
Bjørn Erik Pedersen
a8080c084f Remove CODEOWNERS
To prevent GitHub starting premature code reviews.

See #3737
2017-07-28 19:34:51 +02:00
Anthony Fok
84710eb3ec Add -u flag for go get govendor in CONTRIBUTING.md
This to to ensure the reader is not stuck with a stale version
of govendor where `govendor get` may not actually build/install
the final hugo binary.

See kardianos/govendor#330
2017-07-28 09:18:20 -06:00
Anthony Fok
555a9bc806 tpl: Accommodate gccgo in TestMethodToName
Fixes #3744
2017-07-28 08:03:15 +02:00
Cameron Moore
55d0b89417 tpl/collections: Fix intersect on []interface{} handling
Fixes #3718
2017-07-28 07:21:21 +02:00
Max Rydahl Andersen
aee2b06780 Add --debug option to be improved on over time
Why:

 * first time using hugo I got very little info from --verbose output
   but I noticed there is quite a lot of useful DEBUG logging
 * asked for in other issues like https://github.com/gohugoio/hugo/issues/3514

This change addreses the need by:

 * adding a simple --debug flag which simply turns on debug level in stdout
   and logoutput if enabled.
2017-07-27 22:36:22 +02:00
Anthony Fok
c1a5da9777 vendor: Update dependencies for 0.26-DEV 2017-07-27 13:45:43 -06:00
Anthony Fok
9ed48c1c9a Dockerfile: Run go install with -ldflags '-s -w'
This reduce the Docker image size from 27 MB to 20.5 MB.
2017-07-26 03:22:39 -06:00
Maik Ellerbrock
bfe0bfbbd1 Dockerfile: Reduce image size from 277MB to 27MB
"xtrem" awesome container size optimization
by using alpine:3.6 as base image
and by installing Go at build time.

See #3730 and #3738
2017-07-26 00:51:27 -06:00
Maik Ellerbrock
606d6a8c91 Dockerfile: Optimize Docker image size
Reduce Docker image size from 428 MB to 277 MB.

See #3674
2017-07-23 12:30:18 -06:00
Bjørn Erik Pedersen
12e0495203 docs: Add RSS template lookup example 2017-07-22 15:05:43 +02:00
Jake Howard
6cd33f6953 tpl: Use hash for cache key
Use a hash for the cache key, to fix 'file name too long' errors when retreiving from long urls

Fixes #3690
2017-07-21 13:10:11 +02:00
Bjørn Erik Pedersen
dbe63970e0 hugolib: Support reflinks starting with a slash
Fixes #3703
2017-07-21 13:08:32 +02:00
Anthony Fok
0c90e6d710 Change "hugodocs" to "hugoDocs" to match GitHub's default URL 2017-07-21 03:36:44 -06:00
Vasyl Solovei
b60aa1a504 helpers: Add --trace to asciidoctor args
This will help to understand and fix errors by
seeing stacktrace of an error.

See #3714
2017-07-21 03:07:56 -06:00
Bjørn Erik Pedersen
ff433f9813 Add script to pull in docs changes 2017-07-21 11:01:13 +02:00
Bjørn Erik Pedersen
2c0d1ccdcd Squashed 'docs/' changes from b0470688..73f355ce
73f355ce Update theme
83ff50c2 Use example.com in examples
71292134 Add alias news > release-notes
2e15f642 Update theme
8eef09d2 Add Pygments configuration
572b9e75 Clean up the code shortcode use
a1b2fd3b Remove the code fence language codes
1473b1d9 Remove redundant text
b92c2042 Update theme
8f439c28 Edit contributing section in README
8bcf8a19 Add contributing section to README
4c44ee1c Fix broken content file
2bdc7710 Clarify .Data.Pages sorting in lists.md
092271c2 Use infinitive mood for main titles
b9b8abef Update theme to reflect change to home page content
b897b71b Change copy to use sentence case
fd675ee5 Enable RSS feed for sections
060a5e27 Correct movie title in taxonomies.md
6a5ca96a Update displayed site name for Hub
22f4b7a4 Add example of starting up the local server
d9612cb3 Update theme
a8c3988a Update theme
4198189d Update theme
12d6b016 Update theme
2b1c4197 Update theme
b6d90a1e Fix News release titles
cfe751db Add some build info to README

git-subtree-dir: docs
git-subtree-split: 73f355ce0dd88d032062ea70067431ab980cdd8d
2017-07-21 11:00:08 +02:00
Bjørn Erik Pedersen
f387cb1b38 doc: Merge commit '2c0d1ccdcd' 2017-07-21 11:00:08 +02:00
Michael Henderson
40566ec98e Remove ^M from file to make line-endings consistent 2017-07-21 02:41:07 -06:00
digitalcraftsman
7759a98f71 Clarify the repo choice in the contribution guidelines 2017-07-19 20:53:27 +02:00
digitalcraftsman
720786cd3e Add note about doc-related pull requests in contribution guide 2017-07-18 21:49:16 +02:00
Bjørn Erik Pedersen
214e16eca3 appveyor: Update submodules
Needed for the new docs to build.
2017-07-18 13:08:48 +02:00
Bjørn Erik Pedersen
a2fb8150c3 Add some README info about the docs repo 2017-07-18 10:50:59 +02:00
Bjørn Erik Pedersen
73273d4e81 Add the docs theme to .gitmodules
See #3713
2017-07-18 10:44:02 +02:00
Bjørn Erik Pedersen
4c220c4ac2 Merge commit '6dbde8d731'
Fixes #3709
2017-07-18 10:33:58 +02:00
Bjørn Erik Pedersen
6dbde8d731 Squashed 'docs/' changes from f3c88b08..b0470688
b0470688 Use infinitive mood for titles
96066d1b Update theme to fix JS error
8d500e7d Fix dead key typo in v0.25 release notes
3f6bd838 Add site image for Twitter card
52adf3c9 Fix union description
b1238c98 Document Pages support in union and intersect
14beb0ec Add some more missing aliases
2baad4b3 Add missing functions alias
d3603ef9 Adjust GetPage doc
adeca9f0 Remove unused file
4b0d3393 Regenerate commands doc
436f2a36 Improve Netlify config
94bf0abf Remove tags from menu
2c257180 Add production config
b779fdc8 Remove unused files
fac13f4f Copy edits variables
92726cf0 Copy edits themes and tools
6a058168 Templates copy edits
8cdaa2b6 Update theme
61203de8 Some minor edits of the getting started section
43c935a8 Copy editing of the template func documentation
972f8ba2 Update theme
b9bdfd40 Prefix methods with a "."
4e0bca2b Remove the needsexamples construct
4ac6e828 Update content references to new gohugoio org
646112a2 More copy edits
c6bf314d Update theme
2d75e090 Content fix
ef0564e2 Update theme
6994ef2c Content fix
48c2b9f4 Fix broken links
94806d0c Update theme
29ba55bf Some more copy edits
2a657165 Set unix func to draft
90ba82b4 Update theme
183472a6 Do some copy editing
87db4be7 Remove the tags config for now
52deebf6 next: Cleanup after the big merge
6b07427f next: Final step of merge
45f33bf6 Merge branch 'reword' of hugo-docs-concept into next
f00e68e7 Add release notes for v0.20 - 0.25.1
86c3ac1b Add fREW Schmidt's articles to news
a518ccb9 Fix baseurl
cea93ebe Update archetypes documentation for v0.24
469e504c Explain use of disableKinds to remove default taxonomy
73d616c5 Remove category taxonomy from site config
813a0cb0 Add time to int example for time function
58da4d9e Clean up link formatting on lookup order page
52aedacd Add admonition note to getenv function
9305be17 Make minor tweaks to docs on generated dirs in Directory Structure
ed98ef4e Update dir structure and remove old YT video from Quick Start
240f675f Change baseurl to empty string to fix CSS in dev URL
a4400e8a Remove all temp landing page templating and content
af940ab5 Add temporary tax and terms templates for Announcement page
5c383297 Add temporary Hugodocs.info site migration page
5004ef61 Update output of "hugo help" on Basic Usage page
6df80224 Add CentOS to Install Hugo page
2cef2175 Tweak marketing "copy" for custom outputs on homepage features
ed40185e Clean up language a bit around Configuring RSS entries
0671aed5 Add regenerated docs.json
1b7044b2 Add LICENSE file
578d7978 Release of v0.25.1
e6c38585 Merge branch 'tmp'
e01df481 releaser: Prepare repository for 0.25-DEV
6f462739 releaser: Add release notes to /docs for release of 0.25.1
91a4d55f releaser: Bump versions for release of 0.25.1
d0ee1e45 Add jonbeebe.net to the showcase
a4b499fb Add Hugo/Unix/Vim integration post to press section
ec4cae94 Fix link for pull requests in press.md
c37ea39a releaser: Prepare repository for 0.26-DEV
d89da99d releaser: Add release notes to /docs for release of 0.25
2b11466e releaser: Bump versions for release of 0.25
a8096ce4 docs: Regenerate the docs helpers
d68eaeeb docs: Regenerate commands doc
1c8fff5d docs: Merge docs commit '37c69054e2'
2afe0747 tpl/math: Add log function
ab4e5da8 Merge commit 'dd78d5b23f' as 'docs'
31393f60 Remove the docs submodule
aff1ac32 commands: Use example.com as homepage for new theme
b463c5ad releaser: Remove trailing space in fixes list
1a041522 releaser: One more fix
3aade089 releaser: Improve docs submodule handling
0e1bda34 vendor: Fix +-timezones in TOML
2e4ccd3d create: Preserve shortcodes in archetype templates
fd924d18 commands: Create default archetype on new site
e908d955 create: Fix archetype regression when no archetype file
8b620f7a docs: Update
12611e0c Update docs
58ce9213 releaser: Fix typo, change "relase" to "release"
ae3039b6 Update docs
3554fd12 releaser: Prepare repository for 0.25-DEV
1ac4dbb9 releaser: Update /docs to 0.24 [ci skip]
8f69fe57 releaser: Bump versions for release of 0.24
f8c5716a releaser: Update /docs [ci skip]
2ba9a876 releaser: Add release notes draft for 0.24
b7f8d057 Add numfmt to functions list
976c398f Add numfmt to functions list
c43b512b output: Identify extension-less text types as text
19f2e729 Support non-md files as archetype files
0f40e1fa media, hugolib: Support extension-less media types
516e6c6d hugolib: Add disableAliases
175eb008 Take the first crack at some copy for custom output types
176c35d4 Update theme to include theme PR gohugoio/gohugoioTheme#37
3ac3539f Fix typo on output formats
3183b9a2 parser: Fix handling of quoted brackets in JSON front matter
1a282ee4 vendor: Update Viper
fb53987a hugolib: Fix error handling for JSON front matter
6e3bd702 Update theme to reflect NAV changes
662e12f3 commands, create: Add .Site to the archetype templates
422057f6 create: Use archetype template as-is as a Go template
acd7ffdf config.toml: Update links for GH org and forum
4aa12390 Update links to new discuss URL
d78c5b4d Replace all instances of discuss.gohugo.io with new discourse.gohugo.io URL
e731a7aa Fix heading typo for Windows 10 users in install instructions
4231fd69 Update all relevant instances of spf13 to gohugoio in install instructions
411ac930 vendor: Update deps
4345026b releaser: Add TODO
deffb4c3 releaser: Prepare repository for 0.24-DEV
12b844da releaser: Update /docs to 0.23 [ci skip]
b502b9d8 releaser: Bump versions for release of 0.23
781a1539 releaser: Update /docs [ci skip]
af85eb62 releaser: Adjust
882b2b61 releaser: Add release notes draft for 0.23
00e2fe07 releaser: Adapt release logic to docs submodule
d4e8ea3e Move the theme to the new org
481850c9 Add STOQE's tweet
186eacbe Update tweets through mid-June
ccb8300d Update logo link in README
214dbdfb Remove docs building from CI builds
729be807 commands: Adjust docs path
6cee0dfe Add docs as submodule
8be3934b docs: Remove
fbb25014 Update Gitter link in README
bf5e5995 vendor: Update to new org name
86543d6a Change Windows build badge link, take #3
3b47805f Change Windows build badge link, take #2
e6ae32a0 Update Windows build link
5103935a hugolib: Disable shaky leaktest on CI
95386544 Update links in CONTRIBUTING.md due to the org transition
7b99fb9f Update source path in Dockerfile due to the org transition
d531d17b Update clone folder in appveyor.yml due to the org transition
9266bf9d Update import path in snapcraft.yaml due to the org transition
873a6f18 Run gofmt to get imports in line vs gohugoio/hugo
f503d76a Update Makefile vs gohugoio/hugo
93643860 Update README to point to gohugoio/hugo
db46bcf8 examples: Update examples to point to gohugoio/hugo
66d4850b  docs: Update layout references to gohugoio/hugo
715ff1f8 docs: Update content references to gohugoio/hugo
c17ad675 all: Update textual references in Go source to point to gohugoio/hugo
d8717cd4 all: Update import paths to gohugoio/hugo
2d08a296 vendor: Improve GitInfo
a9e551a1 Fix handling of duplicate footnotes
2aafb247 Revert "releaser: Bump versions for release of 0.22.1"
4bd5ce7e releaser: Prepare repository for 0.23-DEV
0f78dd06 releaser: Prepare repository for 0.22.1-DEV
714594a8 releaser: Add relase notes to /docs for release of 0.22.1
dce70fb7 releaser: Bump versions for release of 0.22.1
c84079ba releaser: Add release notes draft for 0.22.1
a30023f5 hugolib: Fix section logic for root folders with subfolders
1f26420d hugolib: Support sub-sections in permalink settings
ff54b6bd commands: Adjust rlimit to 64000
629e1439 commands: Make error on setting rlimit a warning only
26aa06a3 Revert "commands: Remove the rlimit tweaking on macOS"
52a0cea6 docs: Add note on updates for rpm-based distros
8ca586a6 releaser: Prepare repository for 0.23-DEV
e797a94d releaser: Add relase notes to /docs for release of 0.22
21cf464c releaser: Bump versions for release of 0.22
fb5cac70 releaser: Spelling
63311a14 releaser: Add release notes draft for release of 0.22
0f8f5141 docs: Rewrite “Archetypes” article
8744e6d0 Add noindex to alias explanation
39408925 docs: change .Site to $.Site where the global context is masked by the term's context
208d1646 Add additional reference to layout front matter
e47b74d8 Add information about layout front matter variable
00d63215 docs: Use single link element for RSS in example
f1da5a15 hugolib: Make the RSS feed use the date for the node it represents
d5ab7f08 Add noindex tag to HTML generated by Hugo Aliases
55dd533b hugolib: Unexport some internal methods
b82cd82f tpl/collections: Add uint support to In
204c3a9e tpl/collections: Support interfaces in union
fe901b81 hugolib, commands: Improve live-reload on directory structure changes
b3968939 hugolib: Enable nested sections
bef50485 Revert "hugolib: Fix live-reload regression for add/removal of dirs"
49a10430 hugolib: Fix live-reload regression for add/removal of dirs
5be04486 hugolib: Fix disablePathToLower regression
1f55cb76 hugolib: Simplify some test loops
8aaec644 hugolib: Add test for no 404 in sitemap
55c53ae9 docs: Add thislittleduck.com to the showcase
44e6279d Move archetypes from Bud's theme to project dir
d05edb0f Move all shortcodes out of theme and into project dir
5ba50897 Add more tweets
9ccb82fa Add functions file for uniq
e28d9aa4 tpl: Add uniq function
92bb618c Add new tweets through June 3
9412e0b0 Remove Duoshuo from list of commenting services
46b46078 hugolib: Remove some superflous TODO comments
2c2ce33a parser: Add horizontal YAML tags to benchmark
adc0572d docs: Add Nutspubcrawl.com to the showcase
0907a5c1 all: Temporarily revert to BurntSushi for TOML front matter handling
3d9c4f51 parser: Add BenchmarkFrontmatterTags
250ebc1d hugolib: Add some more tags to benchmark
b37d9594 hugolib: Bump leaktest timeout to 30 seconds
4e00bb7f Write CPU and mem profiles from site benchmark script
fdcfcced hugolib: Fix tag calculation in benchmark test
4d0b6653 Fix typo on Hawksworth's tweet for homepage
bdacc320 Move tweet data file to project dir from theme
c940f08f Remove duplicate custom output pages
59c1bdc5 Move custom outputs from CM to templates section
0e363fe7 Remove theme-showcase.md => removing from global nav as well
213ea749 hugolib: Add number of tags as a benchmark know
08a10e5d hubolib: Make the site benchmark output more compact
d83c53a8 Replace "Github" with "GitHub"
9fa71c94 hubolib: Add 10k pages as a benchmark variant
d25d89e6 hugolib: Increase leaktest timeout
89697019 hugolib: Break early from sitemap disabled check
69d92dc4 hugolib: Respect disableKinds=["sitemap"]
d74452cf Add benchSite.sh
978951cf vendor: Update go-toml
00ea027e Clean up shortcode description on homepage and remove extra "to"
f96df8f2 Remove outdated developer tools
f2ede42a Make minor tweaks to home page and news layout
4aff2b6e source: Cache language config
2342df4d hugolib: Add TOML/YAML switch to benchmark
828427ef hugolib: Adjust timeout for leaktest
ce624cc7 hugolib: Add slightly more realistic tag distribution to benchmark
8930e259 hugolib: Add site building benchmarks
8c53afdb Move assets used in content files into images/ subfolder
0d9ce481 Add _headers file for cross-origin issues with SVGs
fede945d Add home page to hugoDocs
f4c1efc6 Make assets used in content files theme independent
710300cb docs: Update overview/usage
93cab620 Update snapcraft.yaml
b68758a9 Update _index.md to show more intuitive link titles
7fd64f19 Merge bp/theme-design branch containing Bud Parr's new design
19de4476 hubolib: Remove the regular page restriction from .Site.GetPage
37e37877 docs: Fix parameter name in YouTube shortcode section
b5b41c44 hugolib: Refine allKindsInPages
bde807bd travis: Update Go versions
612f6e3a hugolib: Fix ref/relref issue with duplicate base filenames
50d11138 hugolib: Add a cache to GetPage
e0c2e798 hugolib: Support regular pages in .Site.GetPage
87203139 cache: Add a simple partitioned lazy cache
ccf1fcb0 Remove single.html references from homepage template
a91c2705 docs: Add furqansoftware.com to the showcase
99412bfe docs: Delete `brew update` from docs
f4d9612e Update console message in sample code for brew installation
2e693d1e Remove "brew update" from install page
801ab9f5 Remove "brew update" from install page
421a4694 cmd: Replace flagChanged with pflag.FlagSet.Changed
0a40cb43 docs: Add tutswiki.com to the showcase
d460159a docs: Regenerate commands docs
8b49c3a1 hugolib: Enable leaktest
bcd32f10 commands: Remove the rlimit tweaking on macOS
62fe640d vendor: Update libs
fbb78b89 hugolib: Speed up GetPage
6c560288 hugolib: Add BenchmarkGetPage
89b85aed releaser: Disable flaky test
4113693a tpl/cast: Handle template.HTML and friends in ToInt
f41f7282 Remove Unmaintaned Frontends from Tools.
8ddc7a5c releaser: Prepare repository for 0.22-DEV
f63ee656 releaser: Add relase notes to /docs for release of 0.21
1a965e5d releaser: Bump versions for release of 0.21
baa414ae releaser: Add a new step
cdf32f08 releaser: Update ldflags
98e333b3 vendor: Update golang.org/x/sys/unix
a0096213 releaser: Add release notes draft for 0.21
a119ef69 tpl/time: Re-add the time example
1f9e8dcc tpl: Make the Namespace func signature explicit
ebd636e4 releaser: Delay the version bumping
4d1989d5 releaser: Fix tag detection for changelog when doing a main release
a59525b0 tpl/time: Remove asTime template func mapping
3954160a tpl/time: Support overlapping namespace and template func
93c5774d tpl/collections: Make IsSet WARNING less chatty
77d2fe78 docs: Add ttsreader.com to the showcase
405c2f68 tpl/images: Fix error handling in Config
00945628 Remove showcase
58d4c25e tpl/collections: Use Feedback log instead of Error in IsSet
38661c17 tpl/collections: Log an error on unsupported types in IsSet
42fbded1 docs: Regenerate docs helper
10287263 output: Fix output format mixup in example
27e88154 docs: Fix incorrect path in templates/list
f1c29b01 tpl/collections: Add support for interfaces to intersect
93b3b138 tpl/lang: Add NumFmt function
e92ce83d docs: Update references to JSON
4c427f6a docs: Fix minor grammar issue in shortcodes.md
e682fcc6 hugolib: Fix RSSLink vs RSS Output Format
b6ea492b tmplimpl: Add support for ellipsed paginator
6e2f2dd8 hugolib: Fix output formats override when no outputs definition given
ac57a388 Add more 2017 tweets for homepage
765fd441 Remove GH buttons to test performance change
ef8ed989 Add back CRP for speed tests
94b5be67 commands: Skip .git directories
c7646551 Dockerfile: Remove ENTRYPOINT
af72db80 hugolib: Handle shortcode per output format
e951d657 hugolib: Handle any errors in processShortcodes
2bcbf104 hugolib: Prepare render per output format
1e4d082c hubolib: Refactor site rendering with an "output format context"
1d70aa98 docs: Add carnivorousplants.co.uk to the showcase
6fc7337a docs: Add worldtowriters.com to the showcase
ddaf6941 docs: Add ocul.on.ca/topomaps to the showcase
a28fbca6 docs: Fixed incorrect specification of directory structure
544f0a63 hugolib: The deprecated Extension, Now and TargetPath will now ERROR
5794a265 commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, disableRobotsTXT
5d6d5221 Add anchor titles to all links on partial templates page
c022b4bb Add more links to partial templates page
ebf677a5 hubolib: Embed Page in WeightedPage
58d9cbd3 hugolib: Improve shortcode error message
7d399904 helpers: Don't clean the path before Join
9b202862 commands: Use paths from PathSpec for walker
c9976155 docs: Fix bash command in tutorials/github-pages-blog
9b5fac0b Fix menu for "What is Hugo" page
9b080dc6 helpers: Don't clean path twice
231c0a7e docs: Fix typo in templates/functions.md
5575ed44 docs: Update datafiles.md
42f4ce15 hugolib: Add default config for ignoreFiles
14555f13 Fix broken link on templates/introduction page
cff2f313 tpl: Add some GoDoc info to template func docs
f9e41f64 releaser: Push the tag before goreleaser is run
8f2ab5f4 i18n: Simplify code for detecting of untranslated id
cce49997 i18n: Add tests
3dd949d9 tpl/urls: Make urlize return a string
a40d1f6e i18n: Improve the detection of untranslated string
9c17fcb4 Update slug translation in multilingual.md
635b3bb4 docs: Add documentation on slug translation
08c0de5c tpl/data: Clean up data namespace
1cf2f3dc tpl/data: Move cache logic to separate file
5f095c27 tpl/data: Shorten some internal func names
f604076d tpl/images: Fix embedded sync.Mutex
f69df916 tpl: Add basic tests for all namespace init funcs
690b0f8f tpl: Add docshelper for template funcs
e2b067f0 tpl/partials: Remouve unused method
0e226042 tpl: Fix the remaining template funcs namespace issues
4714085a  tpl/urls: Make it a package that stands on its own
55f90a3a tpl/transform: Make it a package that stands on its own
ee5aa84f tpl/time: Make it a package that stands on its own
4a346346 tpl/safe: Make it a package that stands on its own
b958c0c1 tpl/os: Make it a package that stands on its own
fc77b630 tpl/inflect: Make it a package that stands on its own
a432c90a tpl/images: Make it a package that stands on its own
9aee8ace tpl/encoding: Make it a package that stands on its own
744dccbe tpl/crypto: Make it a package that stands on its own
8a49c0b3 tpl/collections: Make it a package that stands on its own
a3bf118e tpl/compare: Make it a package that stands on its own
65615573 tpl/data: Make it a package that stands on its own
0ab23eb5 tpl/strings: Make it a package that stands on its own
eefa0703 tpl/math: Make it a package that stands on its own
c5373efc tpl: Add TemplateFuncsNamespaceRegistry
8f95172c releaser: Disable shaky test
f4857661 Add txtpen to the Commenting Alternatives section
906ad232 Change temporarily ghdocsrepo field in site config
c616ade9 Add logic and operators tags to where.md for better discoverability
044b2389 Add regex101.com reference to both RE functions
c2a5952f Add regex101.com reference to both RE functions
8b94418e Add link to regex101.com for replace/find RE
71471f13 Remove opinionated code blocks (Third round)
bc9a6491 Clean up code block for ids and classes (Second round)
e4336f06 Fix minor typos in "where" function page
8e151a93 Clean up all list templating samples
abe797c9 Clean up code block (First round)
4b637ac0 docs: Replace cdn.mathjax.org with cdnjs.cloudflare.com
b6dc570c Update MathJax official CDN and respective code block
de7c32a1 tpl: Add template function namespaces
154e18dd Render 404 in default language only
565a78b1 netlify: Add some security headers
355736ec livereload: Fix data race in close
86f36c38 Comment out path frontM override in cm-organization page temporarily
93a447c5 docs: Fix typos
eaf75a18 vendor: Update cobra and pflag
8d0917af hubolib: Narrow a test assertion
718c0e14 releaser: Fix broken test build
d6957c19 releaser: Skip Git test on Travis
a695202f release: Add relase notes for 0.20.6
fea4fd86 hugolib: Avoid index.md in /index/index.html
656f8188 docs: Regenerate commands docs
f0f69d03 commands: Make first letter of flags' usage lowercase
8fbec599 vendor: Update cobra and pflag
d163576c Add blank content file for new numFormat function
e55399f5 releaser: Fix some of the fpm fields for deb
5ad2f176 hugolib: Make missing GitInfo a WARNING
202fa954 Update custom output formats description to mention extensiblity
0c435aaa Update description for output formats
162d3a58 docs: Add notes about some output format behaviour
fd5109b6 releaser: Fix ldflags setting
88d81110 docs: Remove temp release notes
4ac60e4c docs: Add relase notes for 0.20.5
b332d93e docs: Add a time to 0.20.4 release docs
b096a10f releaser: Add relase notes for release of 0.20.4
24be139c Add -linkmode external
3e0f1ad7 Set extldflags to static when building
0bd0593a releaser: Add relase notes to /docs for release of 0.20.3
c6e4aff1 release: Adjust release notes for 0.20.3
c0f491ab releaser: Add relase notes draft for release of 0.20.3
67746f36 releaser: Fix a Go vet complaint
7f6430d8 Automate the Hugo release process
0e87b18b hugolib: Fix handling of zero-length files
e98f885b hugolib: Prevent decoding pageParam in common cases
6498d73c helpers: Delete RenderingContext.getConfig
b5b6e81c hugolib: Ignore non-source files on partial rebuild
90d3fbf1 tplimpl: Add translation links to the default sitemap template
5f3ad1c3 commands: Import Octopress image tag in Jekyll importer
8cd3ea56 Fix check-vendor logic in Makefile
9c72fa36 Move lookup order section within lookup order page
8fb94fa4 Add note on Golang regexp library to findRE and replaceRE funcs
6aaf47be Remove the pesky .DS_store from the site and improve .gitignore
1b867649 Correct typo in cm-types page
e63c2fb1 Remove extra parentheses in GetPage function example
21ebf481 Remove extra parentheses in GetPage function example
d3041306 Clean up links in RSS templates
79355410 Remove check-vendor from make check
d6818f23 vendor: Fix go-toml
592e055f Add check-vendor target to Makefile
e97837f6 Fix typo in Format function
4a2148e2 Clean up list ordering and grouping; add ref to Format func
c67f09b2 Update signature for len function
999ba8d4 Add len to functions list with examples
246bb068 Fix heading structure for newest releases
6cba8ff7 Fix minor typos in Release Notes
2d1854f7 Add 20+ Release Notes
b1ce0d98 Fix .Date.Pages typos across the board
f7fae4b1 Fix .Date.Pages typos across the board
ab692e73 hugolib: Log WARNING only on unknown /data files
7cdc244a docs: Add txtpen as alternative commenting service
ed0c3ec4 Fix .Data.Pages range in sample
b5e32eb6 docs: Fix .Data.Pages range in sample
66ec6305 docs: Add 0.20.2 release notes
1cf29200 tplimpl: Allow text partials in HTML templates
fcca2cad Clean up single page and list template explanations further
318a75ec Update homepage terminal to govendor install instructions
74da85ed Fix small typographical errors in shortcode templating page
d557ca80 Explain use of .Params in shortcode templating
807f4519 Make small typographical tweaks to homepage template
8f70189a Fix typographical errors in lists.md
e8457556 Beef up explanation of _index.md in homepage content
452bd58a Add admonition note to GitHub hosting
9ed90b70 Add more in-page references to date-related page vars
0fff8177 Propose archetype usage for summary divider in content-management/summaries.md
8aaa5e17 Fix typo in content-management/types.md
26f87754 Fix broken link in toc.md to page variables
c5e2fa22 Fix link in cm-cross references
83fba815 Fix links in content-management/front-matter.md
8ccee671 vendor: Update dependencies
86a97dbd docs: Add Netlify badge if on Netlify
5e2e62d9 Get versions back to 0.20-DEV
8ac1fcd0 Prepare release 0.20.1
0ed3beec docs: Add 0.20.1 release notes
077005e5 output: Fix base theme vs project base template logic
efc0e05c docs: Add sanjay-saxena.github.io to the showcase
ab7f43e1 Update math function page to include "add" usage with strings
6d2ea0f7 hugolib, output: Do not lower case template names
45c74526 hugolib: Must recreate Paginator on live-reload
e765b43e hugolib: Avoid recreating the Paginator on copy
3b677594 hugolib: Avoid processing the same notify event twice
da022418 Remove unnecessary keys from config file
81fa0a45 Adjust all metadata partials to use absURL and relURL
7ee73ffd Update scripts to use absURL func
5fad8a9d snapcraft: Go 1.8.1
9a1c3f42 Add CLI Overview
aa0c2bd6 Add Emacs Easy Hugo to "other tools" page
26777720 Fix env var description in configuration.md
24ae7df1 Add mention of output format configuration to configuration.md
0b51849d Remove wip badge from output formats page
08ff6f61 Do a small language cleanup for output formats page
33db4143 Update custom outputs title and aliases
6652cb8b Move custom outputs to templating section
9ec00725 hugolib: Final fix of rssURI deprecation
cfd3af8e hugolib: Only show rssUri deprecation WARNING if it is actually set
4c6fec56 all Bump to 0.21-DEV
dac0d4a6 all: Prepare Hugo 0.20 release version
03ec2b33 docs: AddHugo 0.20 Release Notes
2ea0e17b Update incorrect titles in example front matter
18f5f3c1 docs: Add Emacs plugin easy-hugo
308678aa docs: Add siba.ai to the showcase
b50796e3 Add siba.ai to showcase
e73a35de hugolib: Remove unused line
c9731b2c hugolib: Delay deletion of Page.Now()
9ebbf1b0 docs: Add docs about output format linking
2874fc75 hugolib, output: Add NotAlternative to OutputFormat
9e69a92e hugolib: Deprecate rssURI
31014f0a Fix typos in yt shortcode description
f80b90b9 Add back CRP
9f1c72ee Fix typo for code block on templates introduction
0902a1c0 Make toc font size less obnoxiously large
8f60e9ac Update single page template example
bd40c73f Add datatable shortcodes and custom outputs draft
f9df1ed6 Change datatable shortcode to articlelistshortcode
9a8b65d8 travis: Go 1.8.1
7b2e1b0b hubolib: Do not add missing trailing slash to command line baseURL
3ce3917e Remove mention of v0.20 in Getting Started
aa5fddd5 Change width and height of search icon in SVG dimensions
1b638005 Fix links in content-management/front-matter.md
c05526d6 Remove "Using Hugo's Server in Production" section
0b4c1af0 Add some improvements to getting-started/usage.md
63034b10 Keep names of content formats more consistent
39f1401b Keep the name of content formats more consistent
2e639d95 Make a small casing fix on installing page
e975a07f Update press.md
2329545a Favor HTTPS and use ref.-style links more consistently
7ad721fd hugolib: Add .Site.Params.mainSections
5714531f hugolib: Only do link transforms etc. on HTML type of pages
3c405f51 all: Document the Output Formats feature
95808724 hugolib: Update deprecation vs Hugo 0.20
af99a590 output: Add some sane defaults for output format
83dcf5f3 Add SiteGetPage example to taxonomy templates
45bf976b Add Li-Wen Yip press additions to articles data file
7ad5d51e Update lastmod for single page templates
c7816c5b Update single page examples to use more recent Hugo features
7d60b1a5 Update mixed param type error for shortcodes
abe58bf5 Remove more wordiness from shortcode parameter type intro text
7ad76bfa Make yet another typo fix in shortcode templates
2e981048 Clean up shortcode templates
74d331ba Change to Template Lookup Order for temp-lookup linktitle
78164269 Fix heading typo in cm shortcodes
56d459d6 Fix heading in cm-shortcodes
3375fc2b Fix heading in cm-shortcodes
260b55ea tpl: Set RenderingContext.Config in markdownify
8f09e5f6 helpers: Add new properties to ContentSpec
c4a11655 all: Handle all errors
35fffad1 Update content-management/multilingual to reflect new TOML support
bf2d2bbe Fix typo: "KaTex" → "KaTeX"
e77bb13c media, output: Fix spelling
e6e1aca3 docs: Disable GitInfo by default
f3b4a0e9 docs: Add info about Pygments installation in installing.md
0dd6890e docs: Add article by Li-Wen Yip to press section
119182aa Add sections_weight to all content files
ce428a9c Update trim description with note on whitespace
fe78595c Add emphasis to trim function explanation
6650fae7 tpl: Fix nil pointer in Tree()
f4b12935 Fix typos in syntax highlighting docs
6b7c8497 Update trim explanation per gohugoio/hugo#3279
b31da911 docs: Properly capitalize GitHub
4b1dfc1d Update govendor instructions in source install
14255871 hugolib: Add optional outputFormat to Ref/RelRef
a883948c Register all media types when in server mode
bc36d468 tplimpl: Reintroduce the double template lookup in Partial
7da1b659 all: Use the configured output types to resolve template type
868f89d5 hugolib: Improve render error handling
04d80e6e commands, helpers: Add correct verbose log level to the global loggers
0802f79e output: Make template name lower cased
10ff2f31 hugolib: Read media types and output formats from site config
f8d555cc media: Add DecodeTypes
c9aee467 output: Add output formats decoder
d6e8b86f output: Add CSV to the global output formats list
2cf2b483 Add language-hugo Atom plugin to dev-tools editors
dba7e38a Add embedded SVGs example to dict function
af3230aa Fix typos and add explanation on configuration.md
77647be7 Expand static dir explanation in dir structure
a098081c vendor: Update go-i18n
5d7eeead docs: Remove localhost part from link
8b5b558b tpl: Rework to handle both text and HTML templates
53eee8a4 Update Mmark info to show ease of use with MathJax and KaTeX
b3819aa0 Add esaezgil.com to showcase
27610ddd hugolib: Don't ignore errors from applyDepsIfNeeded
6b29bccf hugolib, i18n: Update tests with flat format and TOML files
28fdd71c vendor: Update go-i18n
fe8462b2 docs, examples: Use TOML for i18n config files
d122260d vendor: update goorgeous
a037b855 docs: Add blog of Enrique Saez Gil to the site showcase
7eb71ee0 Revert "tpl: Rework to handle both text and HTML templates"
c97dae40 hugolib: Use Page Kind in template errors to prevent log spam
0aeadfd0 tplimpl: Add test with failing partial
5c5efa03 tpl: Rework to handle both text and HTML templates
631833e9 Add missing comma in Supported Content Formats page
561edc0c Add fm-specific Mmark syntax per bep suggestion
8d65b360 Add fm-specific Mmark syntax per bep suggestion
484bbd1e Add fm-specific Mmark syntax per bep suggestion
3d7960e1 Fix typos in Mmark section in content formats
969178b6 Fix typos in Mmark section in content formats
5a59b0fd Add Mmark section to content formats
e491b309 Add Mmark section to content formats
73c1c7b6 vendor: Update cobra
67076e58 Add example to "now" function
f911b107 media, output: Add CSV type and format
ab07457e Update with temp GA code
d1709df3 Fix broken link at the bottom of shortcodes.md
904eaa8d Fix incorrect syntax decl in cm-shortcodes
7e3805b5 Fix odd formatting in cross-references
45aad24e Add note on Mmark with MathJax to formats doc
d98cfe10 Update nginx config in 404 templates
fb94d4c9 Fix terms template lookup order
4d27a27b Update broken links in customizing themes
bf4015d6 Fix typos in vimeo sc description
001cd27c Clarify custom class to yt and vimeo shortcodes
0c770e40 Add warning to isset function for lowercase site config keys
a649a7ae Add firstname.club to showcase
763dd22c Remove how-to-use docs-page
d2829694 Fix inconsistencies in FM categories
530002e6 Update GitHub deploy
d7d5771a Update gh deploy
68969470 Update content to use Hugo's built-in menu
05949c90 docs: Fix typo/source link in firstname.club showcase addition
d5036c3a docs: Update link to Disqus alternative Livefyre.com
af1f9ecf docs: Add firstname.club to the showcase
42a4f6f9 tplimpl: Fix map data race in URLLock
79b34c2f tplimpl: Fix deadlock in getJSON
de558c3e Remove Livefyre from commenting options
a05fbce1 Remove unnecessary pre 2.4 git docs from GH hosting instructions
5758a6d6 Update GitHub pages hosting
b286c7d9 Remove intelligent posts - stale issue - from roadmap
e1645544 Update taxonomy templates
3c6b16d5 vendor: Update fsnotify with several Linux-fixes
87b3cd46 hugolib, helpers: Reduce log level to WARN on .Render for non-regular pages
8b06205a Add "tip" shortcode and documentation
5989c4d4 helpers, output: Fix spelling
af55ec76 hugolib, output: Gofmt
70080e3d Merge pull request rdwatters/hugo-docs-concept#57 from moorereason/iss31
f2fbf0b2 media: Add some more relevant MIME types
da717759 Add function signatures
3d6d55d6 Remove concept documentation for time being
c698a77d Fix breaking yaml in delimit function
d688bd98 Add alias for old MathJax tutorial
7a1f9a6a Update signature fields
dbbbd498 Add MathJax to supported formats
1989c17e Add old MathJax content to content formats page
0819a044 Add intro text to hosting and deployment
8366049a Add intro text to hosting and deployment
f514681d Remove all tutorial-related content from install guide
db09419d Update readme todos and clarifying readFile w themes
0a6bc386 Fix broken link in list page templates
9c652071 Fix broken link in list page templates
109a6a59 Move list and homepage content to list templates page
e6511dff Remove findRE TOC example
49232736 tplimpl: Fix lookup with non-standard layout folder
930a3df1 hugolib, output: Restrict Render to regular Pages
e49a2b83 hugolib: Fix Render layouts for list pages
9a0aa5fd hugolib: Wrap pageOutput create in sync.Once
0aaf3c56 hugolib: Fix panic for Permalink in 404 etc. templates
ee4a33b1 commands: Fix broken commandeer
09c88e84 output: Rename HTMLType etc. to HTMLFormat
24c17702 hugolib: Revise paginator alias path handling
b7ed67d4 hugolib: More TODO fixes
3cd97951 hugolib, layout: Consolidate RSS template handling
ee75e299 Remove the now superflous defaultExtension
15b64d51 all: Propagate baseURL error to the callers
148fedd2 hugolib, tplimpl: Use OutputFormats to create atom links
ec01c3a7 hugolib: Add 404 test
5761b93c hugolib, output: Fix RSSLink vs output formats
87188496 hugolib, output: Handle aliases for all HTML formats
0c4701f0 hugolib: Update site stats to take output formats into account
d851d6b9 Add custom protocol support in Permalink
8bcc08e3 media, output: Add Calendar type
dbb83f92 hugolib: Read default output formats from site config
4aaed87d hugolib, media: Make the MediaType available to the templates
c7dbee23 hugolib, output: Add Rel to the output format
29d3778b docs: Move the rough custom output formats spec to docs
1b2be5e8 hugolib: Add OutputFormats with permalinks to Page
baa29f65 output: Rework the base template logic
c7c6b47b hubolib: Pick layout per output format
08fa2b11 hugolib: Fix layout lookup order for Render func
6178238a output: Speed up layout calculations
df953839 hugolib: Speed up URL handling
a49bf870 hugolib: Remove siteWriter
d76e5f36 hugolib: Pull all alias handling into one file
ad8cea87 Refactor layout resolve to a descriptor/adapter pattern
4c2abe00 Rename OutputType to OutputFormat
6bf010fe hugolib: Refactor/-work the permalink/target path logic
c8fff950 Implement the first generic JSON output testcase
3ec5fc35 hugolib, output: Incorporate suffix and type in layout resolve
f091fc23 hugolib: Add basic setup for output def per Kind
03122e51 hugolib: Revert to using Page as the render chan type
e5200dda hugolib: Remove the copying in the renderRSS
a8244658 hugolib: Put back taxonomy term paginator logic lost in rebase
50c64415 hugolib, output: Add theme logic to LayoutHandler
348834d0 hugolib: Add a PageOutput wrapper for rendering
254cd89c hugolob: A first incorporation of output types in rendering
10de0771 hugolib: Use the new layout logic in Page
3bb52bf7 output: Move layout logic to the output package
d3d2c63d output: Add output type
c4989c39 Add MediaType and a crude implementation
047e039b Make docsearch config async and defer
0d5146a8 Tweak content
9262c5b3 Exit -1 on ERROR in non-global logger
e0cfe258 Add first round of custom output content
2bea9d0c Revert "tplimpl: return an error on unsupported type in isSet"
850a08a4 Move all files to theme
0796957d Fix paths to indicate theme path and leave a note about it
1b92c8b7 Change RSS description from full .Content to .Summary
50c24e07 Move to theme folder
2ac2fa93 Remove extraneous config key-values in config.toml (continued)
b14b6596 Add Hugo SFTP Upload tool to dev tools
1517384b Remove more extraneous config.toml values
a479cb13 Update all uses of readfile SC to use root path
17b21e0a hugolib: Correctly identify "my_index_page.md"
02501129 Update GH pages tutorial
55407e34 Merge pull request rdwatters/hugo-docs-concept#52 from digitalcraftsman/ga
a3f46c9d Resolve config conflict for taxonomies
8cfea6b1 Update config GA
847d3d4f Remove extraneous values from config.toml per convo with BP
043b4e49 Fix Hosting on GitHub tutorial
22351f4a Switch to Hugo's internal GA variable
7f68e319 snapcraft: Bump version to 0.20-DEV
2ed75f34 snapcraft: Add vendoring support
767ea0a0 Update to muli font across the board
32fc7534 Mix font faces
56c61466 Test out serif font on body copy
0381c06d Remove outdated warning about imageConfig not working
9d9ec1dd docs: Add Hugo SFTP Upload to the tools section
9f0b02b8 commands: Fix case of createpath in new.go
a159feff create: Delete redundant viper calls
30b43476 Add GitHub stars
b5c13109 Make more color changes per Bud's suggestions
0c0ec81d Make more color changes per Bud's suggestions
8b5e4d73 Update footer color to match news site
01a296dd Add navigation design changes per Bud's suggestions
2dab2351 Test adding events to codeblocks
bc055d0a Fix typos on after function page
fc826d5f Update after function with combo example
683011a6 Fix typos on summaries page
09aed316 Add admonition note for CJKLanguages and Hugo summaries
8bfc8828 Fix odd font sizing for code
d07ff9d2 docs: Remove dead links, consistent formatting...
c830861e Add example usage to seq function
f1b1df50 docs: Fix typo in templates/functions.md (#3214)
36bbadec Add final copy for directory structure
b8cfe226 Improve Netlify copy to reflect Netlify design blog
77b26b71 Improve Netlify copy to reflect Netlify design blog
ce78b00f Fix search colors on homepage replacing with SVG
73ede162 Fix breadcrumb to take full section name
fdd20af5 Fix typos
559b4007 commands: Keep "." directories on cleanDestinationDir
5e191ccf docs: Add bharathpalavalli.com to the showcase
6411cbf9 Fix site nav toggle on mobile
ddaebc4e Fix homepage search colors
e5e175c7 Remove test page for yt shortcode
4d8532ab Try out dark header per bp mockup
4df25162 Fix capitalization consistency for markdown term
20bf194f Fix homepage SVG logo
1cbccec3 Add back embedded crp in site header, perf test
b56a888e Align tags to the left in article header
ff9d4635 Switch header logo to img - too big for CRP
f43481f2 Fix heart icon on homepage
d359d63a Add back CRP and switching header logo to embedded svg
08738d38 Add back CRP and switching header logo to embedded svg
d1ab36a4 Merge pull request rdwatters/hugo-docs-concept#48 from sethmacleod/patch-1
15317f21 Fix typo
d3cd68e6 parser: Improve TOML frontmatter parser performance
f816f2bd Add updated Netlify tutorial
68f4cd82 Removing .Site.Recent
e3f79885 Update site.recent closes #46
ff2931c6 Remove all bloat from video sass partial
594a9691 Add yt shortcode
3fa7bc9c Revert "Add support for a flatter and simpler language file structure"
3518de10 Revert "vendor: Fix broken i18m definition"
7c48ad57 vendor: Fix broken i18m definition
0e75f6e7 Add support for a flatter and simpler language file structure
68368bb0 Tweak env var config content
6eddb3e5 Revert "helpers: Add a Debug method to DistinctLogger"
d134b397 Remove editor from config docs
9e2b548b Fix URL for emoji cheat sheet
95597b8a Fix URL for emoji cheat sheet
50d95b94 Add emoji instructions to supported formats in cm
917e26a8 Add tibobeijen-nl to showcase
f74d9c81 Add tibobeijen-nl to showcase
5e6bbd69 Fix typos
6e03c96a docs: Add tibobeijen.nl to site showcase
190dcb59 Improve admonition semantics
1ca6a276 Add ns field to all func files
8c611c13 Remove unnecessary comments from header and baseof
4382a8a6 helpers: Add a Debug method to DistinctLogger
9dfb9c14 Case insensitive translation of the 'more' tag when importing from Jekyll
c2ffdfab docs: Fix documentation of non-existent 'editor' config
2390c000 Add back CRP
fa1c7d1f Update shortcode templating
09d0120d Update to use muli as font
51e42a3a Add parent to shortcode docs
fbc35a84 Add parent to shortcode docs
a9966103 docs: Change OS X to macOS in README and CONTRIBUTING
491d4068 docs: Fix CONTRIBUTING.md
e4c59bf0 Merge pull request #35 from rac2030/firebase
10b05a8f Merge branch 'master' into firebase
ab5cf356 Make small tweaks to language used in "Hosting on Firebase"
d8923eb6 Update to new go-toml API
09384837 Get rid of extraneous icons on homepage
2f02dfa7 Add some 🔥 ❤️️
5ee2949b Remove gratuitous notes markdown
c94abaff Fix SVG on homepage
d6093aba docs: Update contributing guides
770b9ac7 Fix JSON front matter expl per gohugoio/hugo@ede452d
b64f808e Update license page to include download
1849c7e9 Add Red Hat and Fedora to installing.md
0fe6d98b Update OSX to macOS across the board closes #33
7071026d Add IE=Edge to meta to fix broken SVGs on IE11
b87eed3e Fix overflow issues with HP in IE11
110f3086 Fix more IE11 homepage layout issues
78cc9e20 Fix more flexbug issues for IE11
1b6431e1 Remove extra scroll bar in toc
b0c3f566 Make more typographical fixes to the front matter page
aeda2337 Add generator tag and fix typos in front matter page
638cc806 docs: Optimize 11 showcase thumbnail images
ec3dc325 docs: Add Linux distro-specific installation instructions
b156ef27 docs: Note Hugo as Snap package can write only inside $HOME
042f8fca docs: Replace Mac OS X with macOS in three places
c126c941 Remove commented-out front matter vars
6af744c2 Add missing page vars and predefined FM vars
2f1140cb Move articles to toml file in site data (continued)
902d336b Move articles to data file called in datatable shortcode
2704a4ce Update installation instruction on Linux distros
431d5974 docs: Add lucumt.info to showcase
b8666826 Update toc documentation with more advanced example - inspired by forum discussion
a4eb1e0f Update content source tree for spf review
903e43f1 Update content source tree for spf review
a9bfec6d Update concept docs for spf13 review
ede452d3 parser: Accept JSON frontmatter without leading "{\n"
bae5d8a7 Fix typos
a1c8d046 Add GH milestones to roadmap, and update Snap/Ubuntu in installing.md
62efcdfe commands: Improve jekyll import date format
4b9493cb docs: Improve command reference page
48eaf43c Fix typos
b1b4c07a Remove wip badge from multiple template files
b414d7d2 Combine ordering grouping lists with lists introduction page
8187b315 Change all heading links to copy-links
44c97f91 Change to locally hosted blazy.js
3c50e8dd Make final changes to complete final schema.org partial
4dbb2301 Fix odd ordering in functions section
032982a6 Fix date formatting in JSON-LD for schema.org
20bfa632 Commit first draft of schema.org structured data
bec843de Fix broken links (final round)
fbee443c Fix many more broken links, and fix TOC scroll on L-
d97c7778 Fix broken links (first round)
0e0abb17 Fix weights for ordering of hosting and deployment section
201c999a Update other vars to individual pages
c315f532 Fix broken URLs for tags pages
a4f76cfc Remove Tutorials section
a5a7e873 Add js icon to code blocks and fix prev/next icons in content footer
5d0748ce tpl: Add union template func
fb25d255 Update content filenames for all vars section; updated authors draft in cont mgm
559e73b9 Add Netlify hosting and deploy tutorial
4d187661 Add chocolatey install
83fd79c4 Add first draft of content-management authors page
b0eddb63 Add build issues empty page
5c69a21d Add TOC to format function
63e2a46f docs: Add Android to README
2f2ea42c hugolib: Fix reloading corner cases for shortcodes
5f443bd4 commands: t.Error => t.Errorf
e472140d Update for crp before forums release
f039e3be parser: Refactor frontmatter parser and add tests
6f3a6efd Shorten text on homepage; update ordering lists page
9c03693d Update types content
bca33c38 Remove unnecessary content in type
2779a288 Add host-specific icons to source links in showcase
14ddd029 Add host-specific icons to source links in showcase
4c51ebf8 Merge lazy-loading from digitalcraftsman
0f7ce22c Merge pull request rdwatters/hugo-docs-concept#12 from digitalcraftsman/lazy
ddc8cc00 hugolib: Clean up redundant frontmatter error logging
2a011b7c Add admonition note for Snap users in install docs
0e44f75e docs: Explain themes dir in quickstart guide
690961ba docs: Add myearworms.com to the showcase
eb41128a Add lazy loading to showcase
fe41bd61 hugolib: Default rssLimit to unlimited
b841193d Change sorting of tutorials to weight
0f24f217 Fix typos on lookup order page
149abc4e Fix typos on lookup order page
f69dba20 Fix search on M+ screens for HP; make typing faster in HP terminal
6914e9aa Fix search HP icon on mobile
fc7fe4db Fix flex footer on overview pages
cc0d8203 Update docs contrib guide
df5eb4e7 Update docs contrib guide
5ef857a0 Update docs contribute content
e12f8def Fix flexbox wrapping issues on homepage; tighten up gopher animation
fe1a7557 Move to kebab for secondary/toc menu
7032ee8e Add enjoyable recipes with new optimized img and FM
b5ce1d1d Fix external links icon placement
b31ad2ee Merge pull request rdwatters/hugo-docs-concept#6 from sethmacleod/master
68d58c29 Merge branch 'master' into master
8381df3b Fix small typo and make content updates
8e27de10 Fix external link icon in contents list
aba53d24 Fix fontello for blockquotes icon
1739a966 Add README for gulp asset pipeline
c1437ea4 Add finalized views.md and usage.md
60c2babf Attempt to fix scroll on focus issues in iOS
9e999539 Remove extraneous showcase images
ad6367bf Update doc contrib, baseof temps
48120ccf all: Fix some govet complaints
560ed6e6 Update appveyor config
0c45e638 Optimize all showcase images
7e3ef07a Add missing markdown icon for code blocks
1995b5d4 Update permalink values to dl
0467c189 Add back CRP for last build of the day
434edddc Fix homepage layout
766089dd Finalize more CM pages
01545899 Fix bash icon in examples
8d0c9ac6 Fix bash icon in examples
74d7da54 Remove GH buttons and GA temporarily for dev
248fdef3 Concatenate all js
5c638b69 Update to use crp and fontello
45b9d722 tplimpl: Add built-in print funcs to FuncMap
df5be925 Update to use locally hosted Monserrat font
3839a0f9 Make nav accord to 1 item only, per @digitalcraftsman
4e1ad212 Fix forum link in site footer
a2a8a651 hugolib: Don't report taxonomy count if disabled
4bfa1890 hugolib: Remove unnecessary params
7bedd4e2 Update content and CSS
681712a9 Update freebsd icon placement
a2ec372a docs: Add enjoyable.recipes to the showcase
fbe1b65c Fix install row on homepage to not break lines in terminal on iOS
f7ff4eef Update doc contrib guideline
3a3828d7 Update doc contribute guidelines
da06842e Fix icon font family for code blocks
87099898 Revise "Front Matter" section (second round)
da5b2435 Revise "Front Matter" section (first draft)
b67ee3a5 Increase font weight on features row of homepage
5f8d840f Fix typo on homepage
958cb423 Update with homepage description & smaller default social image
e45a9713 Add default social image for sharing
49a83a41 Set font-weight of function headings to 300
3dfb2961 Update AddDate functions and make navigation more narrow
2f3fd84e Fix toc scrollspy and desc for internal.md
ee114747 Fix toc scrollspy and desc for internal.md
b134f2c2 Change title of additional templating languages
26225d8b Add first draft of internal templates page
118704aa Begin first wave of taxonomy templates edits
f9b19fab Add GoHugo AMP to Starter Kits and increase font-weight on hp tagline
07985120 Add Poppins as a self-hosted font
fb9012d5 Concatenate all scripts
67c60f48 Correct delimiters for YAML front matter example
1a147b9b Shorten descriptions for getting started pages
a3dd283d Fix typo with @digitalcraftsman in Arch Linux install docs
c5c7d5a5 Merge pull request rdwatters/hugo-docs-concept#4 from digitalcraftsman/install-via-arch
d1672cac Update funcQR _index content
e90f0b5f Fix open source footer text on homepage
2c776de6 Fix more typos on installing page
b6c7d01e Finish edits to go templates content
c4aa9a34 Remove unnecessary partialCached for footer
eb99500b Clean up first draft of templates/partials
bfddd8ab Clean up first draft of templates/partials
c9506999 hugolib: Populate the taxonomy term Pages list
6c5ef713 hugolib: Add a temporary workaround for page.copy() data race
8e2e9fc8 Add installation instructions for Arch Linux
c7b8c45d docs: Correct toml syntax in Github deploy tutorial
14915639 Fix typos
72685a74 Remove all references to baseurl in templates
e0c3e906 Make small iterative improvements to copy in templating
85707e92 Add descriptions to all remaining pages
be89f1e5 Remove relpermalink file; fix sorting on functions QR
ec001f08 Update with new homepage
3f1de445 Update master with homepage
96544d23 Clean up relURLs and extraneous templating
90d7bfed Make further improvements to content organization page
4b2d20fc Finalize types page under content organization
e52e2a70 hugolib, target: Rework/move the target package
ea165bf9 vendor: Update cast
1a0f38ad Update homepage partials structure for easier management
2e669359 Add descriptions to features section
22c89dcb hugolib: Fix HugoSites.createMissingPages
6db2087e Add fadeindown for homepage menu
4c446c6a Remove call to homepage stylesheet in site-style.html
b45c4b3a Update homepage features data file
eb0e7580 Add download button back to code block shortcode
8d4584c9 Fix bottom margin in global nav
5cb9f686 Add twitter row and dummy text for homepage features
1b7b1f4f Fix eye blinking animation on homepage
4677cbec Add animations to homepage gopher badget and cape
29c1c9aa Fix typo on homepage
e7a9b447 Add first version of adddate to functions
144cc8ee Add format and full date format explanation to functions
78d55aec Copy tweaks to homepage
fe211e9d Fix phrasing on home page to make it more relevant to visuals
7fb86c29 Fix phrasing on home page
fd062680 Add new article to news
d0e2a1fa docs: Add blog post from After Dark creator
6b31541b Add AddDate to functions list
c9dc4276 Add quotes to homepage
e21aa250 Add more content to home row
7ff7a63a Fix breaking error on missing bfconfig shortcode for BF Rendering
33ed1b4c Add webkit no scrollbars to navs
395b2086 Update toc for testing fade at bottom on PC
28cc820f Make first content fixes to bfconfig readme
d5b49fe3 Fix toc
befd5d73 Remove unnecessary sass files
8074ff09 Add Twitter references to data folder
aa3ce7ab Update content and URLs of About section
0b1c31fe Add section lookup order change for v0.20
5a94e4cf hugolib: Add section template baseof test case
f4779b25 docs: Add new section list lookup alternative
8203fc59 hugolib: Add /layouts/SECTION/list.html to template lookup
1dd2b163 Fix more styling inconsistencies
fdcc05e7 Add more icons to code blocks with or without shortcode
9dc11d3b Add SVGs and slide animations to homepage
fb461856 Add removal of icons
abe77bc1 Update fonts per type kit
8b09dfba Update fonts per type kit
7acec3c6 helpers: Return partially cleaned URL in case of error in URLPrep anyway
74ea81b8 tplimpl: return an error on unsupported type in isSet
577522bd helpers: Remove unused arg
8a8a0fc3 Make first content commit with beginnings of new homepage (testing Netlify subdomain)
23f5b9ac hugolib: Fix broken test
1279ca20 docs: Add some more quotes
b1eab2be Update README with new URL
38a9ffaa Make first commit to homepage branch
d5f2560d Add link to GitHub Pull Request Tutorial
9671162a hugolib: Make sure that empty terms lists are still created
50b301cb Fix config to include noindex tag
3669015f Handle Hugo version strings with patch level
a0e3ff16 helpers: Fix version string for Hugo 0.20 and similar
cc158647 hugolib: Only return RSSLink when RSS is available
2c07f133 Add styles for different languages in code blocks
b19db039 Add styles for different languages in code blocks
d0c7f01d Tweak code blocks
c21fea82 Move pipeline to root
0366c01b Switch to new Typekit "Museo Sans" fonts
f0ebb43d Remove headings from note and warning entirely
0ef29d31 Change code block styles, and start first round of fixes for bf config
b7a672fd vendor: Update Cobra
972649c6 docs: Correct date in automated deployment tutorial
afb3334e docs: Correct link of 'now' tpl func in release notes
c266cd2d vendor: Bump versions
5ed3660b Remove heading from admonitions replacing icon with SVG
0b91053c hugolib: Only consider regular pages in Prev/Next
2af9243e Update required fields icon in lists, esp contrib to docs
63b78b38 Remove old aliases afor abs and rel langurl functions
4c048ac4 Fix wrapping issue with prerendered text for code in lis
9c6096db Fix odd behavior of content footer with flexbox
be081676 Switch to Roboto Mono for code
cc6aef27 Add first round of themes submission guide
781574be Finish local file templates page
fcb147cb Add content to contribute themes page from them GH readme
d5146d68 Add contribute themes page
396276aa docs: Revise automated deployment tutorial
d3ea7920 Remove temporarily JSON-LD schema.org metadata that is breaking build on Netlify
66b7e324 Update to ideal workflow in concept document
58eb36f3 Remove functions dropdown and adding content strategy section to concept page
072cd003 Bump version to 0.20-DEV
0a991682 docs: Some minor release notes fixes
28198ce9 docs: Fix shortcode param in release notes
a1741f19 Update versions to 0.19 release
f22a8edd Remove more unnecessary needsreview in front matter
c9c889c1 docs: Add release notes for Hugo 0.19
f2706329 Remove needsreview from all hosting and deployment pages
d219bd04 Update descriptions for all of hosting and deployment section
29edd7fe Add markdownify for function quick reference
e6dc8c46 Add GH stars button to site header for dev review
770d3e96 Make first round of updates for lists explanations and content views
c41585f8 Delete unnecessary sass files, shortcodes, and partials
cd4613d8 Make first round of cleanup for content organization page
f70b94bd Fix ordering of pages in dev tools section in nav
4bd4374d Add updated command mds from bep's 2-25 commit to master
515426a1 Make final commit before submitting to Gitter channel
72e1b602 Update content changes in concept document
6cf78346 Update multilingual page
eb572c8a docs: Add documentation for disableKinds
8d513222 docs: Update RSS docs with rssLimit changes
495d88ef Update filenames and sections for shorter URL structure
75935138 Remove and consolidating countwords and countrunes
1faf3d3c Fix spacing issue caused by command line template
b8a606f6 Update rss vars page
c0a626b6 Add first round of functions
a9604235 Fix spacing on section list pages
0eb76b08 Revert "hugolib: Add terms' pages to .Data.Pages"
a8a8249f Revert "hugolib: Render paginator pages for taxonomy terms"
3631fd2f docs: Regenerate commands doc
e37e3dcc tpl: Add title meta tag to twitter card template
b108e5ee Make first round of edits to ordering and grouping lists page
82dcefe5 Add last of shortcode display examples
ef3edffe Update all built-in shortcodes with output and display examples
6dd57f7a docs: Remove waffle.io graph from CONTRIBUTING.md
eaabecf5 docs: Adds 'Using _index.md' page
e21fdbae docs: Fix ambiguous typo in quickstart
564bce71 Fix missing link in articles page
0c48be63 Fix max size issue with toc on xl=
d93008b4 Fix footer for additional twitter list for bep spf13 and gohugoio
718ed72a Try main element as full width
aeaaa42c Fix broken link in site variables
bfd6a131 Update with download button and new see-source icons in code blocks
ee008f4b Update function front matter across all files
d8c64b2d Make more copy edits to customizing themes tutorial
e9921ae4 docs: Mention Hugo's official twitter account
950d1aa1 docs: Add article to press.md + cleanup
4c101c5e Add external link icon to contents-list.html
582045d6 Add external link icon to contents-list.html
91ff6ac3 Add external link icon to contents-list.html
0fa26bc5 Fix non-markdownified titles in showcase
0004cdd9 Update few functions
ba6104bd Fix delimit description
81596493 Make small mods to heading structures in several WIPs
c1425a16 hugolib: Fix preserveTaxonomyNames regression
8b180ffd Update homepage tile descriptions
1dda1b25 Add first few functions and site hierarchy SVG
74277187 Add first drafts of lists, sections, taxonomy templates
831bfd36 Update Docker file to Go 1.8
4d679627 hugolib: Render paginator pages for taxonomy terms
e117b1b2 hugolib: Add terms' pages to .Data.Pages
48fecc42 Add tree.md to root
27f206de Update local file templates page
7e64e217 Enable TOC breaking layout with content footer
acd850f0 Fix headings in dev tools - comments.md
2e899e41 Fix typos on single page template page
cca1ef53 Revise description of Archetypes
b7c91e4f Update other templates pages with toc true
d15d7dc9 Add missing toc to certain content files
691544f4 Finalize single page template content
9e6b5eb9 hugolib: Temporarily disable leaktest
ed22a83f Finalize syntax highlighting
2eb2431c Finalize syntax highlighting page
c8d5a2ba Update syntax highlighting page
7b72d6ba Finalize migration tools page
1b7ee6e5 Update migration page
2414df12 Add all weights to template section and updated go template primer
0f109fae hugolib: Fix broken shortcode tests
62783935 hugolib: Include full filepath on shortcode errors
a1512e50 Update files for reviewers
5d0694a4 Change annotated content doc to just content changes
06370ca6 Remove redundant roadmap
13c75f44 Add first draft of strategy statement and content revisions
87acf292 docs: Add promotive.es to the showcase
13972d6c hugolib: Cleanup the Goroutine count calculation
91968f3b vendor: Update cast
7934db91 commands: Cache logFile in createLogger
9e52477d hugolib: Add relativeURLs and canonifyURLs to Site
c7535b9c commands: Remove flagChanged from commandeer
eb27c47f tpl: Use og:updated_time OpenGraph tag on nodes
df1ff57d Use Page.Params more consistently when adding metadata
2cbdd653 tpl, hugolib: Fix live-reload of non-renderable content pages
4e77c871 tpl: Remove twitter:domain tag from internal shortcode
d3fb1960 docs: Improve documentation for menu rendering
f8115778 Add comments and analytics to partials page
9bdc96fa Add content for syntax highlighting
f8267ffe Add Scratch function page
122e3c4f Add toc to most template pages
1aafe65f Update content sections page
cbb0461c Fix typos and revise text on install and tutorial pages
2320c568 commands: Make sure build error is logged in watch mode
41857d03 utils: Use local logger
d04a2457 Add tree.txt
03d0a338 Update functions content footer and added new funcs for menus
75d855c0 hugolib: Add check for p.Markup == "org"
86e8dd62 all: Add org-mode support
d2f2d9a3 Update temp command section and reverted to old favicon
e34a358e Add first part of command section
1645c501 Add review badge on incomplete pages
a3af4fe4 hugolib: Finish menu vs section content pages
2a6b26a7 hugolib: Improve menu generation for section pages with content
782004ba Update with aerobatic article on password protected sites
807b2a9c Remove redundant press and articles page
f3e48405 Change all overviews back to section titles on section list pages
170e9616 Finish though in create-your-own-theme admonishment
49f468e6 Update more content management files
370d6686 Add list-icon to overview/section list pages
5860bf1b Revise order of variables pages in site navigation
c184c685 Add more content to getting started pages
fe9fd0ac hugolib: Cache the value of Page's RelPermalink
840c71be Add all variables and params pages
7e0fa13f Get rid of some viper.Get* calls
b4cd9e63 Finish up last of hosting-and-deployment transfer from old site
0a76c785 Add finished Quick Start
9acdc1bb Remove breaking relrefs in quickstart
fb1911e0 Consolidate all install pages into single page
d40ebc68 Add mac install guide
3483642a Remove wercker yml validation ref - 404
16513c9a Add wercker tutorial as example for reviewers
3d4e99ed config: Remove unused var
02b120d1 hugolib: Discard current language based on .Lang()
6809ea1e hugolib: Fix .Site.LastChange
a0b3d9db hugolib: Add temporary date parse test
2ea242d5 hugolib: Minor Go vet fix
99fbc75e hugolib: Fix regression of .Truncated evaluation in manual summaries
ec3c1997 Fix broken links in features page
2b06eb88 Fix odd syntax highlighting in cross references doc
ce58bede Fix local files shortcode
1890155a Add shortcode from live site for readfile example in local files template
b8fba275 Add shortcode from live site for readfile example in local files template
9416fdd3 hugolib: Add missing page kind to allKinds
ed70c14a Add shortcode from live site for readfile example in local files template
4e159ed5 Fix featherlight to avoid icon images
3bedf1e2 Add featherlight for body copy images
b2e3748a hugolib: Enhance `.Param` to permit arbitrarily nested parameter references
44e00b62 Fix broken images originally used in how to contribute tutorial
e028978d Update broken links
55aae645 Fix shortcode language in local file templates that was breaking Netlify build
2cb5ad8e Update shortcode and shortcode templates, both of which need much more work
56ecb233 Add just a shit ton of content
949bbd03 Update functions front matter
6d2281c8 hugolib: Add disableKinds option
e096917f appveyor: Add go version
13ca0b4c appveyor: Fix build, take 2
3dade5de appveyor: Fix build
b360f9b3 appveyor: Print Go environment
be1bb5fc Make further improvements to Go Template Primer
bdc02edf tplimpl: Fix issue with recursive templates
e24c1af2 Make further improvements to Go Template Primer
4493e8ed hugolib: Fix issue with taxonomies when only some have content page
960707a4 Update amber and ace sections
07ab7ae3 hugolib: More test helper cleanup
fa1e4780 Update archetypes content
82c02b84 Update content sections admonition
bec195d1 Fix page title issues with functions section
a1ca69b9 Fix broken tox on markdown and support pages page
bd3b1b53 Make further fixes to shortcodes
e9c7e054 Fix order of built in shortcodes
605508d4 Fix content footer next and prev links
ce3eb287 Fix toc sidebar, add icons to site nav, and add prev/next links
ed847ed9 hugolib: Test helper cleanup
bf7399fe Add first exFile shortcode
10c13f5d hugolib: Make RSS item limit configurable
ade20763 hugolib: Fix Windows build failure, final take
09466307  hugolib: Fix Windows build failure, take 2
94216902 hugolib: Fix Windows build failure
d3abb93c tplimpl: Fix instagram shortcode panic on invalid ID
b7aa2304 travis: Bump to Go 1.7.5 and 1.8 (Yay!)
edfb9d55 vendor: Update Viper
53d07fb4 hugolib: Add test case for empty Pages in regular pages
9d68eb72 Update homepage
04a4a193 hugolib: Remove deprecated marked for removal
4b3ca38b tplimpl: Fix data race in resGetResource
77cbe4d6 tplimpl: Refactor imageConfig into a struct
c507e271 tpl: Refactor package
93ca7c9e all: Refactor to nonglobal Viper, i18n etc.
7483b8ce Fix typo and update shortcodes body copy
0a16b93d Update homepage cards description for getting started
fca2d1e2 Update getting started guide homepage card description
dc5900ba Fix to homepage card descriptions for developer tools
34063e94 Add release notes
9e3dfb66 Fix tags missing quotes for v0.18 on Netlify
2e55c924 Fix front matter in getting started section files
5629f7e2 Fix terms table layout
5091be1c Update terms layout to table
88cad8e7 Update contents list style and markup
cbd08323 Update shortcodes, needs works, and toc styles
6f0eec31 Fix bg color for code shortcode
78213277 Update toc with home baked scrollspy
e34af6ee docs: Add hugofy for atom to the tools section
711fd889 Fix minor typos in content mgmt section files
aeafa4a0 Update issues via shortcode in roadmap
f6a55a16 Add section to toc header
9aa2df68 Add section to toc header
19d7a56e Remove unnecessary math functions and created table for all
0d0973d1 Update breadcrumb colors
1f50dca4 Add contents list for section pages
875a0642 Add contents list for section pages
658b7fc0 Revise style of content footer and blockquote
5851f4b6 Start new callout styles
691156c5 Use OS fs by default
16b16216 Attempt to fix input rounding on ios
51fc29a1 Update archetypes content
5dedeb69 Remove unnecessary content from benefits of static page
3db5aff4 Remove unnecessary content from benefits of static page
c8963435 Update next and prev buttons
ed50c7db Fix js for toc
7768124f Add terms layout and section icon to taxonomy.html
66bd832d Add terms template
63c79249 Add taxonomy list page
3fd4d241 Fix overflow on file name for code block shortcode
01f5105e Update toc style
7982cfa3 Add updated toc esp for mobile
19fcf0dd Update taxonomy aliases
f9c5c3f9 Tighten up archetypes content
f05a9f2d Fix all links and creating new aliases for Hugo features page
7ae01dbb Fix toclayout
9764af5b Update toc styles
513a7852 Add table of contents first attempt
a988d3cf docs: Remove the source relative links docs
360161f6 Emphasize GitHub Stars rating of StaticGen in Why-Use-SSG md file
493b7e11 Update content
0a87ef7f Update content
e067e89d Update content management page order
2ded3bf3 docs: Update www.bullion-investor.com/report/ in the showcase
212241b8 Fix footer on mobile when menu is open
6384a53f Fix overflow issues on mobile safari
1d52df22 Fix overflow issues on mobile safari
4b133ece Fix overflow issues on mobile safari
4a281e2e Improve to archetype copy
c18d21d8 Update archetypes section
f9db26c5 Update inline code styles
234273a5 Deprecate sourceRelativeLinks
03dc2766 Update search input styles
5cc8b589 tpl: Accept limit as interface in findRE func
298ebc37 hugolib: Add ability to sort by frontmatter parameters
2618cfbe hugolib: Fix error for non-renderable HTML content with shortcodes
7234c140 Update homepage icons
dfd84dac Update homepage icons
28e5fb90 Fix descriptions for homepage in data file
91130d1b Fix descriptions for homepage in data file
c7874aa0 Fix last icon for homepage
99e53a95 Fix scroll up by adding preventDefault for site menu toggle on mobile
c4b40a8f Improve layout of homepage cards
11df9370 Add first batch of icons for homepage
25bfa7e1 hugolib: Use the site's Tmpl for non-renderable pages
eb7f8aed Update algolia search styles
c20a89b3 Commit first addition of Algolia search
7d4b94b4 Add a few icons for homepage
87d4ad94 Update directory structure to include dev and design resources
7a5cc3cf docs: Add instructions for customized domain
962443ad hugolib: Correct repeated spelling errors in documentation
f26344ae Fix typos
26443287 Update smooth scroll header links and config page
68476fdf Add smooth scroll to header links andpdf icons to anchors
872a67a8 Update code block
2e677d5a Update styles for code blocks
f9016d40 Remove public folder
20b57f87 Attempt further fixes with Netlify build
0093be60 Fix build error in single and section default layouts
092b3e3c Fix flexbox safari issues
085ccbf4 Fix section default layout
167b7001 Fix content header in single.html
b8de89b4 Fix flexbox issues with Safari
99ee283b Update with more Getting Started and improve code block styles
9d209ada Add tags
060fe019 Replace Font Awesome with Fontello
a89fb86c tpl: Must do a extra lookup of cloned base templates
f4046033 Revert "hugolib: Add some baseof test variants"
d11f37d9 hugolib: Add some baseof test variants
b0de2c1e Add note, caution, and warn shortcodes
b9a13344 Add more to Roadmap and to Getting Started section
24fd81ab Update anchor styles
3e5ad4ae docs: Update Bitbucket Hosting Tutorial
9c979495 docs: Add article to press section
73ccb153 Update font family for functions
a71f7e0c Change font and stylesheet
5dfb3097 Update more section descriptions
36156cfc Revise site main menu and stylesheet, etc.
e459a55f Revise site main menu and stylesheet, etc.
d02359cd Add edit button
7fd88fb1 docs: Update link to blog post in community/press.md
faba90ab helpers: Fix misspells
2af2ff3c docs: Add tuorial "How to use Google Firebase to host a Hugo site"
dae6a453 docs: Fix typo in templates/functions.md
19aff029 hugolib: Skip rendering for the page tests
c71e1b10 all: Refactor to nonglobal file systems
0ada4059 vendor: Revert to previous cast
c2f69226 vendor: Update cast
f9fd6978 Revise link to stylesheet
e0897d3c Update site scripts
a01a0533 Add more content and styling
fdce08fc Update for base templates and blocks page
b676277a Make further changes to nav
c5f367f7 Make first update with actual layout (4/4)
0a5944c9 Make first update with actual layout (3/4)
304e6eae Make first update with actual layout (2/4)
868dccef Make first update with actual layout (1/4)
8e879422 Update with first round of nav scaffolding
48677581 Update README to include link to Discuss forum and proposed source org
9b152d88 Update theme.toml for first Netlify build
3e04d066 Update theme.toml for first Netlify build
24512fa8 docs: Add engineering.invisionapp.com to the showcase
7241253c docs: Multilingual documentation for frontmatter params
1e799008 docs: Add netlify to the list of static hosting solutions
72cffed8 docs: Add picturingjordan.com to the showcase
feeb93d4 Add pygmentize to the hugo snap
95ad3ad2 tpl: Improve generation of OpenGraph date tags
91c569c7 docs: Add petanikode.com to the showcase
99fd7c68 cmd: Remove empty tags/features strings in theme.toml template
d949c34a docs: Add Dokuwiki to hugo conversion tool
7dc94581 make: Fix typo
940c5d8b docs: Add tumblr-to-hugo to tools section
3ac1b9fe tpl: Fix deadlock in cached partials
dc61d3b6 docs: Update author credits in GH pages tutorial
3818d696 docs: Update tutorial on GitHub Pages deployment
85c75783 tpl: Fix broken benchmarks
0d0e0699 Add first round of single files for functions
92ba7219 commands: Fix newly broken server flag handling
1d7b9606 Clean up Makefile (#2924)
db33a33e Show full template error
d6000a20  all: Refactor to nonglobal template handling
4ea4359a hugolib: Avoid double-encoding of paginator URLs
bc06135c helpers: Allow tilde in URLs
45e3ed51 all: Refactor to non-global logger
24a28679 Add the instructions to install the snap
56c5eadc hugolib: Remove summary.go
3d058a93 hugolib: Allow arrays of arrays in frontmatter Params
3286b24f commands: Show OS and ARCH in version output
2989c382 tpl: Add truncate template function
9c19ef0f target: Add COM0 and LPT0 as reservedNames on Windows
9f20e648 hugolib: Sync page collections with Site.Info on rebuild in watch mode
c60c41e0 commans: Remove unneeded build constraint
01ee525f hugolib: Correct usage of "shortcode" in error messages
1b46d2cf commands, vendor: Remove log level setting in Jekyll command
fff6617c vendor: Update jww logger
0dad6932 docs: Vanity-update of site meta description
001dd01e helpers: Remove unusded WordCount
b8544389 Create first commit of new concept hugoDocs (continued)
e856f241 docs: Update references to _index.md
49a840be docs: Add new article about Netlify's PR site preview
e3e5600b helpers: Fix minor typo in error message for Seq()
19b6fdf2 tpl: Fix Unix time test case in TestDateFormat()
b8057b49 vendor: Fix broken build
2127203a Update documentation and test for sitemap template
cb63e87f hugolib: Clean up a benchmark
c344b190 commands, helpers, vendor: Update to the latest jww logger
2ac9817e helpers: Add doc to Language.SetParam
4352156a commands, helpers: Fix docs
52976da0 commands: Fix case in default config variable
6fb4f048 commands: Fix case in names of some methods
be39ae5e docs: Fix typo in overview/source-directory.md
2ece1b32 docs: Add heimatverein-niederjosbach.de to the showcase
433c0361 docs: Add dbzman-online.eu to the showcase
0d330b0d docs: Fix typo in v0.18 release notes
6a51216c docs: Don't use binary version in docs site
5834efd5 hugolib: Add a taxonomy test case
f79877cb Remove waffle.io graph from README
a60ec063 docs: Replace .Now with now
09a0af94 Fix  Appveyor Windows build and GitInfo path issue on Windows
6e0f326b hugolib: Deprecate Page.Now
695be00c hugolib: Bump the current warning deprecations
cabc6b31 tpl: Add now function
707d3cf1 docs, tpl: Fix documentation of  UniqueID
7d072fbb source: Make UniqueID ... unique
02d6f532 tpl: Use HTTPS in Google Analytics template
73c1e271 docs: Add HugoPhotoSwipe to the tools section
6374d82b travis: Add GOARCH 386 test
e9e4fd90 docs: Add release notes for Hugo 0.18.1
a18b9e72 vendor: Update Cobra
95a473e7 Fix Dockerfile
211d20a3 docs: Update GitLab depleyment in /themes/installing.md
164d0fb6 docs: Hide next arrow in theme
8a63e092 docs: Remove right padding in theme
83b4c405 docs: Fix h1 size on small breakpoint in theme
c22b7ff8 docs: Remove unuseful breakpoint in theme
84896080 docs: Fix menu arrows position on mobile devices
bcb3ef74 hugolib: Fix preserveTaxonomyNames regressions
862f09ba docs: Add hugofy for VS Code to the tools section
6affd31b livereload: Simplify RefreshPath
88b5bbd5 hugolib: Fix IsTranslated for "old" node types
d1b89f5c hugolib: Use reflect.DeepEqual in tests
17f85178 hugolib: Fix redundant URL file extension on taxonomy terms pages
e78dd3cd docs: Enable ToC for extras/shortcodes
7d991ed8 hugolib: Make template error messages more verbose
3e4fbbaa helpers: Add patch version
99e5fc63 vendor: Update Afero
63d3c4ce vendor: Temp roll back to an older Afero
bc060ee1 tpl: Update dateFormat test expectations for epoch values
b0e86dcd vendor: Update dependencies
d055862a tpl: Fix crash when using imageConfig
8b0c3b9b helpers: Remove "no theme set" warning
34c87421 tpl: Update getenv to accept interface{} params
29caaddc tpl: Update title to accept interface{} params
661d64c4 tpl: Update upper to accept interface{} params
4e5b4ac5 tpl: Update lower to accept interface{} params
6b8422bb tpl: Update hasPrefix to accept interface{} params
f25f8373 Update Travis go versions
441476b6 docs: Convert code in multilingual.md to TOML
ec34ed05 docs: Add neavey.net to the showcase.
a4fc20a1 docs: Fix typo in templates/blocks
e7ff094d docs: Add details about binary names for setup on Windows
b2687ab1 command: Add `themesDir` command argument to specify themes directory
4845a13c docs: Update christianmendoza.me in the showcase
1881f60a hugolib: Add a test assertion for IsTranslated
1eb07954 docs: Regenerate commands doc
1e313ced Bump to 0.19-DEV
8b410347 Add GoBuilds to .gitignore
09cc7915 docs: Add new alias feature to release docs
3d6fdb8e Bump to 0.18 release version
4de808ae docs: Add 0.18 release notes
018813ca vendor: Update go-toml
71aa797b docs: Fix broken link to Content Types
6fd4bfca docs: Update layouts path name
79b2725a docs: Improve documentation for block templates
a3a67163 hugolib: Enable override of theme base template only
596bbea8 docs: Clarify single page template search path
26084ad1 docs: Fix pipe examples
fa09e20d docs: Fix Ref and RelRef syntax
2f0e8198 docs: Document partialCached func
9c2ea369 docs: Add .Site.RegularPages docs
d332aa16 docs: Update GitInfo usage docs
f8190777 docs: Cleanup Extras menu ordering
aecabfcd docs: Add Extras > GitInfo
ef03c6f9 create: Allow empty dates in archetype in new
e4ebe0d5 docs: Fix querify example
7862de91 tpl: Add a querify test case that is actually and URL
83c68065 Fix menu URL for node type pages
c7f67dd6 docs: Clarify usage of archetypes provided by themes
b4404a95 docs: Update File variables
a1c25bea Create first commit of new concept hugoDocs
b4cbccaa docs: Fix prev/next links in content section
e90cb153 next: Move content files to prepare for new layout
e3d48760 hugolib: Fix comment
d4b9fa96 hugolib: Respect disableRSS
5b1eee44 tpl: Avoid repeating the same test case in TestMD5 and TesSHA*
22360566 docs: Fix linebreaks in templates/variables.md
0f6c73cf tpl: Add sha256 template function
01b8bc1b docs: Update description of querify
0ba9fb96 docs: Document querify template func
ba8a00a6 hugolib: Add regular content page count in publish summary
15622c80 hugolib: Remove superfluous assignment
2f026ab3 hugolib: Make RawContent raw again
971d1baf commands: Add noChmod option to disable perm sync
a4b9abf0 vendor: Update fsync
529574e6 create: Run all the test variants in TestNewContent
c87331ae hugolib: Fix rendered empty msg
b2eadd93 create: Simplify archetype logic
96018ab9 create: Fix archetype title and date handling
65d4d96e vendor: Update go-toml
b7e80045 makefile: Add test-cover-html
20d82a7a hugolib: Create the permalink once only
046320d3 tpl: Fix params case issue with nested template funcs
c38bfda4 hugolib: Fix regressions with uglyURLs
1f6e0de3 hugolib: Avoid repeated Viper loads of sectionPagesMenu
dbb0c1cf hugolib: Add shortcode for Instagram
001e2bbe docs: Set correct default archetype directory in overview
2c7cbca8 examples: Update blog example
68ebf616 examples: Update multilingual example
4c72eb12 commands: Simplify
65e5959b helpers: Simplify
139585f8 tpl: Simplify
a721fbed target: Simplify
3739871f transform: Simplify
43604520 hugolib: Simplify
f1ed89fe Revise the deprecation strategy
0a0db9cd hubolib: Simplify map range
ff2498ee Remove ShowPlan
a6d584bf vendor: Update go-toml
1156be3b vendor: remove afero/sftp deps
e0b27820 Fix alignment of go gets in Dockerfile
c06c3234 helpers: Fix typo in language.Get documentation
c8d41141 hugolib: Add missing paginator test case
c33eb935 tpl: Add some missing test cases
174f97a9 tpl: Fix spelling in test
7665dd23 tpl: Drop an else block in checkCondition
581291dc hugolib: Omit type from declaration of var lang
32336e9e hugolib: Camelcase ALL_CAPS vars and const in tests
75e55cd0 hugolib, source, tpl: Fix docs
e81c06c3 helpers: Rename WalkRootTooShortError to ErrWalkRootTooShort
647540d0 helpers: Add documentation to some Language methods
700d531a helpers: Use iterate operator by int in Emojify
713f577a commands, hugolib: Unify case of config variable names
dec1706a commands, hugolib, parser, tpl: Use errors.New instead of fmt.Errorf
1f130fd6 commands, hugolib, source, target, tpl: Get rid of some fmt statements
120f6b0c all: Use jww instead of fmt for printing
e1da7cb3 Fix case issues with Params
a5b3b076 docs: Add Pages to variables section
382582fc node to page: Re-add translations sort of regular pages
6c0ecc2d docs: Add release notes about node to page
e29f6fe5 docs: Add sections on node now being a page
0eb5f54d node to page: Fix site pages sort
976f8f84 node to page: Fixe index page translation issues
aafbd3b4 docs: Revise docs to reflect that Node is gone
ae1de7ab docs: Make the tools content page a section page
7e81971b node to page: Don't repeat the RSS title if it is the same
f776af6c node to page: Temporary set RSS date to zero
0bbdcf24 node to page: Render aliases before pages
32fb1e6f node to page: Need to append theme templates
28031b08 node to page: Only return regular pages in home.Data.Pages
a843d5d3 node to page: Final TODO-fixes
99d11386 node to page: Fix the Page copy()
62e9e7e6 node to page: Misc. TODO-fixes
524eb166 node to page: Handle URLs
c8d3124d node to page: Remove Node
9347084d node to page: Make Kind a string
9fba2a30 node to page: Rename PageType to Kind
96f71141 node to page: Export GetPage to the templates
487b210f node to page: Handle Date and Lastmod
c80308e6 node to page: Add Pages to Page
063b78d2 node to page: Make Nodes into Pages
88972b0d node to page: Refactor the build process
640b8bed node to page: Handle sections with only _index.md
2d91b17c node to page: Handle aliases on home page etc.
7cb0e34d node to page: Handle menus on home page etc.
ecedc85c node to page: Handle taxonomies on home page etc.
d3d3863c node to page: Add all nodes to sitemap
7cc637e9 node to page: Do not create section node for root
503fb299 node to page: Get Rebuild up to speed
80e453f1 node to page: Fix home target path on Windows
94ea12eb node to page: Remove unused code
bde1bfd3 node to page: Handle aliases, 404, robots.txt, sitemap
ec2d502b node to page: Handle translations
698b994f node to page: Fix the page collections
c175407f node to page: Use _index as identificator for the list nodes
3ff25b37 node to page: Handle RSS
75c38071 node to page: Create pages for nodes without content
f8bda16e node to page: Handle taxonomy terms
3737c9bc node to page: Handle taxonomy lists
c2f3cb2d node to page: Handle sections
734b6508 node to page: Handle home
e371ac0b node to page: Basic outline
e7d0bc8a Revert "Fix case issues with Params"
239c75c7 Fix case issues with Params
1eb3c4a8 docs: Fix list template link
30317934 docs: Add a simple list template
3b42640e hugolib: Don't write zero-bytes files to disk
65f803e1 docs: Rename RSSlink to RSSLink
29fda0e6 commands: Make benchmark command more useful
7b8a09d5 docs: Add balaramadurai.net to the showcase
ce5f41ff vendor: Update deps
a49f838c tpl: Add imageConfig function
950034db source, tpl: Fix staticcheck complaints
bb36d57b docs: Fix typos in extras/scratch.md
4d4c7791 hugolib: Must update PathSpec on SiteInfo per language
85a2d81e commands, tpl: Get rid of repeating viper accesses
4b4ab475 hugolib: Fix page sorting when weight is zero
52e2fd27 docs: Add article by Zetao Yang
b619eb5a docs: Compress Hugo logo (hugo.png)
07eb3a50 tpl: Golint fixes
d4830fc4 helpers: Golint fixes
72156e40 hugolib: Simplify range
8dace9ad docs: Update roadmap
f4afd133 Enhance commit message guidelines
ec44ad5c docs: Link latest change as commit in the footer
774f13bd doc: Add a "Deployment with rsync" tutorial page
0cd0adda transform: Return any read or write error from Apply
3a86aba5 commands: Move initialization of flags in separate function
c9be931e docs: Remove non-showcase Hugo sites
e8380e61 Add GitInfo
186db7cd Fix page names that contain dot
cda3b36f Revert "docs: Add www.bullion-investor.com to the showcase gallery"
b5bc74ca docs: Add www.bullion-investor.com to the showcase gallery
01cfcce6 docs: Add two articles written by Hash Borgir
6a3d1037 Fix RSS Title regression
342b6fe8 Make it clear that Path is relative to content root
4ad39445 Refactor Page tests
f5b26455 Remove Wercker config
301e4c7e Make Amber read from the Afero source file system
0406be3d Add missing template error logging
89e31256 Get rid of the rawContentCopy field of the Page struct
c936b6c8 docs: Fix punctuation in content.md
c859810b docs: Add clearhaus.com to the showcase
a2cc2e75 docs: Fix typos in content section
333bb055 Remove now superfluous lowercasing
5859c691 vendor: Update Viper
f21e2f25 all: Unify case of config variable names
d9f54a13 Handle ToC before handling shortcodes
165edc7f tpl: Fix comment
a10b2cd3 Avoid reading from Viper for path and URL funcs
dffd7da0 docs: Clarify installation of themes
6427fba9 docs: Improve instructions in quickstart.md
db86f480 docs: Add dmitriid.com to the showcase
1992b356 Bump Travis to Go 1.7.3
d0d24b43 commands: Do not print error on missing unknown dirs
f0af8075 commands: Only watch relevant themes dir
ddf2a340 Add page context to error logging in rendering
67df33d8 Fix a more summary corner case
58f31d27 Consolidate the Param methods
faa64abd docs: Add singular/plural i18n example
e6f2426e docs: Add christianmendoza.me to the showcase
3a5b7027 docs: Add fixatom.com to the showcase
6a7f989d docs: Add hugojoomla to the tools section
7f4d9025 docs: Remove merge artifact
df943595 helpers: Slight improvement of ToLowerMap
40b1b8f7 Fix case issue Viper vs Blackfriday config
4d6cd3cb docs: Update link for Ace template site
2ea22a42 docs: Add docs.eurie.io to the showcase
0456f950 docs: Add GitLab to Forestry.io integrations
35dda2d9 Fix pygments check in test
9ee2538e vendor: Add external
2e0e77be Make the pygments shortcode test matching less specific
10a773cd Implement support for alias templates
88675473 Updated link for Ace template site
8b43d39e Use govendor sync instead of get
3ce90466 Rewrite TestRSSOutput to use Afero
58825677 Add workaround for block template crash
794589fb Use example.org for replace-this-with-your-hugo-site.com
4e0c71a6 Added GitLab to Forestry.io integrations
8fa871a0 all: Remove dead code
766c82a6 Add context to asciidoc/-tor error logging
9f9b93af Add logging of asciidoc/-tor errors
998034fa Log on error in translation file
eb00c621 tpl: Remove the spamming template errors
8ddd95e3 tpl: Factor out double Lookup in executeTemplate
474eb454 tpl: Add partialCached template function
d2bc64be Add draft test
5355ddf6 docs: Remove deleted article "Hugo on Netlify — Insanely Fast Deploys"
bfe9b870 docs: Add "Hugo on Netlify" article to press.md
8a63ebcb docs: Add shapeshed.com to the showcase
9d0b1320 docs: Add thecodeking.co.uk to the showcase
71422a7d docs: Add Firebase Hosting to usage.md
df7b8b5c docs: Add Firebase Hosting to hosting providers
b3bcd78f docs: Add webhook to tools for deployments
8d509258 docs: Mention GitLab hosting support
8b8a1e0a Fix broken build
0206be02 hugolib: Prevent TestShortcodeTweet from accessing network
7b0f92db vendor: Update Viper
1f087794 snap: Add "network-bind" plug for "hugo server" to work
a7e2a04d docs: Add Forestry.io to the tools section
c2bf748e docs: Refactor /docs to use the block keyword
56512e81 Allow to set cache dir in config file
3616fb62 command: Fix hugo new for multiple architectures
cf5d2e27 vendor: Revert latest Viper
1c214fcb Add quiet mode
7cdd230e vendor: Update dependencies
a22294aa docs: Stylize "Mac OS" as "macOS" in v0.17 release notes
6195d8f7 docs: Fix grammar in v0.17 release notes
1adfaf49 snapcraft.yaml: Bump version to 0.18-DEV
d54d6633 release: version bump to v0.18-DEV
e1e677f6 snapcraft.yaml: Bump version to 0.17 for release
fe2d246c commands: Bump min_version to 0.17 for "new theme" subcommand
5b9f4883 release: version bump to 0.17
8bc390d8 vendor: update viper to latest version
f9c70c0f add release notes for v0.17
57d7dd5b docs: Add rahulrai.in to the showcase
fbce8445 Whitelist startinline pygments option
27d7aa5f travis: Reintroduce asciidoctor to build
f8e968b2 snapcraft.yaml: Change grade from "devel" to "stable"
00b3667f travis: Remove asciidoctor from build
217d6ea6 travis: Fix asciidoctor build
f37f57a8 travis: Lock asciidoctor to 1.5.4
b3a113b7 docs: Regenerate commands doc
2a4ed1c4 Add hugo env command
80367ea2 docs: Us vs you
88ec7d88 docs: Improve home page
ffbf3dd3 doc: Improving language in archetypes doc
0721a9c7 Update Dockerfile to pull in missing test dependency
d9c1f1ee docs: Add Lipi to tools section
bf0dfa3e Fix URL in multilanguage sitemap index
d30c6a26 docs: Fix typo in tutorials/how-to-contribute-to-hugo.md
50c43c36 Contributing: Link the "How to contribute" tutorial
0043b486 docs: Add notes about multilingual menus
78e5263c Readme: Clarify usage of Gitter
e36b0305 docs: Add tryo labs article to press.md
614dd2aa Deprecate PageMeta.WordCount etc.
59df7db7 Fix half-broken self-closing shortcodes
8b0d16b8 docs: Fix typo on hosting-on-gitlab
6b4d3263 commands: Revise instructions after "hugo new site"
0c223d9c vendor: Update Viper
a61b1497 vendor: Update cast
a0167d83 Fix leaky goroutine
63a6da06 Make multilingual respect DisableSitemap
73894cca Add TestChangeDefaultLanguage
2071d470 tpl: Polish i18n tests
e7e2a1ca tpl: Improve tests and docs for i18n
e7ff5c2d vendor: Update go-toml
608b90da vendor: Update dependencies
894b69db Remove some unused vars
9c017e51 commands: Add some band-aid to convert
2105e42a tpl: Set i18n bundle once per test run
6e692f2d Add vendoring with govendor
b3a72155 Fix i18n with missing translations and add tests
bacc1706 helpers: Skip TestGetRealPath on Windows when not in CI
98c12b7b Fail early in TestGetRealPath
4a79fa0c Revert the "standardize author data"
83533a88 docs: Improve Overview Configuration manual
a7af6303 Make suure SectionPagesMenu setting is always loaded per language
b6673e53 docs: Add documentation for author profiles
56afd943 docs: Add  multilingual alias example
51c9bfbc Remove Authors.Sort
cf978c06 Add First Class Author Support
44bf76d0 Add snapcraft.yaml file
74291114 docs: Clarify difference between slug and url
e80453a9 tpl: Add EnableMissingTranslationPlaceholders option
0dd57b90 docs: List i18n folder in source organization
bca567fa docs: Clarify usecase of data files
0c49370c docs: Fix example of displaying taxonomies
3410007d docs: List multilingual tpl vars and show menu creation
9dab62c5 docs: List config options for multilingual feature
4e16a6d4 docs: Fix markdown in content/extras/scratch.md
cdf1edd5 docs: Fix French translation in multilingual.md
0d1e9670 docs: Improve Traversing Local Files
b86a605b Make paginate settings configurable per language
bbb11a4a Do not add lang prefix in URL when set in frontmatter
dd45e6d7 Lazy calculate  WordCount, ReadingTime and FuzzyWordCount
4abaec5c Improve TotalWords counter func
bcd43479 Avoid splitting words for summary
74ffb45f helpers: Improve the language prefix logic
f53145b2 helpers: Avoid adding language prefix if already present
8d040c96 commands: Improve error messages in convert
a04abf0d tpl: Make the *langURL funcs tace interface{}
7615ef0c commands: Report errors in convert
be09781a Fix broken convert command
69a97823 Add Language.LanguageName
a7dc3c08 Support site menu per language
f0ac26c9 commands: Fix typos
3908489c tpl: Extend where to iterate over maps
64012142 tpl: Fix typos in tests
46342ad5 hugolib: Fix typos in tests
c700cdc3 Replace some leftover os.Stat with hugofs.Source
ef3c4a56 Fix reload dir matching in theme
364e69ab Handle symlink change event
e70cf1ac docs: Remove JPEG as format for showcase thumbnails
d5379fd1 docs: Add davidyat.es to the showcase
4d1cb500 parser: Use strings.Contains instead of strings.Index
798bf60c parser: Simplify err conditions
60baec80 commands: Delete useless conversion
2294b022 commands: Simplify err condition
1e180873 commands: Delete unused newUserErrorF
5867cb5a Fixe target path location check in jekyll import command
7d3dfba8 Prevent panic on empty authorlist
33921331 Remove redundant field in sort helper struct
9c5f2bef tpl: Make it more clear on  missing language string
43bf9ed3 Redirect to root when DefaultContentLanguageInSubdir = false
4df86a70 Fix paginator counter on x86-32
eaf2f9bc Add TODO list support for Blackfriday
76bf2dcd Fix shortcode vs pygments
ccb3040a Fix pagination page counter on 32 bit
fe0c2705 Reset the i18n func map on reload
5ef45bec docs: Fix typos in multilingual section
97c57fe3 Add missing read lock in getNodes
a8fad866 Bump Travis to Go 1.7.1
34fe5cd3 tpl: Fix echoParam
a00edff5 Make it the DEV version
35d2eac4 Fix go vet 1.7 issues
09ed41be Add a global Reset func
dc3618ab Make sure the 404 node has .Data.Pages
30d65fd4 Fix site reset for benchmarks etc.
b3563b40 Fix multilingual reload when shortcode changes
a823b157 Set lang template globals for each site when render shortcodes
28696b5d Small adjustment to SiteInfo init
2f7e8df5 docs: Fix spelling: HasTranslations > IsTranslated
1bce8a85 Create a copy of the section node for RSS
bbfebdea Fix Data in multisites
93717aac docs: Get the variable and funcs re multilingual up-to-date
4fbce787 Add JSON config to the multilanguage testing
d8a256c1 Fix YAML loading of multilingual config
446e606a Add data tests
5b331a18 Add temp MULTILINGUAL version suffix to this branch
a07293cf Create a Node map to get proper node translations
d1212307 doc: Fix TOML vs YAML in multilang section
45c69dd1 Handle error in config loading
76108440 Add IsTranslated to Node and Page
8b55bfc8 Remove unused Multilingual Viper default
f1e1cdab Improve i18n string handling
8da04034 Render main content language in root by default
d953e39e Add parent as owner to Site
9798a956 Make the check command work in multilingual mode
6b552db7 Make sure drafts etc. are not processed
e56ecab1 Multilingual TODO-fixes, take 1
0a7d1d0d Fix some corner cases in revised summary handling
d18a8cbe Fix livereload in multilingual mode
506e131f Fix the shortcode ref tests
54141f71 Improve language handling in URLs
2079a23d Make it possible to configure Blackfroday per language
596e0e98 Make it possible to add a language in server mode
7cac19b1 cmd: Load config from the common config loader in hugolib
8b657a11 Get the list commands up to multi-site level
90de5110 Make taxonomies configurable per language
36f2a1f6 Make the config loading testable
b6fcb3d0 Add sitemap index for multilingual sites
d5720717 Redirect to main language from root
f0b91852 Rework the multilingual docs
ed098540 Render the shortcodes as late as possible
708bc787 Optimize the multilanguage build process
f023dfd7 Move the Build* methods to HugoSites
5b9c2a40 Move HugoSites to hugolib
3a028079 Add Translations and AllTranslations to Node
52bf8f90 Rework the i18n template func handling
75dd596e Introduce HugoSites type
618948e4 Reset translation slice on rebuild
c447b7dd Rename MainSites to Sites
c4e7c370 Add Translations and AllTranslations methods to Page
06d12ab8 Add proper Language and Languages types
ec33732f Add multilingual support in Hugo
faa3472f docs: Fix typo in Quickstart guide
ccc51fe7 docs: Add open.cinegy.com to the showcase
723d4656 docs: Add Vim/Emacs plugin to tools section
a48ac6e9 docs: Clarify first level URL generation
0614a59b docs: Improve Quickstart guide
696c67b0 docs: Clarify Creating a New Theme
bb1812b6 docs: Mention theme config option on Usage page
8e1bcea8 docs: Update documentation for URLs
b6635e1b helpers: Fix bug in emoji renderer
7cb81077 docs: Correct spelling for "parameters" in partials.md
38d034df docs: Document shuffle template func
6eff9e50 docs: Update highlight.js example to latest version
2fc05dad docs: Add location of block template
fee9ee72 tpl: Add missing arg to Fatalf
20c4311d Switch to a more up to date TOML library
81f04ef4 docs: Clarify Usage
2530087a docs: Add Spanish video tutorial by Verónica López to press.md
715d4425 hugolib: Use named keys in composite literals
c5d07299 docs: Just a small grammar fix in quickstart.md
3ce9de76 docs: Follow through on watch default
68c8e0e2 docs: Correct name of release archives for OS X
be429d22 docs: Correct all erroneous swaps of "it's" and "its"
8474b9de docs: Improve section 'Why did you write Hugo?'
de1ca477 docs: Fix URLs in examples sites with path prefix
f914774f Remove broken Bitdeli badge from README.md
5498a1bd tpl: Return all errors from casting
d3627b17 Simplify Travis build
d72c454f Fix command for getting hugo in CONTRIBUTING.md
97c37732 Add a global Reset func
2175ea5b Bump Travis to Go 1.7
661c9787 commands: Suppress 'missing static' error
f6d4801b Skipt Twitter test in short mode
09612f7a tpl: Fix faulty ordering of relURL test cases
88dcbc6e tpl: Make absURL and relURL accept anything
26725515 docs: Convert toml to yaml in config overview
39df7724 source: Normalize file name to NFC
b33bfd40 docs: Add doc for time template func
f2faae08 Remove maximeguitare.com from showcase
0d9c0677 docs: Add rdegges.com to the showcase
914e4d85 tpl: Fix typo in FindRE test
93f3a85b Fix the time template func test
70544f9e tpl: Add time template func
d7f364c2 Fix for meminterval not using specified interval
5824e809 docs: Add romansilin.com to the showcase
b426c20e Return specific error on walk path too short
15b66935 Adjust the sanity check to path length 4
94d99898 Add sanity check to the file walker
802d43cb Disable Go 1.5.4 in Travis
285807ba Take 2: Load templates from the Afero source fs
ec23aa99 Load templates from the Afero source fs
5f5fccbc Do not return empty theme dirs
4ddd5361 Use the Afero source fs where relevant
a0859dc6 Make LazyFileReader use the Afero source fs
94892726 Handle errors during filesystem walk
0087beef docs: Add tumblr2hugomarkdown to tools section
0d0a7596 docs: Add tumblr-importr to tools section
5b40eeed examples: Add example for translation files
04889a5e docs: Document .File variables for pages
333646c5 docs: Drop .isDraft to new line
e3e1f7a2 docs: Add a link to hugo-openapispec-shortcode
ddd5a922 docs: Removed comma from json example.
df0a4534 docs: Add missing configuration option disableHugoGeneratorInject
9c458657 docs: Add weilinshi.org to the showcase
17f53526 docs: Add CTL Compiled edtech blog to showcase
76f332bf docs: Add www.leowkahman.com to the showcase
3e1b579c Be less aggressive with CHMOD filesystem events
91b61b97 Simplify the configuration of HugoHTMLRenderer
4d4da001 Fix broken shortcode test
39a452a4 Add "missing slice" to the Params test
593a546f Check for nil Params in shortcode's Get
0bdc0d62 Add shortcode null param variant
198efc89 docs: Add Algolia as commercial search service
e9924e96 Add shortcode test for mmark
c0eedfe9 docs: Update last-mod date of installing-on-windows.md
10ad648e docs: Fix PATH issue in the instruction for Windows 10
20555b16 Add `htmlEscape` and `htmlUnescape` template functions
7dd5cd67 Bump Travis to Go 1.6.3
3564f09e tpl: Add humanize examples to smoke tests
55a4f6e4 Do not double-escape in querify
ef9b9156 Revert "Throw a noisy error when a post has no layout"
318558f2 docs: Add 404 template
b1593400 Throw a noisy error when a post has no layout Fixes #1313
af34613f Update frontmatter.go
0a812beb tpl: Modify tpl.humanize to ordinalize integer input
330639d2 Fix panic when using URLize
32d82a44 Ignore emacs temp files
d44bb4ec Revert "Use bufferpool in Asciidoc handler"
7c125ebb Revert "Use bufferpool in Rst handler"
adf40549 Fix humanize when string is empty
d9bc233f Use bufferpool in Rst handler
00d70e55 Remove []byte to string to []byte conversion in Rst
068a7715 Use bufferpool in Asciidoc handler
ed5ad12a Remove []byte to string to []byte conversion in Asciidoc
1d7f4413 Consolidate the Render funcs
4a48b5f3 Replace replace-this-with-your-hugo-site.com with example.org
b8af06f2 Make auto-date disabled by default
b581bbd8 Make config flag global
223073c6 transform: Add missing GoDoc
39fe42cf Simplify querify
fbf48824 tpl: Add a querify function to generate query strings inside templates
770df77b Add Docutils to Travis
05a33e31 Add Asciidoctor to Travis
e6d97c4f Add Rst shortcode test
5388211c Add Asciidoc shortcode test
6c0f7052 Fix Emoji benchmark
aa66478c Add Emoji test case
7e08d23e transform: Explicitly bind LiveReload to server port
0ce64382 docs: Update install instructions to reflect hugo.exe filename change
e140070c docs: Add tutorial for GitLab Pages
ca6b26fe commands: Allow schema-less baseURL on command line
5572e349 Update Travis config to Go 1.6.2
195a2b38 docs: Suggests the use of delimiter for taxonomy listing
364686ec docs: Add additional example for taxonomies listing
eda36787 Add automatic page date fallback
c21e2b3b tpl: Enable safeHTMLAttr
cdd6a124 Add test for shortcode in fenced code block
e3b162cc transform: Don't use helpers.StringToReader
e2aea651 helpers: Remove ToReader funcs
29ca323a docs: Regen commands doc
1accd3ba Fix example for autocomplete
a4b84962 docs: Fix typo is 0.16 release notes
ca5ae50c Revert "docs: Refactor /docs to use the block keyword"
3a2748e0 docs: Refactor /docs to use the block keyword
357c9db2 docs: Add mtbhomer.com to the showcase
714d4a9a Fix failing Windows test
44edd938 Add tests for embedded shortcodes
8b54843a hugo: Revert git commit message guidelines
373ca662 hugo: Update contribution guidelines
c52bb4ef commands: Specify os port generic errors
aa690c8e commands: Fix charsets in mimetypes
34f40044 Fix shortcode in markdown headers
6ba07456 docs: Add upbeat.it to the showcase
c01f9825 docs: Add mayan-edms to the showcase
85881033 Unexport ShouldBuild and AssertShouldBuild
eeaafb4b hugolib: futureStats plural
fb0c1350 hugolib: Handle unpecified date for IsFuture and IsExpired
673e41bf hugolib: Add expiredStats to build feedback
32c0e3fd hugolib: Bug fix futureStats
4724a579 hugolib: Refactor page.ShouldBuild and table driven test
f7b2e532 docs: Add ExpiryDate to the list of variables
448f0306 docs: Example of how to use Order by ExpiryDate
02d2f05e docs: Add instructions on buildExpired in build configurations
6e9fbf8a docs: Add expirydate to front-matter doc
5461a5e0 commands: Add listExpiredCmd for expired pages
51f7cd9b commands: Add buildExpired flag
c1c8ecc9 hugolib: Add GroupByExpireDate function
091915c7 hugolib: Add sort ByExpiryDate function
6472f158 hugelib: Add expiredCount as a Site variable
d4156e61 hugolib: Support an expiration date
2564f46a Fix Emojfy for certain text patterns
683888eb Change hugo to Hugo in help text
5d3aabcb Update the alias generated HTML files to conform to the W3C HTML spec
75deb923 Remove unneeded casts in page.getParam
acbedf62 Fix urlesc import url in Dockerfile
48ebd598 docs: Add jamescampbell.us to the showcase
f9cadee8 Bump version to 0.17-DEV
7212e513 Update release-notes.md
b7513ea6 Get Dockerfile up-to-date
a7f51703 Add Hugo generator tag to home page if not present
80ebe057 Update release-notes.md
60184823 docs. Add the guranteed exit -1 on eror to Hugo 0.16 rel notes
cf10d4ce Some polish and addends to 0.16 release notes
d4e5fa6f Pull the shootouts about 0.16 into the intro section
26c18005 Remove HugoVersionSuffix "-DEV" prior to 0.16 release
834d4177 update release notes for 0.16 release
f94cd281 Handle errors during rereading properly
d1cf262b Ignore __jb_tmp___ files created by IntelliJ
f8e4a060 Annotate temp files that Hugo ignores
ce05dfa5 docs: Grammar fix in overview/quickstart.md
4ab5ed6c docs: Add Digital Ocean articles to press section
d486396f docs: Add c't magazine article to press section
20358f46 docs: Document UniqueID page variable
56116315 docs: Add an example of how to use .PrevInSection
c21b1558 docs: Add note about live reload script injection
dcee05b2 docs: Fix minor typo in overview/quickstart.md
efae41c1 docs: Add novelist.xyz to the showcase
90362933 docs: Fix typo / readability in extras/menu.md
6dec7b3e docs: Add stefano.chodino.uk to the showcase gallery.
dec74431 docs: Add klingt.net to the showcase gallery
9305deca docs: Clarify that watch is enabled by default
9aa70af1 docs: Fix git clone for hugo_theme_robust in quickstart guide
ac938d9d docs: Improve description for .Hugo.Generator
64817cc0 Fix broken template test
26906d85 Don't add any space around Emojis
608cfe62 Remove kr/pretty dependency
fd40fe39 docs: Document relativeURLs
b5030782 Ignore Byword temp files
273a6840 Add non-string support in markdownify
7cbafa4e docs: Fix typo in overview/configuration.md
a07889d4 docs: Fix typo in templates/content.md
bf4206a0 docs: Fix links in the documentation
5caea6f2 docs: Add 2626.info to the showcase
09038865 tpl: Add intersect operator to where function
ffbd2b6c docs: Add appernetic blog to showcase
2b02a402 commands: Sett mime type for CSS in Hugo server
e4ee1b89 helpers: Use net/url for URL parsing in AbsURL
16b71bbb Export "detectFrontMatter" to fix caddy-hugo
c5723a89 docs: Add aydos.com to the showcase
4152ce88 Update release-notes.md
7da9163d docs: More on release notes
efa9bdcc docs: Order by Lastmod in release notes
eb627ca1 docs: Order by Lastmod
10af9063 Add ByLastmod page sort
fbca53ac docs: Add notion of exiting the themes folder in quickstart
fe2b22fe docs: Grammar fixes in overview/quickstart.md
19afa5ee docs: Update showcase screenshot of yulinling.net
81a2466b docs: Add some more fixes to release notes
ebefa476 docs: Move image-width fix to style.css
48fce611 docs: Move Algolia styling into style.css
22683a3b Make alias redirect output URL's relative
76738347 docs: Fix findRE typo
a8e05b11 docs: Fix some typos in release notes
56cd3081 doc: Get feature list of 0.16 release notes up to date
01c33898 📚 Add ENV support to release notes
9ddf5202 Update import path of fsnotify
5e9b147c docs: Add some doc about ENV config
b7fd4102 commands: Support config from ENV
0743c767 docs: Fix typo in tutorials/how-to-contribute-to-hugo.md
77159b4b Add some schemaless BaseURL tests
215b8939 docs: Fix grammar in templates/partials.md
fed5f20f docs: Add tutorialonfly.com to the showcase
4b4bfa6a docs: Fix lastmod date for chipsncookies in showcase
6fdb0ca6 docs: Add barricade.io to the showcase
ba0a6614 docs: sa.muel.be has moved to chipsncookies.com in showcase
c40bc274 Improve build labels in README
24cb0d1f tpl: Do not write to cache when ignoring cache
5d50c464 Chomp Unicode BOM if present
d48b986c Revert "tpl: Extend where to iterate over maps"
dc8659c5 Update Travis config to Go 1.5.4 and 1.6.1
0141a021 tpl: Extend where to iterate over maps
206440ee Fix broken tests
88759eec docs: Add plainIDAnchors change to release notes
0d9a5f80 docs: Update default for plainIDAnchors
06772eef Default to plainIDAnchors
c3d28d28 Revert "Add Node.ID"
39c9ae31 Revert "Use Node.ID for anchor ID"
2468b10e docs: Fix example for Param method
cd558958 Use Node.ID for anchor ID
5ef52294 Add Node.ID
37fb2d43 helpers: Ignore cache for Pygments when flag set
c0cf1a7e Fix section menus for lazy blogger
dde967d8c hugofs: Add package doc
16ee8566 create: Add package doc
257dee53 bufpool: Add package doc
4d34a98a Add GoDocs badge
ff7eec2f docs: Regenerate the commands docs
b7efbdc1 hugolib: Add option to disable rendering of 404 page
72bda5ad Move section initialization to Site.assembleSections
8fe48a65 Fix potential data race in test
39c74b70 docs: Add commercial services to the "Tools" section
51ee3fc7 docs: Document how to install dependencies for tests
88a07b75 docs: Fix missing step in Windows version check instructions
65f94270 docs: Document Go 1.6's new ability to trim whitespace
e4d328d8 docs: Fix Go version in install guide
ac1ec5c7 docs: Remove remaining Mercurial references
9f6b5ad3 Save auto-detected markup type in Page.Markup
e6e98bf5 docs: Remove Mercurial from contribution tutorial
6c900380 tpl: Add replaceRE to the "smoke tests"
f2ff77f3 Make Hugo build without Mercurial
ebf3cef1 docs: Add "How to contribute to Hugo" tutorial
970f15cf docs: Use HTTPS links in README where appropriate
d3e82950 commands: Add helpful instuctions after "hugo new site"
1c3c148b hugolib: Un-export internal Site-methods
16ad6281 docs: Fix references to section list templates
6d2898b3 docs: Correct date for proper sorting in showcase
18738266 docs: Add one more quote
ef933e4a docs: Limit the quotes on front page to the last two years
40f62a86 docs: Use data folder for website carousel
1648e327 Document and clean SourceRelativeLinksEval code
819271cb Re-export the methods used in page group tests
3950b137 hugolib: Camelcase ALL_CAPS vars and const in tests
05b88887 huglib: Add even more missing GoDoc
85bcac53 source: Add missing GoDoc in File
ddd02b2f hugolib: Camel-case ALL_CAPS const in test
98ee8c3f hugolib: Add GoDoc to pageGroup.go
57c347e4 hugofs: Fix GoDoc
969f9311 Build Hugo in Travis with race detection enabled
fd5d5735 Add go test -race to make check
27f9e62b Remove Wercker badge
5bfe16ef tpl: Add findRE template func
54750b07 Do not create robots.txt by default
43b5dfab Disable syntax guessing for PygmentsCodeFences by default
0698f294 docs: Add yushuangqi.com to the showcase
dea06f86 docs: embed YouTube video in Windows installation tutorial
23046146 docs: Update set PATH instructions for Windows
21e0515f docs: Fix menu in firefox
1adf4035 docs: Add alternative for Wordpress import
f0dbf2c8 tpl: Add the other test case for hasPrefix
aaee0385 tpl: Sort the smoke tests
80d02a14 tpl: Add hasPrefix to the template funcs' "smoke test"
4502c4e3 docs: Add documentation for hasPrefix template func
fe929114 tpl: Fix panic in sort of nil sequence
d15fda50 tpl: Fix panic in pairList.Less
7d5c9fbf Make ByCount sort consistently
c6c2c689 hugofs: Add missing not nil checks to tests
b678e90d Use to most specific interface in WriteDestPage
c2277fcb docs: Add doc and a test for readDir
cb89ae63 tpl: Make readDir use the WorkingDir fs
4f66f790 Add readFile template func
a89035bd docs: Mention CLA in the showcase contribution guidelines
6a3a6f68 docs: Remove incorrent reference to list.html
93e41a1f docs: Fix typo in templates/functions.md
d65fbfe1 docs: Add surge.sh to main page of static site hosters
effaf6c2 docs: Document GitHub flavoured code fences Fixes #1259
e35a6921 docs: Document lastmod variable Fixes #1351
50506ebe docs: Document the split function Fixes #1997
4c95b700 docs: Add silvergeko.it to the showcase
79af7143 docs: Add robertbasic.com to the showcase
dbfc7ea0 Fix error handling in SymbolicWalk
bfe80094 helpers: Fix SymbolicWalk for the root folder
977b0e34 docs: Adapt commit message for showcase additions
8890885a docs: Add search form powered by Algolia
8aec5ee2 hugolib: Some more unexports
7c81c86b commands: Apply Golint rules
5d3705df helpers: Apply GoLint rules
7fa2cec9 tpl: Small Golint fixes
b71f391c parser: Remove unused vars
6dbae7b6 Be explicit about the type in Scratch test
d7701305 hugolib: Remove unused Tmpl on Page
c846b051 Do not use defer for unlocking in Scratch
fa1a9653 hugolib: Taxonomy GoDoc cleanup
b5bced1d Add a simple benchmark for Scratch
7c84e6b3 hugolib: Even more Golint fixes
3e77886a helpers: Fix GoDoc in Hugo version constants
a7953e25 commands: Apply Golint rules to hugo.go
3bbfd991 hugolib: Apply Golint rules to rss_test.go
b8bf01cd hugolib: Add missing GoDoc in pagination.go
c2c73c2b hugolib: Some more GoLint fixes
218fceac livereload: Add missing GoDoc
e467d233 hugoblib: Clean up the time tests
94409072 transform: Group vars and consts in chain_test
c7869fd7 transform: Clean up the var naming mess in chain_test
a6de8dfb hugolib: Some more Golint fixes
dac34f9b hugolib: Fix spelling mistake
c31fa378 hugolib: Add Godoc to pageSort
c20dee9d parser: Make the constant vars ... constants
bf76e744 parser: Fix ALL_CAPS var names in test
1cb7ed6a parser: Spring code cleaning
937592cb hugolib: Fix some more Golint warnings
8a60571f helpers: Fix and add Godoc in path*
6ff2e1db helpers: Remove the else in MakePathSanitized
faf2e506 Do some minor code cleaning of Site
626874b9 transform: Golint fixes
67289033 target: Fix some Golint warnings
dc7d8a9e Spring cleaning of the menu code
4f00f1c9 heloers: Add a linefeed to make Golint happy
9cf93e11 commands: Fix remaining Golint warning
da4d4164 utils: Add godoc
df92fc31 hugolib: Fix Java-styled all-caps consts
b0e21f96 helpers: Silence some Golint warnings
283b8663 commands: Do not use named return vals in Jekyll import
35b79824 Check returned error in Scratch-test
691c2ea9 Do make check in Travis
b319c189 source: Consolidate if conditions
c54df37f source: Remove unnecessary else condition
b1b7ac7e hugolib: Use field keys in composite literals
b9127ecc helpers: Apply gofmt
e8cf8b40 hugo: Add check tasks to Makefile
048e0742 Add Scratch to shortcode
de8fc876 Re-render shortcode on template or data file change
e5e1bcc2 Add plainify template function
e5aa4774 Add support for symbolic links for content, layout, static, theme
6258d48b Utils methods refactored for readability
c42982f7 Add '+' as one of the valid characters in urls specified in the front matter Fixes #1290
02effd9d Protect against concurrent Scratch read and write
f52b040e docs: Draft of 0.16 release notes
d45b55bd helpers: Rename getMmarkHtmlRenderer to getMmarkHTMLRenderer
bec1ac7b livereload: Run go fmt on connection.go
9323707b create: Refactor NewContent to be testable
bafb7717 livereload: Simplify conditional
2c5e4f76 helpers: Support EXTENSION_BACKSLASH_LINE_BREAK for Blackfriday
4c4ce552 helpers: Fix minor typo in content_test.go
0a768ec9 Simplify GetDottedRelativePath
8d86f1ec Return early from parseOptions
02e50c01 Remove duplicate doArithmetic
42b302fc Revert "Add Codebeat badge"
3529152e Return early from appendThemeTemplates
c50c6687 Add Codebeat badge
0ec8fc54 Add Go Report Card badge to README
21054f73 source: Consolidate filepath.Split calls
df44b193 tpl: Send actual values to in from intersect
60055827 tpl: Add missing printf param in t.Errorf call
b0326a1c tpl: Treat booleans as set in default function
b5c718a4 docs: Fix typos in functions.md and contributing.md
575ae1b3 Remove CircleCI badge for now
58802de3 No block support in shortcodes
3a2a4c3b tpl: Make the safeHTML and cousins accept more than strings
70739c97 Remove unnecessary type conversions
3a82ae71 parser: Unexport some internals
5d915e7e helpers: Unexport some internals
aedb13b2 tpl: Fix race condition in regexp cache
f6c3ca8b transform: Remove unused code
263daaea target: Remove unused code
4ada1cab source: Remove unused code
df3f2af0 parser: Remove unused code
dea185aa hugolib: Remove unused code
c21dc16d commands: Remove unused code
91ffc76b helpers: Remove unused code
0fb31e4a Create an alias from shortcode.Page.Site to shortcode.Site
734dd1c4 Bump Pygment version to 2.1.3
542e220c Make tests green on both Pygments 2.0.2 and 2.1.3
988962e8 Add Pygments 2.0.2 to CircleCI build
989c7487 Add emojify to the template func smoke tests
612c6114 Docs: move tutorial screenshots in their own subfolder
a103d581 Docs: update Windows install instructions
6fb4e071 Docs: add Aerobatic as a deployment option in the Introduction
d9049752 Docs: add tutorial for Hosting on Bitbucket
153dccc0 Add debugging steps for no variables defined
0ab41624 Ability to config layout and content dir via cli
cafb7847 Add emoji support
5926c6c8 Update showcase entry and article link to softinio.com
b8d36512 tpl: Add replaceRE function
e9008b91 Allow picking a specific file out of a gist
7cd69aaa Exit with error code on any error
077b0fa7 Add package prefix to the commit message guidelines
0667d8a0 Add engineering.mongodb.com to the showcase
941b4caf tpl: Add Copyright reference to the Go authors
6cb032b6 Docs: use Shekhar Gulati's Hugo tutorial as quickstart guide
2d0650db tpl: Add custom index function
f3f9763a tpl: Add time note to default func description
09c8c17b tpl: fix default function
0743646f docs: add better default example
ce9ee3cf tpl: Add default function
09624708 Make absURL properly handle baseURL with path component
94c3825e Add md5 and sha1 template funcs
be3519fa Use default sitemap configuration for homepage
0945673f Update Dockerfile to use golang:1.6 base image
a2abad96 Add support for Go 1.6 block keyword in templates
924028a9 Fix for page in multiple menus
973393c9 Create template clone for late template execution
9896cd00 Add reference to parent shortcode
866176be Docs: fix missing words, tense in datadrivencontent.md
7705e32e Resize showcase thumbnail of h10n.me
0f486313 Add viglug website to showcase
64ed64d9 Add h10n.me to the showcase
2a75e970 Add fale.io website to showcase
429b669a doc: Correct Scratch slice example
c7d22604 doc: Add some Scratch slice samples
c7acc318 Add some missing resets on rebuild
eaba04e8 Add list support in Scratch
435e996c Add jsonify template func
c8c6f5d0 Add json mime extension type
d774b142 Make where accept slice
4e32dc80 Simplify the IsHome test cases
023992ab Unexport the target handlers
27f8d8f9 Allow URL with extension in frontmatter
3c100cc3 tpl: Unexport the rest of the internal template funcs
f6591eca tpl: Add some dateFormat testcases with both time and date
8aa90f2b Try both prepped and unprepped taxonomy keys
ccd2f4c3 Prevent capitalized taxonomy labels
e85b821d tpl: Fix broken chomp test
f223f17c tpl: Make chomp return template.HTML
daaf4eb3 tpl: Add integration tests for most of the template funcs examples in doc
80e1fd29 Log fsync errors
5b065a27 Some missing shortcode replacements
7f682d78 Fix shortcode handling in RST
cc38a40f Docs: fix typo in tools section
e2965a35 Remove superfluous FontAwesome files
6b922750 Revert "Create template clone for late template execution"
93b04e67 Create template clone for late template execution
80460315 Check for the presence of pages before setting dates
75cf3243 Set Date and Lastmod for main home page
1f61f403 Use flagChanged in all places
c1f8b188 Add template function slice
9349a889 Do not try to find available port if set by user
ff4ca992 Press: add "Comparison site built with Hugo"
455df107 Optimize replaceShortcodeTokens
83759953 Enlarge data in BenchmarkReplaceShortcodeTokens
ac2eaca0 Press: add tutorial written by Shekhar Gulati
c59bdc20 Press: add article from sitelabs.es
d1bf2f54 Docs: fix typo in introduction.md
086d6540 Add cdnoverview.com to the showcase
060f0206 Docs: remove .Taxonomies from Page variables
d607f4c7 Docs: fix small typos in functions.md
3749dc76 Docs: add "Minify Hugo Generated HTML" to press
e9853642 Listen channel before sending values to it
253a6188 Go 1.6 is out!
284e959f Close file handle when finished reading file
df17fae5 Docs: add hugo-lunr to the tools section
50182cd0 Remove superfluous Errorf
c1e43095 Clean up the trim template func test
8c840480 Force full rebuild when site config changes
ad176055 Export MainSite var
ce7c2671 Docs: clarify that Amazon WS is, actually, AWS
4ecf019e Add gntech.se to the showcase
2b1ad546 Docs: fix typo in YouTube shortcode description
bac1ba46 Fix spelling and go vet errors
0d415e45 Link Gitter as Dev Chat in README
21b0aa86 Restore the wercker status badge to original small size
06e90b12 Add documentation for Google Analytics internal template
a0eec02b Set the wercker badge to track the aaster branch only
207a574f Docs: fix Disqus shortname reference
cfbae7ce docs: Add guideline for showcase additions
4a15051e Crop, resize and optimize shelan-tn.png
2d11551c Ignore temporary file "4913" created by Vim
42f43ad4 Add jorgennilsson.com to showcases
28e6e19d Fix git commit blog article link
8fe10708 Prevent confusing template errors when seq is nil
2b3b90a6 Add test for Hugo hanging up with empty content
d1b0290f Add shelan.org to showcase page
2b0fad79 tpl: Add two more doArithmetic test cases
f90b45f7 tpl: Test with nil value in first, last, after and shuffle
3cc468a8 tpl: Add missing test variants for slicestr
05c8bccf hugolib: Add test for parseSitemap
b3c2d90b tpl: Add missing substr test variants
4dcb63c2 tpl: Add highlight test
0a8583a4 tpl: Add missing base64 tests
0888ddd0 tpl: Add tests for word and rune counting
ec49dbb8 tpl: Consolidate and complete the Inflect tests
1e8b4d9c Add some missing doArithmetic test cases
0f6c8439 Add missing menu tests
c462440d Add Page tests for simple methods
66570d2f Add Node tests for simple methods
75044c19 Add menu sort tests
5995eaaa tpl: Unexport all template funcs
d1d7702c Add a benefit and a simple example to return current year
49c2761b docs: Fix typo: Janapese → Japanese
0586bf0d Use filepath.Join in locale resource getting
8d8e9dde Minor cleanup of some of the resource getting code
b3a70abe tpl: Complete coverage for Humanize
7c3dceea Fix buggy Menu.Limit()
a95426d4 Remove Printf in test
88a320fb Fix buggy Pages.Limit
b21d280c transform: Complete test statement coverage
08b582e1 Only do one livereload replacement
dd1db334 transform: Add missing test case in livereloadinject
96e99045 transform: Add missing test case for NewEmptyTransforms
21cb5264 bufferpool: Add test
1f326ad9 Fix bash-completion for Hugo builder flags such as --theme
45df4596 tpl: Add humanize func and cleanup lint
e95f3af9 helpers: Test coverage increase
318a9845 Apply gofmt -s
eebf00f7 Re-export HugoCmd
08670e6a Fix README.md to list the correct -ldflags for Go 1.5+
ed23711e Optimize seven recently added Showcase thumbnails
61197f9f Order the hugo comand flag vars
74539dea Unexport the remaining vars in hugo command
a89b2f41 commands: Get BaseURL from viper in server mode
792b2438 Add --renderToMemory as an additional Travis build step
3b596b85 Add renderToMemory flag
87ca0d0c Clean flags
bd0176a5 Add CONTRIBUTING.md
447228a7 Revise README.md emphasizing "good commit message"
8f368114 Update Travis CI status in README.md to track master branch only
5a7837cd Added showcase for datapipelinearachitect.com
868d0745 Added showcase for davidrallen.com
68e2e63d Fix Hugo hang up with empty content directory
ec02b990 Fixed example and cross-reference in content/variables.md
243fbbf0 Update lastmod date and screenshot for Rick Cogley site
9b8d2ce5 Remove destination from config file docs
9015aa5b Docs: fix some typos in templates/variables.md
57eebbf2 Use FEEDBACK instead of ERROR for empty home page warning
ca0c67dc Fix a minor typo discovered by Lintian (Debian)
817d6948 Expanded the Page Params section in variables.md
d158f7e3 Provide more detail on static sync when running with verbose
cd36d752 Add autostart option to YouTube shortcode
e8eb6181 Do not call watchConfig() when not in watch mode
c438f456 Add flag --cleanDestinationDir=false to retain prior behavior
5def6d9a Make the watch logger less chatty
3054a461 Make the DistinctErrorLogger more generic
3b3e771d Check for exported fields in embedded structs
12876ec9 Fix hugo benchmark
d08e4c87 Rewrite commentary on static event handling
b0b4b821 Permit directory removal during static sync
db18fd15 Ignore .DS_Store changes (thumbnail cache file on mac)
9413cf84 Handle self rename operations gracefully
74c90553 Static file incremental sync improvements in tandem with Afero improvements
7e196a82 Handle remove & rename source operations incrementally
e01c3409 A single file can be replaced in site.Files
45e50914 Process only the source content that has changed
9f3796a3 Read/reread individual source content files next is incremental conversion
ca6ca4f4 Separate handling content, data and template changes
bcc42c05 Separate reading source and processing source operations
f3aa93fa Ignore temp files created by IntelliJ when saving
0525fbdd Add leepenney.com to showcase page
eae46bdc Add Web Study List to showcase page
8537cecb Docs: add Hugopit to tools section
e27beadf Add Rakuten Tech Blog in showcase page
ca8d187b add javaunion in showcase
3526afc7 Fix some Go vet errors
58a183c3 Docs: Add doc for string and int
75ba84ac Add int and string cast template funcs
f89eb349 Docs: Enable plain id anchors
78f9bf24 Add one more menu test
ab70e6f5 Add menu test for external URL
dd85c290 Docs: Add missing "-b master" parameter to "git submodule add" command
e69e276a Update Travis config to Go 1.5.3
e8ca52e9 Add one more temporary template test for linux/arm
bca2d38e Add temporary template test for linux/arm
ed3015c3 update server to match latest afero
dd1d6556 Docs: Change the pseudo-absolute path to a relative one
082476e7 Docs: add emilyhorsman.com (buttercup theme) to showcase
1ce184b7 Add some p-wrap shortcode tests
48870fef Group vars in paginator
b47652fb Docs: add panel showing the last revision of a page
2c661674 Docs: Copyedit extras/robots-txt.md
01f71bab docs: Add lastmod to content files
9d70e780 Update press.md
9a6dc6c7 Add embeded template for robots.txt
7c5a1fd1 Replace *bytes.Buffer with io.Writer in rendering
4c596483 Update and refactor to ack Go Authors
6a23cd65 Docs: Update copyright year on gohugo.io front page
851c16ef Docs: Run "brew update" before "brew install hugo"
9ff36c5a Add some trailing newline shortcode tests
7bc5d366 Use a Docker container to build hugo
bc48b460 Added documentation about variable scoping in "partials".
8f8120ba Added "Caddy server"'s handling of 404 errors.
dcad0660 Small refactor: don't call `p.Permalink()` for all aliases, call it only once and only if necessary.
0bb3b49c Update doc to reflect default value of watch variable
6cdb8109 Allow renaming of sitemap.xml
26d23f7f added remaining relevant options
e904ccff added more pygments opts
9008ac0b Rename random to shuffle. Remove count parameteter to simplify its role. Add tests for randomising.
302a6ac7 Add Random function to template functions
b1f2b433 Fix /.xml RSSLink when uglyurls are enabled
ff28120e Added async version of Google Analytics internal template
8f6f1310 Copy static files changed
f310492c Add to press.md two articles about Hugo on AWS Lambda
ce0304a1 Change Gitter badge to "gitter | dev chat" in README.md
b309fe85 Update press.md
dfa34afd Add template funcs countwords and countrunes
2e92f368 Add hasPrefix template function.
0f6b334b Source file based relative linking
b78f13b0 Write a simplistic test for site.refLink
47587321 Add themesDir option to configuration
40fccf22 Fixes #1292
b56362de Docs: add hugodeploy to tools section
3b2a78ba Add to press.md Beginners Tutorial for Hugo (German)
fc627d55 Docs: remove unnecessary --watch flag
796ef3a3 Docs: add cross-references to installation guides
f807953a Update Hugo examples
cd54042c Add Coding Journal (blog.kulman.sk) to the Showcase
1d6286b0 update to use cobra's sub package doc
a291f3c5 Copy only the static files changed
277425ba Ignore temp files created by IntelliJ when saving
cb8f4591 Docs: Add nohighlight shortcode and improve formatting
22bd4850 Docs: Add lang attribute to Chinese and Japanese Press entries
ea75985c Update embedded livereload.js to 2.2.1 in livereload.go
5b1261c4 Upgrade Bootswatch, Font Awesome and jQuery in examples/blog
7cf7f85a Docs: Upgrade highlight.js to 9.0.0
df92a6b9 Docs: Upgrade InstantClick from 3.0.1 to 3.1.0
aee92f2a Docs: Upgrade livereload.js from post-2.0.8 to 2.2.1
23abad7b Docs: Upgrade Owl Carousel to 2.0.0-beta.3 (2015-06-19)
4b521b4f Docs: Upgrade jquery.scrollTo from 1.4.6 to 2.1.2
cca49ad0 Docs: Correct file permissions from 0755 to 0644
f6f0111d Docs: Rebase bootstrap-gohugo.css on Bootstrap v3.3.6
88343144 Docs: Rename bootstrap-theme.css to bootstrap-gohugo.css
ad6717bd Docs: Upgrade Bootstrap from v3.2.0 to v3.3.6
f8f128a0 Docs: Remove octicons fonts
7c84ad56 Docs: Remove unused GitHub:buttons files
217d25f5 Docs: Upgrade Font Awesome from 4.1.0 to 4.5.0
a84d8212 Upgrade jQuery 2.1.1 to 2.1.4 in doc
7a5a52f4 Clean up the loop counter variables confusion in TestPageCache
f24ffc9c Docs: Allow HTML in Showcase titles
e1af7cb9 Use MkdirAll instead of Mkdir in `hugo gen doc`
de82404d Fix hugo server "Watching for changes" path display
a1d232f4 Docs: Make <hr> slightly darker on gohugo.io
00fc038d Document 32-bit `hugo server` crash in v0.15 Release Note
5af8cc29 Add gadgetplayboy.com to Showcase and an article to Press
fe7ca7d7 Fix build
13d14ab9 Remove "Host:" prefix from Host header
dd2ab282 Correct the strings.Contains syntax in failing test
31035f8a Fix remote test on Go 1.4
89f8fa58 Set the request Host on http test server
9edc58a0 Fix failing template related tests in Go 1.6
8cea4288 Fix data race in non-renderable pages
0c01fef3 Fix 2 data races in TestPageCache
32da9b20 Docs: add hugo-lambda to tools section
3574304c Improve some random feedback messages
9c39593d Move cobra.MousetrapHelpText to hugo_windows.go
70510433 Docs: Enhance contrast and increase font-weight
868e4798 Fix formatting of "Installing on Windows" tutorial
67b4c524 Regenerate the commands section of doc
c1e134f1 Add `--source` flag back to `hugo new` command
41a3af1a Use absolute path when editing with editor
78576019 Docs: reference Jekyll import command in tools section
ebc187b4 Docs: add Contentful converter to tools section
d1bec542 Do not fail on unknown Jekyll file
d5ebf648 Remove/update outdated links in Press and Showcase
9569d116 Duplicate p.Description in Params map
38c5db98 Added a missing closing tag
f22d59bb Revise docs/content/tools/index.md (minor fixes)
1469ce0e Remove Duplicate "Editor Plugins" Section
280b2f29 Document PreserveTaxonomyNames
4a2623c8 Regenerate the commands section of doc
768370a5 Docs: remove references to dynamic CMS products
9ae07c4f Docs: document Node.IsHome
8509727f Add copyright header to that source files that don’t have one.
e29ede70 Fix some of the "new site" tests
b81fc1be add more architectures to .goxc
6042fc2b move some of the path helper utilities to afero and provide wrappers in Hugo.
de14ceec Update "Join Chat" to "Dev Chat"
56d6c0be Turn off failing new site test
f3c74c9d Add boolean value comparison to where tpl function
e445c35d Fix copyright headers in source files
f13db932 Sort and remove "" from "Available templates" list
d35d8206 Remove transformation of menu URLs
f6fdfcd4 Added 'themes' as a default new site directory
6a519e69 Update Travis config to Go 1.5.2
cd062623 Fix crash with "config", "check" and "benchmark"
69c28985 Fix broken Highlight test
c1b5a48f Add sanity checks for `hugo import jekyll`
00d04774 Change most global flags into local ones
c9526f6e Revise format for "Unable to locate Config file" error
df85e5a0 Switch to container-based Travis
be28d9d9 Fix some errors with format patterns
f363faad Add a number sign "#" before a GitHub issue number
6812229b Add gh shortcode to docs site
d48781ba One more error fix in the server command
c5287e78 Some more error fixes in commands
3f0f7eed Improve error handling in commands
6959b7fa Update external tutorial links in usage.md
75c61236 Move `import jekyll` functions to import_jekyll.go
666ddd23 Enable dirname and filename completion for more flags
0d1d33d7 Print error when /index.html is zero-length
f8302768 Run `go fmt hugolib/site.go`
afbc18c0 Bump min_version to 0.15 for `hugo new theme`
e9894683 Make noTimes command flag work
6c810314 Copy static dir files without theme's static dir
c5e68ba1 Fix typo in "Creating a New Theme"
91771ee3 Add Draft page variable to docs
b0b6a8c7 Use .Site.Pages in the documentation examples instead of .Site.Recent
d7ef272a Add Camunda blog and docs showcases
b557f624 Change plainIdAnchors to plainIDAnchors in docs
249cd625 Copyedit the shortcodes documentation some more
2e3d5c2d Docs: improve shortcodes page
cf732940 Remove an erroneous "$" prompt in quickstart guide
c83e10a4 Added the command in the documentation.
50b5d0af Support setting target directory in `hugo gen man`
09379e89 Update for version 0.16
2519b707 Docs: remove note about config changes and manual livereload
ffb1a96e Docs: improve usage.md
37676a25 Docs: improve quickstart guide
72a66972 Update press.md
26af48a5 Add note in doc about Jekyll import
f77a899d Regenerate the commands section of doc
d356720f Version bump to 0.16-DEV
6faf1d01 version bump to v0.15
9c1319cd Update license file in the docs/website to apache
9410d25e Update release notes with additional new features
171fb883 Update and reorganize 0.15 release notes
0f11eb4f Make the release note about renderToDisk more consise
234fac4a Update release notes
311307c9 Add IsNamedParams property in shortcodes
86dcac61 Add documentation for built-in shortcodes
7d31d5f5 Add shortcode for tweets
e03f27cc Add shortcode for github gists
3027b151 Add shortcode for vimeo
4424288d Add shortcode for youtube
cc3f52b9 Add shortcode for speakerdeck
fe2a9fa2 Update shortcode docs with .IsNamedParams
f045d7a6 Change the license to Apache 2.0
b00771ca Simplify ExtractRootPaths
c3931ef7 Add PygmentsOptions option
99acbb2e Permalink on Node and Page should be of string
5838420a Move blackfriday site-wide config loading to NewBlackFriday()
fde47c5e Add shortcode IsNamedParams property
3d09de89 Restructure the gen commands
831e9368 Improve "watching for ..." logging
098a0c81 Add commands/genman.go to autogenerate man pages
87274755 Fix missing word in code comment (my own fault)
6fa7f2ac Avoid multiple locks for shortcode template
c5f40e8b Improve RW-locking of template in shortcode handling
58c446f5 Fix recently introduced new data race in the shortcode handling
5c723401 Copyedit long help message in commands/server.go
3abb2675 Add RSSLink to SiteInfo
afbd52f7 Apply absURL on social tag urls
05c29ad5 Return error if shortcode template.Tree is nil
e59aabcf docs: Change "Github" to "GitHub"
a871c87f docs: Optimize a few large showcase thumbnail PNGs
2e1d2ba0 Add Go in 5 minutes to the showcases
a5bd101d Docs: fix typo in template function section
c5a4c07b Add SafeJS template function
7c9a2dfe Add increased time.Time support to the 0.15 release notes
f6ba48f2 Update Travis 1.4.2 > 1.4.3
f99730e8 fix broken image in showcase
83f19d8d fixed documentation link
923e4557 Add Arrested DevOps site to Showcase
97d06895 Hugo server watch by default
35abd179 Add time.Time support in ge, gt, le, lt
8d8fa722 Remove some superficial tests
3f5ddd52 Revert "Disable render-to-memory on Windows"
91e0c2b1 Disable render-to-memory on Windows
4679fbee Do not rebuild on extra Spotlight filesystem events
b08d9f26 Make replaceShortcodeTokens rewrite the input slice
4ecf56b8 Add latest review from Smashing Magazine to Press page
df824fa3 Hugo server renders and serves from memory by default (30%+ improvement)
e1618e9d permit the notimes flag on hugo server
cb48425f No double slash when destination set to '/'
ef0b9b51 Handle sync (file copy) errors better)
18a29964 Fix trivial typos in code
452ffab4 Copyedit docs/content/tools/index.md
2fec32a2 Add @wicast’s "Hugo is cool" post to Press page
acd720df Add docs/data/titles.toml to set title "Site Showcase"
5c6d8c57 Add ReadText project to Site Showcase
39933111 Adding LosslessLife blog to showcase.
28436059 Emphasize that commit message titles should start with a capital letter
619c16fd re-simplify SafeHTML function
1a26e351 Docs: add hugofy to tools
5c1204c2 simplify rssuri logic
062f6c33 rewrite safeHTML function
dcf1f96c Revert "Update Go release version to 1.5.2 in Travis config"
53a5932f Get rid of allocation in the BenchmarkReplaceShortcodeTokens itself
d7588fac Docs: fix typo in tools section
b8effd8a Docs: add hugofy to tools
b4ebd0eb Update release notes
8e68a648 Adding article about moving to hugo
a50133ff Improve the server usage output
3bbd02a1 Print parse errors from Viper
469d268c doc: Add new article by Fabiano Frizzo to Press
30ebf6b8 Update Go release version to 1.5.2 in Travis config
139be09f Fix GroupByParam to return original param string
bccf957e Add support for dynamic reloading of config file when watching
488966dc Add hugo theme site to the sidebar
570713a4 Use Identifier as last sort resort for default menu sort
01c87d2d Small Doc Changes
1758db29 Cosmetic change in README to trigger new build
341dcc47 Docs: fix broken links
9dbb6dc5 Add internal Google Analytics template
ca55ea50 Improvements to Automated Deployments tutorial
5bda0398 Export Page.Layout
e1729935 doc: Add new article by Thomas Peham to Press
08b3004f Update link to S3 deploy instructions
217ffa87 Fix doc render on Firefox
c8f2a574 Fixed link to Google Prettify
42453357 add bugtrackers.io to hugo docs showcases
277d0ae4 Fix spell mistake in variables.md
1ce3bb22 add ninjaducks.in to showcase
83e46555 Disable directory listing for Hugo file server
50c819ce Remove dots from snippets.
3d96dfc9 Docs: fix typo under tools section
6c6905d5 Fix missing "]" in README.md in commit 2242712
2242712b Add CircleCI status badge to README.md
e95db67b Add smartDashes flag for Blackfriday
6b34a4e4 Remove anchor from fork link in README
f77279bb Turn all README headlines into imperative mode
4974a62c Trim down 'Adding Compile Information to Hugo' in README
5cf1475e Improve README
36adb5fb Preserve Unicode marks in MakePath
9d603ce8 Show usage when new site creation fails
ab7223df Improve error message on new site command
5e97cf30 Add force flag
3a412543 The missing static directory shouldn't fail the build
4e9a5d8b Fix some typos in docs
0c66ad87 Add CLA assist to the contribution workflow in README
fb0e17a3 Update README.md
698019a5 Disable LiveReload when Hugo is not running as a server
ef4dfcec Load livereload.js from "/"
0f438d18 Create minimal default.md in archetype file
bea7b2e2 Fix typo in shortcode tests
ec9c6912 Insert code tag for server-side syntax highlighting
6a3aced1 Rename prettiyPath to prettifyPath
5619fe52 Unexport internal path helper
4c04d710 Fix In func given an []interface{}
ddd8c779 Use https
17fb7522 Correct number of args to Errorf
72f14a82 Apply project wide go fmt
c274e213 Add Param to release notes
65beca13 Add Param to the docs
078fad49 Add Param(key) to Node and Page
3586d77b Docs: Add pointers to the new themes.gohugo.io site
63d9859c Expose canonifyURLs as a command flag
002227e0 Add `dict` func to release notes
3a27cefe Add dictionary function to be passed into a template
ccd83c30 Docs: Added `hasCJKLanguage` global config flag and `isCJKLanguage` FrontMatter
7b4e4769 Fix comment for NormalizeHugoFlags
c1a60732 Remove Go 1.3 from README
82333487 WordCount and Summary support CJK Language
2c045ac4 Remove RuneCount from doc
5ec6a61d Add Mmark GitHub-flavoured markdown to release notes
c2c694f1 Add GitHub style code fence support to mmark
7ecf2a55 Docs: Added RIDING BYTES to Showcase Page
622d8724 Adding maximeguitare.com to showcase
b25ba8b0 Let Cobra do the usage error logging
b9aaa007 Improve command text for import command
ac1e3c3c Capital J in Jekyll
0387deee Add Jekyll import to release notes
9a2f6c62 Hugo import from jekyll
08d41c3a Fix strange carousel width on http://gohugo.io/
218554e3 Rename NormalizeHugoFlagsFunc to NormalizeHugoFlags
ead339ab is it .md instead of .ad?
7fd42af3 Used leading slash more consistently
d06ebc98 Marked the whole path as code
dcd9c69a Use filepath as the last default sort key for pages
7708d455 Add the base64 template funcs to release notes
79f8bb62 Add base64Decode and base64Encode template functions
a1e32439 Allow for any (short) line begining or ending with html comment
a43b0376 Change port number from 1414 to 1313 (default)
82f770a6 Remove superfluous `g` in docs
493147a7 Tools: Add more to tools to the list
06caa025 Fix typo in docs
8d695ec5 Add singularize template func
751d4906 Add pluralize template func
74924dd5 correct spelling for 'including' and 'counterpart'
ab0d29aa Press: Update URL to Spencer Lyon’s “Hugo and GitHub Pages”
740dc2ca Press: New URL to Kenny Woo’s blog about Hugo
c397c0b2 dead link
0bdb9b7d Link no longer works - Dead link
b29ca44c Show both baseURL and bind address in `hugo server` output
d984dde2 Update .travis.yml for Go 1.5.1
b5b8cc9b Test builds on OS X
c2a7c456 Fix typo in terms.md
e67bee93 Revert "docs: Fix URL to yulinling.net (https → http) in Showcase"
1abc12a9 docs: Fix typo in url extras
ca74dd23 docs: Fix URL to yulinling.net (https → http) in Showcase
68b8dd73 Add yulinling.net to Showcase
cd4f36ba docs: Optimize recent thumbnail images in Showcase
0a80ead5 docs: Fix formatting in overview/usage.md
397080ea docs: Add a few more blog articles to Press
3679fe67 Add "control code" and "trailing space" to alias validation
f5308da3 Move isThemeVsHugoVersionMismatch to /commands
e71bef79 Validate aliases to prevent directory traversal etc.
db85299c Complete the Url-to-URL transition in docs
29aa9bae Complete the Url-to-URL transition in tests
d05b297e Add helpers.NormalizeHugoFlagsFunc() to handle flag name changes
833a396f Docs: extend the migration tool list and add a cross-reference in the start guide
60f7394b Docs: Add a section about tools around Hugo
0e1fd78f WordCount Summary support UTF-8 string
c7521b3d docs: Change redirect documentation to aliases
cf7318a0 Convert example/blog to use new syntax for Hugo v0.14+
cec9054b docs: Remove empty sourceLink from two sites in Showcase
93b38986 Add FxSiteCompat.com to Showcase
9e526b65 fix showcase to render properly
daf5f32c Adding RichardSumilang.com to the showcases.
aec0e17a Docs: Add Humboldtux.net to Showcase page
c7b701ea Docs: Add new french mag article by @humboldtux to Press page
9f75a518 Added details about generated files and development flows
fd7b3155 Add a 404.html file if a new theme is created
d6f69455 Update organization.md
bfa06fff showcase layout improved when thumbnails are different proportions
138ffefd Add NoDesk to Showcase
ea852b8d Add NoDesk to Showcase
d584ca59 Describe the use of custom archetypes in the docs
16cbda97 Add GreenITGlobe website for showcases page
570d4e4c Add Chinese Grammar to showcase
1b8440af Docs: Add new blog post by @CoderZh to Press page
52d94fa6 Add config option "disablePathToLower"
49fe04c0 Correct check of published boolean
311593bf Add undocumented published setting to front matter
5b90b388 Unexport FileAndExt
fd2fc1d3 Polish 0.15 release notes
1e06dfd1 Add first draft of Hugo 0.15 Release Notes
0c98d8e9 Use LazyFileReader for reading file contents
97eb55da Add LazyFileReader type to source library
3982854e Update Travis for Go 1.5
c2869aea Fix -ldflags for Go 1.5
e791835e Fix typo, "delemiters" -> "delimiters"
35ff685c Update press.md
4047ca5c Search current directory for config file by default
dac9c0da Use cast.ToIntE for int conversions in substr and slicestr
5b51b3b9 Slicestr fix for other int type param
d313bc78 Documentation update on Template Where Function for nil
29c9a40a Implement `hugo --theme=[Tab][Tab]` bash completion
7555e364 Print feedback for `hugo genautocomplete`
c69835da Print feedback for `hugo gendoc`
fee55191 Use spf13/pflag's new SetAnnotation helper
209166a2 Added sitemap configuration documentation.
caaf6370 Added mention of .Data.Pages, removed duplicate .Site.Pages mention.
cafcd190 docs: Remove minodisk's http://dsk.mn/ from Showcase
68b424c2 docs: Clean up and align Showcase thumbnail images
36b374f8 docs: Add site title; set pluralizeListTitles = false
b14b9043 Add Arqueart to Showcase
8c3b6f8b Create arqueart.md
ee7dd292 docs: More detailed explanation of .Site.LastChange
6511e2c4 Removed extra .Site.LastChange listing
7a681035 Doc for other supported formats (external helpers)
04b4c996 Reset Scratch for 404
b05a292c Revert "Fix some Go code doc issues"
0f1fb8c7 Avoid panic in shortcode param handling
35bb72c8 Do not panic on index out of range in shortcode.Get
2805a6f8 Also rename readDir in docs shortcode
cea82842 Rename ReadDir to readDir
15333270 Make sort tpl func accept field/key chaining arg
56534bea Fix sort tpl func to return explicit type value
c7aa881d Fix Unicode issue in Slicestr and Substr
de7dd70b Fix some Go code doc issues
1583d8d0 Add missing formatting directive in Printf call
5b19a265 docs: Extend documentation on Blackfriday options
0b7229f7 Add some float tests to TestArethmic
4a2eda49 Add option to disable Blackfriday Smartypants
eb519afe docs: Fix typos
ab8e189a docs: Bolden the blackfriday flags to make them stand out
5505ac0d doc: Strip trailing whitespace; other revisions
b0416e9b Strip trailing whitespace in code
f2ab0b26 Improve formatting of Hugo command descriptions
e64e571b Bump `hugo new theme` template min_version to 0.14
98659bf3 Fix searching YAML/TOML delimiters in frontmatter
4bed6962 Add map support to scratch
8d28686e Trim trailing spaces from YAML and TOML delimiters
211b757f [Docs] Add <br> to an extra-long title in the Press page
738f9561 docs: add netlify article to press section
252ea96d Remove deprecated fields and methods for v0.15
b23b546a Asciidoc[tor]: use --no-header-footer option
43891e39 Always use the template provided in page.Render
3037d200 Fix inconsistent front matter handling
81e69c41 Add ReadDir function to list local files.
72ecd0cd Ignore non-presence of "layouts" directory in watch logic Fixes #691
18d69d7f Fix periods in taxonomies create bad paths Fixes #1188
c1a2b7a1 Replace strings.Compare
40efc867 Fix sort test and title sort
36e0d005 Fall back to link title for default page sort
6674189b The guide is updated to fit the current Wercker interface and configurations. Wercker changed its interface and default infrastructure (Docker).
da0715a0 Remove point 7 in contributors guide
d25cd039 Make small fixes to README file - Add a step to Contributor instructions for those modifying commands - Change forum link to http (https does not work) - Add "Sign the forum release thread" to contributor instructions
027abcfb docs: fix prev in highlightling
9c8ce0d9 Added szymonkatra.github.io site to showcase
cdefb5a0 Fix links to Ace and Amber pages
de38524c Add scottcwilson.github.io to showcase site
28020f86 Move apply before cache put
47e65c4a docs: Rename dynamic content to data-driven content
a9c5133a Fix data races in sorting and Reverse
ea6ae769 Fix broken test
5cf0aa2f Add benchmark for sort and reverse
aca0f604 source/File: Fix data races
dec9749b Document Amber templates Fixes #1064
8a48412c On error, return error message, not nil
c00a1fcb Add a check for the setting of watch flag in config file
03a70161 Let Amber template call Hugo's custom functions
e3ea4b48 Fix name logic for Amber templates
7f1bcd89 Fix link to front matter
85f4935d Fix unclear RSS template docs
bfcf95b9 Add mention about .Hugo.Generator in 'Creating a theme' section
c8477c4f Fix typo: "taxononomy" -> "taxonomy"
1a94148d Add paginator support for page groups
2c22a8b7 fix TestHomeNodeMenu test
24757497 Allow page.HasMenuCurrent() and node.HasMenuCurrent() to proceed with multi-level nested menus Currently HasMenuCurrent only process the first 2 levels.
354192d2 Log missing theme as FATAL
029cdb68 Checks to ensure theme directory, if specified, exists
a2fa3895 Fix log message in test
3663828f Optimize RuneCount
77c60a34 Add RuneCount to Page
90af334c Omit protocol from embedded font resources
c4f81840 Change arianv sourceLink to master branch
88fe0e7c Add learnoverpass
5f69d3d6 Add arianv
6807151a add a showcase of sa.muel.be
c6d46ff2 [Docs] Press page. Fix URL
c139c6e1 Add support for GitHub-flavoured markdown code fences for highlighting
fdab1180 If no language is provided to Pygments, then try and guess it
450dc7a4 Add a showcase of Kangkona
a9454124 Add how-to for foreign language month names
617fa2fe Add Rick and eSolia's sites to the Hugo docs showcase
9b3d0cf5 Added missing "Social" section to SiteInfo
24c8226c Document Page.RawContent in templates/variables/
c9fc0e78 Add Page.RawContent() to access raw Markdown as a string.
dd732e84 Add nil comparison to where tpl function
033a13e1 Fix watcher detecting changes as static when no theme
a509a232 Add doc for new Blackfriday options
483fc8fa Add config option for Blackfriday HTML_HREF_TARGET_BLANK
05c07c56 Add option to disable Blackfriday LaTeX style dashes
664a9781 404 is homeless
50df3140 added thumbnail
d118d037 Create mariosanchez.md
1b50ccd1 add vamp.io site as showcase
c4ad8f64 Use helpers.GetThemeDir() to find base templates.
1058cb17 Refactor theme path helper functions.
0987e98d Add support for baseof.ace templates in themes.
29e786aa Proper parsing structured array from yaml based FrontMatter
e764a6e6 Use pooled buffer in replaceShortcodes
67209dbf docs: make the named value Data File example simpler
e96624cc Update datafiles.md
d4b6f9ac Fix map-order dependent menu tests
c5072291 Print URL when failing menu test
dbd93f51 Remove unused var
004fcddc Remove superfluous p-tags around shortcodes
ae4f72b0 Comment out mystery test
6bcb7e83 Revert "add preliminary support for content/index.md file to be homepage content"
3eb301b5 Revert "refactor and clean up site tests"
f25ce7fe Revert "Move matchRender to test helpers file"
d770fa59 Revert "Add tests for homepage content support"
59c6ba4e Revert "Make .IsHome work when homepage as page"
7e765cc1 Make .IsHome work when homepage as page
24351c58 Add tests for homepage content support
32d91d61 Move matchRender to test helpers file
99e25091 refactor and clean up site tests
5f84bc02 add preliminary support for content/index.md file to be homepage content
50269f25 Remove superfluous return
4b7c1342 Make removal of accents in taxonomy and section paths optional
847ad36e Add new tutorial for multilingual sites
cc9536ec Update docs for `last` template function
0a2e5424 Add `last` template function
627d016c Refactor var name limit to index
40a92a06 Add `after` to template function documentation
c335efdd Add `after` template function
82cc1ac0 Add Blackfriday definition lists extension support
be6cf6a9 Revert "Add some debug to failing menu test"
becc627e Add some debug to failing menu test
bed8197d Move Viper reset to correct level in menu tests
beda46d2 Reset Viper for every duplicate menu test iteration
53c9e890 Make sure target destination has the right path separator.
3ab00e6e Let travis test against go-tip
bee46915 Temp remove tip from Travis
51cabe6f Fix substr tpl func's int type variant issue
be443452 Silence chatty JSON test
beeae6ab Add some tests for IgnoreFiles
beaa1b3a Add some docs for IgnoreFiles
bec3f403 Rename WatchIgnoreFiles to IgnoreFiles
bed22788 Add configurable list to ignore files in server watch
cc5d63c3 GetJSON/GetCSV: Add retry on invalid content
be38acdc Add PreserveTaxonomyNames flag
3ea4df35 Remove accents in URLs
be0903c7 Fix FullFilePath
3cee9b77 Allow custom RSS Uri for section and taxonomy feeds
2690a8c1 Update introduction.md
be0314b1 Fix Windows Ace path issue
e4ed9d6b Add some Ace test cases
be45399c Extract Ace handling to a method
be7404e3 Support `Fish and Chips` section
be535832 Add IsHome
be6dfcc4 Add some missing page permalink test cases
be964e95 Never remove trailing slash in RelPermalink
beffe756 docs: getting usage up to spec
2a404752 Add two articles about Hugo to the Press page
beaa008c Make deprecated warning for this release more alert
be381683 Hyphenate DEV version
601a2ce1 Add `time.Time` type support to `where` tpl func
beaa09a7 docs: add bepsays.com to showcase
102a3b95 Document techniques for debugging templates.
cd06e89b adding goxc config file
d4de2615 bumping master version to v0.15-DEV
6af9d678 Bump version to Hugo v0.14.0
fa58ef53 Add GopherCon to the showcase
6f0b80c9 Add GoGB to the showcase
45efc5e4 Add DavidePetilli to showcase
fe38dc2f update release notes
20cb4c93 Add new directions for maintaining press page
f49b63a4 Move press page to top level menu
4a177396 add dozens of articles to the press page
beee679d Unexport filepath/path bridge types
be79c35b Pass RenderingContext by reference in Mmark
befb54da Apply gofmt -s
bef34597 Add Go 1.4.2 to Travis config
4c850b69 Update release notes in prep for v0.14.0
bec697b0 Remove unused Completed chan on Site
be7c3bbb Prevent cyclic ref crash in JSON encode
be778c31 docs: some more on absURL, relURL
be136607 docs: add doc for substr
be4376a0 docs: add doc for slicestr
be2e08c4 docs: add doc for seq
be4a404f docs: add ToC to some more pages
be71fda5 docs: avoid navbar hiding when jumping to in-page anchor
0d65ca27 Docs: Add taxonomy term variables to the list of vars.
7125103b Add ".Render" to the list of functions.
321bac2f Clarifying Edits for templates/rss.md
be0784bb Grammar fix in error message
be7f5a42 Do not consider single.html for the home page
be2842da Fix formatting in hugo command description
be831d74 Fix CLI command description for the top level
fc946ded Adding default handler & tests Fixes #147
fd5cf9ac Better organization of loading defaults
bdb187e4 Merge branch 'master' of GitHub.com:spf13/hugo
a584ff20 Stop Viper from leaking across many of the tests (now tests pass regardless of order tested)
be026278 Add benchmark test for replaceShortcodeTokens
599d1b97 Add gendoc command
be920fdb Add a line in doc about the RelativeURL setting
be5f865c Add bugfix to releasenotes
2890b6db Fix UTF8 permalink
8a96234b Add Page tests with UTF8 paths
befa26b1 Remove trailing spaces in completionfile flag
be1bac9f Add some bullet points to 0.14 rel notes
be9224d7 Add Bash completion
84f4c21d Fix datePublished to publishdate
bee9718a Do not shout about missing baseURL if relativeURLs is set
6b5ed88c Edits on aliases, comments, theme customizing
6453bb58 Edit docs extras syntax highlighting.md
beaa8b1b Add support for URLs relative to context root
e522e5f4 Edits to templates/404.md
d0a4645a Set s.Info.LastChange to Lastmod
3882e7ce Add Lastmod field
be534a86 Remove old baseline.txt with no current relevance
bef92baa Add convenience script to run benchmarks
be1a5662 Only uglify 404.html on server root
be1287fb Add data-no-instant to livereload script tag
be5fa2f3 docs: reverse taxonomy entries
d5c77bdf Allow to reverse taxonomy entries.
be3a3506 Allow forward slashes in Hugo new on Windows
be72f234 docs: Use ToC length to pick the compact version
be823555 Add doc for absURL and relURL
be4f4865 Add ToC to long pages
be16e5ff Add absURL and relURL to release notes
bec839e6 Add relURL template func
be0cbeee Add absURL template func
bec90e08 Make page 1 alias ugly
be0c1bfe Add docs for Section Menu for “the Lazy Blogger”
be7e746f Add list of deprecated names to release notes
beb1735d Add issue to release notes
0e00ca6a Fix paginator with uglyurls
bef496b9 Fix .Truncated in manual summaries
be52eff6 Some notes on 0.14 rel notes
be325a30 Fix IsMenuCurrent for SectionPagesMenu
bef0f281 Make sure that complete server URL is logged on startup
feba35cd Added in set PATH and new site output.
a52e508d Update test logs for uniformity and consistency
2b91b480 IsMenuCurrent now resolving correctly when baseUrl is not at the root path
b4871787 add undraft command
563a6302 Very experimental support for mmark
d4acacd4 Section menu for the lazy blogger
beb4ab16 Make RSS output test more realistic
fd08e16e Add RSSUri to specify the name of the RSS file
beccdc04 Add bind to release notes
2bfa9fb7 Make server bind interface configurable.
24d8ac1f Fix multilingual styling with small screen.
9cd8673f Added missing files, make the site look better.
9123ac55 Fix multilingual site layouts/templates.
3596b1b8 Add blackfriday/ExtensionsMask option.
ee5a1bbf Allow 'classprefix' pygments options.
bec2c1e3 Add shortcode support for HTML files
bea9280f Do not add trailing slash to baseURL
bef3df74 Polish absurlreplacer
be918d71 Rename field i to the more descriptive idx
be57b1fe absurlreplacer: remove superfluous code, take 2
be4ca217 absurlreplacer: remove superfluous code
be96aacb Add benchmark tests for srcset handling
beb601c7 Fix testdata: srcset items should be comma separated, according to spec
bee6a698 canonifyurls in srcset
be648260 Disable faulty range validation in apply
bee521c6 Try to make it more visible that you have to set baseUrl
be159278 tpl: check that types in args match the target func's type
be049ff9 absurl: export a base url var for testing
be9df847 shortcodeparser: fix panic on slash following opening shortcode comment
be7b830f tpl: add sanity check to prevent panic in seq on big nums
be190fdb tpl: check for too many arguments in apply
be017f18 tpl: check slice bounds in slicestr
be3b8a13 tpl: avoid panic on too few args to apply
beacfcf8 doc: move the index func reference to where it's used
da08fad5 Add index reference to go template primer doc page
be15b077 Fix typo in test
bee1358e Return error from HandleShortcodes
be29c0bf Print ERROR on theme vs Hugo version mismatch
a8f91ace Clarify partials folder subfolders
9e13ac9a Single rather than double backticks in types.md
6b69f951 Clarify hugo new command in types.md
be2c67ad Fix broken Travis tests
beb32af7 Do not fail on unknown files in /data
be366bfe pagination: export pager to make Golint happy
be8e6d4f Use fmt.Errorf to make Golint happy
be01f843 Add shortcut to Scratch from shortcode
bef25432 doc: clarify Scratch usage in shortcodes
be62c948 Check spelling and some minor additions to Ace doc
be7c1e5d Add doc for Ace templates
beff6805 Expand the ACE base template lookup pattern
be46a4b9 Polish func naming in shortcode handling
bed05307 Remove unused types Shortcode and ShortcodeFunc
be0d9770 Only write highlight to cache when CacheDir is set
bee52f85 Fix broken Highlight test
be6a92c8 Temporarily disable Highlight test
be24457a Add more options to highlight
be540f5b Fix potential Windows path issue with Pygments cache
0fcb78e4 Added isso as a Disqus alternative to the docs
1b5b0b3a Add "Google Cloud Storage" article to docs Press page
1f4a3c1f Typo in mathjax.md
3b1db70a Add Google Cloud Storage to doc
bebb1b9d Fix spelling mistake in comment
be31b9e2 Add custom Windows mousestrap message
be4a9dd5 Remove section about the buildDate being configurable
be25acae Fix README part about missing Windows tests
be1b7f67 Add git commit message guideline
be2097e1 tpl: split template.go
42dcaabf Document getenv template function
9a499b56 Add a section comparing the 'build' and 'server'
6b50c8fb Sort function names in templates documentation
9de78aab docs: how to compile on mac, fix minor errors
beb66c19 helpers: add some missing documentation
be57ec53 Fix the last Go Vet error
be01d048 hugolib: make Page implement the ReaderFrom interface
bea42218 helpers: fix some go vet errors
bea5feb3 Return early from DistinctErrorLogger's Printf
99a18b21 List directories being watched when server is run
72aa516c documentation: mention data files under liverload
be627fa7 Remove paragraph tags produced by markdownify
bec9b92d Make contentTransformer names consistent
bec4bdae Return error on wrong use of the Paginator
bec22f89 Add pager size argument to paginator methods
06d704f2 Updates documentation with instructions for a Windows computer
3b2e1006 Capitalize singular
0ab34523 Updates documentation with instructions for a Mac
6a539db5 Update embedded rss.xml code in the docs
be21e2cb Add some more corner tests for ReaderContains
be1429fa Fix shortcode handling in ToC
be6696c3 Handle views in combo with Ace base templates
e8ca8602 Hash all pygments parameters.
beaf5db3 Use helpers.FilePathSeparator const
61a02c4d Fix section name guessing on Windows
15463d3d Cache pygments rendering between runs
be8c0675 Add support for Ace base and inner templates
0921761e Add missing ".adoc" extension in handler_page.go
be84f937 Change to variadic int args in Slicestr
5b0245ca Implement substr template function
beb423a2 Rename Slice to Slicestr
be82b5a9 Polish Slice doc
be19f4eb Rename Substr to Slice
be4fe8f8 Polish Substr and Split tests
04817c7b Add Substr and Split template functions
9cc3d67c Pull Data Files tests into its own file
1e8e5d4e Format docs
66cf3bdc Rename interface contentRewriter to contentTransformer
efb56477 Change safeHTtml to safeHTML in sitemap template
a8bfaba0 template: add some missing test cases for First
b15d0a16 transform: remove some superfluous int conversions
658cfb28 Remove URL param from exported AbsURL methods
e7099cfa Un-export ContentReWriter
98ee69bc Write to rotating ContentReWriter in transformer chain
9688ed25 Comment out shaky Seq test
f4244be0 Calculate the next Hugo version in Deprecated
3273fce0 Refactor Hugo version
49f20bbc Add UrlPath to the deprecated list
e39a258e Improve type handling in Seq
b3bd71fe Update Hugo docs with the initialisms suggested by golint
8b8fb417 More initialism corrections (golint)
ca69cad8 Press: Add "Migrating to Hugo From Octopress" by Nathan LeClaire
a220a3ba [Docs] Copyedit http://gohugo.io/extras/dynamiccontent/
bcdad02c Use ReaderToString in site tests
e1340c06 Fix crossrefs on Windows
a0447345 Add "getenv" as an wrapper for os.Getenv
32bf8b76 removed duplicate word in readme
27ed49e5 Revert "Added image support to the sitemap.xml template"
3c147bd4 Added image support to the sitemap.xml template
0be2aade Add Seq template func
358dcce7 Experimental AsciiDoc support with external helpers
fbcda030 Do not ERROR-log missing /data dir
b190ad0f source: add some test cases for File
f8a840a1 Add double checking in Deprecated
6e30c10d Add deprecated logger
f848dc92 [Docs] Update and expand http://gohugo.io/overview/usage/
d3c0fde5 Update press coverage: Fix URL; new tutorial in Chinese
232398f1 Remove trailing space from site build statistics
67df33f5 Correct initialisms as suggested by golint
00f07c53 doArithmetic: add test for division by zero
43742e02 Add some basic tests for doArithmetic
b9b70fb6 Skip directories like node_modules from the watchlist
f85d1a7d parser: add some frontmatter test cases
c641ffea absurlreplacer: write replacements directly to the byte buffer
3ba279c2 Do not parse backup files with trailing '~' as templates
81695717 Switch from fsnotify.v0 to fsnotify.v1 API (watcher)
634548b9 Add new min_version field to theme.toml template
4784b63e Add test cases for Ne and Eq type normalisation
44cdb37b Fix eq and ne tpl function issue
91d16fbb Fix UglyUrls on Windows
602ceec0 Handle 404 thread safely
851badcb There is only one s.PageTarget() - so we cannot change it, even tempoararily. We have to find another solution to this. ...
63ffb916 parser: apply some Golint rules
81c41d6f livereload: apply some Golint rules
a91bcd85 source: apply some Golint rules
e007c9b2 hugolib: apply some more Golint rules
57590078 menu: make receiver name on Page methods consistent
e24a7759 page: make receiver name on Page methods consistent
8539f781 hugolib: apply some Hugolint rules
b9f8c0c1 author: fix doc
bd2b679e helpers: apply some Golint rules
e685dfc0 Apply some more Golint suggestions
224a2ddf Fix some Go Lint errors
103ea842 Fix errors reported by Go Vet
c4c19ad3 Prevent 404.html from prettifying into 404/index.html
3343cacc Avoid panic when pagination on 0 pages
6e1b0e0c Apply gofmt -s
8557e2cb Add benchmark for the shortcode lexer
ecb2aca6 Update github-pages-blog.md
fb0facef Tidying the Readme a bit more
6c9bdc28 Using a smaller Header Image
8aa646ce Fixing image in readme
1e210a43 Restructure top of Readme.md
fa5cbb2a Merge pull request #944 from gitter-badger/gitter-badge
45d962c6 Added Gitter badge
d5cb3695 Update Readme.md with additional contribution guides
ab5862cd Allow the same shortcode to  be used with or without inline content
241f9f9e Improve error message on missing shortcode inner content
9d80ecb4 Keep trailing slash when baseUrl contains a sub path
176ce5de Allow hyphens in shortcode name
967d001e Use osext on GitHub
bb13d826 [Docs] NetBSD and ARM pre-built binaries are already provided
729a6739 Bumping to version "v0.14-DEV"
e43eabac Updating the final release notes for v0.13
88e7c031 [Docs] Clarify the switch to `canonifyurls = false` as default
ac189fd5 Update README.md and overview/installing.md
dc7b7ef8 Avoid race condition in target list init
c33a8528 Avoid race condition in isInnerShortcode
a3892685 Add trailing file separator to temp dir
f0c8585b Use $.Paginator in template
62752cfe Return unmodified content if panic in LiveReloadInject
4d708f09 Add revocer in LiveReloadInject
d2e022f2 Suppress errors for symbolic links witch point to a file.
aeddaee9 add note that running with watch doesn't produce a site suitable for deployment
e31536dd Add information to highlighting with Payments
c4393257 Adapt to relative path bug fix in purell
41c0e82f Moved futured getSQL topic to another branch
b209f443 getJson and getCsv documentation proof reading by @msjulias
4342dd84 Update Dynamic Content docs
48a6d447 Update doc
47b7cfeb Add getSQL idea
fdf8db9c Initial doc file: Dynamic Content
32d645d9 Fix bug where running hugo without options causes to create $TMPDIR/hugo_cache/ directory.
076b618f GetJson and GetCsv have now variadic URL parts so that you can submit pre or post parts of an URL. The parts will be joined to the final URL.
10c2b41b Add --ignoreCache CLI flag with description "Ignores the cache directory for reading but still writes to it" as @spf13 suggested.
c168666b Adding getJson and getCsv to funcMap
41a51681 Fix bug on windows where the backslash got removed in func MakePath()
5e2d3d2e Merge to stay up to date with current dev Feature: GetJson and GetJson in short codes or other layout files. For more details please see: http://cyrillschumacher.com/2014/12/21/dynamic-pages-with-gohugo.io/
9bf223e5 Quote strings in `hugo config` output
82a08889 Revert "Expansion of unit tests for utils/utils.go"
c2e29138 Fix canonifyurl vs schemaless links
6b28e38c Expansion of unit tests for utils/utils.go
cb9fa627 [Docs] Minor copyediting of highlighting.md
bd0de85d Add information to highlighting with Pygments
1827680b List of variables
09ed3c4b Fixed a typo
54e41768 Make "Indexes" the alias and "Taxonomies" the canonical name
d33a42f1 Merge branch 'master' of github.com:spf13/hugo
159836ed README.me: Add linefeed that got lost in the last commit
63e7b970 [Docs] Add pointers to roadmap; new tweet and article
f1fec88c Improve abs url replacement speed
27c03a6d Add benchmark for AbsUrlInXml
366f9916 Another link in the same page
b389a923 Fixed invalid link to partials
462e666f Update docs so that `figure` includes the `class` parameter.
c14e7b10 Add 'config' command to list site configuration
d6f81c73 Put back static theme conditional
d10e05f2 [commands/new.go] Update theme.toml etc.
87975e04 Remove nohup.out committed by accident
48206833 Doc Data Files: Add section about themes and expanded the example a bit
12176323 Remove now superfluous conditional
8ed67169 Fix broken data dir test
8df59c81 Temporarily disable broken test
ebcc1e66 Add data files support in themes
664fd991 Change "ctrl+c" to "Ctrl+C"
dbb86679 Fix typo: GetJson -> GetCsv
7e28db18 Add showcase entry for consequently.org
fa71f6c1 Make # survice Url cleaning
e3daa359 Update release notes for v0.13
22d85c2a Avoid converting summary to []byte and back to string
371c148c Fix alias for data files doc
03fff880 Add docs for Data Files
6afe70d5 Better error message for data-file parsing errors
1c50f775 DataDir: Minor polish and add missing tests
773812de Reads data files inside data/ and makes data available in .Site.Data
4c7e119c [Docs] Say which directory to clone the hugoThemes
088d46a8 parser.FormatSanitize() MetaDataFormat for date too
08219161 Use buffer pool in StripHTML
5e34ae61 Log ERROR on missing baseurl
43e48a89 Add benchmark test for StripHTML
48b6777e Fix Truncate
2bee4a15 Replace 4 strings.Replace with 1 strings.Replacer
5df85770 Add memprofile to pprof benchmark
f8704c1b Avoid calling strings.Fields multiple times with same content
11a19e07 Build PageMenus only once
df734bc1 Tighten README for the sloppy reader
8b95cab9 Avoid panic on unknown markup
dd934481 Scratch doc: Use the special $ variable to prevent confusion
13d90094 Use .Site.Params.description as fallback for social partials
b984ec96 Optimize for the common case in Blackfriday config
c5078093 Print template parsing errors to aid troubleshooting
d1364ffb Fix defaults for Blackfriday
f264076f Add doc for Scratch
420c9e4d Add writable context to Node
47c8f329 Prevent site config being overwritten
659f71e6 [Docs] Fix more missing `.` in example `partial` calls
20bed49f Fixed syntax error in 404.html template code
f4737689 Updating shortcode imports & site test to work with new buffer pool functions
e1e6aaed Merge branch 'master' of github.com:spf13/hugo
4a9436c1 Some more .Date.IsZero checks in internal templates
230e7c02 Remove _default prefix from SEO templates
8db3c0b0 page rendering and writing using BBP
3d60955e Use .Date.IsZero to skip unset date in embedded templates
35684e8f Use strings instead of byte arrays for replaceShortcodeTokens tests
366c5572 Use a regular expression in replaceShortcodeTokens
b4c50728 site's XML generation using BBP
77074127 page source creation using BBP
4828fee1 transform chain using BBP
5441fc5d template render with BBP
2f2297bd shortcodes using BBP
66ed5c5e Adding BufferPool. Implementing BP in ReaderTo{Bytes,String}().
ba53799f url_path => urlPath
523f38a9 Fix for issue 839 and 490 on Windows
d397bc4f [Docs] Complete the transition from "indexes" to "taxonomies" (almost)
ba44e860 [Docs] Copyediting
82d4b8ab [Docs] Use OptiPNG to shrink PNG images losslessly
8e6cbe82 Some housekeeping of the Showcase and Press pages
831fbd5e Add .mailmap to get a more correct author log
ee1045ad ignore root path, no need strip traling slash
2d8e15a5 Version uses binary name instead of hugo
06b1a883 Added three videos to documentation.
e52a76f5 Use runtime.GOOS to identify Windows specific path tests
0b5f8c8c [doc] Improve paginator doc
7c74a77d Replace assert.Equal(true/false) with assert.True/False
251f5e9d Do not panic on permission denied
8ad4fd05 Split Windows and Unix specific path tests
b155e8b4 Temporarily comment out breaking Windows test case
bedc2d84 Introduce FilepathPathBridge
5f9596e6 Add more tests to helper
de76d4a8 Improve pagination testing
0c229707 Linkify release notes
fb594fc6 Set detault for Paginate to 10
a6d22bcf Add documentation for pagination
c0fbe614 Add Bootstrap-compatible pagination.html
3628d0bb Add pagination to release notes
37445bc6 Add pagination support for home page, sections and taxonomies
407e80a9 Add site-wide/per-page [blackfriday] `extensions` option
39b2cdec Wrong URL for Github Pages
e72ce89a Move s.prepUrl() before prepending BaseUrl.
ea72f15f Correct wercker URL
57b4f331 Fix inverse notation
f6c0b472 Make Blackfriday smart fractions to really default to `true`
eb686352 Add site-wide/per-page [blackfriday] `fractions` option
803865f8 Fix for page.GetParam() for JSON and TOML maps
a0c6dba3 Upgrade from gopkg.in/yaml.v1 to gopkg.in/yaml.v2
bd1b019f Handle empty front matter in archetype.
b345ca26 [Docs]: Add new press/blog coverage about Hugo
1b42dc57 Fix RelPermalink() and Urls in menus vs canonifyUrls
74399830 [Docs] Document the new (temp?) default of `canonifyurls = false`
60c6faa3 Revert "Try to fix mysterious test failures on Travis"
71fe85df Try to fix mysterious test failures on Travis
01ec44a6 Add menu tests for pages with both Yaml and Toml front matter
020c0b86 Revert "Quick-and-dirty way to print details of template errors"
6db6d33b Add dateFormat to release notes
37490ee2 Add dateFormat template function
878754c2 Protect the innerShortCodeCache by a RW lock
c8f8f48e Cache the page's rendering context flags
19c52ab0 Register rstHandler to restore experimental reST support
1cc63869 Make ref and relref respect plainIdAnchors
e5be592e fix outdated MathJax CDN URL
173aa53b [Docs] Use of `$.` to access global context from anywhere
f015e9b8 [Docs] Recommend the use of backticks for IE conditionals
02da4959 Fix string comparison for .Truncated page variable
a17c290a [Docs] Correct description of "Read More" links in Summaries
edcdb6f4 Fix two errors in two internal templates
d897b1e8 Add missing assertion to trim-test
932214d7 fix --uglyUrls params
2ec046af Minor polish in path/url
9e688507 Add more tests to general helper
1b91fec0 Add tests for IsSet
ee34a840 Add test binaries to .gitignore
f77f2a9b Refactor TestGt to also include Lt, Ge, Le, Eq and Ne
1348caa6 [Docs] Add a note about the plan to switch to Apache License
f470cf95 Add tests for Apply
3f0f186b Add inline doc for Apply
eabe8e1a Rename ignoreDotFile to isDotFile (which is what it is)
077d726b Replace regexp based Chomp with builtin TrimRight
99aee304 Add tests for Replace
26856c3b Add tests for Trim
4b1780bf Add test coverage files to .gitignore
a6bf6f52 Add tests for Chomp
42b33102 Quick-and-dirty way to print details of template errors
2342655f [Docs] Incorporate some great ideas by @mohae into the `safeUrl` docs
724cc0dd Add `safeUrl`; disable `safeHtmlAttr`; rename `safeCSS` to `safeCss`
f5946ea3 Add SafeHtmlAttr, SafeCSS template function
53b4ab4c Revert "[Docs] Use <dl> for definition lists of variables"
4609f77a [Docs] New testimonials and press coverage
0e60c513 [Docs] Limit `.fa { display: inline }` within #main-content
b56c9db6 [Docs] Add FreeBSD logo beside the FreeBSD name
3c4bc653 Merge branch 'master' of github.com:spf13/hugo
783c76b8 Make RSS dates valid
5d6dfe81 [Docs] Use <dl> for definition lists of variables
9712d06b Fix the Hugo.Generator tag so it can be used
56eead2a Fix broken doc section
c23dfd99 Use an init() method to create the HugoInfo instance
7257ab68 Update release notes with the new Hugo var
724357a2 Make sure there are only one HugoInfo instance
109e6f95 Merge branch 'master' of github.com:spf13/hugo
73d923e9 Fix HugoInfo init
ac6b86af Added top level .Hugo variable with version, commit and generator information + docs Added Version, CommitHash and BuildDate to hugolib/hugo.go and used it in build Removed commitHash and buildDate from commands/version.go and used hugolib vars Removed getDateFormat function from commands/version.go
1dfd0225 [Docs] Minor revisions to future v0.13 Release Note
a2c88715 [Docs] New "Troubleshooting Overview" page
90afe41e Add trim and replace to release notes
4f4015d7 Make all the params to Replace an interface{}
e08cabad Rewrite first argument to interface{}
871e8113 Add trim and replace template functions
32d15d91 Change CR+LF to LF on gohugo.io front page, saving 286 bytes
af956c41 Update gohugo.io front page for 2015; add @popthestack's testimony :-)
b59dd163 [Docs] More copyediting
769ab9e2 [Docs] Adjust sidebar menu width and capitalization
a4da5262 Missing . on footer partials
508788e6 Update TestFixUrl() to expect BaseUrl to have trailing `/`
3a9300dd Merge pull request #798 from bjornerik/fix/nestedshortcodes
1cbdd3e5 Ensure that BaseUrl used in `hugo server` ends with `/`
714abd5c Fix issue with nested shortcodes
9150a98f Replace `if` with `with` in embedded rss.xml
208086eb Add ".swx" suffix to file watcher's ignore list
f0b3979a Disable shortcode processing for html files
4f66acdc First take on release notes for 0.13
fc39019f Add an alias to the old URL of github-pages-blog.md
433ce3b7 Rename github_pages_blog.md to github-pages-blog.md
4107fd50 [Docs] More random revision and copyediting
6fda9012 Fixed error in tutorial, added site variable docs
6c5a7b7b Tutorial: Automated deployments
700c2b8f Trivial fixes to get RSS 2.0 feeds to validate.
5bfc812d [Docs] Remove references to "ATOM" feeds
6ee35f65 Correct typo in hugolib/path_separators_windows_test.go
a4eef4eb Correct spelling of two test files: seperators → separators
78e9229c Fix "hugo new" EOF error with an archetype file without the final EOL
b6ab6618 note in archetype.md to alert that ending carriage return may be nessary to avoid EOF errors.
b0181e27 Some more random copyediting of Hugo docs
49f5eb5c Moved a test regarding a content.go function to a new test file content_test.go. Added some tests for general helpers, especially as a way to document the expected behavior, and as a warm-up welcome contribution.
2b46f3e5 Do not exit server watch on error
190964c5 [Docs] New Troubleshooting section
cb909cde Google Custom Search: Open link in _parent
eba33459 Add basic Google Custom Search to Hugo docs
d12f6cd7 Fix `echoParam` template function to accept string key name
c0f54aef Rename to plainIdAnchors
a0e44bb7 Add Blackfriday: documentIDAnchor documentation
4adf58cc Group both options under Blackfriday: documentIDAnchor
b7716948 Add config options: disable footnote anchor prefix and header ID suffix New config options:
dca6eaba Add config file example to variables.md
0b7392b3 Update configuration.md
e6c27f76 Add example code to Summaries
d3763147 use fsnotify 0.9.3
a5f51061 Add in-section Next/Prev content pointers
837922d3 Add ERROR logging on invalid date and publishdate
0d17ee7e Add operator argument to `where` template function
ae9c25af Implement `apply`.
6033abe1 Add a chomp function.
14e93de8 Initialize funcMap in an init function.
6a98d269 Hygiene: Reduce copy-pasted code.
c6f4b09f always use http scheme for localhost
dd1001ce Merge pull request #762 from bjornerik/fix/revert-revert-menutest
076a475d Revert "Temporarily disable failing menu test"
fb1b795d Bumping Travis to test go 1.3 & 1.4
d3c36761 Fix EOF
ec2566fa Add www.thehome.dk to showcase
975f4cf1 Refactor tpl codes
fa8ac87d Make 'where' template function accepts dot chaining key argument
dd5bc034 [Docs] Mention support for the Ace HTML Template Engine
ddf41901 Docs copyediting: Add more external URLs; add backticks, etc.
5792cc3a [Docs] Go 1.4+ required for building on Windows
afe5add8 Add anchor ref to Blackfriday doc
5e0a16ea Fix a crash for ref page#anchor.
029a3ae7 Merge pull request #742 from bjornerik/doc/blackfriday
7dacc999 Add ability to canonify URLs in rendered XML output.
f5a3fb14 Wrap comments helpers package to fit 80-column width
a0fe1170 Add doc for Blackfriday configuration
fbf8bcac Add configurable support for angled quotes
bb376982 Fix unicode menu URLs
e4a22255 Temporarily disable failing menu test
0cfdb2e5 Revise README.md: buildDate expects timezone; copyediting
8042e774 Typo fix: "simple" → "simply" in templates/views.md
68cea070 Minor copyediting, no new content added.
e3433e6a Fix long descriptions of `benchmark` and `serve` commands
331043b9 Remove noisy Println in test
717f702e Added delimit & sort template functions, tests and docs
8f6f871f Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs Added Page.Author(s) functions Added schema, opengraph, twitter_cards, google_news metadata templates Added "" template
fd33e5d2 Documentation for `ref` and `relref`.
112c3c5c Provide (relative) reference funcs & shortcodes.
14bce119 Commented helpers package
7436829b Use current working dir as WorkingDir instead of hugo executable's dir
ec4b6c03 Trigger an editor after `hugo new`.
2c8e9a79 Commenting helpers package
b11838da Commented commands package
9b04c279 Revert "Make Urls in menus respect CanonifyUrls"
3ccb3979 Make Urls in menus respect CanonifyUrls
e6541c45 ERROR-log on symbolic links
9f77f930 Fix various Windows-issues
3a8c1241 Add timezone to buildDate
be3d563a Add an `install` target to Makefile.
9f0f73f4 Fix front matter for 'Creating a New Theme'
a6d3862b Docs: Minor copyediting/proofreading
736dd4b5 Docs: Quote <!--more--> in <code> instead of italicizing it
010f6057 Correct URL of the favicon in the documentation
11cdb815 Remove Println that panics in test
27840932 Always use RFC3339 for version date format.
a0d956c2 Add Ace template engine support
390c158f Github page strategy for username.github.io repos
1b36bda6 Fixed typo in summaries description in the documentation
c00788d8 showcase: update ucsb entry
742a064b Correct alias
df8e9366 Fix missing shortcode in doc
b719ba7e Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc)
78316903 adding appvoyer support for Windows CI integration
d6166172 Doc for markdownify
53c707bb Add markdownify template filter
f0400697 update summary.md with info on handling of html tags
8f9cea7f Enable descriptive header IDs.
0282c922 fixing race condition in CreatePages
c5ae2a2d Added makefile that builds with git information
9b850c4a Correct path in theme search order
9e152989 Added link to my blogpost about travelling with Hugo in asia
a1954c4f Added stou.dk to showcases
0eeaa4c8 fix version command so that it will work with all supported config formats and added tests
6c25cd52 typo: practical
cdbc741c fixed #656. Templates work properly when watching.
4a2f16f9 refactor handlers to use types instead of structs.
73f203ad Move template library into it's own package (tpl). No longer dependent on hugolib. Can be used externally.
92a3372a Added a new command `hugo list drafts` and `hugo list future`
728d0fa3 Update shortcode doc for 0.13-DEV
cb3576b6 Fix broken convert
bcaf3341 Update shortcodes.md
a6a9df39 Fix failing shortcode tests on Travis
596d6793 Various fixes in RSS feed generation
a07dd565 fixing typo
b716dbec Fix template checking order in site.go
55fcd2f3 Shortcode rewrite, take 2
c8904756 Removing dependency on go-html-transform (fixing the build).
7e692544 Fix `GroupBy` function issues
91e03b9f Reinsert deleted test
6bf6a810 Update creating-a-new-theme.md
88881de2 Update creating-a-new-theme.md
e9917bfe Update creating-a-new-theme.md
ca4e4ce2 converted helpers usage of path 2 filepath
99463f6a converted path 2 filepath
2c51bba0 converted path 2 filepath
7fd348cf convert path 2 filepath
4f2dfe70 converted path 2 filepath
7badd2eb change path usage to filepath
05300fde add support for fsync's noTime flag
f037ae7b update README.md with info on adding compile information to version
fc20d0b4 Fixed launchcode5.md description
52ae1c75 Added launchcode-tn.jpg to docs/static/img
15dae3cc Create launchcode5.md
8ad9c0a7 Make Where template-method accept methodname as key
fdae0907 Params map has string as key
e127a5cb Added better error message for poorly formed frontmatters in archtypes
3cec04e0 Add Git directory deployment flow to tutorial
d467ec0a Fix a bug with taxonomy rendering.
d7e6e490 Allow partial without .html
266511b6 Fix missing space before 'width'
cafd39eb Fixing some tests
55fb0242 Updating tests to use hugofs
a40bd3ca rewriting guessSection to accurately reflect intent and usage. Update tests.
e2634752 First stab at correcting GuessSection tests
f81f9ceb Fix: rewrite FileAndExt
5906c865 Fix: remove the unnecessary dot in an extension
3521e8b1 Updated TestReplaceExtensioni, TestFilename and TestFileAndExt
980d0f14 WriteToDisk and SafeWriteToDisk test cleaned up
bf07dc92 WriteToDisk and SafeWriteToDisk tests now pass
a54ad2bf Fix: Test TestSafeWriteToDisk now works
e8bbc44a Added the path modules test files
6b619d2c Added the url modules test files.
57cd9539 Added the general modules test files
b87402e8 Remove the helpers_test.go file
8a5dd06a Use page.Markup to determine which PageHandler to use if it's set.
ade2ca60 Adding an html file handler
7fba2500 Adding a proper css file handler (with automatic minification)
4dcf734a Updating tests to use new Targets & Writers and switch to using Afero.MemMapFs for more accurate tests.
7b960ac1 New targets & new renderers and write methods [WIP]
e02dc674 Cleanup file conversion handling
3616d167 Better error messages for show_plan_test
07f2ef9c Page Group functions now work even when an uppercase field / method is provided.
4b9ea105 Setting to filesystems to the afero.fs interface so can be easily swapped out.
ad69374f Source files can provide content as String or Bytes or Reader
dcea0fa5 Adding ReaderTo and ToReader helper functions
2cb89a52 Update menu test to work with revised source struct
8cc7684a Change the type of .Site.Author from…
f3e9cbc7 Fix #593 problem with `hugo -w`
c1942e91 Change permalink validation and substitution.
c07b10bb Output a timestamp with hugo server --watch
2060031c Fix sourceLink for Hugo
d036ddf2 Create creating-a-new-theme.md
11ddc308 Fix for issue 583
6c238e14 Fix broken link
649a7d2b Minor doc corrections
af47e5a2 Extend template's mod and modBool functions to accept any int types
d4ed5919 added note about pygment example code and markdown processing, updated example
8e368e25 540: add support for build information output to version command
8cb435f1 Fix redirect-loop for Hugo server
5e28606b Add sort and grouping functions for publish date and param of Page `GroupBy` is modified to allow it to receive a method name argument for example `Type` as its first argument. It is only allowed to call with a method which takes no arguments and returns a result or a pair of a result and an error.
d013edb7 Implement HasMenuCurrent and IsMenuCurrent for Nodes
2b412d4a fixed server reporting Web Server is available at https://localhost:1313 when server always serve http
73ec0925 update summary doc
9e029fe4 #463 add summary.md page
c5f1031e Handler WIP
141f3e19 Migrating Hugo to Afero for filesystem calls.
dfb84825 Handlers WIP - Convert now working
30d4a26b Handlers WIP (builds)
93f3d604 Handlers WIP
8bd0ffba Initial Handler Architecture WIP
20467e36 Improved error message when config file not found.
5dfc1ded Big refactor of how source files are used. Also added default destination extension option.
24bbfe7d Set Content-Type for livereload.js
0167fb48 Copy content from archetype
da5d98e9 Make First accept any int
d064139c Fix spf13/hugo#467. RSSLink now point to index.xml
16330cea Add nil-check to Intersect
1d4dde7a added docs for 'intersect' and 'in' template functions
ca7007bf Minor proofreading corrections to Hugo docs
953cad6c Document manual breakpoint of .Summary
3da97656 add 'width' parameter to 'figure' shortcode
fb82f00f handle https prefixes in baseUrl
b98c2088 Minor fix to error message when copying static files
4b9e4c90 #462 fix, remove leading and trailing dashes from urlized slug. includes test changes
f52e6628 Feed the titleized taxonomy key through string replace to replace '-' with ' ' for proper display of the taxonmy title
938733f4 added In and Intersect template functions
9cdd2e54 Use md5 against the file path for uniqueness.
603b24a1 Make each generated page’s footnotes unique.
e68e7ef9 Configure footnote rendering.
eeaf343a Mention .Params and .Page variables in shortcode docs. Also `highlight` variables.
1614b824 Correct desc for hugo new command
c739ec22 Removed text from code block.
879e90dc Switch to new hompage
e3d4d40d better error messages for template errors
3f59abe8 add some information to rendering errors so it's easier to tell what's failing.
def79376 Make taxonomy documentation match the example.
30603070 Make highlight.js example clearer
b81ebf2a Making the install on the homepage a bit more clear
4e4ea958 instructions for Homebrew installation
26e44506 adding memstat option to server
5d565c34 Extend template's basic math functions to accept float, uint and string values
d5308e6f Adding a community link to the homepage
bf980bc1 switching website to gohugo.io & adding links to discuss
1a0dc0b9 Update urls.md
b590de69 limit the number of goroutines used in taxonomy rendering to gomaxprocs*4
49045b1c limit the number of goroutines we use for page rendering to gomaxprocs*4
cf3e748b remove unused field
a72ca38c make the value of the BuildDrafts flag available to templates.This can be useful for if you only want to show some specific information on your local machine and/or when showing drafts.
71423743 Sort by title if dates are the same
275e1c0d more examples and explanation of go templating
becd4fe3 refactor handling of amber to AddTemplateFile as the TODO note stated. Used switch statement to make it easier to add other template support
4e9b0408 fix tags not being in lowercase, #491
012a473e added "eq" function to docs.
df489b47 Enable soft livereload of CSS and images
0099b5a3 Change all uses of sort.Sort to sort.Stable.Using sort.Stable ensures that even if the sort keys are the same, the order of the sort will not randomly change.  Using the old sort.Sort, if you had pages with no date, the lists of those pages would randomly reorder every time you regenerate the list, causing spurious changes to the output.  Now they'll always get ordered in the same way.
d9964451 More error messages at syncing static contents
acf9561a fix zero date
b336abcf Fix typo in Archetypes documentation.
2ca615c5 Add Node.Site.Pages to all nodes and ensure all pages from the site exist in the list before processing shortcodes.
b97c6c70 add Name to File, which is the filename minus the extension
16845791 Go back to lowercase slugs. Also, use MakePathToLower in TestMakeToLower.
5dd3eaab More proofreading and minor revisions to Hugo docs
ac78d252 A small fix and update to the multilingual example
4bb5e326 Taxonomies can now be provided as a single string value if there is only one in frontmatter (tag = "val" vs tag = ["val"])
1b7f18e3 Making partials context optional for compatibility with template.
7b3df238 Bumping Version to 0.13-DEV
efc98a3b Update example blog to Hugo v0.12 conventions
05102f1b Fixing typo in ordering.md fixed #401
13631289 Bumping Version
b4d3195f Adding V0.12 release notes
f36ed446 Adding a bunch of new quotes to the front page and switching to Owl Carousel
d2020506 Fix loading of Lato font in style.css for docs
a6022293 Minor proofreading corrections to Hugo docs
f142458c Use typographic quote chars in the carousel quotes section
13a317b9 Enable header id blackfriday extension
c1b9e8d5 quickstart.md: Put long options inside backticks
242d6b4e Adjusting the number of go routines to build the pages in to 4*GOMAXPROCS (from 2) for faster rendering.
47c91a4c Fix CreatePages
93addfcb Adding documentation about 'where' and cleaning up docs around first.
0ce4ec1e Added more examples and cleaned up the GroupBy functionality documentation
7e19fa40 Making direction optional (and setting defaults) for GroupBy Pages functionality.
b15eb889 Adding .Reverse() to PagesGroup
41b28462 Switch .Data to .Pages in the PageGroup functionality for increased consistency.
70dc370c Making the term "Term" more consistent with Taxonomy usage.
01caaeba Making the Pages Sorting methods available within a taxonomy term.
bb02a14b Adding a page listing the different methods available to Taxonomies.
ba8f652a More taxonomy examples in templates.
6f9f93f3 Fixing the taxonomy example. Fixed #318.
d3646aaa Be more specific about .Params content
7de32092 Shortcodes are content files specific.
6f9db4a7 Add document about page grouping functions
53b7d5b8 Inner Shortcodes now treated as markdown. fixed #185
828401cb More press additions
4b71eb16 Compressed showcase thumbnails further
95449880 Added ucsb to showcase
dcda66df More Press
4a91b8c7 fixed #389 . Added alias for missing page.
987a82d0 small tweaks to the hover effect
8a44deac Creating a showcase archetype to make for easier showcase additions
1c1615d7 Adding a bunch of new sites to the showcase
c9a6b2b9 Adding a bunch of new press to the Press page.
733bff90 Prettier link hover state
1143a8fa Bumping Travis to test Go 1.2 & tip (1.3)
294222ac Fixing a broken link in the docs
4281cbfa LiveReloadDisabled works with Watching properly. Fixed #335.
1b5f59b0 go fmt site.go
30af267b Fix #302. Links now have trailing slashes.
a31edb33 Support subdir in baseurl.
4b979b17 added functionality to check the error message returned from Cobra, if any. for uage message text. If its present, the usage message gets truncated and the resulting message is returned to be used for the rest of the error message. If the resulting error is blank, no error message is printed
4c735a78 preserve alias case while lowercasing taxonomy
348e123c Update 404 to be compiled to .html instead of directory
50a8c507 Add page grouping functions
867683e4 Add link for learning more about static directory
c750a95e support for futre/draft summary info output
946ad9c2 Making the links stand out more
f5157566 Cleaning up a ton of CSS.. Removing unused selectors. Eliminated over 80% of CSS. Upgrading jQuery & FA
34a93fa1 Fixing the docs sidebar interactions
04d412ed Fixed showcase image paths
cece27fa fix issue 411, /path/to/site/archetypes : is a directory error
e31d4609 Bringing back the showcase
b047e2f8 Removing redundant bootstrap
864f91d9 Changing the docs template partials to be able to be used to render a section
aae1ff3c Adding IsNode & IsPage functions to Page & Node
b10dea29 added evaluation for toml for metadataformat date handling
27c0ec31 Added a note after the script adding potential issues per @franklinwise's feedback
5ae28327 errors not propagating
634d7b26 switch to new location of goyaml
002a5b67 Add 'where' template function
6e15f652 Added yaml menu example
5d8ac54f Config changes and Live Reload
09115a96 Fix #394 - Docs: add a missing link to the livereload page in the intro
e9b47da0 hugo builds no site if there are only drafts
3e9fc47a Adding more press
cbb29795 Docs-removed bullet and broken link for catagetories.  Included category text in bullet for taxonomies
b3130b52 Fix #363 - Docs: make the fixed menu on the left scrollable
1778f28c remove extraneous "Because"
f556cb44 update docs for permalinks with all fields
29c45dd6 make type-or-section more obvious
756be987 Merge pull request #388 from GraemeCaldwell/patch-2
d8b78c3d Update press.md
2850692a Merge pull request #370 from kevinburke/its
657e4a46 it's/its
bf9595aa Fixed #328. Config file set appropriately.
8d3fa7ef Getting rid of bad scrollbar
aa42f430 allow site to be built with empty content
73dd4f38 report errors
78962a14 Allows 404 templates from themes/THEME directories.
ac99cecc Add shortcode template loading from themes directory.
35d04671 Add PluralizeListTitles option (default true) to allow disabling use of the inflect package
3eb480a6 fix link to template primer
b7671974 taxonomies -> Taxonomies
836b1800 Fix minor typo in file docs/content/templates/overview.md
0e57e32f do not use angle brackets in hyperlink labels
5969315c switch back to master blackfriday; enable footnotes
406233f0 Included instructions for omitting disqus comments on localhost.
86c3de4b Fix #263, document HTML comments & IE conditionals
b2b7ba42 fixing typo in docs
4483a665 Centralizing the template execution logic in one place
c297d745 Adding 'partial' template function to add theme / local awareness to the partials directory.
4e99d6b5 Adding proper error message when view is not found.. fixing #303
640ab3c7 fixed #303. Adding theme support to views
e0ea6b99 Support embedding <script> tags in markdown pages
7b7ce117 Add empty line to correctly render a list
ca18cfef Setting new version
05875153 Converting front matter to YAML
2b90779f Actually bumping the version
a3d6e7c4 Fix docs script and css references to refer to the correct location
012823a3 Update menu documentation to be accurate
b9bba2b9 Updating Convert to handle dates properly for yaml and json
0c254460 Add future details to documentation
c502f078 Add handling for publishDates (which will be ignored if in the future). Fixed #260
4ebaec89 Include Section Taxonomy into SiteInfo
35a60597 SiteInfo is now a pointer on the Node
7a8b754c Fixed #301. LiveReload works on any port now.
4076d770 Simplifying the siteInfo handling
280df4e3 Fix Viperized .Site.Params
e98f0014 Allow to use filename in permalinks
d65061df Adding TechMadePlain to showcase
79767f56 Fix links to GitHub repo for spencerlyon2/hugo_gh_blog
1ba63f15 Make the header not jump around
2a44ca54 More doc site improvements. Added documentation's new layout
79dd1d02 Fixing bug with Live Reload where it broadcast instead of sending the handshake
57ad3abe Pre and Post in Menu are type HTML
a87f171b Updating / Rewriting / Adding all of the documentation in preparation for the next release
aeb06c7b Rename chrome to partials (in builder)
9173022e Set verbose to Info level
e7991003 Fix bug so watch works on theme directories as well
6b8244ba new site works in an empty directory now
df4bbcef Adding instant click library to docs so even more responsive navigation
be1ee220 Proper integration of live reload with automatic injection
60ed5bda Live reloading is working! Still need to incorporate cleanly.
296d218e Better handling of when the specified port is already in use
b520f885 Switching docs highlighting to highlight.js .. Docs build super fast again!
b198cb26 Renaming indexes to taxonomies in docs
a4a1e39a Fixing issue when two menu items have the same name.
4f75ec98 Homepage renders with _default/list.html or then _default/single.html when index.html is not present.
025a37df Fix permalink functionality, which was broken in 62dd1d4.
05b76dcb Add a blank line after the front matter when writing back a page.
73cbefdb Make template comparison functions handle floats
667a047c Fix date issue with home page in Sitemap
0053be97 Correctly print server URL when base-url is specified in the command line
2194cc77 Add pygmentsstyle and pygmentsuseclasses options
5df0cf7e Add Sitemap documentation content
35926dcf Add Sitemap testing
6049c3a1 Update Sitemap default value syntax
2a902bbc Add Sitemaps config values handling
f8e675d0 Add base Sitemap support
17922544 Add template comparison functions (Go 1.1 compat)
4e0208d4 Doc fix: replace "hugolibs" with "hugo" in "contributing" page, fixes #271.
c38d694f  Change some typography in the docs.
ec4b1526 Fixing broken link. Fixed #278.
9b192e67 Adding more information about client side highlighting
bc9f69e7 Add client-side syntax highlighting example
6b9d4a93 Adding new commands (new site [path], new theme [name])
be3e5592 Adding an archetype file for the docs site
28ffb92b Adding the new command and the create package
08c30b6e Using new helpers in page.go
bff1f1e6 Adding some new methods to helpers (GuessSection, MakeTitle & Filename)
ef2ad4d9 More feedback where errors happen during metadata conversion
6d9a2d24 adding a front matter format to lead rune method
fb7d45e6 permitting empty files again. Fixing some tests to now pass.
3395e1cb Adding a command that enables converting site to a different metadata format. Doing this revealed some bugs in the encoding functionality in some of the underlying libraries. Please backup before using.
859a78e1 Providing the ability to save (write) a content's source file.
1302ef9f Making site page initialization a bit more granular and accessible
cbd9506c moving front matter parsing (and creation) to parse package
58f8b43f moving writeToDisk to helpers to make it more accessible
f271faea Don't process dotfiles
5581e33a Update broken localhost link
96b6ae81 Adding example blog
b52e9463 Little syntax mistake
2e954d85 Fix permalinks to subdomains
bdf7cd9f Creating site menu configuration and have the docs site use it
ac82fe32 Making active parent in nav reflect when child is active page in docs
ef87dffb Fix accidentally removed line from menu template.
4f813c09 Fixing some bugs introduced in prior few commits. Tests now pass.
11fe227b Implementing new menu system in the docs site
9ecf58e2 new menus system including active link & nesting
69c1944f Add handling of deeply nested front matter
4a8de8ea Add Disqus support out of the box. Move template/bundle into hugolib.
41adafbc Updated to work with the latest viper
8afff8c7 Preliminary Theme Support
c0a046cb Added internal rss.xml template and config option to turn off rss creation
bb9bcdcf Add more information to the siteInfo (and configuration options) for better RSS generation.
93bcddeb Renamed Indexes to Taxonomies. Old template and config parameters still work.
aae6fa0b Fix test to not fail when order is different, but slice contents are the same.
be37c0b3 Adding more articles to press page.
bd022534 Adding Params to node for easy template access of page.params without throwing errors.
c8269d6d Making node.Keywords the correct length
4161d542 Misc doc fixes
d1c500c1 Adding Press page to hugo docs
af1acfbc writing indexes under more configuration conditions
ad34be9d strip trailing baseurl slash. Added a new template function "sanitizeurl" which ensures no double slashes. Fixed #221
a6170154 add: yslow-rules showcase
9a83f7a0 Fixing all tests to pass with new Viper Config
62dd1d45 Hugo config abstracted into a general purpose config library called  "Viper". Hugo casting now in own library called "cast"
a01056b9 typos in mathjax.md
a7ca39cc ENH: added tutorial for hosting a blog on github pages
2e4158b0 added appliance.cloudshark.org to showcase also cleaned up thumbnail view to not show source link if unavailable
e50b9d8a Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137
2fa3761e DOC: added tutorial for using MathJax with Hugo
c02a0207 change golang to go
5ee0a3b9 Typo: s/executible/executable/
895fe536 Adding a few more logos and powered by/made by images.
f733e70e Adding apple touch & favicon meta links
51b078a7 Homepage update. New Logo. Minor site updates.
6205a16b Fixes #227 by properly scoping the variables within the go routine.
85c04ca2 Add Tutorial With Steps to Migrate from Jekyll.
7135d897 Optimizing thumbnail & preview images
17fdf7d6 Add www.heyitsalex.net to Community Showcase.
1b3525d6 fix typo of readme
38131837 clearer pseudo command in quickstart doc
d5c58b45 Order ByTitle and ByLinkTitle added
eec0e512 Add sort pages by Title and by LinkTitle
3dfb4751 Parallelizing the largest build processes (templates, pages, indexes). Seeing 300%+ improvement of total build time.
d84f707d Also ignore Emacs lock & recovery files.
3a0ab5a3 Bumping version to v0.11-dev
0447c759 Adding the right date for the release of 0.10
0a775650 bumping version for 0.10
2540d884 Fixing issues go vet reports.
2c0ded7f Add test for ignoring ~$ files
e53bc948 Ignore content files ending in ~
0becad72 Make error message when encountering unrecognized file extensions more helpful
ea8d0981 Make per-page url overrides take precedence over section permalink settings
732b5d42 Add Kieran Healy's website.
ae954d51 updating the intro page
14227351 Reorganization of helpers. Centralized Url/Path logic. Fixed #175.
64572d2d Shortcode cleanup. Added a ton of tests. Much more flexible with input. Doesn't crash with bad input. Fixed #193
dc068ccb Fix imports so hugo builds on darwin
8fe78f6f A bunch of small documentation changes
de05a0d9 Adding documentation on Pretty Urls
e74d1b86 Adding documentation on Table of Contents functionality
30e804ee Adding an introduction to Hugo
82fdfa2c Warn about bad shortcode parameters (and don't crash)
5cff3e62 Adding Else If example
ed0fe9dd Make 'read a string' code understand float64 (json) and int (yaml) as well as actual strings
b41622bc Allow 1/0 for true/false in Yaml front-matter
e4af4f65 Support ISO8601 date/time format without timezones
0bfe9276 Make the invalid date/time format error message more helpful
1dbed5ee Call the json delimiter 'json_lead' instead of 'java_lead'
8ebb85f1 Fix build
1bead0ed Adding Documentation on using Syntax Highlighting
56dfdfe8 Adding Documentation on Hugo Template Functions
bf640775 Minor Docs Tweaks
80086759 Adding Go Template Tutorial
dca7a901 Updating Release Notes and Roadmap
75c260fa Only change rLimit on OSX (where it is needed). Fixed #194
11ca84f8 Add unicode support for aliases, indexes, urlize template filter. Now aliases and indexes are not restricted ASCII letters and can include any unicode letters.
24ffe043 Add Ant Zucaro's showcase.
5cfb690e Fix docs error with json comma
72ba6d63 Fix permalink bug in uglyurls mode (refs #187).
3e87d7a8 Automatically increase the process ulimit to maximum available.  fixes #168.
ae9cc09b Adding the ability to check the system limit on open files (important for watching large sites)
c1b9380d Add back blackfriday extensions during Markdown conversion
6dd2e9a4 gofmt all go code
ff9f6e1b Fix panic with HTTP serve initialization problems.
0ce6f05f Add text transformation template functions.
18b9948f Using table of contents within the documentation.
1882ffab Adding support for boolean params
1da3fd03 Continue with TOC integration and page refactor. Updated a few tests to match new generated output.
f45c6bc3 Moved TOC test into page_test. Some general page_test cleanup.
9666f33e Don’t render short codes on summary twice
f82c645b fixing 178.
d0825a21 Big refactor of pages code. Changed TOC code to only parse when actually used
f62e3e99 Add new TableOfContents Page variable (Markdown only)
4f1807c7 Replacing hall of fame with showcase. (new type, content driven, thumbnails, etc)
9564e6e9 Adding support for some primitive template math functions
0e013b52 add andrewcodispoti.com to hall-of-fame
3851117c renaming MinRead to ReadingTime and adding to documentation.
50a7f97a Updating page variable documentation (for templates).
f0634ec0 fixed #171. RSSlink is now RSSLink (and matches existing docs).
ae15ff09 Fixing test which erroneously checked values and order, rather than just values.
44186c6a Extending rss item limit to 50… can reduce further in template with ‘first N’ functionality.
fa2e58fd Have travis build with latest go.
cb040533 RSS improvements, now limit to 15 items and provide accurate date. fixed #172
303be735 Adding github button to docs homepage
c51d040e Adding Werker status to readme
845d0976 Create wercker.yml
f8243624 feat(docs/hall-of-fame): add ifup
438c2198 Add `canonifyurls` config option.
2ff108fc Add highlighting of code in documentation and clean up a bunch of the docs.
13b5c10d Rewriting some homepage text
74d7ae1f A bunch of style updates. Switching to bootstrap carousel.
01da9a40 Report error, but don’t fatally stop if pygments has error. Return original string. (+1 squashed commit) Squashed commits: [849a7af] if highlighting doesn’t work, just return original string
3fd6c1a2 Adding some embedded short codes (including code highlighting)
13b067b5 Adding support for embedded templates
f78e2cb8 Removing Twitter js
a70acd11 New Icon Font for Hugo
247db151 Adding some analytics
b82baa28 Adding chimeraarts.org to hall-of-fame
5550c414 Added append-port flag
e5aa08ff If baseurl is set then print that on the command line, else leave as default of localhost
8b84156f Example of a multilingual site.
8055838c Allowing empty files (ignored) so you can touch a new file while watching
1c60d5bf Don't shutdown hugo on an empty file.
8d80f9b3 Added batching behavior for page building.
1979f7d9 Avoid locking the files for an extended amount of time. Sublime Text doesn't like this and shows an error when modifying a file in rapid succession.
e46148f9 Fix static file change detection on Windows. Fixed windows uses different filepath separator. The filepath.ToSlash shouldn't be used, because it can cause errors in filepath suffix and prefix testing since "c:\a" isn't a prefix of "c:/a/b/c".
065928fc Adding page sorting by weight function (the default)
34ac562c Added documentation on ordering indexes, content and content within indexes
70745e8c Complete refactor of indexes, move (and rewrite) page sorting to page.go, add tests
6aa3e512 Added PageSorter and PagesByDate
c7083a5d Section in example was wrong for happiness.md
950d9f55 Testcases for multilevel structure were wrong
de670ced Fixes #141: Wrong section in multi level structure
6da23f74 Gofmt
1abc2f0b properly use non-localhost BaseUrl in server command
a1051964 Adding better contribution guidelines from the read me to the contribution page.
dd574628 Adding community section to the documentation
ceb70805 Adding selected tweets to the homepage
f09505a6 Adding example short codes to the documentation
6410965b Add go fmt to contribution guidelines
357ab956 Add Contribution Guidelines
0e04b9a0 Moving processing short codes to the page
d0ef3d43 better handling of detecting markup format
f432b187 render shortcodes prior to converting to html
a45de56d adding support for shortcodes with opening and closing tags
db29f57c Adding (source code) Highlight template helper
fa29e94e Adding Pygments helper
44d57fdc Reorganize helpers
10c7cf29 Create directories in publishdir with mode 0777.
ba5dadff Typo fix in docs.
32d9345b Fix a minor typo in types.md
b351731f quickstart docs - fix flag needs arg error
860f982c fixed trailing dir slash when using slug
e425226a Documentation updates, mostly for my bits
07978e4a configurable permalinks support
4f335f0c Updated release notes.
445b7d23 Updating docs to include ‘first’ functionality for the homepage
aedfa6a2 Version bump 0.9
ad2c0b56 Homepage now has all content available, use sorting and first to control rendering
13fa7cb7 lowercase template function first to be consistent with all other template functions
50d9046b remove initialization loop error from compile
40d05f12 Truncated; .Site.Params; First function
6017599a restored behavior of respecting config values unless set by command flags. fixed #116
ef595aed Handle schema-less urls when apply absurl
90a902c8 fixing double slash during absurlify
b69694a3 Merge branch 'master' of github.com:spf13/hugo
532e2e7b Some mobile and other fixes for docs
0b6a11c9 Merge pull request #113 from oyvindsk/master
adc559b0 minor documentation fix
ad04f6c8 Adding baseline
86233c00 Remove the hugo-nav function
1cebce12 Adding RSS test case.
b2236457 Fix Test Name
1fbcaf92 Buffers instead of pipes
226bc8f5 Updated release notes
23a5711d Fix benchmark panic
23a711a2 Hugo updated to work with latest cobra
9af47f07 Improve rendering time
f4cb8e16 Adding benchmark for transformation module.
789aa6ad Removing check for directory: static, layouts
861472be Small tweaks to Homepage and CSS
1d0d280e Addition of an indexes section to the docs. Updated most of the existing index content.
a7dae30a More work on indexes
bc7c9221 Better mobile support on docs site
90355eec Big visual overhaul of the docs. Docs now using indexes for all menu generation.
df0523ff Flipping around weight order. higher weight at the bottom. use negative to pin to top.
5003f7f7 Docs menu now powered by indexes.. converting some of the content to use this.
d20b41a2 Big index overhaul. Now supporting ordering tokens by count or alphabetically. Also made full indexes available to the Site variable.
9388f236 Adding support for linkTitles
b580a25d Better error handling when rendering error found when in watch mode In watch mode it should continue to watch for changes, in any other mode it should exit with a -1 error code so can check for success when scripting
764abd20 Update homepage
dde965a5 Migrate docs to Bootstrap 3.0
cd71eb73 Watching doesn't built site 2x on write (ignores rename events). Also ignores temporary files written by editors.
a5606b06 Adding support for ordering content in indexes by other than date (weighted indexes)
471fb1ff Adding support for date field in front matter as date (as TOML provides)
f3c816ea Adding support for more front matter types (int, float & date)
3558e3d6 Add support for weighted pages Now pages can be sorted by other than date
90090175 Adding preliminary support for weighted indexes (for ordering by other than date)
678ddef4 Adding a quick start guide to hugo docs
4d333e81 New Homepage for Hugo
4263094d Adding support for MinRead. Closed #106
be5ace15 Wordcount restored. fixed #92
e58d8fe7 fixed #95, fixed #93
f5fda804 simplified buildSite & better error handling around it
0318f7c1 Clean up server & build site logic. Fixed #94
e6ace71f server command now builds prior to serving
4993152d Permalink to include multiple directories levels
6e1268f4 Test case for permalink functionality
89563843 Adding back the hugo homepage.
9500ec1b Refactor layout selection code
197aacb6 Add support for Relative Permalinks
06da6091 Refactor Permalink to private function
6fa6f69a Change transformer order
d712d6f3 Moving transformation on a per-page level
9032a228 Better handle missing layouts
54a2790f Use io.Pipe for chaning render tasks.
689cda17 Code cleanup
19cb6c78 Move writing next to rendering
2176d2c1 Reducing scope of RenderThing*
ff8b5275 Move in memory target into target module.
80009b42 Change the order of Apply to be more Unixy
94a3184a Fixing up source code formatting.
5a66fa39 Chain transformers and test cases
eb117eb9 Move AbsURL into seperate file
f0211b84 Rename Transform to AbsURL
03d1a57f Set the name of the Nav attribute to select
5e14af95 Proper handling of 404 page return value
7468292c Fixing bug where RSS for site was rendered in wrong location
d829e050 Fixing bug where only the first index list was created.
2aaf92b5 Summary can now contain short codes when using <!--more--> to define end of summary.
be7ba0e9 server defaults to localhost unless overridden by command line flags
266f583a Restoring former snippet behavior & adding test to ensure future behavior
dcfcbac5 Enabling Nitro ('--stepAnalysis') again. Fix #58
18f2b826 Switching to the rjson library which is more friendly to human generated json.
48e1068e fixed #85
8efb90eb Updating usage documentation to new interface
3ae8dda2 Restoring build and watch functionality
aa9b9d59 minor documentation cleanup. - changed it's -> its where appropriate. - added post/ parent directory above happy/ to the organization examples
8ce4bc7a Update filesystem.go
94d7fe52 Change the interface to use commands and flags instead of just flags. Better organization of main (controller style) code.
92cff055 go fmt so code
ff2b98c9 Better error message when no source content is found.
f34ea610 Add the ability to set navbar li class to active
db50154e Support index.html indexes in content directory
4250bf8e Fixes #80 - Homepage now renders correctly
c9223cfd source: Fix failing build on windows
8df88496 Fix breaking test cases on unix platform
bffe4baf Create a TargetPath() method that provides OutFile
52e8c7a0 Section is determined by the source, not the url
784077da Fix fragments being AbsUrlified in final html
311e1022 Allow non-markdown content in content directory
5374242f More expressive --check output
c510140c Add renderer information to --check
67b2abaf Add IsRenderable to Page
d8e18349 Fix parsing edge case of frontmatter
a82efe5b Merge remote-tracking branch 'origin/parser' into mrg_praser
6b0752e8 Move AbUrlify to post content transformation
c6fe87b1 Add a transform step
c75da346 Fix alias documentation.
172ff5ea Initialize HTMLRedirectAlias before ShowPlan()
d45fb72f Add /index.html to unadorned alias paths
803a0fce Remove RenderedContent from page.
2ebfb33f Move alias logic to target module
2f10da15 Move alias rendering to target
74b55fc7 Normalize paths within hugo
998b2f73 Added safeHtml template function
6274aa0a Homepage "/" respects PublishDir
610c06e6 Introduce source.Filesystem
d4d9da9f Remove page module dependence on opening files
cb00917a Expand the ShowPlan functionality
4004687f Move to target.Filesystem
7919603f Add Translate to target
c6ad532b Add file reporting to planner
13d2c552 Adding Planner
79d9f82e Code reorg, helpers.go has been decomposed.
207d8fb7 Date rendering unit tests in pages
3ecc698f Remove hugolib.HTML and hugolib.URL types
a591a106 Include building hugo docs as part of test.
d841d522 Include building hugo docs as part of test.
ba82a203 Add support for amber files
ee5865f2 Abstract html/template dependency
0a9dc705 Use s everywhere for consistency
b268e639 Return an error (other than 0) when ./hugo fails
6c8e7edb The <!--more--> (summary divider) now works even if it is on the same line as content
4349216d Small code cleanup
0fdea0c2 Return an error with WritePublic
097b782a Removing site.Directories.
b14b61af Externalize the writing of content to a target
bc3c2290 Ensure Section is set before returning Page object.
c32f401b Revert "Return errors when rendering"
a792ec09 Cleanup formatting - go fmt ./...
4ed43e80 Fixed bug where Url specified in front matter as pretty url wouldnt render
71678a71 Adding .Summary to page variables
3ab52450 clean up logic
1bb00b8c Refactored added RenderThingOrDefault and tests
554375b2 Using new parser.
1de19926 Return any error reported by RenderHomePage
9930011e Wordpress summaries
7b1f0960 Add 404.html for gh-pages
f28a8fa0 RenderThing test cases
9d15262e Test cases for ignoreDotFile
0fabd51a Update .gitignore to ignore *.swo files
7461ed63 Fix benchmark so the buffer is read each time.
599e6672 Removing GetSection
ae711297 Skip "dot" files in layout
eb4288e3 Merge pull request #53 from hugoduncan/feature/print-error-on-invalid-index
00839567 Merge pull request #52 from rozza/StaticSync
35b35a70 Merge pull request #51 from cabello/patch-3
6f424175 Merge pull request #50 from cabello/patch-2
3d0dc1ac Merge pull request #49 from cabello/patch-1
301d2baf Print error if index value in a page is wrong type
5aa47a7b Static changes shouldn't be destructive to existing files
8415c5e6 Remove extra quotes from meta data
acd5ea0e Check .Prev and .Next pointers before using it
8058abd7 Fix broken link to Index page
eff8457a Merge pull request #46 from rawfalafel/sync_static
2dcdd673 Watch StaticDir and sync to PublishDir on change New behavior adds a special case for file changes inside the static directory to fsync PublishDir
c4bcdebc Merge pull request #44 from cactus/avoid-redirect-with-slugs
e2744d40 Merge pull request #43 from hugoduncan/feature/allow-xhtml-aliases
2542836b Merge pull request #41 from rozza/skipStatic
8f330626 Merge branch 'noahcampbell-index_reporting'
c713beba Formatting cleanup
ec821739 Removing the use of slash
8eca8f8a Detect missed index from front matter
e66ba5d2 Return errors when rendering
0a79edd4 Removing extra links on homepage
3ae8078d Adding "fork me on github" banner
8c0ab4de Complete overhaul of the docs
b76b80c5 Merge pull request #40 from VonC/clarify_uglyurls_flag
b9e835b1 avoid handling a redirect from slug to slug/
23a98ad0 Enable aliases from .xhtml paths
0f143dcf Skip Static directory if its in your content directory
9308cd6a Clarify uglyurls flag.
3c3fc45d Merge branch 'master' of github.com:spf13/hugo
480e01eb Further work on path/section stuff. Tests passing now.
7a51a8a5 Merge pull request #38 from noahcampbell/workflow_dotfile
b4bcc591 Now support for nested paths. Better section detection.
6e272394 Merge branch 'master' of github.com:spf13/hugo
ca5a94a9 Merge pull request #37 from noahcampbell/master
c661d980 Merge pull request #31 from cactus/issue-31
ec02fa4b Adding support for a default content type template default template found at layouts/_default/single.html
89685249 Adding support for recent content.
97eb9225 Ignore dotfiles in content directory
5664780c gofmt pass
2d11d1bd Test GetParam and the various incarnations of frontmatter.
31a1ade1 move "dot" in regex to avoid it being part of a range
c689d46a Merge pull request #32 from cactus/issue-32
b13afc41 fix sanitizeRegex to not strip "dots"
023567b0 fix bad tab/space due to paste
2f9b582d fix wrong renderlist feed permalink
cb39f052 Merge pull request #36 from noahcampbell/master
8c031413 Use / for template names regardless of platform.
ec1a3a8d Merge pull request #35 from noahcampbell/master
3fdcd0ba Support for non-standard formats.
0305c825 Move timezone tests to integration test.
f610d45c Add additional details to date test cases.
dd19d0cc Provide better support for various date formats.
17aafb39 Avoid error if no content.
5b3b0f95 Merge pull request #26 from noahcampbell/master
02337089 Started new release notes, added nitro step for aliases
ac26de20 Adding correct canonical link to alias pages
d5518c09 Adding support for aliases (redirects)
45ce6e2b Merge branch 'redirect' of https://github.com/rozza/hugo into rozza-redirect
bb273df4 Add support for continuous testing.
733c0207 Merge branch 'master' of github.com:spf13/hugo
2bf24877 Merge pull request #25 from noahcampbell/master
2bbecc7b Better reporting when the template is missing.
309db474 Nitro timer is encapsulated.
e26b43f6 Adding more test cases
e67db666 Adding benchmark for parsing pages using unicode.
085ce15f Adding ability to read from io.Reader
274d324c Introduce unit testing for page.go
fa55cd98 Remove unreachable code path.
0595f27e Using a composite literal to create a page.
19538a1b Support pages without folders
fc5e92cc Provide better error handling
e2a28114 Add redirect to page parameters and redirects example
4f17ad69 Merge pull request #22 from nsabine/master
7a13434d Merge pull request #21 from duncanbeevers/master
a8b3e153 Added examples to indexes.md
04a0dbbf Added .Content variable to docs
6a5e4b36 Merge pull request #20 from VonC/version
49b8ac5f Make sure hugo --version prints the version and does *nothing* else.
a870f4d9 Fixing missing trailing slash in baseUrl
d89c7ec7 Merge pull request #19 from nsabine/master
780e2f31 Populated page Site metadata.  Enables accessing Indexes from Page template.
42de9bd8 Merge pull request #15 from hhatto/update-doc
0e57fcc9 Merge branch 'master' of github.com:spf13/hugo
783f0d61 fixing badlink on homepage
6789b6c5 removing erroneous debugging output
78afe8d3 update document for content directory
c5715e98 Merge pull request #12 from imrehg/docfix
f31ec3c2 Fix example in docs that wouldn't work in practice
de9f9ae1 Fixing getting started link.
57b206ca Merge pull request #11 from noahcampbell/master
f6e590e5 Fixing link to contributor page on github
6a1a038c Shrinking the readme to just the basics to avoid dupe with doc site
6efbd93a Updating a bunch of the docs
def5f101 Including documentation on indexes
dff86cb2 Renaming indexes template to indexes.html
21a7b725 Moved static content to /static
52c089ff Added support for indexes of indexes & ordered indexes
ddad1e04 adding previous next capabilities
66610a65 Removing OSX files from repo.  Updating .gitignore to not track these files.
d36d7fba Merge pull request #8 from SebastianM/doc-json-fix
47783c1f Merge pull request #10 from noahcampbell/master
3e539c71 Adding error message when no content pages exists.
03e804ff Updating the .gitignore for windows and vim users.
c9a09418 Fixed section labels causing panic on windows. The filename path was being split using a unix specific path seperator.  This fix uses the os.PathSeperator to ensure proper evaluation regardless of platform.
4efdb909 Fix JSON syntax error in example configuration
61258858 copying static content to destination
736677a2 Using MkdirAll instead of my own logic
7ab28c56 Adding support for destination dir, split out static
92c31bbe permalink now respects pretty urls
d5f55430 create content at any level of nesting
e08d14ad fixing issue with some urls missing '/'
b7bbc28c fixing bug with server not finding right path
c560a753 adding more verbose output to server functionality
b2385f06 create missing directories recurisvely
dd9a7e64 Fixing headers in readme
16b1f284 Improving installation instructions
f2e4c9d7 Merge branch 'master' of github.com:spf13/hugo
3ad3f2f0 Merge branch 'doc-fix' of https://github.com/brandonblack/hugo into brandonblack-doc-fix
580bb9bb minor: adding some more instructions for building from source
2dde27f0 Update README.md
627cf265 Adding proper command line option parsing
8fae5f0d Default is now pretty urls (without .html) Adding --uglyurls option to retain previous behavior
dcd8ff71 Adding better source build instructions
f1990049 GO -> Go
8d50dd91 fixing typo in config readme
c24112ce Render shortcodes before index and section rss feeds
649560fc proper BaseUrl handling (if has trailing slash or not)
7a521ad1 Fixing some RSS issues
b7b6f054 Accidentally left in debugging code
75a2e6d4 Now support for config files as yaml, json or toml
d9b5f9cd fixing incorrect import path
f857f4ca adding helper to create absolute url
d4caa8ee Adding total time to generated stats.
51e30985 Writing relative links to absolute so they work in feeds
e76c3feb Fix bug with JSON front matter parsing.
a6914e9c Better error handling for parsing front matter
8403dba3 Merge pull request #3 from tychoish/rst-fix
4951ff99 rst: fixing rst output processing
aee48725 Adding version number to command line options
d2a6267a Adding support for TOML, updating documentation
3c80cd32 YAML support similar to jekyll (start and end with '---')
94e57774 Merge pull request #2 from tychoish/yaml-rst-support
d0ff3126 minor: correcting example
f851c416 fix: changing terminal yaml line, generalizing forematter splitting
b024454e fixes: returning json parsing, error messages, yaml header offsets
67f4da30 revert: adding json support
6c42d3d4 fix: parsing of yaml forematter
431fa0e2 changing to suport yaml rather than json and adding optional restructuredtext support
a7f5f97b sanity: move from json to yaml
4d2fbfc7 Merge pull request #1 from tychoish/add-gitignore
8aff6cc3 gitignore: sanity
f8755771 rendering shortcodes earlier for better performance
77d142ba fixing typos
1aa125cf fixing two typos
0d63bf00 better install instructions and fixing usage typo
3ec920ac adding better install directions
d1162555 updating readme
6e16449e adding hugo
50a1d6f3 Initial commit

git-subtree-dir: docs
git-subtree-split: b0470688f14bc964f4928a812f4c3dbd6123e2e7
2017-07-18 10:24:26 +02:00
Bjørn Erik Pedersen
deccc54004 hubolib: Add HasShortcode
Fixes #3707
2017-07-17 23:20:13 +02:00
Bjørn Erik Pedersen
00b590d7ab Improve the twitter card template
Now fall back to `images` set in site config for twitter card.

Fixes #3711
2017-07-17 23:09:52 +02:00
Michael Henderson
ea5e9e346c Add GOEXE to support building with different versions of go
Add a variable to the makefile and benchmark scripts to let users change the command used to build. Doesn't impact tools like govendor.
2017-07-16 00:35:15 +02:00
Bjørn Erik Pedersen
61bb3ccab3 hugolib: Improve panic handling in layout rendering 2017-07-14 10:26:51 +02:00
Bjørn Erik Pedersen
794ea21e94 hugolib: Make template panics into nice error messages 2017-07-14 10:08:04 +02:00
Bjørn Erik Pedersen
91f410ea90 Bump versions to 0.26-DEV 2017-07-10 09:16:02 +02:00
Bjørn Erik Pedersen
0e25f1e969 Revert "Revert "vendor: Update dependencies for 0.26-DEV""
This reverts commit a48e132345.
2017-07-10 09:04:46 +02:00
Bjørn Erik Pedersen
aded65b71d releaser: Prepare repository for 0.25-DEV
[ci skip]
2017-07-10 09:02:20 +02:00
Bjørn Erik Pedersen
bbd33dbf5d releaser: Add release notes to /docs for release of 0.25.1
[ci skip]
2017-07-10 08:57:34 +02:00
Bjørn Erik Pedersen
0e09be7b3c releaser: Bump versions for release of 0.25.1
[ci skip]
2017-07-10 08:57:34 +02:00
Bjørn Erik Pedersen
195f945758 releaser: Ignore openbsd/arm
It is failing with "undefined: Flock_t".
2017-07-10 08:56:57 +02:00
Bjørn Erik Pedersen
44b8f740e9 releaser: Add release notes draft for 0.25.1
[ci skip]
2017-07-10 08:12:28 +02:00
Bjørn Erik Pedersen
a48e132345 Revert "vendor: Update dependencies for 0.26-DEV"
This reverts commit 4ec8ee7fb1.
2017-07-10 07:46:08 +02:00
Bjørn Erik Pedersen
7f82b41a24 parser: Final (!) fix for issue with escaped JSON front matter
Fixes #3682
2017-07-08 18:43:36 +02:00
Bjørn Erik Pedersen
84db6c74a0 parser: Fix issue with escaped JSON front matter
Fixes #3682
2017-07-08 10:56:56 +02:00
Bjørn Erik Pedersen
e0cf2e05bb tpl/collections: Add some empty slice tests to intersect
See #3686
2017-07-08 10:34:42 +02:00
Bjørn Erik Pedersen
dbbc5c4810 tpl/collections: Fix union when the first slice is empty
Fixes #3686
2017-07-08 10:31:09 +02:00
Vasiliy Solovey
7bcc1ce659 commands: Navigate to changed on CREATE
When working with content from IntelliJ IDE,
like WebStorm, every file save is followed by
two events: "RENAME" and then "CREATE".
2017-07-08 09:37:24 +02:00
Bjørn Erik Pedersen
fd41e70cff Add first draft of CODEOWNERS
See https://github.com/blog/2392-introducing-code-owners
2017-07-07 21:32:14 +02:00
Anthony Fok
4ec8ee7fb1 vendor: Update dependencies for 0.26-DEV 2017-07-07 01:52:38 -06:00
Bjørn Erik Pedersen
1e19a98451 releaser: Prepare repository for 0.26-DEV
[ci skip]
2017-07-07 09:34:13 +02:00
3067 changed files with 267651 additions and 74254 deletions

115
.circleci/config.yml Normal file
View file

@ -0,0 +1,115 @@
parameters:
# v2: 11m.
defaults: &defaults
resource_class: large
docker:
- image: bepsays/ci-hugoreleaser:1.22400.20000
environment: &buildenv
GOMODCACHE: /root/project/gomodcache
version: 2
jobs:
prepare_release:
<<: *defaults
environment: &buildenv
GOMODCACHE: /root/project/gomodcache
steps:
- setup_remote_docker
- checkout:
path: hugo
- &git-config
run:
command: |
git config --global user.email "bjorn.erik.pedersen+hugoreleaser@gmail.com"
git config --global user.name "hugoreleaser"
- run:
command: |
cd hugo
go mod download
go run -tags release main.go release --step 1
- save_cache:
key: git-sha-{{ .Revision }}
paths:
- hugo
- gomodcache
build_container1:
<<: [*defaults]
environment:
<<: [*buildenv]
steps:
- &restore-cache
restore_cache:
key: git-sha-{{ .Revision }}
- run:
no_output_timeout: 20m
command: |
mkdir -p /tmp/files/dist1
cd hugo
hugoreleaser build -paths "builds/container1/**" -workers 3 -dist /tmp/files/dist1 -chunks $CIRCLE_NODE_TOTAL -chunk-index $CIRCLE_NODE_INDEX
- &persist-workspace
persist_to_workspace:
root: /tmp/files
paths:
- dist1
- dist2
parallelism: 7
build_container2:
<<: [*defaults]
environment:
<<: [*buildenv]
docker:
- image: bepsays/ci-hugoreleaser-linux-arm64:1.22400.20000
steps:
- *restore-cache
- &attach-workspace
attach_workspace:
at: /tmp/workspace
- run:
command: |
mkdir -p /tmp/files/dist2
cd hugo
hugoreleaser build -paths "builds/container2/**" -workers 1 -dist /tmp/files/dist2
- *persist-workspace
archive_and_release:
<<: [*defaults]
environment:
<<: [*buildenv]
steps:
- *restore-cache
- *attach-workspace
- *git-config
- run:
name: Add github.com to known hosts
command: ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
command: |
cp -a /tmp/workspace/dist1/. ./hugo/dist
cp -a /tmp/workspace/dist2/. ./hugo/dist
- run:
command: |
cd hugo
hugoreleaser archive
hugoreleaser release
go run -tags release main.go release --step 2
workflows:
version: 2
release:
jobs:
- prepare_release:
filters:
branches:
only: /release-.*/
- build_container1:
requires:
- prepare_release
- build_container2:
requires:
- prepare_release
- archive_and_release:
context: org-global
requires:
- build_container1
- build_container2

9
.dockerignore Normal file
View file

@ -0,0 +1,9 @@
*.md
*.log
*.txt
.git
.github
.circleci
docs
examples
Dockerfile

8
.gitattributes vendored Normal file
View file

@ -0,0 +1,8 @@
# Text files have auto line endings
* text=auto
# Go source files always have LF line endings
*.go text eol=lf
# SVG files should not be modified
*.svg -text

23
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,23 @@
---
name: 'Bug report'
labels: 'Bug, NeedsTriage'
assignees: ''
about: Create a report to help us improve
---
<!--
Please do not use the issue queue for questions or troubleshooting. Unless you are certain that your issue is a software defect, use the forum:
https://discourse.gohugo.io
-->
<!-- Please answer these questions before submitting your issue. Thanks! -->
### What version of Hugo are you using (`hugo version`)?
<pre>
$ hugo version
</pre>
### Does this issue reproduce with the latest release?

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: SUPPORT, ISSUES and TROUBLESHOOTING
url: https://discourse.gohugo.io/
about: Please DO NOT use Github for support requests. Please visit https://discourse.gohugo.io for support! You will be helped much faster there. If you ignore this request your issue might be closed with a discourse label.

View file

@ -0,0 +1,11 @@
---
name: Proposal
about: Propose a new feature for Hugo
title: ''
labels: 'Proposal, NeedsTriage'
assignees: ''
---
<!-- Describe this new feature. Think about if it really belongs in the Hugo core module; you may want to discuss it on https://discourse.gohugo.io/ first. -->

3
.github/SUPPORT.md vendored Normal file
View file

@ -0,0 +1,3 @@
### Asking Support Questions
We have an active [discussion forum](https://discourse.gohugo.io) where users and developers can ask questions. Please don't use the GitHub issue tracker to ask questions.

7
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,7 @@
# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"

49
.github/workflows/image.yml vendored Normal file
View file

@ -0,0 +1,49 @@
name: Build Docker image
on:
release:
types: [published]
pull_request:
permissions:
packages: write
env:
REGISTRY_IMAGE: ghcr.io/gohugoio/hugo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Docker meta
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Login to GHCR
# Login is only needed when the image is pushed
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: build
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1
with:
context: .
provenance: mode=max
sbom: true
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: HUGO_BUILD_TAGS=extended,withdeploy

52
.github/workflows/stale.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: 'Close stale and lock closed issues and PRs'
on:
workflow_dispatch:
schedule:
- cron: '30 1 * * *'
permissions:
contents: read
jobs:
stale:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@7de207be1d3ce97a9abe6ff1306222982d1ca9f9 # v5.0.1
with:
issue-inactive-days: 21
add-issue-labels: 'Outdated'
issue-comment: >
This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
pr-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
operations-per-run: 999
days-before-issue-stale: 365
days-before-pr-stale: 365
days-before-issue-close: 56
days-before-pr-close: 56
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a **bug** and you can still reproduce this error on the <code>master</code> branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a **feature request**, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
stale-pr-message: This PR has been automatically marked as stale because it has not had
recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
Please check https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md#code-contribution and verify that this code contribution fits with the description. If yes, tell is in a comment.
This PR will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
stale-issue-label: 'Stale'
exempt-issue-labels: 'Keep,Security'
stale-pr-label: 'Stale'
exempt-pr-labels: 'Keep,Security'

132
.github/workflows/test.yml vendored Normal file
View file

@ -0,0 +1,132 @@
on:
push:
branches: [master]
pull_request:
name: Test
env:
GOPROXY: https://proxy.golang.org
GO111MODULE: on
SASS_VERSION: 1.80.3
DART_SASS_SHA_LINUX: 7c933edbad0a7d389192c5b79393485c088bd2c4398e32f5754c32af006a9ffd
DART_SASS_SHA_MACOS: 79e060b0e131c3bb3c16926bafc371dc33feab122bfa8c01aa337a072097967b
DART_SASS_SHA_WINDOWS: 0bc4708b37cd1bac4740e83ac5e3176e66b774f77fd5dd364da5b5cfc9bfb469
permissions:
contents: read
jobs:
test:
strategy:
matrix:
go-version: [1.23.x, 1.24.x]
os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'ubuntu-latest'
name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go-version }}
check-latest: true
cache: true
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Install Ruby
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
with:
ruby-version: "2.7"
bundler-cache: true #
- name: Install Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.x"
- name: Install Mage
run: go install github.com/magefile/mage@v1.15.0
- name: Install asciidoctor
uses: reitzig/actions-asciidoctor@c642db5eedd1d729bb8c92034770d0b2f769eda6 # v2.0.2
- name: Install docutils
run: |
pip install docutils
rst2html --version
- if: matrix.os == 'ubuntu-latest'
name: Install pandoc on Linux
run: |
sudo apt-get update -y
sudo apt-get install -y pandoc
- if: matrix.os == 'macos-latest'
run: |
brew install pandoc
- if: matrix.os == 'windows-latest'
run: |
choco install pandoc
- run: pandoc -v
- if: matrix.os == 'windows-latest'
run: |
choco install mingw
- if: matrix.os == 'ubuntu-latest'
name: Install dart-sass Linux
run: |
echo "Install Dart Sass version ${SASS_VERSION} ..."
curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
echo "${DART_SASS_SHA_LINUX} dart-sass-${SASS_VERSION}-linux-x64.tar.gz" | sha256sum -c;
tar -xvf "dart-sass-${SASS_VERSION}-linux-x64.tar.gz";
echo "$GOBIN"
echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
- if: matrix.os == 'macos-latest'
name: Install dart-sass MacOS
run: |
echo "Install Dart Sass version ${SASS_VERSION} ..."
curl -LJO "https://github.com/sass/dart-sass/releases/download/${SASS_VERSION}/dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
echo "${DART_SASS_SHA_MACOS} dart-sass-${SASS_VERSION}-macos-x64.tar.gz" | shasum -a 256 -c;
tar -xvf "dart-sass-${SASS_VERSION}-macos-x64.tar.gz";
echo "$GITHUB_WORKSPACE/dart-sass/" >> $GITHUB_PATH
- if: matrix.os == 'windows-latest'
name: Install dart-sass Windows
run: |
echo "Install Dart Sass version ${env:SASS_VERSION} ..."
curl -LJO "https://github.com/sass/dart-sass/releases/download/${env:SASS_VERSION}/dart-sass-${env:SASS_VERSION}-windows-x64.zip";
Expand-Archive -Path "dart-sass-${env:SASS_VERSION}-windows-x64.zip" -DestinationPath .;
echo "$env:GITHUB_WORKSPACE/dart-sass/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
- if: matrix.os == 'ubuntu-latest'
name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- if: matrix.os == 'ubuntu-latest'
name: Run staticcheck
run: staticcheck ./...
- if: matrix.os != 'windows-latest'
name: Check
run: |
sass --version;
mage -v check;
env:
HUGO_BUILD_TAGS: extended,withdeploy
- if: matrix.os == 'windows-latest'
# See issue #11052. We limit the build to regular test (no -race flag) on Windows for now.
name: Test
run: |
mage -v test;
env:
HUGO_BUILD_TAGS: extended,withdeploy
- name: Build tags
run: |
go install -tags extended
- if: matrix.os == 'ubuntu-latest'
name: Build for dragonfly
run: |
go install
env:
GOARCH: amd64
GOOS: dragonfly

22
.gitignore vendored
View file

@ -1,18 +1,6 @@
hugo
docs/public*
/.idea
hugo.exe
*.test
*.prof
nohup.out
cover.out
*.swp
*.swo
.DS_Store
*~
vendor/*/
*.bench
coverage*.out
GoBuilds
dist
*.test
imports.*
dist/
public/
.DS_Store

View file

@ -1,6 +0,0 @@
{
"ArtifactsDest": "GoBuilds/",
"OutPath": "{{.Dest}}{{.PS}}{{.AppName}}{{.PS}}{{.Version}}{{.PS}}{{.AppName}}_{{.Version}}_{{.Os}}_{{.Arch}}{{.Ext}}",
"BuildConstraints": "linux windows darwin freebsd netbsd openbsd dragonfly",
"ConfigVersion": "0.9"
}

View file

@ -1,23 +0,0 @@
language: go
sudo: required
go:
- 1.7.6
- 1.8.3
- tip
os:
- linux
- osx
matrix:
allow_failures:
- go: tip
fast_finish: true
install:
- make vendor
script:
- make hugo-race check
- ./hugo -s docs/
- ./hugo --renderToMemory -s docs/
before_install:
# gem install must be run with sudo on OSX
- sudo gem install asciidoctor | gem install asciidoctor
- sudo pip install docutils

View file

@ -1,3 +1,5 @@
>**Note:** We would appreciate if you hold on with any big refactoring (like renaming deprecated Go packages), mainly because of potential for extra merge work for future coming in in the near future.
# Contributing to Hugo
We welcome contributions to Hugo of any kind including documentation, themes,
@ -7,6 +9,10 @@ helping to manage issues, etc.
The Hugo community and maintainers are [very active](https://github.com/gohugoio/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity. We created a [step by step guide](https://gohugo.io/tutorials/how-to-contribute-to-hugo/) if you're unfamiliar with GitHub or contributing to open source projects in general.
*Note that this repository only contains the actual source code of Hugo. For **only** documentation-related pull requests / issues please refer to the [hugoDocs](https://github.com/gohugoio/hugoDocs) repository.*
*Changes to the codebase **and** related documentation, e.g. for a new feature, should still use a single pull request.*
## Table of Contents
* [Asking Support Questions](#asking-support-questions)
@ -14,11 +20,8 @@ The Hugo community and maintainers are [very active](https://github.com/gohugoio
* [Submitting Patches](#submitting-patches)
* [Code Contribution Guidelines](#code-contribution-guidelines)
* [Git Commit Message Guidelines](#git-commit-message-guidelines)
* [Vendored Dependencies](#vendored-dependencies)
* [Fetching the Sources From GitHub](#fetching-the-sources-from-github)
* [Using Git Remotes](#using-git-remotes)
* [Build Hugo with Your Changes](#build-hugo-with-your-changes)
* [Updating the Hugo Sources](#updating-the-hugo-sources)
* [Building Hugo with Your Changes](#building-hugo-with-your-changes)
## Asking Support Questions
@ -28,22 +31,42 @@ Please don't use the GitHub issue tracker to ask questions.
## Reporting Issues
If you believe you have found a defect in Hugo or its documentation, use
the GitHub [issue tracker](https://github.com/gohugoio/hugo/issues) to report the problem to the Hugo maintainers.
If you're not sure if it's a bug or not, start by asking in the [discussion forum](https://discourse.gohugo.io).
When reporting the issue, please provide the version of Hugo in use (`hugo version`) and your operating system.
the GitHub issue tracker to report
the problem to the Hugo maintainers. If you're not sure if it's a bug or not,
start by asking in the [discussion forum](https://discourse.gohugo.io).
When reporting the issue, please provide the version of Hugo in use (`hugo
version`) and your operating system.
- [Hugo Issues · gohugoio/hugo](https://github.com/gohugoio/hugo/issues)
- [Hugo Documentation Issues · gohugoio/hugoDocs](https://github.com/gohugoio/hugoDocs/issues)
- [Hugo Website Theme Issues · gohugoio/hugoThemesSite](https://github.com/gohugoio/hugoThemesSite/issues)
## Code Contribution
Hugo has become a fully featured static site generator, so any new functionality must:
* be useful to many.
* fit naturally into _what Hugo does best._
* strive not to break existing sites.
* close or update an open [Hugo issue](https://github.com/gohugoio/hugo/issues)
If it is of some complexity, the contributor is expected to maintain and support the new feature in the future (answer questions on the forum, fix any bugs etc.).
Any non-trivial code change needs to update an open [issue](https://github.com/gohugoio/hugo/issues). A non-trivial code change without an issue reference with one of the labels `bug` or `enhancement` will not be merged.
Note that we do not accept new features that require [CGO](https://github.com/golang/go/wiki/cgo).
We have one exception to this rule which is LibSASS.
**Bug fixes are, of course, always welcome.**
## Submitting Patches
The Hugo project welcomes all contributors and contributions regardless of skill or experience level.
If you are interested in helping with the project, we will help you with your contribution.
Hugo is a very active project with many contributions happening daily.
Because we want to create the best possible product for our users and the best contribution experience for our developers,
we have a set of guidelines which ensure that all contributions are acceptable.
The guidelines are not intended as a filter or barrier to participation.
If you are unfamiliar with the contribution process, the Hugo team will help you and teach you how to bring your contribution in accordance with the guidelines.
The Hugo project welcomes all contributors and contributions regardless of skill or experience level. If you are interested in helping with the project, we will help you with your contribution.
### Code Contribution Guidelines
Because we want to create the best possible product for our users and the best contribution experience for our developers, we have a set of guidelines which ensure that all contributions are acceptable. The guidelines are not intended as a filter or barrier to participation. If you are unfamiliar with the contribution process, the Hugo team will help you and teach you how to bring your contribution in accordance with the guidelines.
To make the contribution process as seamless as possible, we ask for the following:
* Go ahead and fork the project and make your changes. We encourage pull requests to allow for review and discussion of code changes.
@ -53,24 +76,28 @@ To make the contribution process as seamless as possible, we ask for the followi
* Run `go fmt`.
* Add documentation if you are adding new features or changing functionality. The docs site lives in `/docs`.
* Squash your commits into a single commit. `git rebase -i`. Its okay to force update your pull request with `git push -f`.
* Ensure that `make check` succeeds. [Travis CI](https://travis-ci.org/gohugoio/hugo) (Linux and macOS) and [AppVeyor](https://ci.appveyor.com/project/gohugoio/hugo/branch/master) (Windows) will fail the build if `make check` fails.
* Ensure that `mage check` succeeds. [Travis CI](https://travis-ci.org/gohugoio/hugo) (Windows, Linux and macOS) will fail the build if `mage check` fails.
* Follow the **Git Commit Message Guidelines** below.
### Git Commit Message Guidelines
This [blog article](http://chris.beams.io/posts/git-commit/) is a good resource for learning how to write good commit messages,
This [blog article](https://cbea.ms/git-commit/) is a good resource for learning how to write good commit messages,
the most important part being that each commit message should have a title/subject in imperative mood starting with a capital letter and no trailing period:
*"Return error on wrong use of the Paginator"*, **NOT** *"returning some error."*
*"js: Return error when option x is not set"*, **NOT** *"returning some error."*
Most title/subjects should have a lower-cased prefix with a colon and one whitespace. The prefix can be:
* The name of the package where (most of) the changes are made (e.g. `media: Add text/calendar`)
* If the package name is deeply nested/long, try to shorten it from the left side, e.g. `markup/goldmark` is OK, `resources/resource_transformers/js` can be shortened to `js`.
* If this commit touches several packages with a common functional topic, use that as a prefix, e.g. `errors: Resolve correct line numbers`)
* If this commit touches many packages without a common functional topic, prefix with `all:` (e.g. `all: Reformat Go code`)
* If this is a documentation update, prefix with `docs:`.
* If nothing of the above applies, just leave the prefix out.
* Note that the above excludes nouns seen in other repositories, e.g. "chore:".
Also, if your commit references one or more GitHub issues, always end your commit message body with *See #1234* or *Fixes #1234*.
Replace *1234* with the GitHub issue ID. The last example will close the issue when the commit is merged into *master*.
Sometimes it makes sense to prefix the commit message with the packagename (or docs folder) all lowercased ending with a colon.
That is fine, but the rest of the rules above apply.
So it is "tpl: Add emojify template func", not "tpl: add emojify template func.", and "docs: Document emoji", not "doc: document emoji."
Please consider to use a short and descriptive branch name, e.g. **NOT** "patch-1". It's very common but creates a naming conflict each time when a submission is pulled for a review.
An example:
```text
@ -84,42 +111,35 @@ new default function more useful for Hugo users.
Fixes #1949
```
### Vendored Dependencies
### Fetching the Sources From GitHub
Hugo uses [govendor](https://github.com/kardianos/govendor) to vendor dependencies, but we don't commit the vendored packages themselves to the Hugo git repository.
Therefore, a simple `go get` is not supported since `go get` is not vendor-aware.
You **must use govendor** to fetch and manage Hugo's dependencies.
Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build. The easiest is to clone Hugo in a directory outside of `GOPATH`, as in the following example:
### Fetch the Sources From GitHub
```
go get github.com/kardianos/govendor
govendor get github.com/gohugoio/hugo
```bash
mkdir $HOME/src
cd $HOME/src
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install
```
### Using Git Remotes
For some convenient build and test targets, you also will want to install Mage:
Due to the way Go handles package imports, the best approach for working on a
Hugo fork is to use Git Remotes. Here's a simple walk-through for getting
started:
```bash
go install github.com/magefile/mage
```
1. Fetch the Hugo sources as described above.
1. Change to the Hugo source directory:
```
cd $HOME/go/src/github.com/gohugoio/hugo
```
Now, to make a change to Hugo's source:
1. Create a new branch for your changes (the branch name is arbitrary):
```
```bash
git checkout -b iss1234
```
1. After making your changes, commit them to your new branch:
```
```bash
git commit -a -v
```
@ -127,35 +147,53 @@ started:
1. Add your fork as a new remote (the remote name, "fork" in this example, is arbitrary):
```
git remote add fork git://github.com/USERNAME/hugo.git
```bash
git remote add fork git@github.com:USERNAME/hugo.git
```
1. Push the changes to your new remote:
```
```bash
git push --set-upstream fork iss1234
```
1. You're now ready to submit a PR based upon the new branch in your forked repository.
### Build Hugo with Your Changes
### Building Hugo with Your Changes
Hugo uses [mage](https://github.com/magefile/mage) to sync vendor dependencies, build Hugo, run the test suite and other things. You must run mage from the Hugo directory.
```bash
cd $HOME/go/src/github.com/gohugoio/hugo
make hugo
# or to install in $HOME/go/bin:
make install
```
### Updating the Hugo Sources
To build Hugo:
If you want to stay in sync with the Hugo repository, you can easily pull down
the source changes, but you'll need to keep the vendored packages up-to-date as
well.
```
git pull
make vendor
```bash
mage hugo
```
To install hugo in `$HOME/go/bin`:
```bash
mage install
```
To run the tests:
```bash
mage hugoRace
mage -v check
```
To list all available commands along with descriptions:
```bash
mage -l
```
**Note:** From Hugo 0.43 we have added a build tag, `extended` that adds **SCSS support**. This needs a C compiler installed to build. You can enable this when building by:
```bash
HUGO_BUILD_TAGS=extended mage install
````

110
Dockerfile Normal file → Executable file
View file

@ -1,27 +1,99 @@
FROM golang:alpine3.6
# GitHub: https://github.com/gohugoio
# Twitter: https://twitter.com/gohugoio
# Website: https://gohugo.io/
ENV GOPATH /go
ARG GO_VERSION="1.24"
ARG ALPINE_VERSION="3.22"
ARG DART_SASS_VERSION="1.79.3"
RUN \
adduser -h /site -s /sbin/nologin -u 1000 -D hugo && \
apk add --no-cache dumb-init && \
apk add --no-cache --virtual .build-deps \
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0 AS xx
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gobuild
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gorun
FROM gobuild AS build
RUN apk add clang lld
# Set up cross-compilation helpers
COPY --from=xx / /
ARG TARGETPLATFORM
RUN xx-apk add musl-dev gcc g++
# Optionally set HUGO_BUILD_TAGS to "none" or "withdeploy" when building like so:
# docker build --build-arg HUGO_BUILD_TAGS=withdeploy .
#
# We build the extended version by default.
ARG HUGO_BUILD_TAGS="extended"
ENV CGO_ENABLED=1
ENV GOPROXY=https://proxy.golang.org
ENV GOCACHE=/root/.cache/go-build
ENV GOMODCACHE=/go/pkg/mod
ARG TARGETPLATFORM
WORKDIR /go/src/github.com/gohugoio/hugo
# For --mount=type=cache the value of target is the default cache id, so
# for the go mod cache it would be good if we could share it with other Go images using the same setup,
# but the go build cache needs to be per platform.
# See this comment: https://github.com/moby/buildkit/issues/1706#issuecomment-702238282
RUN --mount=target=. \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build,id=go-build-$TARGETPLATFORM <<EOT
set -ex
xx-go build -tags "$HUGO_BUILD_TAGS" -ldflags "-s -w -X github.com/gohugoio/hugo/common/hugo.vendorInfo=docker" -o /usr/bin/hugo
xx-verify /usr/bin/hugo
EOT
# dart-sass downloads the dart-sass runtime dependency
FROM alpine:${ALPINE_VERSION} AS dart-sass
ARG TARGETARCH
ARG DART_SASS_VERSION
ARG DART_ARCH=${TARGETARCH/amd64/x64}
WORKDIR /out
ADD https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${DART_ARCH}.tar.gz .
RUN tar -xf dart-sass-${DART_SASS_VERSION}-linux-${DART_ARCH}.tar.gz
FROM gorun AS final
COPY --from=build /usr/bin/hugo /usr/bin/hugo
# libc6-compat are required for extended libraries (libsass, libwebp).
RUN apk add --no-cache \
libc6-compat \
git \
make && \
go get github.com/kardianos/govendor && \
govendor get github.com/gohugoio/hugo && \
cd $GOPATH/src/github.com/gohugoio/hugo && \
make install test && \
rm -rf $GOPATH/src/* && \
apk del .build-deps
runuser \
nodejs \
npm
USER hugo
RUN mkdir -p /var/hugo/bin /cache && \
addgroup -Sg 1000 hugo && \
adduser -Sg hugo -u 1000 -h /var/hugo hugo && \
chown -R hugo: /var/hugo /cache && \
# For the Hugo's Git integration to work.
runuser -u hugo -- git config --global --add safe.directory /project && \
# See https://github.com/gohugoio/hugo/issues/9810
runuser -u hugo -- git config --global core.quotepath false
WORKDIR /site
USER hugo:hugo
VOLUME /project
WORKDIR /project
ENV HUGO_CACHEDIR=/cache
ENV PATH="/var/hugo/bin:$PATH"
COPY scripts/docker/entrypoint.sh /entrypoint.sh
COPY --from=dart-sass /out/dart-sass /var/hugo/bin/dart-sass
# Update PATH to reflect the new dependencies.
# For more complex setups, we should probably find a way to
# delegate this to the script itself, but this will have to do for now.
# Also, the dart-sass binary is a little special, other binaries can be put/linked
# directly in /var/hugo/bin.
ENV PATH="/var/hugo/bin/dart-sass:$PATH"
# Expose port for live server
EXPOSE 1313
ENTRYPOINT ["/usr/bin/dumb-init", "--", "hugo"]
CMD [ "--help" ]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["--help"]

201
LICENSE Normal file
View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,194 +0,0 @@
Apache License
==============
_Version 2.0, January 2004_
_&lt;<http://www.apache.org/licenses/>&gt;_
### Terms and Conditions for use, reproduction, and distribution
#### 1. Definitions
“License” shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
“Licensor” shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
“Legal Entity” shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, “control” means **(i)** the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
outstanding shares, or **(iii)** beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising
permissions granted by this License.
“Source” form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
“Object” form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
“Work” shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as “Not a Contribution.”
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
#### 2. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
#### 3. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
#### 4. Redistribution
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
this License; and
* **(b)** You must cause any modified files to carry prominent notices stating that You
changed the files; and
* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
#### 5. Submission of Contributions
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
#### 6. Trademarks
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
#### 7. Disclaimer of Warranty
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
#### 8. Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
#### 9. Accepting Warranty or Additional Liability
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
_END OF TERMS AND CONDITIONS_
### APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets `[]` replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,83 +0,0 @@
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
PACKAGE = github.com/gohugoio/hugo
COMMIT_HASH = `git rev-parse --short HEAD 2>/dev/null`
BUILD_DATE = `date +%FT%T%z`
LDFLAGS = -ldflags "-X ${PACKAGE}/hugolib.CommitHash=${COMMIT_HASH} -X ${PACKAGE}/hugolib.BuildDate=${BUILD_DATE}"
NOGI_LDFLAGS = -ldflags "-X ${PACKAGE}/hugolib.BuildDate=${BUILD_DATE}"
.PHONY: vendor docker check fmt lint test test-race vet test-cover-html help
.DEFAULT_GOAL := help
vendor: ## Install govendor and sync Hugo's vendored dependencies
go get github.com/kardianos/govendor
govendor sync ${PACKAGE}
hugo: vendor ## Build hugo binary
go build ${LDFLAGS} ${PACKAGE}
hugo-race: vendor ## Build hugo binary with race detector enabled
go build -race ${LDFLAGS} ${PACKAGE}
install: vendor ## Install hugo binary
go install ${LDFLAGS} ${PACKAGE}
hugo-no-gitinfo: LDFLAGS = ${NOGI_LDFLAGS}
hugo-no-gitinfo: vendor hugo ## Build hugo without git info
docker: ## Build hugo Docker container
docker build -t hugo .
docker rm -f hugo-build || true
docker run --name hugo-build hugo ls /go/bin
docker cp hugo-build:/go/bin/hugo .
docker rm hugo-build
govendor: vendor # Deprecated: use "vendor" target
get: vendor # Deprecated: use "vendor"
gitinfo: hugo # Deprecated: use "hugo" target
install-gitinfo: install # Deprecated: use "install" target
no-git-info: hugo-no-gitinfo # Deprecated: use "hugo-no-gitinfo" target
check: test-race test386 fmt vet ## Run tests and linters
test386: ## Run tests in 32-bit mode
GOARCH=386 govendor test +local
test: ## Run tests
govendor test +local
test-race: ## Run tests with race detector
govendor test -race +local
fmt: ## Run gofmt linter
@for d in `govendor list -no-status +local | sed 's/github.com.gohugoio.hugo/./'` ; do \
if [ "`gofmt -l $$d/*.go | tee /dev/stderr`" ]; then \
echo "^ improperly formatted go files" && echo && exit 1; \
fi \
done
lint: ## Run golint linter
@for d in `govendor list -no-status +local | sed 's/github.com.gohugoio.hugo/./'` ; do \
if [ "`golint $$d | tee /dev/stderr`" ]; then \
echo "^ golint errors!" && echo && exit 1; \
fi \
done
vet: ## Run go vet linter
@if [ "`govendor vet +local | tee /dev/stderr`" ]; then \
echo "^ go vet errors!" && echo && exit 1; \
fi
test-cover-html: PACKAGES = $(shell govendor list -no-status +local | sed 's/github.com.gohugoio.hugo/./')
test-cover-html: ## Generate test coverage report
echo "mode: count" > coverage-all.out
$(foreach pkg,$(PACKAGES),\
govendor test -coverprofile=coverage.out -covermode=count $(pkg);\
tail -n +2 coverage.out >> coverage-all.out;)
go tool cover -html=coverage-all.out
check-vendor: ## Verify that vendored packages match git HEAD
@git diff-index --quiet HEAD vendor/ || (echo "check-vendor target failed: vendored packages out of sync" && echo && git diff vendor/ && exit 1)
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

320
README.md
View file

@ -1,106 +1,282 @@
![Hugo](https://raw.githubusercontent.com/gohugoio/hugoDocs/master/static/img/hugo-logo.png)
[bep]: https://github.com/bep
[bugs]: https://github.com/gohugoio/hugo/issues?q=is%3Aopen+is%3Aissue+label%3ABug
[contributing]: CONTRIBUTING.md
[create a proposal]: https://github.com/gohugoio/hugo/issues/new?labels=Proposal%2C+NeedsTriage&template=feature_request.md
[documentation repository]: https://github.com/gohugoio/hugoDocs
[documentation]: https://gohugo.io/documentation
[dragonfly bsd, freebsd, netbsd, and openbsd]: https://gohugo.io/installation/bsd
[features]: https://gohugo.io/about/features/
[forum]: https://discourse.gohugo.io
[friends]: https://github.com/gohugoio/hugo/graphs/contributors
[go]: https://go.dev/
[hugo modules]: https://gohugo.io/hugo-modules/
[installation]: https://gohugo.io/installation
[issue queue]: https://github.com/gohugoio/hugo/issues
[linux]: https://gohugo.io/installation/linux
[macos]: https://gohugo.io/installation/macos
[prebuilt binary]: https://github.com/gohugoio/hugo/releases/latest
[requesting help]: https://discourse.gohugo.io/t/requesting-help/9132
[spf13]: https://github.com/spf13
[static site generator]: https://en.wikipedia.org/wiki/Static_site_generator
[support]: https://discourse.gohugo.io
[themes]: https://themes.gohugo.io/
[website]: https://gohugo.io
[windows]: https://gohugo.io/installation/windows
A Fast and Flexible Static Site Generator built with love by [spf13](http://spf13.com/) and [friends](https://github.com/gohugoio/hugo/graphs/contributors) in [Go][].
<a href="https://gohugo.io/"><img src="https://raw.githubusercontent.com/gohugoio/gohugoioTheme/master/static/images/hugo-logo-wide.svg?sanitize=true" alt="Hugo" width="565"></a>
[Website](https://gohugo.io) |
[Forum](https://discourse.gohugo.io) |
[Developer Chat (no support)](https://gitter.im/gohugoio/hugo) |
[Documentation](https://gohugo.io/overview/introduction/) |
[Installation Guide](https://gohugo.io/overview/installing/) |
[Contribution Guide](CONTRIBUTING.md) |
[Twitter](http://twitter.com/gohugoio)
A fast and flexible static site generator built with love by [bep], [spf13], and [friends] in [Go].
---
[![GoDoc](https://godoc.org/github.com/gohugoio/hugo?status.svg)](https://godoc.org/github.com/gohugoio/hugo)
[![Linux and macOS Build Status](https://api.travis-ci.org/gohugoio/hugo.svg?branch=master&label=Linux+and+macOS+build "Linux and macOS Build Status")](https://travis-ci.org/gohugoio/hugo)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/a5mr220vsd091kua?svg=true&label=Windows+build "Windows Build Status")](https://ci.appveyor.com/project/bep/hugo/branch/master)
[![Dev chat at https://gitter.im/gohugoio/hugo](https://img.shields.io/badge/gitter-developer_chat-46bc99.svg)](https://gitter.im/spf13/hugo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Tests on Linux, MacOS and Windows](https://github.com/gohugoio/hugo/workflows/Test/badge.svg)](https://github.com/gohugoio/hugo/actions?query=workflow%3ATest)
[![Go Report Card](https://goreportcard.com/badge/github.com/gohugoio/hugo)](https://goreportcard.com/report/github.com/gohugoio/hugo)
[Website] | [Installation] | [Documentation] | [Support] | [Contributing] | <a rel="me" href="https://fosstodon.org/@gohugoio">Mastodon</a>
## Overview
Hugo is a static HTML and CSS website generator written in [Go][].
It is optimized for speed, easy use and configurability.
Hugo takes a directory with content and templates and renders them into a full HTML website.
Hugo is a [static site generator] written in [Go], optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a complete site in seconds, often less.
Hugo relies on Markdown files with front matter for meta data.
And you can run Hugo from any directory.
This works well for shared hosts and other systems where you dont have a privileged account.
Due to its flexible framework, multilingual support, and powerful taxonomy system, Hugo is widely used to create:
Hugo renders a typical website of moderate size in a fraction of a second.
A good rule of thumb is that each piece of content renders in around 1 millisecond.
- Corporate, government, nonprofit, education, news, event, and project sites
- Documentation sites
- Image portfolios
- Landing pages
- Business, professional, and personal blogs
- Resumes and CVs
Hugo is designed to work well for any kind of website including blogs, tumbles and docs.
Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. Then deploy the site to your host, or push changes to your Git provider for automated builds and deployment.
#### Supported Architectures
Hugo's fast asset pipelines include:
Currently, we provide pre-built Hugo binaries for Windows, Linux, FreeBSD, NetBSD and macOS (Darwin) and [Android](https://gist.github.com/bep/a0d8a26cf6b4f8bc992729b8e50b480b) for x64, i386 and ARM architectures.
- Image processing &ndash; Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data
- JavaScript bundling &ndash; Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing.
- Sass processing &ndash; Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS
- Tailwind CSS processing &ndash; Compile Tailwind CSS utility classes into standard CSS, bundle, tree shake, optimize, minify, perform SRI hashing, and integrate with PostCSS
Hugo may also be compiled from source wherever the Go compiler tool chain can run, e.g. for other operating systems including DragonFly BSD, OpenBSD, Plan&nbsp;9 and Solaris.
And with [Hugo Modules], you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories.
**Complete documentation is available at [Hugo Documentation][].**
See the [features] section of the documentation for a comprehensive summary of Hugo's capabilities.
## Choose How to Install
## Sponsors
If you want to use Hugo as your site generator, simply install the Hugo binaries.
The Hugo binaries have no external dependencies.
<p>&nbsp;</p>
<p float="left">
<a href="https://www.linode.com/?utm_campaign=hugosponsor&utm_medium=banner&utm_source=hugogithub" target="_blank"><img src="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/assets/images/sponsors/linode-logo_standard_light_medium.png" width="200" alt="Linode"></a>
&nbsp;&nbsp;&nbsp;
<a href="https://www.jetbrains.com/go/?utm_source=OSS&utm_medium=referral&utm_campaign=hugo" target="_blank"><img src="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/assets/images/sponsors/goland.svg" width="200" alt="The complete IDE crafted for professional Go developers."></a>
&nbsp;&nbsp;&nbsp;
<a href="https://pinme.eth.limo/?s=hugo" target="_blank"><img src="https://raw.githubusercontent.com/gohugoio/hugoDocs/master/assets/images/sponsors/logo-pinme.svg" width="200" alt="PinMe."></a>
</p>
To contribute to the Hugo source code or documentation, you should [fork the Hugo GitHub project](https://github.com/gohugoio/hugo#fork-destination-box) and clone it to your local machine.
## Editions
Finally, you can install the Hugo source code with `go`, build the binaries yourself, and run Hugo that way.
Building the binaries is an easy task for an experienced `go` getter.
Hugo is available in three editions: standard, extended, and extended/deploy. While the standard edition provides core functionality, the extended and extended/deploy editions offer advanced features.
### Install Hugo as Your Site Generator (Binary Install)
Feature|extended edition|extended/deploy edition
:--|:-:|:-:
Encode to the WebP format when [processing images]. You can decode WebP images with any edition.|:heavy_check_mark:|:heavy_check_mark:
[Transpile Sass to CSS] using the embedded LibSass transpiler. You can use the [Dart Sass] transpiler with any edition.|:heavy_check_mark:|:heavy_check_mark:
Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See&nbsp;[details].|:x:|:heavy_check_mark:
Use the [installation instructions in the Hugo documentation](https://gohugo.io/overview/installing/).
[dart sass]: https://gohugo.io/functions/css/sass/#dart-sass
[processing images]: https://gohugo.io/content-management/image-processing/
[transpile sass to css]: https://gohugo.io/functions/css/sass/
[details]: https://gohugo.io/hosting-and-deployment/hugo-deploy/
### Build and Install the Binaries from Source (Advanced Install)
Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition.
Add Hugo and its package dependencies to your go `src` directory.
## Installation
go get -v github.com/gohugoio/hugo
Install Hugo from a [prebuilt binary], package manager, or package repository. Please see the installation instructions for your operating system:
Once the `get` completes, you should find your new `hugo` (or `hugo.exe`) executable sitting inside `$GOPATH/bin/`.
- [macOS]
- [Linux]
- [Windows]
- [DragonFly BSD, FreeBSD, NetBSD, and OpenBSD]
To update Hugos dependencies, use `go get` with the `-u` option.
## Build from source
go get -u -v github.com/gohugoio/hugo
Prerequisites to build Hugo from source:
## Contributing to Hugo
- Standard edition: Go 1.23.0 or later
- Extended edition: Go 1.23.0 or later, and GCC
- Extended/deploy edition: Go 1.23.0 or later, and GCC
Build the standard edition:
```text
go install github.com/gohugoio/hugo@latest
```
Build the extended edition:
```text
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
```
Build the extended/deploy edition:
```text
CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest
```
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=gohugoio/hugo&type=Timeline)](https://star-history.com/#gohugoio/hugo&Timeline)
## Documentation
Hugo's [documentation] includes installation instructions, a quick start guide, conceptual explanations, reference information, and examples.
Please submit documentation issues and pull requests to the [documentation repository].
## Support
Please **do not use the issue queue** for questions or troubleshooting. Unless you are certain that your issue is a software defect, use the [forum].
Hugos [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
## Contributing
You can contribute to the Hugo project by:
- Answering questions on the [forum]
- Improving the [documentation]
- Monitoring the [issue queue]
- Creating or improving [themes]
- Squashing [bugs]
Please submit documentation issues and pull requests to the [documentation repository].
If you have an idea for an enhancement or new feature, create a new topic on the [forum] in the "Feature" category. This will help you to:
- Determine if the capability already exists
- Measure interest
- Refine the concept
If there is sufficient interest, [create a proposal]. Do not submit a pull request until the project lead accepts the proposal.
For a complete guide to contributing to Hugo, see the [Contribution Guide](CONTRIBUTING.md).
We welcome contributions to Hugo of any kind including documentation, themes,
organization, tutorials, blog posts, bug reports, issues, feature requests,
feature implementations, pull requests, answering questions on the forum,
helping to manage issues, etc.
## Dependencies
The Hugo community and maintainers are [very active](https://github.com/gohugoio/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity.
Hugo stands on the shoulders of great open source libraries. Run `hugo env --logLevel info` to display a list of dependencies.
### Asking Support Questions
<details>
<summary>See current dependencies</summary>
We have an active [discussion forum](https://discourse.gohugo.io) where users and developers can ask questions.
Please don't use the GitHub issue tracker to ask questions.
### Reporting Issues
If you believe you have found a defect in Hugo or its documentation, use
the GitHub issue tracker to report the problem to the Hugo maintainers.
If you're not sure if it's a bug or not, start by asking in the [discussion forum](https://discourse.gohugo.io).
When reporting the issue, please provide the version of Hugo in use (`hugo version`).
### Submitting Patches
The Hugo project welcomes all contributors and contributions regardless of skill or experience level.
If you are interested in helping with the project, we will help you with your contribution.
Hugo is a very active project with many contributions happening daily.
Because we want to create the best possible product for our users and the best contribution experience for our developers,
we have a set of guidelines which ensure that all contributions are acceptable.
The guidelines are not intended as a filter or barrier to participation.
If you are unfamiliar with the contribution process, the Hugo team will help you and teach you how to bring your contribution in accordance with the guidelines.
For a complete guide to contributing code to Hugo, see the [Contribution Guide](CONTRIBUTING.md).
[![Analytics](https://ga-beacon.appspot.com/UA-7131036-6/hugo/readme)](https://github.com/igrigorik/ga-beacon)
[Go]: https://golang.org/
[Hugo Documentation]: https://gohugo.io/overview/introduction/
```text
github.com/BurntSushi/locker="v0.0.0-20171006230638-a6e239ea1c69"
github.com/PuerkitoBio/goquery="v1.10.1"
github.com/alecthomas/chroma/v2="v2.15.0"
github.com/andybalholm/cascadia="v1.3.3"
github.com/armon/go-radix="v1.0.1-0.20221118154546-54df44f2176c"
github.com/bep/clocks="v0.5.0"
github.com/bep/debounce="v1.2.0"
github.com/bep/gitmap="v1.6.0"
github.com/bep/goat="v0.5.0"
github.com/bep/godartsass/v2="v2.3.2"
github.com/bep/golibsass="v1.2.0"
github.com/bep/gowebp="v0.3.0"
github.com/bep/imagemeta="v0.8.4"
github.com/bep/lazycache="v0.7.0"
github.com/bep/logg="v0.4.0"
github.com/bep/mclib="v1.20400.20402"
github.com/bep/overlayfs="v0.9.2"
github.com/bep/simplecobra="v0.5.0"
github.com/bep/tmc="v0.5.1"
github.com/cespare/xxhash/v2="v2.3.0"
github.com/clbanning/mxj/v2="v2.7.0"
github.com/cpuguy83/go-md2man/v2="v2.0.4"
github.com/disintegration/gift="v1.2.1"
github.com/dlclark/regexp2="v1.11.5"
github.com/dop251/goja="v0.0.0-20250125213203-5ef83b82af17"
github.com/evanw/esbuild="v0.24.2"
github.com/fatih/color="v1.18.0"
github.com/frankban/quicktest="v1.14.6"
github.com/fsnotify/fsnotify="v1.8.0"
github.com/getkin/kin-openapi="v0.129.0"
github.com/ghodss/yaml="v1.0.0"
github.com/go-openapi/jsonpointer="v0.21.0"
github.com/go-openapi/swag="v0.23.0"
github.com/go-sourcemap/sourcemap="v2.1.4+incompatible"
github.com/gobuffalo/flect="v1.0.3"
github.com/gobwas/glob="v0.2.3"
github.com/gohugoio/go-i18n/v2="v2.1.3-0.20230805085216-e63c13218d0e"
github.com/gohugoio/hashstructure="v0.5.0"
github.com/gohugoio/httpcache="v0.7.0"
github.com/gohugoio/hugo-goldmark-extensions/extras="v0.2.0"
github.com/gohugoio/hugo-goldmark-extensions/passthrough="v0.3.0"
github.com/gohugoio/locales="v0.14.0"
github.com/gohugoio/localescompressed="v1.0.1"
github.com/golang/freetype="v0.0.0-20170609003504-e2365dfdc4a0"
github.com/google/go-cmp="v0.6.0"
github.com/google/pprof="v0.0.0-20250208200701-d0013a598941"
github.com/gorilla/websocket="v1.5.3"
github.com/hairyhenderson/go-codeowners="v0.7.0"
github.com/hashicorp/golang-lru/v2="v2.0.7"
github.com/jdkato/prose="v1.2.1"
github.com/josharian/intern="v1.0.0"
github.com/kr/pretty="v0.3.1"
github.com/kr/text="v0.2.0"
github.com/kyokomi/emoji/v2="v2.2.13"
github.com/lucasb-eyer/go-colorful="v1.2.0"
github.com/mailru/easyjson="v0.7.7"
github.com/makeworld-the-better-one/dither/v2="v2.4.0"
github.com/marekm4/color-extractor="v1.2.1"
github.com/mattn/go-colorable="v0.1.13"
github.com/mattn/go-isatty="v0.0.20"
github.com/mattn/go-runewidth="v0.0.9"
github.com/mazznoer/csscolorparser="v0.1.5"
github.com/mitchellh/mapstructure="v1.5.1-0.20231216201459-8508981c8b6c"
github.com/mohae/deepcopy="v0.0.0-20170929034955-c48cc78d4826"
github.com/muesli/smartcrop="v0.3.0"
github.com/niklasfasching/go-org="v1.7.0"
github.com/oasdiff/yaml3="v0.0.0-20241210130736-a94c01f36349"
github.com/oasdiff/yaml="v0.0.0-20241210131133-6b86fb107d80"
github.com/olekukonko/tablewriter="v0.0.5"
github.com/pbnjay/memory="v0.0.0-20210728143218-7b4eea64cf58"
github.com/pelletier/go-toml/v2="v2.2.3"
github.com/perimeterx/marshmallow="v1.1.5"
github.com/pkg/browser="v0.0.0-20240102092130-5ac0b6a4141c"
github.com/pkg/errors="v0.9.1"
github.com/rivo/uniseg="v0.4.7"
github.com/rogpeppe/go-internal="v1.13.1"
github.com/russross/blackfriday/v2="v2.1.0"
github.com/sass/libsass="3.6.6"
github.com/spf13/afero="v1.11.0"
github.com/spf13/cast="v1.7.1"
github.com/spf13/cobra="v1.8.1"
github.com/spf13/fsync="v0.10.1"
github.com/spf13/pflag="v1.0.6"
github.com/tdewolff/minify/v2="v2.20.37"
github.com/tdewolff/parse/v2="v2.7.15"
github.com/tetratelabs/wazero="v1.8.2"
github.com/webmproject/libwebp="v1.3.2"
github.com/yuin/goldmark-emoji="v1.0.4"
github.com/yuin/goldmark="v1.7.8"
go.uber.org/automaxprocs="v1.5.3"
golang.org/x/crypto="v0.33.0"
golang.org/x/exp="v0.0.0-20250210185358-939b2ce775ac"
golang.org/x/image="v0.24.0"
golang.org/x/mod="v0.23.0"
golang.org/x/net="v0.35.0"
golang.org/x/sync="v0.11.0"
golang.org/x/sys="v0.30.0"
golang.org/x/text="v0.22.0"
golang.org/x/tools="v0.30.0"
golang.org/x/xerrors="v0.0.0-20240903120638-7835f813f4da"
gonum.org/v1/plot="v0.15.0"
google.golang.org/protobuf="v1.36.5"
gopkg.in/yaml.v2="v2.4.0"
gopkg.in/yaml.v3="v3.0.1"
oss.terrastruct.com/d2="v0.6.9"
oss.terrastruct.com/util-go="v0.0.0-20241005222610-44c011a04896"
rsc.io/qr="v0.2.0"
software.sslmate.com/src/go-pkcs12="v0.2.0"
```
</details>

7
SECURITY.md Normal file
View file

@ -0,0 +1,7 @@
## Security Policy
### Reporting a Vulnerability
Please report (suspected) security vulnerabilities to **[bjorn.erik.pedersen@gmail.com](mailto:bjorn.erik.pedersen@gmail.com)**. You will receive a response from us within 48 hours. If we can confirm the issue, we will release a patch as soon as possible depending on the complexity of the issue but historically within days.
Also see [Hugo's Security Model](https://gohugo.io/about/security/).

View file

@ -1,17 +0,0 @@
init:
- copy c:\MinGW\bin\mingw32-make.exe c:\MinGW\bin\make.exe
- set PATH=%PATH%;C:\MinGW\bin;%GOPATH%\bin
- go version
- go env
# clones and cd's to path
clone_folder: C:\GOPATH\src\github.com\gohugoio\hugo
install:
- gem install asciidoctor
- pip install docutils
build_script:
- make hugo-race check
- hugo -s docs/
- hugo --renderToMemory -s docs/

View file

@ -1,35 +0,0 @@
#!/usr/bin/env bash
# Convenience script to
# - For a given branch
# - Run benchmark tests for a given package
# - Do the same for master
# - then compare the two runs with benchcmp
benchFilter=".*"
if (( $# < 2 ));
then
echo "USAGE: ./bench.sh <git-branch> <package-to-bench> (and <benchmark filter> (regexp, optional))"
exit 1
fi
if [ $# -eq 3 ]; then
benchFilter=$3
fi
BRANCH=$1
PACKAGE=$2
git checkout $BRANCH
go test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-$BRANCH.txt
git checkout master
go test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-master.txt
benchcmp /tmp/bench-$PACKAGE-master.txt /tmp/bench-$PACKAGE-$BRANCH.txt

View file

@ -1,9 +0,0 @@
#!/bin/bash
# Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'.
# Note the quotes, which will be needed for more complex expressions.
# The above will run all variations, but only for front matter YAML.
echo "Running with BenchmarkSiteBuilding/${1}"
go test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof

View file

@ -20,7 +20,7 @@ import (
)
var bufferPool = &sync.Pool{
New: func() interface{} {
New: func() any {
return &bytes.Buffer{}
},
}

View file

@ -14,14 +14,18 @@
package bufferpool
import (
"github.com/stretchr/testify/assert"
"testing"
qt "github.com/frankban/quicktest"
)
func TestBufferPool(t *testing.T) {
c := qt.New(t)
buff := GetBuffer()
buff.WriteString("do be do be do")
assert.Equal(t, "do be do be do", buff.String())
c.Assert(buff.String(), qt.Equals, "do be do be do")
PutBuffer(buff)
assert.Equal(t, 0, buff.Len())
c.Assert(buff.Len(), qt.Equals, 0)
}

2
cache/docs.go vendored Normal file
View file

@ -0,0 +1,2 @@
// Package cache contains the different cache implementations.
package cache

647
cache/dynacache/dynacache.go vendored Normal file
View file

@ -0,0 +1,647 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package dynacache
import (
"context"
"fmt"
"math"
"path"
"regexp"
"runtime"
"sync"
"time"
"github.com/bep/lazycache"
"github.com/bep/logg"
"github.com/gohugoio/hugo/common/collections"
"github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/common/rungroup"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/resources/resource"
)
const minMaxSize = 10
type KeyIdentity struct {
Key any
Identity identity.Identity
}
// New creates a new cache.
func New(opts Options) *Cache {
if opts.CheckInterval == 0 {
opts.CheckInterval = time.Second * 2
}
if opts.MaxSize == 0 {
opts.MaxSize = 100000
}
if opts.Log == nil {
panic("nil Log")
}
if opts.MinMaxSize == 0 {
opts.MinMaxSize = 30
}
stats := &stats{
opts: opts,
adjustmentFactor: 1.0,
currentMaxSize: opts.MaxSize,
availableMemory: config.GetMemoryLimit(),
}
infol := opts.Log.InfoCommand("dynacache")
evictedIdentities := collections.NewStack[KeyIdentity]()
onEvict := func(k, v any) {
if !opts.Watching {
return
}
identity.WalkIdentitiesShallow(v, func(level int, id identity.Identity) bool {
evictedIdentities.Push(KeyIdentity{Key: k, Identity: id})
return false
})
resource.MarkStale(v)
}
c := &Cache{
partitions: make(map[string]PartitionManager),
onEvict: onEvict,
evictedIdentities: evictedIdentities,
opts: opts,
stats: stats,
infol: infol,
}
c.stop = c.start()
return c
}
// Options for the cache.
type Options struct {
Log loggers.Logger
CheckInterval time.Duration
MaxSize int
MinMaxSize int
Watching bool
}
// Options for a partition.
type OptionsPartition struct {
// When to clear the this partition.
ClearWhen ClearWhen
// Weight is a number between 1 and 100 that indicates how, in general, how big this partition may get.
Weight int
}
func (o OptionsPartition) WeightFraction() float64 {
return float64(o.Weight) / 100
}
func (o OptionsPartition) CalculateMaxSize(maxSizePerPartition int) int {
return int(math.Floor(float64(maxSizePerPartition) * o.WeightFraction()))
}
// A dynamic partitioned cache.
type Cache struct {
mu sync.RWMutex
partitions map[string]PartitionManager
onEvict func(k, v any)
evictedIdentities *collections.Stack[KeyIdentity]
opts Options
infol logg.LevelLogger
stats *stats
stopOnce sync.Once
stop func()
}
// DrainEvictedIdentities drains the evicted identities from the cache.
func (c *Cache) DrainEvictedIdentities() []KeyIdentity {
return c.evictedIdentities.Drain()
}
// DrainEvictedIdentitiesMatching drains the evicted identities from the cache that match the given predicate.
func (c *Cache) DrainEvictedIdentitiesMatching(predicate func(KeyIdentity) bool) []KeyIdentity {
return c.evictedIdentities.DrainMatching(predicate)
}
// ClearMatching clears all partition for which the predicate returns true.
func (c *Cache) ClearMatching(predicatePartition func(k string, p PartitionManager) bool, predicateValue func(k, v any) bool) {
if predicatePartition == nil {
predicatePartition = func(k string, p PartitionManager) bool { return true }
}
if predicateValue == nil {
panic("nil predicateValue")
}
g := rungroup.Run[PartitionManager](context.Background(), rungroup.Config[PartitionManager]{
NumWorkers: len(c.partitions),
Handle: func(ctx context.Context, partition PartitionManager) error {
partition.clearMatching(predicateValue)
return nil
},
})
for k, p := range c.partitions {
if !predicatePartition(k, p) {
continue
}
g.Enqueue(p)
}
g.Wait()
}
// ClearOnRebuild prepares the cache for a new rebuild taking the given changeset into account.
// predicate is optional and will clear any entry for which it returns true.
func (c *Cache) ClearOnRebuild(predicate func(k, v any) bool, changeset ...identity.Identity) {
g := rungroup.Run[PartitionManager](context.Background(), rungroup.Config[PartitionManager]{
NumWorkers: len(c.partitions),
Handle: func(ctx context.Context, partition PartitionManager) error {
partition.clearOnRebuild(predicate, changeset...)
return nil
},
})
for _, p := range c.partitions {
g.Enqueue(p)
}
g.Wait()
// Clear any entries marked as stale above.
g = rungroup.Run[PartitionManager](context.Background(), rungroup.Config[PartitionManager]{
NumWorkers: len(c.partitions),
Handle: func(ctx context.Context, partition PartitionManager) error {
partition.clearStale()
return nil
},
})
for _, p := range c.partitions {
g.Enqueue(p)
}
g.Wait()
}
type keysProvider interface {
Keys() []string
}
// Keys returns a list of keys in all partitions.
func (c *Cache) Keys(predicate func(s string) bool) []string {
if predicate == nil {
predicate = func(s string) bool { return true }
}
var keys []string
for pn, g := range c.partitions {
pkeys := g.(keysProvider).Keys()
for _, k := range pkeys {
p := path.Join(pn, k)
if predicate(p) {
keys = append(keys, p)
}
}
}
return keys
}
func calculateMaxSizePerPartition(maxItemsTotal, totalWeightQuantity, numPartitions int) int {
if numPartitions == 0 {
panic("numPartitions must be > 0")
}
if totalWeightQuantity == 0 {
panic("totalWeightQuantity must be > 0")
}
avgWeight := float64(totalWeightQuantity) / float64(numPartitions)
return int(math.Floor(float64(maxItemsTotal) / float64(numPartitions) * (100.0 / avgWeight)))
}
// Stop stops the cache.
func (c *Cache) Stop() {
c.stopOnce.Do(func() {
c.stop()
})
}
func (c *Cache) adjustCurrentMaxSize() {
c.mu.RLock()
defer c.mu.RUnlock()
if len(c.partitions) == 0 {
return
}
var m runtime.MemStats
runtime.ReadMemStats(&m)
s := c.stats
s.memstatsCurrent = m
// fmt.Printf("\n\nAvailable = %v\nAlloc = %v\nTotalAlloc = %v\nSys = %v\nNumGC = %v\nMaxSize = %d\nAdjustmentFactor=%f\n\n", helpers.FormatByteCount(s.availableMemory), helpers.FormatByteCount(m.Alloc), helpers.FormatByteCount(m.TotalAlloc), helpers.FormatByteCount(m.Sys), m.NumGC, c.stats.currentMaxSize, s.adjustmentFactor)
if s.availableMemory >= s.memstatsCurrent.Alloc {
if s.adjustmentFactor <= 1.0 {
s.adjustmentFactor += 0.2
}
} else {
// We're low on memory.
s.adjustmentFactor -= 0.4
}
if s.adjustmentFactor <= 0 {
s.adjustmentFactor = 0.05
}
if !s.adjustCurrentMaxSize() {
return
}
totalWeight := 0
for _, pm := range c.partitions {
totalWeight += pm.getOptions().Weight
}
maxSizePerPartition := calculateMaxSizePerPartition(c.stats.currentMaxSize, totalWeight, len(c.partitions))
evicted := 0
for _, p := range c.partitions {
evicted += p.adjustMaxSize(p.getOptions().CalculateMaxSize(maxSizePerPartition))
}
if evicted > 0 {
c.infol.
WithFields(
logg.Fields{
{Name: "evicted", Value: evicted},
{Name: "numGC", Value: m.NumGC},
{Name: "limit", Value: helpers.FormatByteCount(c.stats.availableMemory)},
{Name: "alloc", Value: helpers.FormatByteCount(m.Alloc)},
{Name: "totalAlloc", Value: helpers.FormatByteCount(m.TotalAlloc)},
},
).Logf("adjusted partitions' max size")
}
}
func (c *Cache) start() func() {
ticker := time.NewTicker(c.opts.CheckInterval)
quit := make(chan struct{})
go func() {
for {
select {
case <-ticker.C:
c.adjustCurrentMaxSize()
// Reset the ticker to avoid drift.
ticker.Reset(c.opts.CheckInterval)
case <-quit:
ticker.Stop()
return
}
}
}()
return func() {
close(quit)
}
}
var partitionNameRe = regexp.MustCompile(`^\/[a-zA-Z0-9]{4}(\/[a-zA-Z0-9]+)?(\/[a-zA-Z0-9]+)?`)
// GetOrCreatePartition gets or creates a partition with the given name.
func GetOrCreatePartition[K comparable, V any](c *Cache, name string, opts OptionsPartition) *Partition[K, V] {
if c == nil {
panic("nil Cache")
}
if opts.Weight < 1 || opts.Weight > 100 {
panic("invalid Weight, must be between 1 and 100")
}
if partitionNameRe.FindString(name) != name {
panic(fmt.Sprintf("invalid partition name %q", name))
}
c.mu.RLock()
p, found := c.partitions[name]
c.mu.RUnlock()
if found {
return p.(*Partition[K, V])
}
c.mu.Lock()
defer c.mu.Unlock()
// Double check.
p, found = c.partitions[name]
if found {
return p.(*Partition[K, V])
}
// At this point, we don't know the number of partitions or their configuration, but
// this will be re-adjusted later.
const numberOfPartitionsEstimate = 10
maxSize := opts.CalculateMaxSize(c.opts.MaxSize / numberOfPartitionsEstimate)
onEvict := func(k K, v V) {
c.onEvict(k, v)
}
// Create a new partition and cache it.
partition := &Partition[K, V]{
c: lazycache.New(lazycache.Options[K, V]{MaxEntries: maxSize, OnEvict: onEvict}),
maxSize: maxSize,
trace: c.opts.Log.Logger().WithLevel(logg.LevelTrace).WithField("partition", name),
opts: opts,
}
c.partitions[name] = partition
return partition
}
// Partition is a partition in the cache.
type Partition[K comparable, V any] struct {
c *lazycache.Cache[K, V]
zero V
trace logg.LevelLogger
opts OptionsPartition
maxSize int
}
// GetOrCreate gets or creates a value for the given key.
func (p *Partition[K, V]) GetOrCreate(key K, create func(key K) (V, error)) (V, error) {
v, err := p.doGetOrCreate(key, create)
if err != nil {
return p.zero, err
}
if resource.StaleVersion(v) > 0 {
p.c.Delete(key)
return p.doGetOrCreate(key, create)
}
return v, err
}
func (p *Partition[K, V]) doGetOrCreate(key K, create func(key K) (V, error)) (V, error) {
v, _, err := p.c.GetOrCreate(key, create)
return v, err
}
func (p *Partition[K, V]) GetOrCreateWitTimeout(key K, duration time.Duration, create func(key K) (V, error)) (V, error) {
v, err := p.doGetOrCreateWitTimeout(key, duration, create)
if err != nil {
return p.zero, err
}
if resource.StaleVersion(v) > 0 {
p.c.Delete(key)
return p.doGetOrCreateWitTimeout(key, duration, create)
}
return v, err
}
// GetOrCreateWitTimeout gets or creates a value for the given key and times out if the create function
// takes too long.
func (p *Partition[K, V]) doGetOrCreateWitTimeout(key K, duration time.Duration, create func(key K) (V, error)) (V, error) {
resultch := make(chan V, 1)
errch := make(chan error, 1)
go func() {
var (
v V
err error
)
defer func() {
if r := recover(); r != nil {
if rerr, ok := r.(error); ok {
err = rerr
} else {
err = fmt.Errorf("panic: %v", r)
}
}
if err != nil {
errch <- err
} else {
resultch <- v
}
}()
v, _, err = p.c.GetOrCreate(key, create)
}()
select {
case v := <-resultch:
return v, nil
case err := <-errch:
return p.zero, err
case <-time.After(duration):
return p.zero, &herrors.TimeoutError{
Duration: duration,
}
}
}
func (p *Partition[K, V]) clearMatching(predicate func(k, v any) bool) {
p.c.DeleteFunc(func(key K, v V) bool {
if predicate(key, v) {
p.trace.Log(
logg.StringFunc(
func() string {
return fmt.Sprintf("clearing cache key %v", key)
},
),
)
return true
}
return false
})
}
func (p *Partition[K, V]) clearOnRebuild(predicate func(k, v any) bool, changeset ...identity.Identity) {
if predicate == nil {
predicate = func(k, v any) bool {
return false
}
}
opts := p.getOptions()
if opts.ClearWhen == ClearNever {
return
}
if opts.ClearWhen == ClearOnRebuild {
// Clear all.
p.Clear()
return
}
depsFinder := identity.NewFinder(identity.FinderConfig{})
shouldDelete := func(key K, v V) bool {
// We always clear elements marked as stale.
if resource.StaleVersion(v) > 0 {
return true
}
// Now check if this entry has changed based on the changeset
// based on filesystem events.
if len(changeset) == 0 {
// Nothing changed.
return false
}
var probablyDependent bool
identity.WalkIdentitiesShallow(v, func(level int, id2 identity.Identity) bool {
for _, id := range changeset {
if r := depsFinder.Contains(id, id2, -1); r > 0 {
// It's probably dependent, evict from cache.
probablyDependent = true
return true
}
}
return false
})
return probablyDependent
}
// First pass.
// Second pass needs to be done in a separate loop to catch any
// elements marked as stale in the other partitions.
p.c.DeleteFunc(func(key K, v V) bool {
if predicate(key, v) || shouldDelete(key, v) {
p.trace.Log(
logg.StringFunc(
func() string {
return fmt.Sprintf("first pass: clearing cache key %v", key)
},
),
)
return true
}
return false
})
}
func (p *Partition[K, V]) Keys() []K {
var keys []K
p.c.DeleteFunc(func(key K, v V) bool {
keys = append(keys, key)
return false
})
return keys
}
func (p *Partition[K, V]) clearStale() {
p.c.DeleteFunc(func(key K, v V) bool {
staleVersion := resource.StaleVersion(v)
if staleVersion > 0 {
p.trace.Log(
logg.StringFunc(
func() string {
return fmt.Sprintf("second pass: clearing cache key %v", key)
},
),
)
}
return staleVersion > 0
})
}
// adjustMaxSize adjusts the max size of the and returns the number of items evicted.
func (p *Partition[K, V]) adjustMaxSize(newMaxSize int) int {
if newMaxSize < minMaxSize {
newMaxSize = minMaxSize
}
oldMaxSize := p.maxSize
if newMaxSize == oldMaxSize {
return 0
}
p.maxSize = newMaxSize
// fmt.Println("Adjusting max size of partition from", oldMaxSize, "to", newMaxSize)
return p.c.Resize(newMaxSize)
}
func (p *Partition[K, V]) getMaxSize() int {
return p.maxSize
}
func (p *Partition[K, V]) getOptions() OptionsPartition {
return p.opts
}
func (p *Partition[K, V]) Clear() {
p.c.DeleteFunc(func(key K, v V) bool {
return true
})
}
func (p *Partition[K, V]) Get(ctx context.Context, key K) (V, bool) {
return p.c.Get(key)
}
type PartitionManager interface {
adjustMaxSize(addend int) int
getMaxSize() int
getOptions() OptionsPartition
clearOnRebuild(predicate func(k, v any) bool, changeset ...identity.Identity)
clearMatching(predicate func(k, v any) bool)
clearStale()
}
const (
ClearOnRebuild ClearWhen = iota + 1
ClearOnChange
ClearNever
)
type ClearWhen int
type stats struct {
opts Options
memstatsCurrent runtime.MemStats
currentMaxSize int
availableMemory uint64
adjustmentFactor float64
}
func (s *stats) adjustCurrentMaxSize() bool {
newCurrentMaxSize := int(math.Floor(float64(s.opts.MaxSize) * s.adjustmentFactor))
if newCurrentMaxSize < s.opts.MinMaxSize {
newCurrentMaxSize = int(s.opts.MinMaxSize)
}
changed := newCurrentMaxSize != s.currentMaxSize
s.currentMaxSize = newCurrentMaxSize
return changed
}
// CleanKey turns s into a format suitable for a cache key for this package.
// The key will be a Unix-styled path with a leading slash but no trailing slash.
func CleanKey(s string) string {
return path.Clean(paths.ToSlashPreserveLeading(s))
}

230
cache/dynacache/dynacache_test.go vendored Normal file
View file

@ -0,0 +1,230 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package dynacache
import (
"errors"
"fmt"
"path/filepath"
"testing"
"time"
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/resources/resource"
)
var (
_ resource.StaleInfo = (*testItem)(nil)
_ identity.Identity = (*testItem)(nil)
)
type testItem struct {
name string
staleVersion uint32
}
func (t testItem) StaleVersion() uint32 {
return t.staleVersion
}
func (t testItem) IdentifierBase() string {
return t.name
}
func TestCache(t *testing.T) {
t.Parallel()
c := qt.New(t)
cache := New(Options{
Log: loggers.NewDefault(),
})
c.Cleanup(func() {
cache.Stop()
})
opts := OptionsPartition{Weight: 30}
c.Assert(cache, qt.Not(qt.IsNil))
p1 := GetOrCreatePartition[string, testItem](cache, "/aaaa/bbbb", opts)
c.Assert(p1, qt.Not(qt.IsNil))
p2 := GetOrCreatePartition[string, testItem](cache, "/aaaa/bbbb", opts)
c.Assert(func() { GetOrCreatePartition[string, testItem](cache, "foo bar", opts) }, qt.PanicMatches, ".*invalid partition name.*")
c.Assert(func() { GetOrCreatePartition[string, testItem](cache, "/aaaa/cccc", OptionsPartition{Weight: 1234}) }, qt.PanicMatches, ".*invalid Weight.*")
c.Assert(p2, qt.Equals, p1)
p3 := GetOrCreatePartition[string, testItem](cache, "/aaaa/cccc", opts)
c.Assert(p3, qt.Not(qt.IsNil))
c.Assert(p3, qt.Not(qt.Equals), p1)
c.Assert(func() { New(Options{}) }, qt.PanicMatches, ".*nil Log.*")
}
func TestCalculateMaxSizePerPartition(t *testing.T) {
t.Parallel()
c := qt.New(t)
c.Assert(calculateMaxSizePerPartition(1000, 500, 5), qt.Equals, 200)
c.Assert(calculateMaxSizePerPartition(1000, 250, 5), qt.Equals, 400)
c.Assert(func() { calculateMaxSizePerPartition(1000, 250, 0) }, qt.PanicMatches, ".*must be > 0.*")
c.Assert(func() { calculateMaxSizePerPartition(1000, 0, 1) }, qt.PanicMatches, ".*must be > 0.*")
}
func TestCleanKey(t *testing.T) {
c := qt.New(t)
c.Assert(CleanKey("a/b/c"), qt.Equals, "/a/b/c")
c.Assert(CleanKey("/a/b/c"), qt.Equals, "/a/b/c")
c.Assert(CleanKey("a/b/c/"), qt.Equals, "/a/b/c")
c.Assert(CleanKey(filepath.FromSlash("/a/b/c/")), qt.Equals, "/a/b/c")
}
func newTestCache(t *testing.T) *Cache {
cache := New(
Options{
Log: loggers.NewDefault(),
},
)
p1 := GetOrCreatePartition[string, testItem](cache, "/aaaa/bbbb", OptionsPartition{Weight: 30, ClearWhen: ClearOnRebuild})
p2 := GetOrCreatePartition[string, testItem](cache, "/aaaa/cccc", OptionsPartition{Weight: 30, ClearWhen: ClearOnChange})
p1.GetOrCreate("clearOnRebuild", func(string) (testItem, error) {
return testItem{}, nil
})
p2.GetOrCreate("clearBecauseStale", func(string) (testItem, error) {
return testItem{
staleVersion: 32,
}, nil
})
p2.GetOrCreate("clearBecauseIdentityChanged", func(string) (testItem, error) {
return testItem{
name: "changed",
}, nil
})
p2.GetOrCreate("clearNever", func(string) (testItem, error) {
return testItem{
staleVersion: 0,
}, nil
})
t.Cleanup(func() {
cache.Stop()
})
return cache
}
func TestClear(t *testing.T) {
t.Parallel()
c := qt.New(t)
predicateAll := func(string) bool {
return true
}
cache := newTestCache(t)
c.Assert(cache.Keys(predicateAll), qt.HasLen, 4)
cache.ClearOnRebuild(nil)
// Stale items are always cleared.
c.Assert(cache.Keys(predicateAll), qt.HasLen, 2)
cache = newTestCache(t)
cache.ClearOnRebuild(nil, identity.StringIdentity("changed"))
c.Assert(cache.Keys(nil), qt.HasLen, 1)
cache = newTestCache(t)
cache.ClearMatching(nil, func(k, v any) bool {
return k.(string) == "clearOnRebuild"
})
c.Assert(cache.Keys(predicateAll), qt.HasLen, 3)
cache.adjustCurrentMaxSize()
}
func TestPanicInCreate(t *testing.T) {
t.Parallel()
c := qt.New(t)
cache := newTestCache(t)
p1 := GetOrCreatePartition[string, testItem](cache, "/aaaa/bbbb", OptionsPartition{Weight: 30, ClearWhen: ClearOnRebuild})
willPanic := func(i int) func() {
return func() {
p1.GetOrCreate(fmt.Sprintf("panic-%d", i), func(key string) (testItem, error) {
panic(errors.New(key))
})
}
}
// GetOrCreateWitTimeout needs to recover from panics in the create func.
willErr := func(i int) error {
_, err := p1.GetOrCreateWitTimeout(fmt.Sprintf("error-%d", i), 10*time.Second, func(key string) (testItem, error) {
return testItem{}, errors.New(key)
})
return err
}
for i := range 3 {
for range 3 {
c.Assert(willPanic(i), qt.PanicMatches, fmt.Sprintf("panic-%d", i))
c.Assert(willErr(i), qt.ErrorMatches, fmt.Sprintf("error-%d", i))
}
}
// Test the same keys again without the panic.
for i := range 3 {
for range 3 {
v, err := p1.GetOrCreate(fmt.Sprintf("panic-%d", i), func(key string) (testItem, error) {
return testItem{
name: key,
}, nil
})
c.Assert(err, qt.IsNil)
c.Assert(v.name, qt.Equals, fmt.Sprintf("panic-%d", i))
v, err = p1.GetOrCreateWitTimeout(fmt.Sprintf("error-%d", i), 10*time.Second, func(key string) (testItem, error) {
return testItem{
name: key,
}, nil
})
c.Assert(err, qt.IsNil)
c.Assert(v.name, qt.Equals, fmt.Sprintf("error-%d", i))
}
}
}
func TestAdjustCurrentMaxSize(t *testing.T) {
t.Parallel()
c := qt.New(t)
cache := newTestCache(t)
alloc := cache.stats.memstatsCurrent.Alloc
cache.adjustCurrentMaxSize()
c.Assert(cache.stats.memstatsCurrent.Alloc, qt.Not(qt.Equals), alloc)
}

496
cache/filecache/filecache.go vendored Normal file
View file

@ -0,0 +1,496 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package filecache
import (
"bytes"
"errors"
"io"
"os"
"path/filepath"
"strings"
"sync"
"time"
"github.com/gohugoio/httpcache"
"github.com/gohugoio/hugo/common/hugio"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/helpers"
"github.com/BurntSushi/locker"
"github.com/spf13/afero"
)
// ErrFatal can be used to signal an unrecoverable error.
var ErrFatal = errors.New("fatal filecache error")
const (
FilecacheRootDirname = "filecache"
)
// Cache caches a set of files in a directory. This is usually a file on
// disk, but since this is backed by an Afero file system, it can be anything.
type Cache struct {
Fs afero.Fs
// Max age for items in this cache. Negative duration means forever,
// 0 is effectively turning this cache off.
maxAge time.Duration
// When set, we just remove this entire root directory on expiration.
pruneAllRootDir string
nlocker *lockTracker
initOnce sync.Once
initErr error
}
type lockTracker struct {
seenMu sync.RWMutex
seen map[string]struct{}
*locker.Locker
}
// Lock tracks the ids in use. We use this information to do garbage collection
// after a Hugo build.
func (l *lockTracker) Lock(id string) {
l.seenMu.RLock()
if _, seen := l.seen[id]; !seen {
l.seenMu.RUnlock()
l.seenMu.Lock()
l.seen[id] = struct{}{}
l.seenMu.Unlock()
} else {
l.seenMu.RUnlock()
}
l.Locker.Lock(id)
}
// ItemInfo contains info about a cached file.
type ItemInfo struct {
// This is the file's name relative to the cache's filesystem.
Name string
}
// NewCache creates a new file cache with the given filesystem and max age.
func NewCache(fs afero.Fs, maxAge time.Duration, pruneAllRootDir string) *Cache {
return &Cache{
Fs: fs,
nlocker: &lockTracker{Locker: locker.NewLocker(), seen: make(map[string]struct{})},
maxAge: maxAge,
pruneAllRootDir: pruneAllRootDir,
}
}
// lockedFile is a file with a lock that is released on Close.
type lockedFile struct {
afero.File
unlock func()
}
func (l *lockedFile) Close() error {
defer l.unlock()
return l.File.Close()
}
func (c *Cache) init() error {
c.initOnce.Do(func() {
// Create the base dir if it does not exist.
if err := c.Fs.MkdirAll("", 0o777); err != nil && !os.IsExist(err) {
c.initErr = err
}
})
return c.initErr
}
// WriteCloser returns a transactional writer into the cache.
// It's important that it's closed when done.
func (c *Cache) WriteCloser(id string) (ItemInfo, io.WriteCloser, error) {
if err := c.init(); err != nil {
return ItemInfo{}, nil, err
}
id = cleanID(id)
c.nlocker.Lock(id)
info := ItemInfo{Name: id}
f, err := helpers.OpenFileForWriting(c.Fs, id)
if err != nil {
c.nlocker.Unlock(id)
return info, nil, err
}
return info, &lockedFile{
File: f,
unlock: func() { c.nlocker.Unlock(id) },
}, nil
}
// ReadOrCreate tries to lookup the file in cache.
// If found, it is passed to read and then closed.
// If not found a new file is created and passed to create, which should close
// it when done.
func (c *Cache) ReadOrCreate(id string,
read func(info ItemInfo, r io.ReadSeeker) error,
create func(info ItemInfo, w io.WriteCloser) error,
) (info ItemInfo, err error) {
if err := c.init(); err != nil {
return ItemInfo{}, err
}
id = cleanID(id)
c.nlocker.Lock(id)
defer c.nlocker.Unlock(id)
info = ItemInfo{Name: id}
if r := c.getOrRemove(id); r != nil {
err = read(info, r)
defer r.Close()
if err == nil || err == ErrFatal {
// See https://github.com/gohugoio/hugo/issues/6401
// To recover from file corruption we handle read errors
// as the cache item was not found.
// Any file permission issue will also fail in the next step.
return
}
}
f, err := helpers.OpenFileForWriting(c.Fs, id)
if err != nil {
return
}
err = create(info, f)
return
}
// NamedLock locks the given id. The lock is released when the returned function is called.
func (c *Cache) NamedLock(id string) func() {
id = cleanID(id)
c.nlocker.Lock(id)
return func() {
c.nlocker.Unlock(id)
}
}
// GetOrCreate tries to get the file with the given id from cache. If not found or expired, create will
// be invoked and the result cached.
// This method is protected by a named lock using the given id as identifier.
func (c *Cache) GetOrCreate(id string, create func() (io.ReadCloser, error)) (ItemInfo, io.ReadCloser, error) {
if err := c.init(); err != nil {
return ItemInfo{}, nil, err
}
id = cleanID(id)
c.nlocker.Lock(id)
defer c.nlocker.Unlock(id)
info := ItemInfo{Name: id}
if r := c.getOrRemove(id); r != nil {
return info, r, nil
}
var (
r io.ReadCloser
err error
)
r, err = create()
if err != nil {
return info, nil, err
}
if c.maxAge == 0 {
// No caching.
return info, hugio.ToReadCloser(r), nil
}
var buff bytes.Buffer
return info,
hugio.ToReadCloser(&buff),
c.writeReader(id, io.TeeReader(r, &buff))
}
func (c *Cache) writeReader(id string, r io.Reader) error {
dir := filepath.Dir(id)
if dir != "" {
_ = c.Fs.MkdirAll(dir, 0o777)
}
f, err := c.Fs.Create(id)
if err != nil {
return err
}
defer f.Close()
_, _ = io.Copy(f, r)
return nil
}
// GetOrCreateBytes is the same as GetOrCreate, but produces a byte slice.
func (c *Cache) GetOrCreateBytes(id string, create func() ([]byte, error)) (ItemInfo, []byte, error) {
if err := c.init(); err != nil {
return ItemInfo{}, nil, err
}
id = cleanID(id)
c.nlocker.Lock(id)
defer c.nlocker.Unlock(id)
info := ItemInfo{Name: id}
if r := c.getOrRemove(id); r != nil {
defer r.Close()
b, err := io.ReadAll(r)
return info, b, err
}
var (
b []byte
err error
)
b, err = create()
if err != nil {
return info, nil, err
}
if c.maxAge == 0 {
return info, b, nil
}
if err := c.writeReader(id, bytes.NewReader(b)); err != nil {
return info, nil, err
}
return info, b, nil
}
// GetBytes gets the file content with the given id from the cache, nil if none found.
func (c *Cache) GetBytes(id string) (ItemInfo, []byte, error) {
if err := c.init(); err != nil {
return ItemInfo{}, nil, err
}
id = cleanID(id)
c.nlocker.Lock(id)
defer c.nlocker.Unlock(id)
info := ItemInfo{Name: id}
if r := c.getOrRemove(id); r != nil {
defer r.Close()
b, err := io.ReadAll(r)
return info, b, err
}
return info, nil, nil
}
// Get gets the file with the given id from the cache, nil if none found.
func (c *Cache) Get(id string) (ItemInfo, io.ReadCloser, error) {
if err := c.init(); err != nil {
return ItemInfo{}, nil, err
}
id = cleanID(id)
c.nlocker.Lock(id)
defer c.nlocker.Unlock(id)
info := ItemInfo{Name: id}
r := c.getOrRemove(id)
return info, r, nil
}
// getOrRemove gets the file with the given id. If it's expired, it will
// be removed.
func (c *Cache) getOrRemove(id string) hugio.ReadSeekCloser {
if c.maxAge == 0 {
// No caching.
return nil
}
if removed, err := c.removeIfExpired(id); err != nil || removed {
return nil
}
f, err := c.Fs.Open(id)
if err != nil {
return nil
}
return f
}
func (c *Cache) getBytesAndRemoveIfExpired(id string) ([]byte, bool) {
if c.maxAge == 0 {
// No caching.
return nil, false
}
f, err := c.Fs.Open(id)
if err != nil {
return nil, false
}
defer f.Close()
b, err := io.ReadAll(f)
if err != nil {
return nil, false
}
removed, err := c.removeIfExpired(id)
if err != nil {
return nil, false
}
return b, removed
}
func (c *Cache) removeIfExpired(id string) (bool, error) {
if c.maxAge <= 0 {
return false, nil
}
fi, err := c.Fs.Stat(id)
if err != nil {
return false, err
}
if c.isExpired(fi.ModTime()) {
c.Fs.Remove(id)
return true, nil
}
return false, nil
}
func (c *Cache) isExpired(modTime time.Time) bool {
if c.maxAge < 0 {
return false
}
// Note the use of time.Since here.
// We cannot use Hugo's global Clock for this.
return c.maxAge == 0 || time.Since(modTime) > c.maxAge
}
// For testing
func (c *Cache) GetString(id string) string {
id = cleanID(id)
c.nlocker.Lock(id)
defer c.nlocker.Unlock(id)
f, err := c.Fs.Open(id)
if err != nil {
return ""
}
defer f.Close()
b, _ := io.ReadAll(f)
return string(b)
}
// Caches is a named set of caches.
type Caches map[string]*Cache
// Get gets a named cache, nil if none found.
func (f Caches) Get(name string) *Cache {
return f[strings.ToLower(name)]
}
// NewCaches creates a new set of file caches from the given
// configuration.
func NewCaches(p *helpers.PathSpec) (Caches, error) {
dcfg := p.Cfg.GetConfigSection("caches").(Configs)
fs := p.Fs.Source
m := make(Caches)
for k, v := range dcfg {
var cfs afero.Fs
if v.IsResourceDir {
cfs = p.BaseFs.ResourcesCache
} else {
cfs = fs
}
if cfs == nil {
panic("nil fs")
}
baseDir := v.DirCompiled
bfs := hugofs.NewBasePathFs(cfs, baseDir)
var pruneAllRootDir string
if k == CacheKeyModules {
pruneAllRootDir = "pkg"
}
m[k] = NewCache(bfs, v.MaxAge, pruneAllRootDir)
}
return m, nil
}
func cleanID(name string) string {
return strings.TrimPrefix(filepath.Clean(name), helpers.FilePathSeparator)
}
// AsHTTPCache returns an httpcache.Cache implementation for this file cache.
// Note that none of the methods are protected by named locks, so you need to make sure
// to do that in your own code.
func (c *Cache) AsHTTPCache() httpcache.Cache {
return &httpCache{c: c}
}
type httpCache struct {
c *Cache
}
func (h *httpCache) Get(id string) (resp []byte, ok bool) {
id = cleanID(id)
b, removed := h.c.getBytesAndRemoveIfExpired(id)
return b, !removed
}
func (h *httpCache) Set(id string, resp []byte) {
if h.c.maxAge == 0 {
return
}
id = cleanID(id)
if err := h.c.writeReader(id, bytes.NewReader(resp)); err != nil {
panic(err)
}
}
func (h *httpCache) Delete(key string) {
h.c.Fs.Remove(key)
}

247
cache/filecache/filecache_config.go vendored Normal file
View file

@ -0,0 +1,247 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package filecache provides a file based cache for Hugo.
package filecache
import (
"errors"
"fmt"
"path"
"path/filepath"
"strings"
"time"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/config"
"github.com/mitchellh/mapstructure"
"github.com/spf13/afero"
)
const (
resourcesGenDir = ":resourceDir/_gen"
cacheDirProject = ":cacheDir/:project"
)
var defaultCacheConfig = FileCacheConfig{
MaxAge: -1, // Never expire
Dir: cacheDirProject,
}
const (
CacheKeyGetJSON = "getjson"
CacheKeyGetCSV = "getcsv"
CacheKeyImages = "images"
CacheKeyAssets = "assets"
CacheKeyModules = "modules"
CacheKeyGetResource = "getresource"
CacheKeyMisc = "misc"
)
type Configs map[string]FileCacheConfig
// For internal use.
func (c Configs) CacheDirModules() string {
return c[CacheKeyModules].DirCompiled
}
var defaultCacheConfigs = Configs{
CacheKeyModules: {
MaxAge: -1,
Dir: ":cacheDir/modules",
},
CacheKeyGetJSON: defaultCacheConfig,
CacheKeyGetCSV: defaultCacheConfig,
CacheKeyImages: {
MaxAge: -1,
Dir: resourcesGenDir,
},
CacheKeyAssets: {
MaxAge: -1,
Dir: resourcesGenDir,
},
CacheKeyGetResource: {
MaxAge: -1, // Never expire
Dir: cacheDirProject,
},
CacheKeyMisc: {
MaxAge: -1,
Dir: cacheDirProject,
},
}
type FileCacheConfig struct {
// Max age of cache entries in this cache. Any items older than this will
// be removed and not returned from the cache.
// A negative value means forever, 0 means cache is disabled.
// Hugo is lenient with what types it accepts here, but we recommend using
// a duration string, a sequence of decimal numbers, each with optional fraction and a unit suffix,
// such as "300ms", "1.5h" or "2h45m".
// Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
MaxAge time.Duration
// The directory where files are stored.
Dir string
DirCompiled string `json:"-"`
// Will resources/_gen will get its own composite filesystem that
// also checks any theme.
IsResourceDir bool `json:"-"`
}
// GetJSONCache gets the file cache for getJSON.
func (f Caches) GetJSONCache() *Cache {
return f[CacheKeyGetJSON]
}
// GetCSVCache gets the file cache for getCSV.
func (f Caches) GetCSVCache() *Cache {
return f[CacheKeyGetCSV]
}
// ImageCache gets the file cache for processed images.
func (f Caches) ImageCache() *Cache {
return f[CacheKeyImages]
}
// ModulesCache gets the file cache for Hugo Modules.
func (f Caches) ModulesCache() *Cache {
return f[CacheKeyModules]
}
// AssetsCache gets the file cache for assets (processed resources, SCSS etc.).
func (f Caches) AssetsCache() *Cache {
return f[CacheKeyAssets]
}
// MiscCache gets the file cache for miscellaneous stuff.
func (f Caches) MiscCache() *Cache {
return f[CacheKeyMisc]
}
// GetResourceCache gets the file cache for remote resources.
func (f Caches) GetResourceCache() *Cache {
return f[CacheKeyGetResource]
}
func DecodeConfig(fs afero.Fs, bcfg config.BaseConfig, m map[string]any) (Configs, error) {
c := make(Configs)
valid := make(map[string]bool)
// Add defaults
for k, v := range defaultCacheConfigs {
c[k] = v
valid[k] = true
}
_, isOsFs := fs.(*afero.OsFs)
for k, v := range m {
if _, ok := v.(maps.Params); !ok {
continue
}
cc := defaultCacheConfig
dc := &mapstructure.DecoderConfig{
Result: &cc,
DecodeHook: mapstructure.StringToTimeDurationHookFunc(),
WeaklyTypedInput: true,
}
decoder, err := mapstructure.NewDecoder(dc)
if err != nil {
return c, err
}
if err := decoder.Decode(v); err != nil {
return nil, fmt.Errorf("failed to decode filecache config: %w", err)
}
if cc.Dir == "" {
return c, errors.New("must provide cache Dir")
}
name := strings.ToLower(k)
if !valid[name] {
return nil, fmt.Errorf("%q is not a valid cache name", name)
}
c[name] = cc
}
for k, v := range c {
dir := filepath.ToSlash(filepath.Clean(v.Dir))
hadSlash := strings.HasPrefix(dir, "/")
parts := strings.Split(dir, "/")
for i, part := range parts {
if strings.HasPrefix(part, ":") {
resolved, isResource, err := resolveDirPlaceholder(fs, bcfg, part)
if err != nil {
return c, err
}
if isResource {
v.IsResourceDir = true
}
parts[i] = resolved
}
}
dir = path.Join(parts...)
if hadSlash {
dir = "/" + dir
}
v.DirCompiled = filepath.Clean(filepath.FromSlash(dir))
if !v.IsResourceDir {
if isOsFs && !filepath.IsAbs(v.DirCompiled) {
return c, fmt.Errorf("%q must resolve to an absolute directory", v.DirCompiled)
}
// Avoid cache in root, e.g. / (Unix) or c:\ (Windows)
if len(strings.TrimPrefix(v.DirCompiled, filepath.VolumeName(v.DirCompiled))) == 1 {
return c, fmt.Errorf("%q is a root folder and not allowed as cache dir", v.DirCompiled)
}
}
if !strings.HasPrefix(v.DirCompiled, "_gen") {
// We do cache eviction (file removes) and since the user can set
// his/hers own cache directory, we really want to make sure
// we do not delete any files that do not belong to this cache.
// We do add the cache name as the root, but this is an extra safe
// guard. We skip the files inside /resources/_gen/ because
// that would be breaking.
v.DirCompiled = filepath.Join(v.DirCompiled, FilecacheRootDirname, k)
} else {
v.DirCompiled = filepath.Join(v.DirCompiled, k)
}
c[k] = v
}
return c, nil
}
// Resolves :resourceDir => /myproject/resources etc., :cacheDir => ...
func resolveDirPlaceholder(fs afero.Fs, bcfg config.BaseConfig, placeholder string) (cacheDir string, isResource bool, err error) {
switch strings.ToLower(placeholder) {
case ":resourcedir":
return "", true, nil
case ":cachedir":
return bcfg.CacheDir, false, nil
case ":project":
return filepath.Base(bcfg.WorkingDir), false, nil
}
return "", false, fmt.Errorf("%q is not a valid placeholder (valid values are :cacheDir or :resourceDir)", placeholder)
}

146
cache/filecache/filecache_config_test.go vendored Normal file
View file

@ -0,0 +1,146 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package filecache_test
import (
"path/filepath"
"runtime"
"testing"
"time"
"github.com/spf13/afero"
"github.com/gohugoio/hugo/cache/filecache"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/config/testconfig"
qt "github.com/frankban/quicktest"
)
func TestDecodeConfig(t *testing.T) {
t.Parallel()
c := qt.New(t)
configStr := `
resourceDir = "myresources"
contentDir = "content"
dataDir = "data"
i18nDir = "i18n"
layoutDir = "layouts"
assetDir = "assets"
archetypeDir = "archetypes"
[caches]
[caches.getJSON]
maxAge = "10m"
dir = "/path/to/c1"
[caches.getCSV]
maxAge = "11h"
dir = "/path/to/c2"
[caches.images]
dir = "/path/to/c3"
[caches.getResource]
dir = "/path/to/c4"
`
cfg, err := config.FromConfigString(configStr, "toml")
c.Assert(err, qt.IsNil)
fs := afero.NewMemMapFs()
decoded := testconfig.GetTestConfigs(fs, cfg).Base.Caches
c.Assert(len(decoded), qt.Equals, 7)
c2 := decoded["getcsv"]
c.Assert(c2.MaxAge.String(), qt.Equals, "11h0m0s")
c.Assert(c2.DirCompiled, qt.Equals, filepath.FromSlash("/path/to/c2/filecache/getcsv"))
c3 := decoded["images"]
c.Assert(c3.MaxAge, qt.Equals, time.Duration(-1))
c.Assert(c3.DirCompiled, qt.Equals, filepath.FromSlash("/path/to/c3/filecache/images"))
c4 := decoded["getresource"]
c.Assert(c4.MaxAge, qt.Equals, time.Duration(-1))
c.Assert(c4.DirCompiled, qt.Equals, filepath.FromSlash("/path/to/c4/filecache/getresource"))
}
func TestDecodeConfigIgnoreCache(t *testing.T) {
t.Parallel()
c := qt.New(t)
configStr := `
resourceDir = "myresources"
contentDir = "content"
dataDir = "data"
i18nDir = "i18n"
layoutDir = "layouts"
assetDir = "assets"
archeTypedir = "archetypes"
ignoreCache = true
[caches]
[caches.getJSON]
maxAge = 1234
dir = "/path/to/c1"
[caches.getCSV]
maxAge = 3456
dir = "/path/to/c2"
[caches.images]
dir = "/path/to/c3"
[caches.getResource]
dir = "/path/to/c4"
`
cfg, err := config.FromConfigString(configStr, "toml")
c.Assert(err, qt.IsNil)
fs := afero.NewMemMapFs()
decoded := testconfig.GetTestConfigs(fs, cfg).Base.Caches
c.Assert(len(decoded), qt.Equals, 7)
for _, v := range decoded {
c.Assert(v.MaxAge, qt.Equals, time.Duration(0))
}
}
func TestDecodeConfigDefault(t *testing.T) {
c := qt.New(t)
cfg := config.New()
if runtime.GOOS == "windows" {
cfg.Set("resourceDir", "c:\\cache\\resources")
cfg.Set("cacheDir", "c:\\cache\\thecache")
} else {
cfg.Set("resourceDir", "/cache/resources")
cfg.Set("cacheDir", "/cache/thecache")
}
cfg.Set("workingDir", filepath.FromSlash("/my/cool/hugoproject"))
fs := afero.NewMemMapFs()
decoded := testconfig.GetTestConfigs(fs, cfg).Base.Caches
c.Assert(len(decoded), qt.Equals, 7)
imgConfig := decoded[filecache.CacheKeyImages]
jsonConfig := decoded[filecache.CacheKeyGetJSON]
if runtime.GOOS == "windows" {
c.Assert(imgConfig.DirCompiled, qt.Equals, filepath.FromSlash("_gen/images"))
} else {
c.Assert(imgConfig.DirCompiled, qt.Equals, "_gen/images")
c.Assert(jsonConfig.DirCompiled, qt.Equals, "/cache/thecache/hugoproject/filecache/getjson")
}
c.Assert(imgConfig.IsResourceDir, qt.Equals, true)
c.Assert(jsonConfig.IsResourceDir, qt.Equals, false)
}

View file

@ -0,0 +1,106 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package filecache_test
import (
"path/filepath"
"testing"
"time"
"github.com/bep/logg"
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/htesting"
"github.com/gohugoio/hugo/hugolib"
)
// See issue #10781. That issue wouldn't have been triggered if we kept
// the empty root directories (e.g. _resources/gen/images).
// It's still an upstream Go issue that we also need to handle, but
// this is a test for the first part.
func TestPruneShouldPreserveEmptyCacheRoots(t *testing.T) {
files := `
-- hugo.toml --
baseURL = "https://example.com"
-- content/_index.md --
---
title: "Home"
---
`
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{T: t, TxtarString: files, RunGC: true, NeedsOsFS: true},
).Build()
_, err := b.H.BaseFs.ResourcesCache.Stat(filepath.Join("_gen", "images"))
b.Assert(err, qt.IsNil)
}
func TestPruneImages(t *testing.T) {
if htesting.IsCI() {
// TODO(bep)
t.Skip("skip flaky test on CI server")
}
t.Skip("skip flaky test")
files := `
-- hugo.toml --
baseURL = "https://example.com"
[caches]
[caches.images]
maxAge = "200ms"
dir = ":resourceDir/_gen"
-- content/_index.md --
---
title: "Home"
---
-- assets/a/pixel.png --
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
-- layouts/index.html --
{{ warnf "HOME!" }}
{{ $img := resources.GetMatch "**.png" }}
{{ $img = $img.Resize "3x3" }}
{{ $img.RelPermalink }}
`
b := hugolib.NewIntegrationTestBuilder(
hugolib.IntegrationTestConfig{T: t, TxtarString: files, Running: true, RunGC: true, NeedsOsFS: true, LogLevel: logg.LevelInfo},
).Build()
b.Assert(b.GCCount, qt.Equals, 0)
b.Assert(b.H, qt.IsNotNil)
imagesCacheDir := filepath.Join("_gen", "images")
_, err := b.H.BaseFs.ResourcesCache.Stat(imagesCacheDir)
b.Assert(err, qt.IsNil)
// TODO(bep) we need a way to test full rebuilds.
// For now, just sleep a little so the cache elements expires.
time.Sleep(500 * time.Millisecond)
b.RenameFile("assets/a/pixel.png", "assets/b/pixel2.png").Build()
b.Assert(b.GCCount, qt.Equals, 1)
// Build it again to GC the empty a dir.
b.Build()
_, err = b.H.BaseFs.ResourcesCache.Stat(filepath.Join(imagesCacheDir, "a"))
b.Assert(err, qt.Not(qt.IsNil))
_, err = b.H.BaseFs.ResourcesCache.Stat(imagesCacheDir)
b.Assert(err, qt.IsNil)
}

137
cache/filecache/filecache_pruner.go vendored Normal file
View file

@ -0,0 +1,137 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package filecache
import (
"fmt"
"io"
"os"
"github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/afero"
)
// Prune removes expired and unused items from this cache.
// The last one requires a full build so the cache usage can be tracked.
// Note that we operate directly on the filesystem here, so this is not
// thread safe.
func (c Caches) Prune() (int, error) {
counter := 0
for k, cache := range c {
count, err := cache.Prune(false)
counter += count
if err != nil {
if herrors.IsNotExist(err) {
continue
}
return counter, fmt.Errorf("failed to prune cache %q: %w", k, err)
}
}
return counter, nil
}
// Prune removes expired and unused items from this cache.
// If force is set, everything will be removed not considering expiry time.
func (c *Cache) Prune(force bool) (int, error) {
if c.pruneAllRootDir != "" {
return c.pruneRootDir(force)
}
if err := c.init(); err != nil {
return 0, err
}
counter := 0
err := afero.Walk(c.Fs, "", func(name string, info os.FileInfo, err error) error {
if info == nil {
return nil
}
name = cleanID(name)
if info.IsDir() {
f, err := c.Fs.Open(name)
if err != nil {
// This cache dir may not exist.
return nil
}
_, err = f.Readdirnames(1)
f.Close()
if err == io.EOF {
// Empty dir.
if name == "." {
// e.g. /_gen/images -- keep it even if empty.
err = nil
} else {
err = c.Fs.Remove(name)
}
}
if err != nil && !herrors.IsNotExist(err) {
return err
}
return nil
}
shouldRemove := force || c.isExpired(info.ModTime())
if !shouldRemove && len(c.nlocker.seen) > 0 {
// Remove it if it's not been touched/used in the last build.
_, seen := c.nlocker.seen[name]
shouldRemove = !seen
}
if shouldRemove {
err := c.Fs.Remove(name)
if err == nil {
counter++
}
if err != nil && !herrors.IsNotExist(err) {
return err
}
}
return nil
})
return counter, err
}
func (c *Cache) pruneRootDir(force bool) (int, error) {
if err := c.init(); err != nil {
return 0, err
}
info, err := c.Fs.Stat(c.pruneAllRootDir)
if err != nil {
if herrors.IsNotExist(err) {
return 0, nil
}
return 0, err
}
if !force && !c.isExpired(info.ModTime()) {
return 0, nil
}
return hugofs.MakeReadableAndRemoveAllModulePkgDir(c.Fs, c.pruneAllRootDir)
}

111
cache/filecache/filecache_pruner_test.go vendored Normal file
View file

@ -0,0 +1,111 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package filecache_test
import (
"fmt"
"testing"
"time"
"github.com/gohugoio/hugo/cache/filecache"
"github.com/spf13/afero"
qt "github.com/frankban/quicktest"
)
func TestPrune(t *testing.T) {
t.Parallel()
c := qt.New(t)
configStr := `
resourceDir = "myresources"
contentDir = "content"
dataDir = "data"
i18nDir = "i18n"
layoutDir = "layouts"
assetDir = "assets"
archeTypedir = "archetypes"
[caches]
[caches.getjson]
maxAge = "200ms"
dir = "/cache/c"
[caches.getcsv]
maxAge = "200ms"
dir = "/cache/d"
[caches.assets]
maxAge = "200ms"
dir = ":resourceDir/_gen"
[caches.images]
maxAge = "200ms"
dir = ":resourceDir/_gen"
`
for _, name := range []string{filecache.CacheKeyGetCSV, filecache.CacheKeyGetJSON, filecache.CacheKeyAssets, filecache.CacheKeyImages} {
msg := qt.Commentf("cache: %s", name)
p := newPathsSpec(t, afero.NewMemMapFs(), configStr)
caches, err := filecache.NewCaches(p)
c.Assert(err, qt.IsNil)
cache := caches[name]
for i := range 10 {
id := fmt.Sprintf("i%d", i)
cache.GetOrCreateBytes(id, func() ([]byte, error) {
return []byte("abc"), nil
})
if i == 4 {
// This will expire the first 5
time.Sleep(201 * time.Millisecond)
}
}
count, err := caches.Prune()
c.Assert(err, qt.IsNil)
c.Assert(count, qt.Equals, 5, msg)
for i := range 10 {
id := fmt.Sprintf("i%d", i)
v := cache.GetString(id)
if i < 5 {
c.Assert(v, qt.Equals, "")
} else {
c.Assert(v, qt.Equals, "abc")
}
}
caches, err = filecache.NewCaches(p)
c.Assert(err, qt.IsNil)
cache = caches[name]
// Touch one and then prune.
cache.GetOrCreateBytes("i5", func() ([]byte, error) {
return []byte("abc"), nil
})
count, err = caches.Prune()
c.Assert(err, qt.IsNil)
c.Assert(count, qt.Equals, 4)
// Now only the i5 should be left.
for i := range 10 {
id := fmt.Sprintf("i%d", i)
v := cache.GetString(id)
if i != 5 {
c.Assert(v, qt.Equals, "")
} else {
c.Assert(v, qt.Equals, "abc")
}
}
}
}

276
cache/filecache/filecache_test.go vendored Normal file
View file

@ -0,0 +1,276 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package filecache_test
import (
"errors"
"fmt"
"io"
"strings"
"sync"
"testing"
"time"
"github.com/gohugoio/hugo/cache/filecache"
"github.com/gohugoio/hugo/common/hugio"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/config/testconfig"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/afero"
qt "github.com/frankban/quicktest"
)
func TestFileCache(t *testing.T) {
t.Parallel()
c := qt.New(t)
tempWorkingDir := t.TempDir()
tempCacheDir := t.TempDir()
osfs := afero.NewOsFs()
for _, test := range []struct {
cacheDir string
workingDir string
}{
// Run with same dirs twice to make sure that works.
{tempCacheDir, tempWorkingDir},
{tempCacheDir, tempWorkingDir},
} {
configStr := `
workingDir = "WORKING_DIR"
resourceDir = "resources"
cacheDir = "CACHEDIR"
contentDir = "content"
dataDir = "data"
i18nDir = "i18n"
layoutDir = "layouts"
assetDir = "assets"
archeTypedir = "archetypes"
[caches]
[caches.getJSON]
maxAge = "10h"
dir = ":cacheDir/c"
`
winPathSep := "\\\\"
replacer := strings.NewReplacer("CACHEDIR", test.cacheDir, "WORKING_DIR", test.workingDir)
configStr = replacer.Replace(configStr)
configStr = strings.Replace(configStr, "\\", winPathSep, -1)
p := newPathsSpec(t, osfs, configStr)
caches, err := filecache.NewCaches(p)
c.Assert(err, qt.IsNil)
cache := caches.Get("GetJSON")
c.Assert(cache, qt.Not(qt.IsNil))
cache = caches.Get("Images")
c.Assert(cache, qt.Not(qt.IsNil))
rf := func(s string) func() (io.ReadCloser, error) {
return func() (io.ReadCloser, error) {
return struct {
io.ReadSeeker
io.Closer
}{
strings.NewReader(s),
io.NopCloser(nil),
}, nil
}
}
bf := func() ([]byte, error) {
return []byte("bcd"), nil
}
for _, ca := range []*filecache.Cache{caches.ImageCache(), caches.AssetsCache(), caches.GetJSONCache(), caches.GetCSVCache()} {
for range 2 {
info, r, err := ca.GetOrCreate("a", rf("abc"))
c.Assert(err, qt.IsNil)
c.Assert(r, qt.Not(qt.IsNil))
c.Assert(info.Name, qt.Equals, "a")
b, _ := io.ReadAll(r)
r.Close()
c.Assert(string(b), qt.Equals, "abc")
info, b, err = ca.GetOrCreateBytes("b", bf)
c.Assert(err, qt.IsNil)
c.Assert(r, qt.Not(qt.IsNil))
c.Assert(info.Name, qt.Equals, "b")
c.Assert(string(b), qt.Equals, "bcd")
_, b, err = ca.GetOrCreateBytes("a", bf)
c.Assert(err, qt.IsNil)
c.Assert(string(b), qt.Equals, "abc")
_, r, err = ca.GetOrCreate("a", rf("bcd"))
c.Assert(err, qt.IsNil)
b, _ = io.ReadAll(r)
r.Close()
c.Assert(string(b), qt.Equals, "abc")
}
}
c.Assert(caches.Get("getJSON"), qt.Not(qt.IsNil))
info, w, err := caches.ImageCache().WriteCloser("mykey")
c.Assert(err, qt.IsNil)
c.Assert(info.Name, qt.Equals, "mykey")
io.WriteString(w, "Hugo is great!")
w.Close()
c.Assert(caches.ImageCache().GetString("mykey"), qt.Equals, "Hugo is great!")
info, r, err := caches.ImageCache().Get("mykey")
c.Assert(err, qt.IsNil)
c.Assert(r, qt.Not(qt.IsNil))
c.Assert(info.Name, qt.Equals, "mykey")
b, _ := io.ReadAll(r)
r.Close()
c.Assert(string(b), qt.Equals, "Hugo is great!")
info, b, err = caches.ImageCache().GetBytes("mykey")
c.Assert(err, qt.IsNil)
c.Assert(info.Name, qt.Equals, "mykey")
c.Assert(string(b), qt.Equals, "Hugo is great!")
}
}
func TestFileCacheConcurrent(t *testing.T) {
t.Parallel()
c := qt.New(t)
configStr := `
resourceDir = "myresources"
contentDir = "content"
dataDir = "data"
i18nDir = "i18n"
layoutDir = "layouts"
assetDir = "assets"
archeTypedir = "archetypes"
[caches]
[caches.getjson]
maxAge = "1s"
dir = "/cache/c"
`
p := newPathsSpec(t, afero.NewMemMapFs(), configStr)
caches, err := filecache.NewCaches(p)
c.Assert(err, qt.IsNil)
const cacheName = "getjson"
filenameData := func(i int) (string, string) {
data := fmt.Sprintf("data: %d", i)
filename := fmt.Sprintf("file%d", i)
return filename, data
}
var wg sync.WaitGroup
for i := range 50 {
wg.Add(1)
go func(i int) {
defer wg.Done()
for range 20 {
ca := caches.Get(cacheName)
c.Assert(ca, qt.Not(qt.IsNil))
filename, data := filenameData(i)
_, r, err := ca.GetOrCreate(filename, func() (io.ReadCloser, error) {
return hugio.ToReadCloser(strings.NewReader(data)), nil
})
c.Assert(err, qt.IsNil)
b, _ := io.ReadAll(r)
r.Close()
c.Assert(string(b), qt.Equals, data)
// Trigger some expiration.
time.Sleep(50 * time.Millisecond)
}
}(i)
}
wg.Wait()
}
func TestFileCacheReadOrCreateErrorInRead(t *testing.T) {
t.Parallel()
c := qt.New(t)
var result string
rf := func(failLevel int) func(info filecache.ItemInfo, r io.ReadSeeker) error {
return func(info filecache.ItemInfo, r io.ReadSeeker) error {
if failLevel > 0 {
if failLevel > 1 {
return filecache.ErrFatal
}
return errors.New("fail")
}
b, _ := io.ReadAll(r)
result = string(b)
return nil
}
}
bf := func(s string) func(info filecache.ItemInfo, w io.WriteCloser) error {
return func(info filecache.ItemInfo, w io.WriteCloser) error {
defer w.Close()
result = s
_, err := w.Write([]byte(s))
return err
}
}
cache := filecache.NewCache(afero.NewMemMapFs(), 100*time.Hour, "")
const id = "a32"
_, err := cache.ReadOrCreate(id, rf(0), bf("v1"))
c.Assert(err, qt.IsNil)
c.Assert(result, qt.Equals, "v1")
_, err = cache.ReadOrCreate(id, rf(0), bf("v2"))
c.Assert(err, qt.IsNil)
c.Assert(result, qt.Equals, "v1")
_, err = cache.ReadOrCreate(id, rf(1), bf("v3"))
c.Assert(err, qt.IsNil)
c.Assert(result, qt.Equals, "v3")
_, err = cache.ReadOrCreate(id, rf(2), bf("v3"))
c.Assert(err, qt.Equals, filecache.ErrFatal)
}
func newPathsSpec(t *testing.T, fs afero.Fs, configStr string) *helpers.PathSpec {
c := qt.New(t)
cfg, err := config.FromConfigString(configStr, "toml")
c.Assert(err, qt.IsNil)
acfg := testconfig.GetTestConfig(fs, cfg)
p, err := helpers.NewPathSpec(hugofs.NewFrom(fs, acfg.BaseConfig()), acfg, nil)
c.Assert(err, qt.IsNil)
return p
}

229
cache/httpcache/httpcache.go vendored Normal file
View file

@ -0,0 +1,229 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package httpcache
import (
"encoding/json"
"time"
"github.com/gobwas/glob"
"github.com/gohugoio/hugo/common/predicate"
"github.com/gohugoio/hugo/config"
"github.com/mitchellh/mapstructure"
)
// DefaultConfig holds the default configuration for the HTTP cache.
var DefaultConfig = Config{
Cache: Cache{
For: GlobMatcher{
Excludes: []string{"**"},
},
},
Polls: []PollConfig{
{
For: GlobMatcher{
Includes: []string{"**"},
},
Disable: true,
},
},
}
// Config holds the configuration for the HTTP cache.
type Config struct {
// Configures the HTTP cache behavior (RFC 9111).
// When this is not enabled for a resource, Hugo will go straight to the file cache.
Cache Cache
// Polls holds a list of configurations for polling remote resources to detect changes in watch mode.
// This can be disabled for some resources, typically if they are known to not change.
Polls []PollConfig
}
type Cache struct {
// Enable HTTP cache behavior (RFC 9111) for these resources.
For GlobMatcher
}
func (c *Config) Compile() (ConfigCompiled, error) {
var cc ConfigCompiled
p, err := c.Cache.For.CompilePredicate()
if err != nil {
return cc, err
}
cc.For = p
for _, pc := range c.Polls {
p, err := pc.For.CompilePredicate()
if err != nil {
return cc, err
}
cc.PollConfigs = append(cc.PollConfigs, PollConfigCompiled{
For: p,
Config: pc,
})
}
return cc, nil
}
// PollConfig holds the configuration for polling remote resources to detect changes in watch mode.
type PollConfig struct {
// What remote resources to apply this configuration to.
For GlobMatcher
// Disable polling for this configuration.
Disable bool
// Low is the lower bound for the polling interval.
// This is the starting point when the resource has recently changed,
// if that resource stops changing, the polling interval will gradually increase towards High.
Low time.Duration
// High is the upper bound for the polling interval.
// This is the interval used when the resource is stable.
High time.Duration
}
func (c PollConfig) MarshalJSON() (b []byte, err error) {
// Marshal the durations as strings.
type Alias PollConfig
return json.Marshal(&struct {
Low string
High string
Alias
}{
Low: c.Low.String(),
High: c.High.String(),
Alias: (Alias)(c),
})
}
type GlobMatcher struct {
// Excludes holds a list of glob patterns that will be excluded.
Excludes []string
// Includes holds a list of glob patterns that will be included.
Includes []string
}
func (gm GlobMatcher) IsZero() bool {
return len(gm.Includes) == 0 && len(gm.Excludes) == 0
}
type ConfigCompiled struct {
For predicate.P[string]
PollConfigs []PollConfigCompiled
}
func (c *ConfigCompiled) PollConfigFor(s string) PollConfigCompiled {
for _, pc := range c.PollConfigs {
if pc.For(s) {
return pc
}
}
return PollConfigCompiled{}
}
func (c *ConfigCompiled) IsPollingDisabled() bool {
for _, pc := range c.PollConfigs {
if !pc.Config.Disable {
return false
}
}
return true
}
type PollConfigCompiled struct {
For predicate.P[string]
Config PollConfig
}
func (p PollConfigCompiled) IsZero() bool {
return p.For == nil
}
func (gm *GlobMatcher) CompilePredicate() (func(string) bool, error) {
if gm.IsZero() {
panic("no includes or excludes")
}
var p predicate.P[string]
for _, include := range gm.Includes {
g, err := glob.Compile(include, '/')
if err != nil {
return nil, err
}
fn := func(s string) bool {
return g.Match(s)
}
p = p.Or(fn)
}
for _, exclude := range gm.Excludes {
g, err := glob.Compile(exclude, '/')
if err != nil {
return nil, err
}
fn := func(s string) bool {
return !g.Match(s)
}
p = p.And(fn)
}
return p, nil
}
func DecodeConfig(_ config.BaseConfig, m map[string]any) (Config, error) {
if len(m) == 0 {
return DefaultConfig, nil
}
var c Config
dc := &mapstructure.DecoderConfig{
Result: &c,
DecodeHook: mapstructure.StringToTimeDurationHookFunc(),
WeaklyTypedInput: true,
}
decoder, err := mapstructure.NewDecoder(dc)
if err != nil {
return c, err
}
if err := decoder.Decode(m); err != nil {
return c, err
}
if c.Cache.For.IsZero() {
c.Cache.For = DefaultConfig.Cache.For
}
for pci := range c.Polls {
if c.Polls[pci].For.IsZero() {
c.Polls[pci].For = DefaultConfig.Cache.For
c.Polls[pci].Disable = true
}
}
if len(c.Polls) == 0 {
c.Polls = DefaultConfig.Polls
}
return c, nil
}

View file

@ -0,0 +1,95 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package httpcache_test
import (
"testing"
"time"
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/hugolib"
)
func TestConfigCustom(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
[httpcache]
[httpcache.cache.for]
includes = ["**gohugo.io**"]
[[httpcache.polls]]
low = "5s"
high = "32s"
[httpcache.polls.for]
includes = ["**gohugo.io**"]
`
b := hugolib.Test(t, files)
httpcacheConf := b.H.Configs.Base.HTTPCache
compiled := b.H.Configs.Base.C.HTTPCache
b.Assert(httpcacheConf.Cache.For.Includes, qt.DeepEquals, []string{"**gohugo.io**"})
b.Assert(httpcacheConf.Cache.For.Excludes, qt.IsNil)
pc := compiled.PollConfigFor("https://gohugo.io/foo.jpg")
b.Assert(pc.Config.Low, qt.Equals, 5*time.Second)
b.Assert(pc.Config.High, qt.Equals, 32*time.Second)
b.Assert(compiled.PollConfigFor("https://example.com/foo.jpg").IsZero(), qt.IsTrue)
}
func TestConfigDefault(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
`
b := hugolib.Test(t, files)
compiled := b.H.Configs.Base.C.HTTPCache
b.Assert(compiled.For("https://gohugo.io/posts.json"), qt.IsFalse)
b.Assert(compiled.For("https://gohugo.io/foo.jpg"), qt.IsFalse)
b.Assert(compiled.PollConfigFor("https://gohugo.io/foo.jpg").Config.Disable, qt.IsTrue)
}
func TestConfigPollsOnly(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
[httpcache]
[[httpcache.polls]]
low = "5s"
high = "32s"
[httpcache.polls.for]
includes = ["**gohugo.io**"]
`
b := hugolib.Test(t, files)
compiled := b.H.Configs.Base.C.HTTPCache
b.Assert(compiled.For("https://gohugo.io/posts.json"), qt.IsFalse)
b.Assert(compiled.For("https://gohugo.io/foo.jpg"), qt.IsFalse)
pc := compiled.PollConfigFor("https://gohugo.io/foo.jpg")
b.Assert(pc.Config.Low, qt.Equals, 5*time.Second)
b.Assert(pc.Config.High, qt.Equals, 32*time.Second)
b.Assert(compiled.PollConfigFor("https://example.com/foo.jpg").IsZero(), qt.IsTrue)
}

73
cache/httpcache/httpcache_test.go vendored Normal file
View file

@ -0,0 +1,73 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package httpcache
import (
"testing"
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/config"
)
func TestGlobMatcher(t *testing.T) {
c := qt.New(t)
g := GlobMatcher{
Includes: []string{"**/*.jpg", "**.png", "**/bar/**"},
Excludes: []string{"**/foo.jpg", "**.css"},
}
p, err := g.CompilePredicate()
c.Assert(err, qt.IsNil)
c.Assert(p("foo.jpg"), qt.IsFalse)
c.Assert(p("foo.png"), qt.IsTrue)
c.Assert(p("foo/bar.jpg"), qt.IsTrue)
c.Assert(p("foo/bar.png"), qt.IsTrue)
c.Assert(p("foo/bar/foo.jpg"), qt.IsFalse)
c.Assert(p("foo/bar/foo.css"), qt.IsFalse)
c.Assert(p("foo.css"), qt.IsFalse)
c.Assert(p("foo/bar/foo.css"), qt.IsFalse)
c.Assert(p("foo/bar/foo.xml"), qt.IsTrue)
}
func TestDefaultConfig(t *testing.T) {
c := qt.New(t)
_, err := DefaultConfig.Compile()
c.Assert(err, qt.IsNil)
}
func TestDecodeConfigInjectsDefaultAndCompiles(t *testing.T) {
c := qt.New(t)
cfg, err := DecodeConfig(config.BaseConfig{}, map[string]interface{}{})
c.Assert(err, qt.IsNil)
c.Assert(cfg, qt.DeepEquals, DefaultConfig)
_, err = cfg.Compile()
c.Assert(err, qt.IsNil)
cfg, err = DecodeConfig(config.BaseConfig{}, map[string]any{
"cache": map[string]any{
"polls": []map[string]any{
{"disable": true},
},
},
})
c.Assert(err, qt.IsNil)
_, err = cfg.Compile()
c.Assert(err, qt.IsNil)
}

View file

@ -1,80 +0,0 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cache
import (
"sync"
)
// Partition represents a cache partition where Load is the callback
// for when the partition is needed.
type Partition struct {
Key string
Load func() (map[string]interface{}, error)
}
type lazyPartition struct {
initSync sync.Once
cache map[string]interface{}
load func() (map[string]interface{}, error)
}
func (l *lazyPartition) init() error {
var err error
l.initSync.Do(func() {
var c map[string]interface{}
c, err = l.load()
l.cache = c
})
return err
}
// PartitionedLazyCache is a lazily loaded cache paritioned by a supplied string key.
type PartitionedLazyCache struct {
partitions map[string]*lazyPartition
}
// NewPartitionedLazyCache creates a new NewPartitionedLazyCache with the supplied
// partitions.
func NewPartitionedLazyCache(partitions ...Partition) *PartitionedLazyCache {
lazyPartitions := make(map[string]*lazyPartition, len(partitions))
for _, partition := range partitions {
lazyPartitions[partition.Key] = &lazyPartition{load: partition.Load}
}
cache := &PartitionedLazyCache{partitions: lazyPartitions}
return cache
}
// Get initializes the partition if not already done so, then looks up the given
// key in the given partition, returns nil if no value found.
func (c *PartitionedLazyCache) Get(partition, key string) (interface{}, error) {
p, found := c.partitions[partition]
if !found {
return nil, nil
}
if err := p.init(); err != nil {
return nil, err
}
if v, found := p.cache[key]; found {
return v, nil
}
return nil, nil
}

View file

@ -1,138 +0,0 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cache
import (
"errors"
"sync"
"testing"
"github.com/stretchr/testify/require"
)
func TestNewPartitionedLazyCache(t *testing.T) {
t.Parallel()
assert := require.New(t)
p1 := Partition{
Key: "p1",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p1_1": "p1v1",
"p1_2": "p1v2",
"p1_nil": nil,
}, nil
},
}
p2 := Partition{
Key: "p2",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p2_1": "p2v1",
"p2_2": "p2v2",
"p2_3": "p2v3",
}, nil
},
}
cache := NewPartitionedLazyCache(p1, p2)
v, err := cache.Get("p1", "p1_1")
assert.NoError(err)
assert.Equal("p1v1", v)
v, err = cache.Get("p1", "p2_1")
assert.NoError(err)
assert.Nil(v)
v, err = cache.Get("p1", "p1_nil")
assert.NoError(err)
assert.Nil(v)
v, err = cache.Get("p2", "p2_3")
assert.NoError(err)
assert.Equal("p2v3", v)
v, err = cache.Get("doesnotexist", "p1_1")
assert.NoError(err)
assert.Nil(v)
v, err = cache.Get("p1", "doesnotexist")
assert.NoError(err)
assert.Nil(v)
errorP := Partition{
Key: "p3",
Load: func() (map[string]interface{}, error) {
return nil, errors.New("Failed")
},
}
cache = NewPartitionedLazyCache(errorP)
v, err = cache.Get("p1", "doesnotexist")
assert.NoError(err)
assert.Nil(v)
_, err = cache.Get("p3", "doesnotexist")
assert.Error(err)
}
func TestConcurrentPartitionedLazyCache(t *testing.T) {
t.Parallel()
assert := require.New(t)
var wg sync.WaitGroup
p1 := Partition{
Key: "p1",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p1_1": "p1v1",
"p1_2": "p1v2",
"p1_nil": nil,
}, nil
},
}
p2 := Partition{
Key: "p2",
Load: func() (map[string]interface{}, error) {
return map[string]interface{}{
"p2_1": "p2v1",
"p2_2": "p2v2",
"p2_3": "p2v3",
}, nil
},
}
cache := NewPartitionedLazyCache(p1, p2)
for i := 0; i < 100; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for j := 0; j < 10; j++ {
v, err := cache.Get("p1", "p1_1")
assert.NoError(err)
assert.Equal("p1v1", v)
}
}()
}
wg.Wait()
}

2
check_gofmt.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
diff <(gofmt -d .) <(printf '')

540
codegen/methods.go Normal file
View file

@ -0,0 +1,540 @@
// Copyright 2019 The Hugo Authors. All rights reserved.
// Some functions in this file (see comments) is based on the Go source code,
// copyright The Go Authors and governed by a BSD-style license.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package codegen contains helpers for code generation.
package codegen
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
"path"
"path/filepath"
"reflect"
"regexp"
"slices"
"sort"
"strings"
"sync"
)
// Make room for insertions
const weightWidth = 1000
// NewInspector creates a new Inspector given a source root.
func NewInspector(root string) *Inspector {
return &Inspector{ProjectRootDir: root}
}
// Inspector provides methods to help code generation. It uses a combination
// of reflection and source code AST to do the heavy lifting.
type Inspector struct {
ProjectRootDir string
init sync.Once
// Determines method order. Go's reflect sorts lexicographically, so
// we must parse the source to preserve this order.
methodWeight map[string]map[string]int
}
// MethodsFromTypes create a method set from the include slice, excluding any
// method in exclude.
func (c *Inspector) MethodsFromTypes(include []reflect.Type, exclude []reflect.Type) Methods {
c.parseSource()
var methods Methods
excludes := make(map[string]bool)
if len(exclude) > 0 {
for _, m := range c.MethodsFromTypes(exclude, nil) {
excludes[m.Name] = true
}
}
// There may be overlapping interfaces in types. Do a simple check for now.
seen := make(map[string]bool)
nameAndPackage := func(t reflect.Type) (string, string) {
var name, pkg string
isPointer := t.Kind() == reflect.Ptr
if isPointer {
t = t.Elem()
}
pkgPrefix := ""
if pkgPath := t.PkgPath(); pkgPath != "" {
pkgPath = strings.TrimSuffix(pkgPath, "/")
_, shortPath := path.Split(pkgPath)
pkgPrefix = shortPath + "."
pkg = pkgPath
}
name = t.Name()
if name == "" {
// interface{}
name = t.String()
}
if isPointer {
pkgPrefix = "*" + pkgPrefix
}
name = pkgPrefix + name
return name, pkg
}
for _, t := range include {
for i := range t.NumMethod() {
m := t.Method(i)
if excludes[m.Name] || seen[m.Name] {
continue
}
seen[m.Name] = true
if m.PkgPath != "" {
// Not exported
continue
}
numIn := m.Type.NumIn()
ownerName, _ := nameAndPackage(t)
method := Method{Owner: t, OwnerName: ownerName, Name: m.Name}
for i := range numIn {
in := m.Type.In(i)
name, pkg := nameAndPackage(in)
if pkg != "" {
method.Imports = append(method.Imports, pkg)
}
method.In = append(method.In, name)
}
numOut := m.Type.NumOut()
if numOut > 0 {
for i := range numOut {
out := m.Type.Out(i)
name, pkg := nameAndPackage(out)
if pkg != "" {
method.Imports = append(method.Imports, pkg)
}
method.Out = append(method.Out, name)
}
}
methods = append(methods, method)
}
}
sort.SliceStable(methods, func(i, j int) bool {
mi, mj := methods[i], methods[j]
wi := c.methodWeight[mi.OwnerName][mi.Name]
wj := c.methodWeight[mj.OwnerName][mj.Name]
if wi == wj {
return mi.Name < mj.Name
}
return wi < wj
})
return methods
}
func (c *Inspector) parseSource() {
c.init.Do(func() {
if !strings.Contains(c.ProjectRootDir, "hugo") {
panic("dir must be set to the Hugo root")
}
c.methodWeight = make(map[string]map[string]int)
dirExcludes := regexp.MustCompile("docs|examples")
fileExcludes := regexp.MustCompile("autogen")
var filenames []string
filepath.Walk(c.ProjectRootDir, func(path string, info os.FileInfo, err error) error {
if info.IsDir() {
if dirExcludes.MatchString(info.Name()) {
return filepath.SkipDir
}
}
if !strings.HasSuffix(path, ".go") || fileExcludes.MatchString(path) {
return nil
}
filenames = append(filenames, path)
return nil
})
for _, filename := range filenames {
pkg := c.packageFromPath(filename)
fset := token.NewFileSet()
node, err := parser.ParseFile(fset, filename, nil, parser.ParseComments)
if err != nil {
panic(err)
}
ast.Inspect(node, func(n ast.Node) bool {
switch t := n.(type) {
case *ast.TypeSpec:
if t.Name.IsExported() {
switch it := t.Type.(type) {
case *ast.InterfaceType:
iface := pkg + "." + t.Name.Name
methodNames := collectMethodsRecursive(pkg, it.Methods.List)
weights := make(map[string]int)
weight := weightWidth
for _, name := range methodNames {
weights[name] = weight
weight += weightWidth
}
c.methodWeight[iface] = weights
}
}
}
return true
})
}
// Complement
for _, v1 := range c.methodWeight {
for k2, w := range v1 {
if v, found := c.methodWeight[k2]; found {
for k3, v3 := range v {
v1[k3] = (v3 / weightWidth) + w
}
}
}
}
})
}
func (c *Inspector) packageFromPath(p string) string {
p = filepath.ToSlash(p)
base := path.Base(p)
if !strings.Contains(base, ".") {
return base
}
return path.Base(strings.TrimSuffix(p, base))
}
// Method holds enough information about it to recreate it.
type Method struct {
// The interface we extracted this method from.
Owner reflect.Type
// String version of the above, on the form PACKAGE.NAME, e.g.
// page.Page
OwnerName string
// Method name.
Name string
// Imports needed to satisfy the method signature.
Imports []string
// Argument types, including any package prefix, e.g. string, int, interface{},
// net.Url
In []string
// Return types.
Out []string
}
// Declaration creates a method declaration (without any body) for the given receiver.
func (m Method) Declaration(receiver string) string {
return fmt.Sprintf("func (%s %s) %s%s %s", receiverShort(receiver), receiver, m.Name, m.inStr(), m.outStr())
}
// DeclarationNamed creates a method declaration (without any body) for the given receiver
// with named return values.
func (m Method) DeclarationNamed(receiver string) string {
return fmt.Sprintf("func (%s %s) %s%s %s", receiverShort(receiver), receiver, m.Name, m.inStr(), m.outStrNamed())
}
// Delegate creates a delegate call string.
func (m Method) Delegate(receiver, delegate string) string {
ret := ""
if len(m.Out) > 0 {
ret = "return "
}
return fmt.Sprintf("%s%s.%s.%s%s", ret, receiverShort(receiver), delegate, m.Name, m.inOutStr())
}
func (m Method) String() string {
return m.Name + m.inStr() + " " + m.outStr() + "\n"
}
func (m Method) inOutStr() string {
if len(m.In) == 0 {
return "()"
}
args := make([]string, len(m.In))
for i := range args {
args[i] = fmt.Sprintf("arg%d", i)
}
return "(" + strings.Join(args, ", ") + ")"
}
func (m Method) inStr() string {
if len(m.In) == 0 {
return "()"
}
args := make([]string, len(m.In))
for i := range args {
args[i] = fmt.Sprintf("arg%d %s", i, m.In[i])
}
return "(" + strings.Join(args, ", ") + ")"
}
func (m Method) outStr() string {
if len(m.Out) == 0 {
return ""
}
if len(m.Out) == 1 {
return m.Out[0]
}
return "(" + strings.Join(m.Out, ", ") + ")"
}
func (m Method) outStrNamed() string {
if len(m.Out) == 0 {
return ""
}
outs := make([]string, len(m.Out))
for i := range outs {
outs[i] = fmt.Sprintf("o%d %s", i, m.Out[i])
}
return "(" + strings.Join(outs, ", ") + ")"
}
// Methods represents a list of methods for one or more interfaces.
// The order matches the defined order in their source file(s).
type Methods []Method
// Imports returns a sorted list of package imports needed to satisfy the
// signatures of all methods.
func (m Methods) Imports() []string {
var pkgImports []string
for _, method := range m {
pkgImports = append(pkgImports, method.Imports...)
}
if len(pkgImports) > 0 {
pkgImports = uniqueNonEmptyStrings(pkgImports)
sort.Strings(pkgImports)
}
return pkgImports
}
// ToMarshalJSON creates a MarshalJSON method for these methods. Any method name
// matching any of the regexps in excludes will be ignored.
func (m Methods) ToMarshalJSON(receiver, pkgPath string, excludes ...string) (string, []string) {
var sb strings.Builder
r := receiverShort(receiver)
what := firstToUpper(trimAsterisk(receiver))
pgkName := path.Base(pkgPath)
fmt.Fprintf(&sb, "func Marshal%sToJSON(%s %s) ([]byte, error) {\n", what, r, receiver)
var methods Methods
excludeRes := make([]*regexp.Regexp, len(excludes))
for i, exclude := range excludes {
excludeRes[i] = regexp.MustCompile(exclude)
}
for _, method := range m {
// Exclude methods with arguments and incompatible return values
if len(method.In) > 0 || len(method.Out) == 0 || len(method.Out) > 2 {
continue
}
if len(method.Out) == 2 {
if method.Out[1] != "error" {
continue
}
}
for _, re := range excludeRes {
if re.MatchString(method.Name) {
continue
}
}
methods = append(methods, method)
}
for _, method := range methods {
varn := varName(method.Name)
if len(method.Out) == 1 {
fmt.Fprintf(&sb, "\t%s := %s.%s()\n", varn, r, method.Name)
} else {
fmt.Fprintf(&sb, "\t%s, err := %s.%s()\n", varn, r, method.Name)
fmt.Fprint(&sb, "\tif err != nil {\n\t\treturn nil, err\n\t}\n")
}
}
fmt.Fprint(&sb, "\n\ts := struct {\n")
for _, method := range methods {
fmt.Fprintf(&sb, "\t\t%s %s\n", method.Name, typeName(method.Out[0], pgkName))
}
fmt.Fprint(&sb, "\n\t}{\n")
for _, method := range methods {
varn := varName(method.Name)
fmt.Fprintf(&sb, "\t\t%s: %s,\n", method.Name, varn)
}
fmt.Fprint(&sb, "\n\t}\n\n")
fmt.Fprint(&sb, "\treturn json.Marshal(&s)\n}")
pkgImports := append(methods.Imports(), "encoding/json")
if pkgPath != "" {
// Exclude self
for i, pkgImp := range pkgImports {
if pkgImp == pkgPath {
pkgImports = slices.Delete(pkgImports, i, i+1)
}
}
}
return sb.String(), pkgImports
}
func collectMethodsRecursive(pkg string, f []*ast.Field) []string {
var methodNames []string
for _, m := range f {
if m.Names != nil {
methodNames = append(methodNames, m.Names[0].Name)
continue
}
if ident, ok := m.Type.(*ast.Ident); ok && ident.Obj != nil {
switch tt := ident.Obj.Decl.(*ast.TypeSpec).Type.(type) {
case *ast.InterfaceType:
// Embedded interface
methodNames = append(
methodNames,
collectMethodsRecursive(
pkg,
tt.Methods.List)...)
}
} else {
// Embedded, but in a different file/package. Return the
// package.Name and deal with that later.
name := packageName(m.Type)
if !strings.Contains(name, ".") {
// Assume current package
name = pkg + "." + name
}
methodNames = append(methodNames, name)
}
}
return methodNames
}
func firstToLower(name string) string {
return strings.ToLower(name[:1]) + name[1:]
}
func firstToUpper(name string) string {
return strings.ToUpper(name[:1]) + name[1:]
}
func packageName(e ast.Expr) string {
switch tp := e.(type) {
case *ast.Ident:
return tp.Name
case *ast.SelectorExpr:
return fmt.Sprintf("%s.%s", packageName(tp.X), packageName(tp.Sel))
}
return ""
}
func receiverShort(receiver string) string {
return strings.ToLower(trimAsterisk(receiver))[:1]
}
func trimAsterisk(name string) string {
return strings.TrimPrefix(name, "*")
}
func typeName(name, pkg string) string {
return strings.TrimPrefix(name, pkg+".")
}
func uniqueNonEmptyStrings(s []string) []string {
var unique []string
set := map[string]any{}
for _, val := range s {
if val == "" {
continue
}
if _, ok := set[val]; !ok {
unique = append(unique, val)
set[val] = val
}
}
return unique
}
func varName(name string) string {
name = firstToLower(name)
// Adjust some reserved keywords, see https://golang.org/ref/spec#Keywords
switch name {
case "type":
name = "typ"
case "package":
name = "pkg"
// Not reserved, but syntax highlighters has it as a keyword.
case "len":
name = "length"
}
return name
}

20
codegen/methods2_test.go Normal file
View file

@ -0,0 +1,20 @@
// Copyright 2019 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package codegen
type IEmbed interface {
MethodEmbed3(s string) string
MethodEmbed1() string
MethodEmbed2()
}

96
codegen/methods_test.go Normal file
View file

@ -0,0 +1,96 @@
// Copyright 2019 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package codegen
import (
"fmt"
"net"
"os"
"reflect"
"testing"
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/common/herrors"
)
func TestMethods(t *testing.T) {
var (
zeroIE = reflect.TypeOf((*IEmbed)(nil)).Elem()
zeroIEOnly = reflect.TypeOf((*IEOnly)(nil)).Elem()
zeroI = reflect.TypeOf((*I)(nil)).Elem()
)
dir, _ := os.Getwd()
insp := NewInspector(dir)
t.Run("MethodsFromTypes", func(t *testing.T) {
c := qt.New(t)
methods := insp.MethodsFromTypes([]reflect.Type{zeroI}, nil)
methodsStr := fmt.Sprint(methods)
c.Assert(methodsStr, qt.Contains, "Method1(arg0 herrors.ErrorContext)")
c.Assert(methodsStr, qt.Contains, "Method7() interface {}")
c.Assert(methodsStr, qt.Contains, "Method0() string\n Method4() string")
c.Assert(methodsStr, qt.Contains, "MethodEmbed3(arg0 string) string\n MethodEmbed1() string")
c.Assert(methods.Imports(), qt.Contains, "github.com/gohugoio/hugo/common/herrors")
})
t.Run("EmbedOnly", func(t *testing.T) {
c := qt.New(t)
methods := insp.MethodsFromTypes([]reflect.Type{zeroIEOnly}, nil)
methodsStr := fmt.Sprint(methods)
c.Assert(methodsStr, qt.Contains, "MethodEmbed3(arg0 string) string")
})
t.Run("ToMarshalJSON", func(t *testing.T) {
c := qt.New(t)
m, pkg := insp.MethodsFromTypes(
[]reflect.Type{zeroI},
[]reflect.Type{zeroIE}).ToMarshalJSON("*page", "page")
c.Assert(m, qt.Contains, "method6 := p.Method6()")
c.Assert(m, qt.Contains, "Method0: method0,")
c.Assert(m, qt.Contains, "return json.Marshal(&s)")
c.Assert(pkg, qt.Contains, "github.com/gohugoio/hugo/common/herrors")
c.Assert(pkg, qt.Contains, "encoding/json")
fmt.Println(pkg)
})
}
type I interface {
IEmbed
Method0() string
Method4() string
Method1(myerr herrors.ErrorContext)
Method3(myint int, mystring string)
Method5() (string, error)
Method6() *net.IP
Method7() any
Method8() herrors.ErrorContext
method2()
method9() os.FileInfo
}
type IEOnly interface {
IEmbed
}

View file

@ -1,112 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"os"
"runtime"
"runtime/pprof"
"time"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var (
benchmarkTimes int
cpuProfileFile string
memProfileFile string
)
var benchmarkCmd = &cobra.Command{
Use: "benchmark",
Short: "Benchmark Hugo by building a site a number of times.",
Long: `Hugo can build a site many times over and analyze the running process
creating a benchmark.`,
}
func init() {
initHugoBuilderFlags(benchmarkCmd)
initBenchmarkBuildingFlags(benchmarkCmd)
benchmarkCmd.Flags().StringVar(&cpuProfileFile, "cpuprofile", "", "path/filename for the CPU profile file")
benchmarkCmd.Flags().StringVar(&memProfileFile, "memprofile", "", "path/filename for the memory profile file")
benchmarkCmd.Flags().IntVarP(&benchmarkTimes, "count", "n", 13, "number of times to build the site")
benchmarkCmd.RunE = benchmark
}
func benchmark(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig(benchmarkCmd)
if err != nil {
return err
}
c, err := newCommandeer(cfg)
if err != nil {
return err
}
var memProf *os.File
if memProfileFile != "" {
memProf, err = os.Create(memProfileFile)
if err != nil {
return err
}
}
var cpuProf *os.File
if cpuProfileFile != "" {
cpuProf, err = os.Create(cpuProfileFile)
if err != nil {
return err
}
}
var memStats runtime.MemStats
runtime.ReadMemStats(&memStats)
memAllocated := memStats.TotalAlloc
mallocs := memStats.Mallocs
if cpuProf != nil {
pprof.StartCPUProfile(cpuProf)
}
t := time.Now()
for i := 0; i < benchmarkTimes; i++ {
if err = c.resetAndBuildSites(false); err != nil {
return err
}
}
totalTime := time.Since(t)
if memProf != nil {
pprof.WriteHeapProfile(memProf)
memProf.Close()
}
if cpuProf != nil {
pprof.StopCPUProfile()
cpuProf.Close()
}
runtime.ReadMemStats(&memStats)
totalMemAllocated := memStats.TotalAlloc - memAllocated
totalMallocs := memStats.Mallocs - mallocs
jww.FEEDBACK.Println()
jww.FEEDBACK.Printf("Average time per operation: %vms\n", int(1000*totalTime.Seconds()/float64(benchmarkTimes)))
jww.FEEDBACK.Printf("Average memory allocated per operation: %vkB\n", totalMemAllocated/uint64(benchmarkTimes)/1024)
jww.FEEDBACK.Printf("Average allocations per operation: %v\n", totalMallocs/uint64(benchmarkTimes))
return nil
}

View file

@ -1,23 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/spf13/cobra"
)
var checkCmd = &cobra.Command{
Use: "check",
Short: "Contains some verification checks",
}

View file

@ -1,4 +1,4 @@
// Copyright 2017 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,49 +14,666 @@
package commands
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"os/signal"
"path/filepath"
"runtime"
"strings"
"sync"
"sync/atomic"
"syscall"
"time"
"go.uber.org/automaxprocs/maxprocs"
"github.com/bep/clocks"
"github.com/bep/lazycache"
"github.com/bep/logg"
"github.com/bep/overlayfs"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/common/hstrings"
"github.com/gohugoio/hugo/common/htime"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/common/types"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/config/allconfig"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/resources/kinds"
"github.com/spf13/afero"
"github.com/spf13/cobra"
)
type commandeer struct {
*deps.DepsCfg
pathSpec *helpers.PathSpec
configured bool
}
var errHelp = errors.New("help requested")
func (c *commandeer) Set(key string, value interface{}) {
if c.configured {
panic("commandeer cannot be changed")
}
c.Cfg.Set(key, value)
}
// PathSpec lazily creates a new PathSpec, as all the paths must
// be configured before it is created.
func (c *commandeer) PathSpec() *helpers.PathSpec {
c.configured = true
return c.pathSpec
}
func (c *commandeer) initFs(fs *hugofs.Fs) error {
c.DepsCfg.Fs = fs
ps, err := helpers.NewPathSpec(fs, c.Cfg)
// Execute executes a command.
func Execute(args []string) error {
// Default GOMAXPROCS to be CPU limit aware, still respecting GOMAXPROCS env.
maxprocs.Set()
x, err := newExec()
if err != nil {
return err
}
c.pathSpec = ps
args = mapLegacyArgs(args)
cd, err := x.Execute(context.Background(), args)
if cd != nil {
if closer, ok := cd.Root.Command.(types.Closer); ok {
closer.Close()
}
}
if err != nil {
if err == errHelp {
cd.CobraCommand.Help()
fmt.Println()
return nil
}
if simplecobra.IsCommandError(err) {
// Print the help, but also return the error to fail the command.
cd.CobraCommand.Help()
fmt.Println()
}
}
return err
}
type commonConfig struct {
mu *sync.Mutex
configs *allconfig.Configs
cfg config.Provider
fs *hugofs.Fs
}
type configKey struct {
counter int32
ignoreModulesDoesNotExists bool
}
// This is the root command.
type rootCommand struct {
Printf func(format string, v ...any)
Println func(a ...any)
StdOut io.Writer
StdErr io.Writer
logger loggers.Logger
// The main cache busting key for the caches below.
configVersionID atomic.Int32
// Some, but not all commands need access to these.
// Some needs more than one, so keep them in a small cache.
commonConfigs *lazycache.Cache[configKey, *commonConfig]
hugoSites *lazycache.Cache[configKey, *hugolib.HugoSites]
// changesFromBuild received from Hugo in watch mode.
changesFromBuild chan []identity.Identity
commands []simplecobra.Commander
// Flags
source string
buildWatch bool
environment string
// Common build flags.
baseURL string
gc bool
poll string
forceSyncStatic bool
// Profile flags (for debugging of performance problems)
cpuprofile string
memprofile string
mutexprofile string
traceprofile string
printm bool
logLevel string
quiet bool
devMode bool // Hidden flag.
renderToMemory bool
cfgFile string
cfgDir string
}
func (r *rootCommand) isVerbose() bool {
return r.logger.Level() <= logg.LevelInfo
}
func (r *rootCommand) Close() error {
if r.hugoSites != nil {
r.hugoSites.DeleteFunc(func(key configKey, value *hugolib.HugoSites) bool {
if value != nil {
value.Close()
}
return false
})
}
return nil
}
func newCommandeer(cfg *deps.DepsCfg) (*commandeer, error) {
l := cfg.Language
if l == nil {
l = helpers.NewDefaultLanguage(cfg.Cfg)
}
ps, err := helpers.NewPathSpec(cfg.Fs, l)
func (r *rootCommand) Build(cd *simplecobra.Commandeer, bcfg hugolib.BuildCfg, cfg config.Provider) (*hugolib.HugoSites, error) {
h, err := r.Hugo(cfg)
if err != nil {
return nil, err
}
return &commandeer{DepsCfg: cfg, pathSpec: ps}, nil
if err := h.Build(bcfg); err != nil {
return nil, err
}
return h, nil
}
func (r *rootCommand) Commands() []simplecobra.Commander {
return r.commands
}
func (r *rootCommand) ConfigFromConfig(key configKey, oldConf *commonConfig) (*commonConfig, error) {
cc, _, err := r.commonConfigs.GetOrCreate(key, func(key configKey) (*commonConfig, error) {
fs := oldConf.fs
configs, err := allconfig.LoadConfig(
allconfig.ConfigSourceDescriptor{
Flags: oldConf.cfg,
Fs: fs.Source,
Filename: r.cfgFile,
ConfigDir: r.cfgDir,
Logger: r.logger,
Environment: r.environment,
IgnoreModuleDoesNotExist: key.ignoreModulesDoesNotExists,
},
)
if err != nil {
return nil, err
}
if !configs.Base.C.Clock.IsZero() {
// TODO(bep) find a better place for this.
htime.Clock = clocks.Start(configs.Base.C.Clock)
}
return &commonConfig{
mu: oldConf.mu,
configs: configs,
cfg: oldConf.cfg,
fs: fs,
}, nil
})
return cc, err
}
func (r *rootCommand) ConfigFromProvider(key configKey, cfg config.Provider) (*commonConfig, error) {
if cfg == nil {
panic("cfg must be set")
}
cc, _, err := r.commonConfigs.GetOrCreate(key, func(key configKey) (*commonConfig, error) {
var dir string
if r.source != "" {
dir, _ = filepath.Abs(r.source)
} else {
dir, _ = os.Getwd()
}
if cfg == nil {
cfg = config.New()
}
if !cfg.IsSet("workingDir") {
cfg.Set("workingDir", dir)
} else {
if err := os.MkdirAll(cfg.GetString("workingDir"), 0o777); err != nil {
return nil, fmt.Errorf("failed to create workingDir: %w", err)
}
}
// Load the config first to allow publishDir to be configured in config file.
configs, err := allconfig.LoadConfig(
allconfig.ConfigSourceDescriptor{
Flags: cfg,
Fs: hugofs.Os,
Filename: r.cfgFile,
ConfigDir: r.cfgDir,
Environment: r.environment,
Logger: r.logger,
IgnoreModuleDoesNotExist: key.ignoreModulesDoesNotExists,
},
)
if err != nil {
return nil, err
}
base := configs.Base
cfg.Set("publishDir", base.PublishDir)
cfg.Set("publishDirStatic", base.PublishDir)
cfg.Set("publishDirDynamic", base.PublishDir)
renderStaticToDisk := cfg.GetBool("renderStaticToDisk")
sourceFs := hugofs.Os
var destinationFs afero.Fs
if cfg.GetBool("renderToMemory") {
destinationFs = afero.NewMemMapFs()
if renderStaticToDisk {
// Hybrid, render dynamic content to Root.
cfg.Set("publishDirDynamic", "/")
} else {
// Rendering to memoryFS, publish to Root regardless of publishDir.
cfg.Set("publishDirDynamic", "/")
cfg.Set("publishDirStatic", "/")
}
} else {
destinationFs = hugofs.Os
}
fs := hugofs.NewFromSourceAndDestination(sourceFs, destinationFs, cfg)
if renderStaticToDisk {
dynamicFs := fs.PublishDir
publishDirStatic := cfg.GetString("publishDirStatic")
workingDir := cfg.GetString("workingDir")
absPublishDirStatic := paths.AbsPathify(workingDir, publishDirStatic)
staticFs := hugofs.NewBasePathFs(afero.NewOsFs(), absPublishDirStatic)
// Serve from both the static and dynamic fs,
// the first will take priority.
// THis is a read-only filesystem,
// we do all the writes to
// fs.Destination and fs.DestinationStatic.
fs.PublishDirServer = overlayfs.New(
overlayfs.Options{
Fss: []afero.Fs{
dynamicFs,
staticFs,
},
},
)
fs.PublishDirStatic = staticFs
}
if !base.C.Clock.IsZero() {
// TODO(bep) find a better place for this.
htime.Clock = clocks.Start(configs.Base.C.Clock)
}
if base.PrintPathWarnings {
// Note that we only care about the "dynamic creates" here,
// so skip the static fs.
fs.PublishDir = hugofs.NewCreateCountingFs(fs.PublishDir)
}
commonConfig := &commonConfig{
mu: &sync.Mutex{},
configs: configs,
cfg: cfg,
fs: fs,
}
return commonConfig, nil
})
return cc, err
}
func (r *rootCommand) HugFromConfig(conf *commonConfig) (*hugolib.HugoSites, error) {
k := configKey{counter: r.configVersionID.Load()}
h, _, err := r.hugoSites.GetOrCreate(k, func(key configKey) (*hugolib.HugoSites, error) {
depsCfg := r.newDepsConfig(conf)
return hugolib.NewHugoSites(depsCfg)
})
return h, err
}
func (r *rootCommand) Hugo(cfg config.Provider) (*hugolib.HugoSites, error) {
return r.getOrCreateHugo(cfg, false)
}
func (r *rootCommand) getOrCreateHugo(cfg config.Provider, ignoreModuleDoesNotExist bool) (*hugolib.HugoSites, error) {
k := configKey{counter: r.configVersionID.Load(), ignoreModulesDoesNotExists: ignoreModuleDoesNotExist}
h, _, err := r.hugoSites.GetOrCreate(k, func(key configKey) (*hugolib.HugoSites, error) {
conf, err := r.ConfigFromProvider(key, cfg)
if err != nil {
return nil, err
}
depsCfg := r.newDepsConfig(conf)
return hugolib.NewHugoSites(depsCfg)
})
return h, err
}
func (r *rootCommand) newDepsConfig(conf *commonConfig) deps.DepsCfg {
return deps.DepsCfg{Configs: conf.configs, Fs: conf.fs, StdOut: r.logger.StdOut(), StdErr: r.logger.StdErr(), LogLevel: r.logger.Level(), ChangesFromBuild: r.changesFromBuild}
}
func (r *rootCommand) Name() string {
return "hugo"
}
func (r *rootCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
b := newHugoBuilder(r, nil)
if !r.buildWatch {
defer b.postBuild("Total", time.Now())
}
if err := b.loadConfig(cd, false); err != nil {
return err
}
err := func() error {
if r.buildWatch {
defer r.timeTrack(time.Now(), "Built")
}
err := b.build()
if err != nil {
return err
}
return nil
}()
if err != nil {
return err
}
if !r.buildWatch {
// Done.
return nil
}
watchDirs, err := b.getDirList()
if err != nil {
return err
}
watchGroups := helpers.ExtractAndGroupRootPaths(watchDirs)
for _, group := range watchGroups {
r.Printf("Watching for changes in %s\n", group)
}
watcher, err := b.newWatcher(r.poll, watchDirs...)
if err != nil {
return err
}
defer watcher.Close()
r.Println("Press Ctrl+C to stop")
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
<-sigs
return nil
}
func (r *rootCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
r.StdOut = os.Stdout
r.StdErr = os.Stderr
if r.quiet {
r.StdOut = io.Discard
r.StdErr = io.Discard
}
// Used by mkcert (server).
log.SetOutput(r.StdOut)
r.Printf = func(format string, v ...any) {
if !r.quiet {
fmt.Fprintf(r.StdOut, format, v...)
}
}
r.Println = func(a ...any) {
if !r.quiet {
fmt.Fprintln(r.StdOut, a...)
}
}
_, running := runner.Command.(*serverCommand)
var err error
r.logger, err = r.createLogger(running)
if err != nil {
return err
}
// Set up the global logger early to allow info deprecations during config load.
loggers.SetGlobalLogger(r.logger)
r.changesFromBuild = make(chan []identity.Identity, 10)
r.commonConfigs = lazycache.New(lazycache.Options[configKey, *commonConfig]{MaxEntries: 5})
// We don't want to keep stale HugoSites in memory longer than needed.
r.hugoSites = lazycache.New(lazycache.Options[configKey, *hugolib.HugoSites]{
MaxEntries: 1,
OnEvict: func(key configKey, value *hugolib.HugoSites) {
value.Close()
runtime.GC()
},
})
return nil
}
func (r *rootCommand) createLogger(running bool) (loggers.Logger, error) {
level := logg.LevelWarn
if r.devMode {
level = logg.LevelTrace
} else {
if r.logLevel != "" {
switch strings.ToLower(r.logLevel) {
case "debug":
level = logg.LevelDebug
case "info":
level = logg.LevelInfo
case "warn", "warning":
level = logg.LevelWarn
case "error":
level = logg.LevelError
default:
return nil, fmt.Errorf("invalid log level: %q, must be one of debug, warn, info or error", r.logLevel)
}
}
}
optsLogger := loggers.Options{
DistinctLevel: logg.LevelWarn,
Level: level,
StdOut: r.StdOut,
StdErr: r.StdErr,
StoreErrors: running,
}
return loggers.New(optsLogger), nil
}
func (r *rootCommand) resetLogs() {
r.logger.Reset()
loggers.Log().Reset()
}
// IsTestRun reports whether the command is running as a test.
func (r *rootCommand) IsTestRun() bool {
return os.Getenv("HUGO_TESTRUN") != ""
}
func (r *rootCommand) Init(cd *simplecobra.Commandeer) error {
return r.initRootCommand("", cd)
}
func (r *rootCommand) initRootCommand(subCommandName string, cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
commandName := "hugo"
if subCommandName != "" {
commandName = subCommandName
}
cmd.Use = fmt.Sprintf("%s [flags]", commandName)
cmd.Short = "Build your site"
cmd.Long = `COMMAND_NAME is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.
Complete documentation is available at https://gohugo.io/.`
cmd.Long = strings.ReplaceAll(cmd.Long, "COMMAND_NAME", commandName)
// Configure persistent flags
cmd.PersistentFlags().StringVarP(&r.source, "source", "s", "", "filesystem path to read files relative from")
_ = cmd.MarkFlagDirname("source")
cmd.PersistentFlags().StringP("destination", "d", "", "filesystem path to write files to")
_ = cmd.MarkFlagDirname("destination")
cmd.PersistentFlags().StringVarP(&r.environment, "environment", "e", "", "build environment")
_ = cmd.RegisterFlagCompletionFunc("environment", cobra.NoFileCompletions)
cmd.PersistentFlags().StringP("themesDir", "", "", "filesystem path to themes directory")
_ = cmd.MarkFlagDirname("themesDir")
cmd.PersistentFlags().StringP("ignoreVendorPaths", "", "", "ignores any _vendor for module paths matching the given Glob pattern")
cmd.PersistentFlags().BoolP("noBuildLock", "", false, "don't create .hugo_build.lock file")
_ = cmd.RegisterFlagCompletionFunc("ignoreVendorPaths", cobra.NoFileCompletions)
cmd.PersistentFlags().String("clock", "", "set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00")
_ = cmd.RegisterFlagCompletionFunc("clock", cobra.NoFileCompletions)
cmd.PersistentFlags().StringVar(&r.cfgFile, "config", "", "config file (default is hugo.yaml|json|toml)")
_ = cmd.MarkFlagFilename("config", config.ValidConfigFileExtensions...)
cmd.PersistentFlags().StringVar(&r.cfgDir, "configDir", "config", "config dir")
_ = cmd.MarkFlagDirname("configDir")
cmd.PersistentFlags().BoolVar(&r.quiet, "quiet", false, "build in quiet mode")
cmd.PersistentFlags().BoolVarP(&r.renderToMemory, "renderToMemory", "M", false, "render to memory (mostly useful when running the server)")
cmd.PersistentFlags().BoolVarP(&r.devMode, "devMode", "", false, "only used for internal testing, flag hidden.")
cmd.PersistentFlags().StringVar(&r.logLevel, "logLevel", "", "log level (debug|info|warn|error)")
_ = cmd.RegisterFlagCompletionFunc("logLevel", cobra.FixedCompletions([]string{"debug", "info", "warn", "error"}, cobra.ShellCompDirectiveNoFileComp))
cmd.Flags().BoolVarP(&r.buildWatch, "watch", "w", false, "watch filesystem for changes and recreate as needed")
cmd.PersistentFlags().MarkHidden("devMode")
// Configure local flags
applyLocalFlagsBuild(cmd, r)
return nil
}
// A sub set of the complete build flags. These flags are used by new and mod.
func applyLocalFlagsBuildConfig(cmd *cobra.Command, r *rootCommand) {
cmd.Flags().StringSliceP("theme", "t", []string{}, "themes to use (located in /themes/THEMENAME/)")
_ = cmd.MarkFlagDirname("theme")
cmd.Flags().StringVarP(&r.baseURL, "baseURL", "b", "", "hostname (and path) to the root, e.g. https://spf13.com/")
cmd.Flags().StringP("cacheDir", "", "", "filesystem path to cache directory")
_ = cmd.MarkFlagDirname("cacheDir")
cmd.Flags().StringP("contentDir", "c", "", "filesystem path to content directory")
cmd.Flags().StringSliceP("renderSegments", "", []string{}, "named segments to render (configured in the segments config)")
}
// Flags needed to do a build (used by hugo and hugo server commands)
func applyLocalFlagsBuild(cmd *cobra.Command, r *rootCommand) {
applyLocalFlagsBuildConfig(cmd, r)
cmd.Flags().Bool("cleanDestinationDir", false, "remove files from destination not found in static directories")
cmd.Flags().BoolP("buildDrafts", "D", false, "include content marked as draft")
cmd.Flags().BoolP("buildFuture", "F", false, "include content with publishdate in the future")
cmd.Flags().BoolP("buildExpired", "E", false, "include expired content")
cmd.Flags().BoolP("ignoreCache", "", false, "ignores the cache directory")
cmd.Flags().Bool("enableGitInfo", false, "add Git revision, date, author, and CODEOWNERS info to the pages")
cmd.Flags().StringP("layoutDir", "l", "", "filesystem path to layout directory")
_ = cmd.MarkFlagDirname("layoutDir")
cmd.Flags().BoolVar(&r.gc, "gc", false, "enable to run some cleanup tasks (remove unused cache files) after the build")
cmd.Flags().StringVar(&r.poll, "poll", "", "set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes")
_ = cmd.RegisterFlagCompletionFunc("poll", cobra.NoFileCompletions)
cmd.Flags().Bool("panicOnWarning", false, "panic on first WARNING log")
cmd.Flags().Bool("templateMetrics", false, "display metrics about template executions")
cmd.Flags().Bool("templateMetricsHints", false, "calculate some improvement hints when combined with --templateMetrics")
cmd.Flags().BoolVar(&r.forceSyncStatic, "forceSyncStatic", false, "copy all files when static is changed.")
cmd.Flags().BoolP("noTimes", "", false, "don't sync modification time of files")
cmd.Flags().BoolP("noChmod", "", false, "don't sync permission mode of files")
cmd.Flags().BoolP("printI18nWarnings", "", false, "print missing translations")
cmd.Flags().BoolP("printPathWarnings", "", false, "print warnings on duplicate target paths etc.")
cmd.Flags().BoolP("printUnusedTemplates", "", false, "print warnings on unused templates.")
cmd.Flags().StringVarP(&r.cpuprofile, "profile-cpu", "", "", "write cpu profile to `file`")
cmd.Flags().StringVarP(&r.memprofile, "profile-mem", "", "", "write memory profile to `file`")
cmd.Flags().BoolVarP(&r.printm, "printMemoryUsage", "", false, "print memory usage to screen at intervals")
cmd.Flags().StringVarP(&r.mutexprofile, "profile-mutex", "", "", "write Mutex profile to `file`")
cmd.Flags().StringVarP(&r.traceprofile, "trace", "", "", "write trace to `file` (not useful in general)")
// Hide these for now.
cmd.Flags().MarkHidden("profile-cpu")
cmd.Flags().MarkHidden("profile-mem")
cmd.Flags().MarkHidden("profile-mutex")
cmd.Flags().StringSlice("disableKinds", []string{}, "disable different kind of pages (home, RSS etc.)")
_ = cmd.RegisterFlagCompletionFunc("disableKinds", cobra.FixedCompletions(kinds.AllKinds, cobra.ShellCompDirectiveNoFileComp))
cmd.Flags().Bool("minify", false, "minify any supported output format (HTML, XML etc.)")
}
func (r *rootCommand) timeTrack(start time.Time, name string) {
elapsed := time.Since(start)
r.Printf("%s in %v ms\n", name, int(1000*elapsed.Seconds()))
}
type simpleCommand struct {
use string
name string
short string
long string
run func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *rootCommand, args []string) error
withc func(cmd *cobra.Command, r *rootCommand)
initc func(cd *simplecobra.Commandeer) error
commands []simplecobra.Commander
rootCmd *rootCommand
}
func (c *simpleCommand) Commands() []simplecobra.Commander {
return c.commands
}
func (c *simpleCommand) Name() string {
return c.name
}
func (c *simpleCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
if c.run == nil {
return nil
}
return c.run(ctx, cd, c.rootCmd, args)
}
func (c *simpleCommand) Init(cd *simplecobra.Commandeer) error {
c.rootCmd = cd.Root.Command.(*rootCommand)
cmd := cd.CobraCommand
cmd.Short = c.short
cmd.Long = c.long
if c.use != "" {
cmd.Use = c.use
}
if c.withc != nil {
c.withc(cmd, c.rootCmd)
}
return nil
}
func (c *simpleCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
if c.initc != nil {
return c.initc(cd)
}
return nil
}
func mapLegacyArgs(args []string) []string {
if len(args) > 1 && args[0] == "new" && !hstrings.EqualAny(args[1], "site", "theme", "content") {
// Insert "content" as the second argument
args = append(args[:1], append([]string{"content"}, args[1:]...)...)
}
return args
}

73
commands/commands.go Normal file
View file

@ -0,0 +1,73 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"context"
"github.com/bep/simplecobra"
)
// newExec wires up all of Hugo's CLI.
func newExec() (*simplecobra.Exec, error) {
rootCmd := &rootCommand{
commands: []simplecobra.Commander{
newHugoBuildCmd(),
newVersionCmd(),
newEnvCommand(),
newServerCommand(),
newDeployCommand(),
newConfigCommand(),
newNewCommand(),
newConvertCommand(),
newImportCommand(),
newListCommand(),
newModCommands(),
newGenCommand(),
newReleaseCommand(),
},
}
return simplecobra.New(rootCmd)
}
func newHugoBuildCmd() simplecobra.Commander {
return &hugoBuildCommand{}
}
// hugoBuildCommand just delegates to the rootCommand.
type hugoBuildCommand struct {
rootCmd *rootCommand
}
func (c *hugoBuildCommand) Commands() []simplecobra.Commander {
return nil
}
func (c *hugoBuildCommand) Name() string {
return "build"
}
func (c *hugoBuildCommand) Init(cd *simplecobra.Commandeer) error {
c.rootCmd = cd.Root.Command.(*rootCommand)
return c.rootCmd.initRootCommand("build", cd)
}
func (c *hugoBuildCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
return c.rootCmd.PreRun(cd, runner)
}
func (c *hugoBuildCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
return c.rootCmd.Run(ctx, cd, args)
}

239
commands/config.go Normal file
View file

@ -0,0 +1,239 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"context"
"encoding/json"
"fmt"
"os"
"strings"
"time"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/config/allconfig"
"github.com/gohugoio/hugo/modules"
"github.com/gohugoio/hugo/parser"
"github.com/gohugoio/hugo/parser/metadecoders"
"github.com/spf13/cobra"
)
// newConfigCommand creates a new config command and its subcommands.
func newConfigCommand() *configCommand {
return &configCommand{
commands: []simplecobra.Commander{
&configMountsCommand{},
},
}
}
type configCommand struct {
r *rootCommand
format string
lang string
printZero bool
commands []simplecobra.Commander
}
func (c *configCommand) Commands() []simplecobra.Commander {
return c.commands
}
func (c *configCommand) Name() string {
return "config"
}
func (c *configCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
conf, err := c.r.ConfigFromProvider(configKey{counter: c.r.configVersionID.Load()}, flagsToCfg(cd, nil))
if err != nil {
return err
}
var config *allconfig.Config
if c.lang != "" {
var found bool
config, found = conf.configs.LanguageConfigMap[c.lang]
if !found {
return fmt.Errorf("language %q not found", c.lang)
}
} else {
config = conf.configs.LanguageConfigSlice[0]
}
var buf bytes.Buffer
dec := json.NewEncoder(&buf)
dec.SetIndent("", " ")
dec.SetEscapeHTML(false)
if err := dec.Encode(parser.ReplacingJSONMarshaller{Value: config, KeysToLower: true, OmitEmpty: !c.printZero}); err != nil {
return err
}
format := strings.ToLower(c.format)
switch format {
case "json":
os.Stdout.Write(buf.Bytes())
default:
// Decode the JSON to a map[string]interface{} and then unmarshal it again to the correct format.
var m map[string]any
if err := json.Unmarshal(buf.Bytes(), &m); err != nil {
return err
}
maps.ConvertFloat64WithNoDecimalsToInt(m)
switch format {
case "yaml":
return parser.InterfaceToConfig(m, metadecoders.YAML, os.Stdout)
case "toml":
return parser.InterfaceToConfig(m, metadecoders.TOML, os.Stdout)
default:
return fmt.Errorf("unsupported format: %q", format)
}
}
return nil
}
func (c *configCommand) Init(cd *simplecobra.Commandeer) error {
c.r = cd.Root.Command.(*rootCommand)
cmd := cd.CobraCommand
cmd.Short = "Display site configuration"
cmd.Long = `Display site configuration, both default and custom settings.`
cmd.Flags().StringVar(&c.format, "format", "toml", "preferred file format (toml, yaml or json)")
_ = cmd.RegisterFlagCompletionFunc("format", cobra.FixedCompletions([]string{"toml", "yaml", "json"}, cobra.ShellCompDirectiveNoFileComp))
cmd.Flags().StringVar(&c.lang, "lang", "", "the language to display config for. Defaults to the first language defined.")
cmd.Flags().BoolVar(&c.printZero, "printZero", false, `include config options with zero values (e.g. false, 0, "") in the output`)
_ = cmd.RegisterFlagCompletionFunc("lang", cobra.NoFileCompletions)
applyLocalFlagsBuildConfig(cmd, c.r)
return nil
}
func (c *configCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
return nil
}
type configModMount struct {
Source string `json:"source"`
Target string `json:"target"`
Lang string `json:"lang,omitempty"`
}
type configModMounts struct {
verbose bool
m modules.Module
}
// MarshalJSON is for internal use only.
func (m *configModMounts) MarshalJSON() ([]byte, error) {
var mounts []configModMount
for _, mount := range m.m.Mounts() {
mounts = append(mounts, configModMount{
Source: mount.Source,
Target: mount.Target,
Lang: mount.Lang,
})
}
var ownerPath string
if m.m.Owner() != nil {
ownerPath = m.m.Owner().Path()
}
if m.verbose {
config := m.m.Config()
return json.Marshal(&struct {
Path string `json:"path"`
Version string `json:"version"`
Time time.Time `json:"time"`
Owner string `json:"owner"`
Dir string `json:"dir"`
Meta map[string]any `json:"meta"`
HugoVersion modules.HugoVersion `json:"hugoVersion"`
Mounts []configModMount `json:"mounts"`
}{
Path: m.m.Path(),
Version: m.m.Version(),
Time: m.m.Time(),
Owner: ownerPath,
Dir: m.m.Dir(),
Meta: config.Params,
HugoVersion: config.HugoVersion,
Mounts: mounts,
})
}
return json.Marshal(&struct {
Path string `json:"path"`
Version string `json:"version"`
Time time.Time `json:"time"`
Owner string `json:"owner"`
Dir string `json:"dir"`
Mounts []configModMount `json:"mounts"`
}{
Path: m.m.Path(),
Version: m.m.Version(),
Time: m.m.Time(),
Owner: ownerPath,
Dir: m.m.Dir(),
Mounts: mounts,
})
}
type configMountsCommand struct {
r *rootCommand
configCmd *configCommand
}
func (c *configMountsCommand) Commands() []simplecobra.Commander {
return nil
}
func (c *configMountsCommand) Name() string {
return "mounts"
}
func (c *configMountsCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
r := c.configCmd.r
conf, err := r.ConfigFromProvider(configKey{counter: c.r.configVersionID.Load()}, flagsToCfg(cd, nil))
if err != nil {
return err
}
for _, m := range conf.configs.Modules {
if err := parser.InterfaceToConfig(&configModMounts{m: m, verbose: r.isVerbose()}, metadecoders.JSON, os.Stdout); err != nil {
return err
}
}
return nil
}
func (c *configMountsCommand) Init(cd *simplecobra.Commandeer) error {
c.r = cd.Root.Command.(*rootCommand)
cmd := cd.CobraCommand
cmd.Short = "Print the configured file mounts"
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, c.r)
return nil
}
func (c *configMountsCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
c.configCmd = cd.Parent.Command.(*configCommand)
return nil
}

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,144 +14,215 @@
package commands
import (
"errors"
"bytes"
"context"
"fmt"
"path/filepath"
"strings"
"time"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cast"
"github.com/gohugoio/hugo/parser/metadecoders"
"github.com/gohugoio/hugo/parser/pageparser"
"github.com/gohugoio/hugo/resources/page"
"github.com/spf13/cobra"
)
var outputDir string
var unsafe bool
var convertCmd = &cobra.Command{
Use: "convert",
Short: "Convert your content to different formats",
Long: `Convert your content (e.g. front matter) to different formats.
See convert's subcommands toJSON, toTOML and toYAML for more information.`,
RunE: nil,
}
var toJSONCmd = &cobra.Command{
Use: "toJSON",
Short: "Convert front matter to JSON",
Long: `toJSON converts all front matter in the content directory
func newConvertCommand() *convertCommand {
var c *convertCommand
c = &convertCommand{
commands: []simplecobra.Commander{
&simpleCommand{
name: "toJSON",
short: "Convert front matter to JSON",
long: `toJSON converts all front matter in the content directory
to use JSON for the front matter.`,
RunE: func(cmd *cobra.Command, args []string) error {
return convertContents(rune([]byte(parser.JSONLead)[0]))
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
return c.convertContents(metadecoders.JSON)
},
}
var toTOMLCmd = &cobra.Command{
Use: "toTOML",
Short: "Convert front matter to TOML",
Long: `toTOML converts all front matter in the content directory
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
&simpleCommand{
name: "toTOML",
short: "Convert front matter to TOML",
long: `toTOML converts all front matter in the content directory
to use TOML for the front matter.`,
RunE: func(cmd *cobra.Command, args []string) error {
return convertContents(rune([]byte(parser.TOMLLead)[0]))
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
return c.convertContents(metadecoders.TOML)
},
}
var toYAMLCmd = &cobra.Command{
Use: "toYAML",
Short: "Convert front matter to YAML",
Long: `toYAML converts all front matter in the content directory
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
&simpleCommand{
name: "toYAML",
short: "Convert front matter to YAML",
long: `toYAML converts all front matter in the content directory
to use YAML for the front matter.`,
RunE: func(cmd *cobra.Command, args []string) error {
return convertContents(rune([]byte(parser.YAMLLead)[0]))
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
return c.convertContents(metadecoders.YAML)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
},
}
return c
}
func init() {
convertCmd.AddCommand(toJSONCmd)
convertCmd.AddCommand(toTOMLCmd)
convertCmd.AddCommand(toYAMLCmd)
convertCmd.PersistentFlags().StringVarP(&outputDir, "output", "o", "", "filesystem path to write files to")
convertCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
convertCmd.PersistentFlags().BoolVar(&unsafe, "unsafe", false, "enable less safe operations, please backup first")
convertCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
type convertCommand struct {
// Flags.
outputDir string
unsafe bool
// Deps.
r *rootCommand
h *hugolib.HugoSites
// Commands.
commands []simplecobra.Commander
}
func convertContents(mark rune) error {
cfg, err := InitializeConfig()
func (c *convertCommand) Commands() []simplecobra.Commander {
return c.commands
}
func (c *convertCommand) Name() string {
return "convert"
}
func (c *convertCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
return nil
}
func (c *convertCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "Convert front matter to another format"
cmd.Long = `Convert front matter to another format.
See convert's subcommands toJSON, toTOML and toYAML for more information.`
cmd.PersistentFlags().StringVarP(&c.outputDir, "output", "o", "", "filesystem path to write files to")
_ = cmd.MarkFlagDirname("output")
cmd.PersistentFlags().BoolVar(&c.unsafe, "unsafe", false, "enable less safe operations, please backup first")
cmd.RunE = nil
return nil
}
func (c *convertCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
c.r = cd.Root.Command.(*rootCommand)
cfg := config.New()
cfg.Set("buildDrafts", true)
h, err := c.r.Hugo(flagsToCfg(cd, cfg))
if err != nil {
return err
}
c.h = h
return nil
}
h, err := hugolib.NewHugoSites(*cfg)
func (c *convertCommand) convertAndSavePage(p page.Page, site *hugolib.Site, targetFormat metadecoders.Format) error {
// The resources are not in .Site.AllPages.
for _, r := range p.Resources().ByType("page") {
if err := c.convertAndSavePage(r.(page.Page), site, targetFormat); err != nil {
return err
}
}
if p.File() == nil {
// No content file.
return nil
}
errMsg := fmt.Errorf("error processing file %q", p.File().Path())
site.Log.Infoln("attempting to convert", p.File().Filename())
f := p.File()
file, err := f.FileInfo().Meta().Open()
if err != nil {
return err
site.Log.Errorln(errMsg)
file.Close()
return nil
}
site := h.Sites[0]
if err = site.Initialise(); err != nil {
return err
}
if site.Source == nil {
panic("site.Source not set")
}
if len(site.Source.Files()) < 1 {
return errors.New("No source files found")
}
contentDir := site.PathSpec.AbsPathify(site.Cfg.GetString("contentDir"))
site.Log.FEEDBACK.Println("processing", len(site.Source.Files()), "content files")
for _, file := range site.Source.Files() {
site.Log.INFO.Println("Attempting to convert", file.LogicalName())
page, err := site.NewPage(file.LogicalName())
pf, err := pageparser.ParseFrontMatterAndContent(file)
if err != nil {
site.Log.Errorln(errMsg)
file.Close()
return err
}
psr, err := parser.ReadFrom(file.Contents)
if err != nil {
site.Log.ERROR.Println("Error processing file:", file.Path())
return err
}
metadata, err := psr.Metadata()
if err != nil {
site.Log.ERROR.Println("Error processing file:", file.Path())
return err
}
file.Close()
// better handling of dates in formats that don't have support for them
if mark == parser.FormatToLeadRune("json") || mark == parser.FormatToLeadRune("yaml") || mark == parser.FormatToLeadRune("toml") {
newMetadata := cast.ToStringMap(metadata)
for k, v := range newMetadata {
if pf.FrontMatterFormat == metadecoders.JSON || pf.FrontMatterFormat == metadecoders.YAML || pf.FrontMatterFormat == metadecoders.TOML {
for k, v := range pf.FrontMatter {
switch vv := v.(type) {
case time.Time:
newMetadata[k] = vv.Format(time.RFC3339)
pf.FrontMatter[k] = vv.Format(time.RFC3339)
}
}
metadata = newMetadata
}
page.SetDir(filepath.Join(contentDir, file.Dir()))
page.SetSourceContent(psr.Content())
if err = page.SetSourceMetaData(metadata, mark); err != nil {
site.Log.ERROR.Printf("Failed to set source metadata for file %q: %s. For more info see For more info see https://github.com/gohugoio/hugo/issues/2458", page.FullFilePath(), err)
var newContent bytes.Buffer
err = parser.InterfaceToFrontMatter(pf.FrontMatter, targetFormat, &newContent)
if err != nil {
site.Log.Errorln(errMsg)
return err
}
newContent.Write(pf.Content)
newFilename := p.File().Filename()
if c.outputDir != "" {
contentDir := strings.TrimSuffix(newFilename, p.File().Path())
contentDir = filepath.Base(contentDir)
newFilename = filepath.Join(c.outputDir, contentDir, p.File().Path())
}
fs := hugofs.Os
if err := helpers.WriteToDisk(newFilename, &newContent, fs); err != nil {
return fmt.Errorf("failed to save file %q:: %w", newFilename, err)
}
return nil
}
func (c *convertCommand) convertContents(format metadecoders.Format) error {
if c.outputDir == "" && !c.unsafe {
return newUserError("Unsafe operation not allowed, use --unsafe or set a different output path")
}
if err := c.h.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return err
}
site := c.h.Sites[0]
var pagesBackedByFile page.Pages
for _, p := range site.AllPages() {
if p.File() == nil {
continue
}
pagesBackedByFile = append(pagesBackedByFile, p)
}
if outputDir != "" {
if err = page.SaveSourceAs(filepath.Join(outputDir, page.FullFilePath())); err != nil {
return fmt.Errorf("Failed to save file %q: %s", page.FullFilePath(), err)
}
} else {
if unsafe {
if err = page.SaveSource(); err != nil {
return fmt.Errorf("Failed to save file %q: %s", page.FullFilePath(), err)
}
} else {
site.Log.FEEDBACK.Println("Unsafe operation not allowed, use --unsafe or set a different output path")
}
site.Log.Println("processing", len(pagesBackedByFile), "content files")
for _, p := range site.AllPages() {
if err := c.convertAndSavePage(p, site, format); err != nil {
return err
}
}
return nil

51
commands/deploy.go Normal file
View file

@ -0,0 +1,51 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build withdeploy
package commands
import (
"context"
"github.com/gohugoio/hugo/deploy"
"github.com/bep/simplecobra"
"github.com/spf13/cobra"
)
func newDeployCommand() simplecobra.Commander {
return &simpleCommand{
name: "deploy",
short: "Deploy your site to a cloud provider",
long: `Deploy your site to a cloud provider
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
documentation.
`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.Hugo(flagsToCfgWithAdditionalConfigBase(cd, nil, "deployment"))
if err != nil {
return err
}
deployer, err := deploy.New(h.Configs.GetFirstLanguageConfig(), h.Log, h.PathSpec.PublishFs)
if err != nil {
return err
}
return deployer.Deploy(ctx)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
applyDeployFlags(cmd, r)
},
}
}

33
commands/deploy_flags.go Normal file
View file

@ -0,0 +1,33 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/gohugoio/hugo/deploy/deployconfig"
"github.com/spf13/cobra"
)
func applyDeployFlags(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.Flags().String("target", "", "target deployment from deployments section in config file; defaults to the first one")
_ = cmd.RegisterFlagCompletionFunc("target", cobra.NoFileCompletions)
cmd.Flags().Bool("confirm", false, "ask for confirmation before making changes to the target")
cmd.Flags().Bool("dryRun", false, "dry run")
cmd.Flags().Bool("force", false, "force upload of all files")
cmd.Flags().Bool("invalidateCDN", deployconfig.DefaultConfig.InvalidateCDN, "invalidate the CDN cache listed in the deployment target")
cmd.Flags().Int("maxDeletes", deployconfig.DefaultConfig.MaxDeletes, "maximum # of files to delete, or -1 to disable")
_ = cmd.RegisterFlagCompletionFunc("maxDeletes", cobra.NoFileCompletions)
cmd.Flags().Int("workers", deployconfig.DefaultConfig.Workers, "number of workers to transfer files. defaults to 10")
_ = cmd.RegisterFlagCompletionFunc("workers", cobra.NoFileCompletions)
}

50
commands/deploy_off.go Normal file
View file

@ -0,0 +1,50 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !withdeploy
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"context"
"errors"
"github.com/bep/simplecobra"
"github.com/spf13/cobra"
)
func newDeployCommand() simplecobra.Commander {
return &simpleCommand{
name: "deploy",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
return errors.New("deploy not supported in this version of Hugo; install a release with 'withdeploy' in the archive filename or build yourself with the 'withdeploy' build tag. Also see https://github.com/gohugoio/hugo/pull/12995")
},
withc: func(cmd *cobra.Command, r *rootCommand) {
applyDeployFlags(cmd, r)
cmd.Hidden = true
},
}
}

View file

@ -1,4 +1,4 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,22 +14,57 @@
package commands
import (
"context"
"runtime"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/common/hugo"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var envCmd = &cobra.Command{
Use: "env",
Short: "Print Hugo version and environment info",
Long: `Print Hugo version and environment info. This is useful in Hugo bug reports.`,
RunE: func(cmd *cobra.Command, args []string) error {
printHugoVersion()
jww.FEEDBACK.Printf("GOOS=%q\n", runtime.GOOS)
jww.FEEDBACK.Printf("GOARCH=%q\n", runtime.GOARCH)
jww.FEEDBACK.Printf("GOVERSION=%q\n", runtime.Version())
func newEnvCommand() simplecobra.Commander {
return &simpleCommand{
name: "env",
short: "Display version and environment info",
long: "Display version and environment info. This is useful in Hugo bug reports",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
r.Printf("%s\n", hugo.BuildVersionString())
r.Printf("GOOS=%q\n", runtime.GOOS)
r.Printf("GOARCH=%q\n", runtime.GOARCH)
r.Printf("GOVERSION=%q\n", runtime.Version())
if r.isVerbose() {
deps := hugo.GetDependencyList()
for _, dep := range deps {
r.Printf("%s\n", dep)
}
} else {
// These are also included in the GetDependencyList above;
// always print these as these are most likely the most useful to know about.
deps := hugo.GetDependencyListNonGo()
for _, dep := range deps {
r.Printf("%s\n", dep)
}
}
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
}
}
func newVersionCmd() simplecobra.Commander {
return &simpleCommand{
name: "version",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
r.Println(hugo.BuildVersionString())
return nil
},
short: "Display version",
long: "Display version and environment info. This is useful in Hugo bug reports.",
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
}
}

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,10 +14,290 @@
package commands
import (
"bytes"
"context"
"encoding/json"
"fmt"
"os"
"path"
"path/filepath"
"slices"
"strings"
"github.com/alecthomas/chroma/v2"
"github.com/alecthomas/chroma/v2/formatters/html"
"github.com/alecthomas/chroma/v2/styles"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/common/hugo"
"github.com/gohugoio/hugo/docshelper"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"gopkg.in/yaml.v2"
)
var genCmd = &cobra.Command{
Use: "gen",
Short: "A collection of several useful generators.",
func newGenCommand() *genCommand {
var (
// Flags.
gendocdir string
genmandir string
// Chroma flags.
style string
highlightStyle string
lineNumbersInlineStyle string
lineNumbersTableStyle string
omitEmpty bool
)
newChromaStyles := func() simplecobra.Commander {
return &simpleCommand{
name: "chromastyles",
short: "Generate CSS stylesheet for the Chroma code highlighter",
long: `Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if markup.highlight.noClasses is disabled in config.
See https://xyproto.github.io/splash/docs/all.html for a preview of the available styles`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
style = strings.ToLower(style)
if !slices.Contains(styles.Names(), style) {
return fmt.Errorf("invalid style: %s", style)
}
builder := styles.Get(style).Builder()
if highlightStyle != "" {
builder.Add(chroma.LineHighlight, highlightStyle)
}
if lineNumbersInlineStyle != "" {
builder.Add(chroma.LineNumbers, lineNumbersInlineStyle)
}
if lineNumbersTableStyle != "" {
builder.Add(chroma.LineNumbersTable, lineNumbersTableStyle)
}
style, err := builder.Build()
if err != nil {
return err
}
var formatter *html.Formatter
if omitEmpty {
formatter = html.New(html.WithClasses(true))
} else {
formatter = html.New(html.WithAllClasses(true))
}
w := os.Stdout
fmt.Fprintf(w, "/* Generated using: hugo %s */\n\n", strings.Join(os.Args[1:], " "))
formatter.WriteCSS(w, style)
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.PersistentFlags().StringVar(&style, "style", "friendly", "highlighter style (see https://xyproto.github.io/splash/docs/)")
_ = cmd.RegisterFlagCompletionFunc("style", cobra.NoFileCompletions)
cmd.PersistentFlags().StringVar(&highlightStyle, "highlightStyle", "", `foreground and background colors for highlighted lines, e.g. --highlightStyle "#fff000 bg:#000fff"`)
_ = cmd.RegisterFlagCompletionFunc("highlightStyle", cobra.NoFileCompletions)
cmd.PersistentFlags().StringVar(&lineNumbersInlineStyle, "lineNumbersInlineStyle", "", `foreground and background colors for inline line numbers, e.g. --lineNumbersInlineStyle "#fff000 bg:#000fff"`)
_ = cmd.RegisterFlagCompletionFunc("lineNumbersInlineStyle", cobra.NoFileCompletions)
cmd.PersistentFlags().StringVar(&lineNumbersTableStyle, "lineNumbersTableStyle", "", `foreground and background colors for table line numbers, e.g. --lineNumbersTableStyle "#fff000 bg:#000fff"`)
_ = cmd.RegisterFlagCompletionFunc("lineNumbersTableStyle", cobra.NoFileCompletions)
cmd.PersistentFlags().BoolVar(&omitEmpty, "omitEmpty", false, `omit empty CSS rules`)
_ = cmd.RegisterFlagCompletionFunc("omitEmpty", cobra.NoFileCompletions)
},
}
}
newMan := func() simplecobra.Commander {
return &simpleCommand{
name: "man",
short: "Generate man pages for the Hugo CLI",
long: `This command automatically generates up-to-date man pages of Hugo's
command-line interface. By default, it creates the man page files
in the "man" directory under the current directory.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
header := &doc.GenManHeader{
Section: "1",
Manual: "Hugo Manual",
Source: fmt.Sprintf("Hugo %s", hugo.CurrentVersion),
}
if !strings.HasSuffix(genmandir, helpers.FilePathSeparator) {
genmandir += helpers.FilePathSeparator
}
if found, _ := helpers.Exists(genmandir, hugofs.Os); !found {
r.Println("Directory", genmandir, "does not exist, creating...")
if err := hugofs.Os.MkdirAll(genmandir, 0o777); err != nil {
return err
}
}
cd.CobraCommand.Root().DisableAutoGenTag = true
r.Println("Generating Hugo man pages in", genmandir, "...")
doc.GenManTree(cd.CobraCommand.Root(), header, genmandir)
r.Println("Done.")
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.PersistentFlags().StringVar(&genmandir, "dir", "man/", "the directory to write the man pages.")
_ = cmd.MarkFlagDirname("dir")
},
}
}
newGen := func() simplecobra.Commander {
const gendocFrontmatterTemplate = `---
title: "%s"
slug: %s
url: %s
---
`
return &simpleCommand{
name: "doc",
short: "Generate Markdown documentation for the Hugo CLI",
long: `Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation
of Hugo's command-line interface for https://gohugo.io/.
It creates one Markdown file per command with front matter suitable
for rendering in Hugo.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
cd.CobraCommand.VisitParents(func(c *cobra.Command) {
// Disable the "Auto generated by spf13/cobra on DATE"
// as it creates a lot of diffs.
c.DisableAutoGenTag = true
})
if !strings.HasSuffix(gendocdir, helpers.FilePathSeparator) {
gendocdir += helpers.FilePathSeparator
}
if found, _ := helpers.Exists(gendocdir, hugofs.Os); !found {
r.Println("Directory", gendocdir, "does not exist, creating...")
if err := hugofs.Os.MkdirAll(gendocdir, 0o777); err != nil {
return err
}
}
prepender := func(filename string) string {
name := filepath.Base(filename)
base := strings.TrimSuffix(name, path.Ext(name))
url := "/docs/reference/commands/" + strings.ToLower(base) + "/"
return fmt.Sprintf(gendocFrontmatterTemplate, strings.Replace(base, "_", " ", -1), base, url)
}
linkHandler := func(name string) string {
base := strings.TrimSuffix(name, path.Ext(name))
return "/docs/reference/commands/" + strings.ToLower(base) + "/"
}
r.Println("Generating Hugo command-line documentation in", gendocdir, "...")
doc.GenMarkdownTreeCustom(cd.CobraCommand.Root(), gendocdir, prepender, linkHandler)
r.Println("Done.")
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.PersistentFlags().StringVar(&gendocdir, "dir", "/tmp/hugodoc/", "the directory to write the doc.")
_ = cmd.MarkFlagDirname("dir")
},
}
}
var docsHelperTarget string
newDocsHelper := func() simplecobra.Commander {
return &simpleCommand{
name: "docshelper",
short: "Generate some data files for the Hugo docs",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
r.Println("Generate docs data to", docsHelperTarget)
var buf bytes.Buffer
jsonEnc := json.NewEncoder(&buf)
configProvider := func() docshelper.DocProvider {
conf := hugolib.DefaultConfig()
conf.CacheDir = "" // The default value does not make sense in the docs.
defaultConfig := parser.NullBoolJSONMarshaller{Wrapped: parser.LowerCaseCamelJSONMarshaller{Value: conf}}
return docshelper.DocProvider{"config": defaultConfig}
}
docshelper.AddDocProviderFunc(configProvider)
if err := jsonEnc.Encode(docshelper.GetDocProvider()); err != nil {
return err
}
// Decode the JSON to a map[string]interface{} and then unmarshal it again to the correct format.
var m map[string]any
if err := json.Unmarshal(buf.Bytes(), &m); err != nil {
return err
}
targetFile := filepath.Join(docsHelperTarget, "docs.yaml")
f, err := os.Create(targetFile)
if err != nil {
return err
}
defer f.Close()
yamlEnc := yaml.NewEncoder(f)
if err := yamlEnc.Encode(m); err != nil {
return err
}
r.Println("Done!")
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.Hidden = true
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.PersistentFlags().StringVarP(&docsHelperTarget, "dir", "", "docs/data", "data dir")
},
}
}
return &genCommand{
commands: []simplecobra.Commander{
newChromaStyles(),
newGen(),
newMan(),
newDocsHelper(),
},
}
}
type genCommand struct {
rootCmd *rootCommand
commands []simplecobra.Commander
}
func (c *genCommand) Commands() []simplecobra.Commander {
return c.commands
}
func (c *genCommand) Name() string {
return "gen"
}
func (c *genCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
return nil
}
func (c *genCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "Generate documentation and syntax highlighting styles"
cmd.Long = "Generate documentation for your project using Hugo's documentation engine, including syntax highlighting for various programming languages."
cmd.RunE = nil
return nil
}
func (c *genCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
c.rootCmd = cd.Root.Command.(*rootCommand)
return nil
}

View file

@ -1,70 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var autocompleteTarget string
// bash for now (zsh and others will come)
var autocompleteType string
var genautocompleteCmd = &cobra.Command{
Use: "autocomplete",
Short: "Generate shell autocompletion script for Hugo",
Long: `Generates a shell autocompletion script for Hugo.
NOTE: The current version supports Bash only.
This should work for *nix systems with Bash installed.
By default, the file is written directly to /etc/bash_completion.d
for convenience, and the command may need superuser rights, e.g.:
$ sudo hugo gen autocomplete
Add ` + "`--completionfile=/path/to/file`" + ` flag to set alternative
file-path and name.
Logout and in again to reload the completion scripts,
or just source them in directly:
$ . /etc/bash_completion`,
RunE: func(cmd *cobra.Command, args []string) error {
if autocompleteType != "bash" {
return newUserError("Only Bash is supported for now")
}
err := cmd.Root().GenBashCompletionFile(autocompleteTarget)
if err != nil {
return err
}
jww.FEEDBACK.Println("Bash completion file for Hugo saved to", autocompleteTarget)
return nil
},
}
func init() {
genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", "/etc/bash_completion.d/hugo.sh", "autocompletion file")
genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "autocompletion type (currently only bash supported)")
// For bash-completion
genautocompleteCmd.PersistentFlags().SetAnnotation("completionfile", cobra.BashCompFilenameExt, []string{})
}

View file

@ -1,86 +0,0 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"fmt"
"path"
"path/filepath"
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
jww "github.com/spf13/jwalterweatherman"
)
const gendocFrontmatterTemplate = `---
date: %s
title: "%s"
slug: %s
url: %s
---
`
var gendocdir string
var gendocCmd = &cobra.Command{
Use: "doc",
Short: "Generate Markdown documentation for the Hugo CLI.",
Long: `Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation
of Hugo's command-line interface for http://gohugo.io/.
It creates one Markdown file per command with front matter suitable
for rendering in Hugo.`,
RunE: func(cmd *cobra.Command, args []string) error {
if !strings.HasSuffix(gendocdir, helpers.FilePathSeparator) {
gendocdir += helpers.FilePathSeparator
}
if found, _ := helpers.Exists(gendocdir, hugofs.Os); !found {
jww.FEEDBACK.Println("Directory", gendocdir, "does not exist, creating...")
if err := hugofs.Os.MkdirAll(gendocdir, 0777); err != nil {
return err
}
}
now := time.Now().Format(time.RFC3339)
prepender := func(filename string) string {
name := filepath.Base(filename)
base := strings.TrimSuffix(name, path.Ext(name))
url := "/commands/" + strings.ToLower(base) + "/"
return fmt.Sprintf(gendocFrontmatterTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
}
linkHandler := func(name string) string {
base := strings.TrimSuffix(name, path.Ext(name))
return "/commands/" + strings.ToLower(base) + "/"
}
jww.FEEDBACK.Println("Generating Hugo command-line documentation in", gendocdir, "...")
doc.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
jww.FEEDBACK.Println("Done.")
return nil
},
}
func init() {
gendocCmd.PersistentFlags().StringVar(&gendocdir, "dir", "/tmp/hugodoc/", "the directory to write the doc.")
// For bash-completion
gendocCmd.PersistentFlags().SetAnnotation("dir", cobra.BashCompSubdirsInDir, []string{})
}

View file

@ -1,70 +0,0 @@
// Copyright 2017-present The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"github.com/gohugoio/hugo/docshelper"
"github.com/spf13/cobra"
)
type genDocsHelper struct {
target string
cmd *cobra.Command
}
func createGenDocsHelper() *genDocsHelper {
g := &genDocsHelper{
cmd: &cobra.Command{
Use: "docshelper",
Short: "Generate some data files for the Hugo docs.",
Hidden: true,
},
}
g.cmd.RunE = func(cmd *cobra.Command, args []string) error {
return g.generate()
}
g.cmd.PersistentFlags().StringVarP(&g.target, "dir", "", "docs/data", "data dir")
return g
}
func (g *genDocsHelper) generate() error {
fmt.Println("Generate docs data to", g.target)
targetFile := filepath.Join(g.target, "docs.json")
f, err := os.Create(targetFile)
if err != nil {
return err
}
defer f.Close()
enc := json.NewEncoder(f)
enc.SetIndent("", " ")
if err := enc.Encode(docshelper.DocProviders); err != nil {
return err
}
fmt.Println("Done!")
return nil
}

View file

@ -1,66 +0,0 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"fmt"
"strings"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
jww "github.com/spf13/jwalterweatherman"
)
var genmandir string
var genmanCmd = &cobra.Command{
Use: "man",
Short: "Generate man pages for the Hugo CLI",
Long: `This command automatically generates up-to-date man pages of Hugo's
command-line interface. By default, it creates the man page files
in the "man" directory under the current directory.`,
RunE: func(cmd *cobra.Command, args []string) error {
header := &doc.GenManHeader{
Section: "1",
Manual: "Hugo Manual",
Source: fmt.Sprintf("Hugo %s", helpers.CurrentHugoVersion),
}
if !strings.HasSuffix(genmandir, helpers.FilePathSeparator) {
genmandir += helpers.FilePathSeparator
}
if found, _ := helpers.Exists(genmandir, hugofs.Os); !found {
jww.FEEDBACK.Println("Directory", genmandir, "does not exist, creating...")
if err := hugofs.Os.MkdirAll(genmandir, 0777); err != nil {
return err
}
}
cmd.Root().DisableAutoGenTag = true
jww.FEEDBACK.Println("Generating Hugo man pages in", genmandir, "...")
doc.GenManTree(cmd.Root(), header, genmandir)
jww.FEEDBACK.Println("Done.")
return nil
},
}
func init() {
genmanCmd.PersistentFlags().StringVar(&genmandir, "dir", "man/", "the directory to write the man pages.")
// For bash-completion
genmanCmd.PersistentFlags().SetAnnotation("dir", cobra.BashCompSubdirsInDir, []string{})
}

121
commands/helpers.go Normal file
View file

@ -0,0 +1,121 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"errors"
"fmt"
"log"
"os"
"path/filepath"
"strings"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/config"
"github.com/spf13/pflag"
)
const (
ansiEsc = "\u001B"
clearLine = "\r\033[K"
hideCursor = ansiEsc + "[?25l"
showCursor = ansiEsc + "[?25h"
)
func newUserError(a ...any) *simplecobra.CommandError {
return &simplecobra.CommandError{Err: errors.New(fmt.Sprint(a...))}
}
func setValueFromFlag(flags *pflag.FlagSet, key string, cfg config.Provider, targetKey string, force bool) {
key = strings.TrimSpace(key)
if (force && flags.Lookup(key) != nil) || flags.Changed(key) {
f := flags.Lookup(key)
configKey := key
if targetKey != "" {
configKey = targetKey
}
// Gotta love this API.
switch f.Value.Type() {
case "bool":
bv, _ := flags.GetBool(key)
cfg.Set(configKey, bv)
case "string":
cfg.Set(configKey, f.Value.String())
case "stringSlice":
bv, _ := flags.GetStringSlice(key)
cfg.Set(configKey, bv)
case "int":
iv, _ := flags.GetInt(key)
cfg.Set(configKey, iv)
default:
panic(fmt.Sprintf("update switch with %s", f.Value.Type()))
}
}
}
func flagsToCfg(cd *simplecobra.Commandeer, cfg config.Provider) config.Provider {
return flagsToCfgWithAdditionalConfigBase(cd, cfg, "")
}
func flagsToCfgWithAdditionalConfigBase(cd *simplecobra.Commandeer, cfg config.Provider, additionalConfigBase string) config.Provider {
if cfg == nil {
cfg = config.New()
}
// Flags with a different name in the config.
keyMap := map[string]string{
"minify": "minifyOutput",
"destination": "publishDir",
"editor": "newContentEditor",
}
// Flags that we for some reason don't want to expose in the site config.
internalKeySet := map[string]bool{
"quiet": true,
"verbose": true,
"watch": true,
"liveReloadPort": true,
"renderToMemory": true,
"clock": true,
}
cmd := cd.CobraCommand
flags := cmd.Flags()
flags.VisitAll(func(f *pflag.Flag) {
if f.Changed {
targetKey := f.Name
if internalKeySet[targetKey] {
targetKey = "internal." + targetKey
} else if mapped, ok := keyMap[targetKey]; ok {
targetKey = mapped
}
setValueFromFlag(flags, f.Name, cfg, targetKey, false)
if additionalConfigBase != "" {
setValueFromFlag(flags, f.Name, cfg, additionalConfigBase+"."+targetKey, true)
}
}
})
return cfg
}
func mkdir(x ...string) {
p := filepath.Join(x...)
err := os.MkdirAll(p, 0o777) // before umask
if err != nil {
log.Fatal(err)
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -13,15 +13,21 @@
package commands
import "github.com/spf13/cobra"
import (
// For time zone lookups on Windows without Go installed.
// See #8892
_ "time/tzdata"
"github.com/spf13/cobra"
)
func init() {
// This message to show to Windows users if Hugo is opened from explorer.exe
cobra.MousetrapHelpText = `
Hugo is a command-line tool for generating static website.
Hugo is a command-line tool for generating static websites.
You need to open cmd.exe and run Hugo from there.
You need to open PowerShell and run Hugo from there.
Visit http://gohugo.io/ for more information.`
Visit https://gohugo.io/ for more information.`
}

1157
commands/hugobuilder.go Normal file

File diff suppressed because it is too large Load diff

618
commands/import.go Normal file
View file

@ -0,0 +1,618 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"log"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"unicode"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/common/htime"
"github.com/gohugoio/hugo/common/hugio"
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/parser"
"github.com/gohugoio/hugo/parser/metadecoders"
"github.com/gohugoio/hugo/parser/pageparser"
"github.com/spf13/afero"
"github.com/spf13/cobra"
)
func newImportCommand() *importCommand {
var c *importCommand
c = &importCommand{
commands: []simplecobra.Commander{
&simpleCommand{
name: "jekyll",
short: "hugo import from Jekyll",
long: `hugo import from Jekyll.
Import from Jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
if len(args) < 2 {
return newUserError(`import from jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.")
}
return c.importFromJekyll(args)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.Flags().BoolVar(&c.force, "force", false, "allow import into non-empty target directory")
},
},
},
}
return c
}
type importCommand struct {
r *rootCommand
force bool
commands []simplecobra.Commander
}
func (c *importCommand) Commands() []simplecobra.Commander {
return c.commands
}
func (c *importCommand) Name() string {
return "import"
}
func (c *importCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
return nil
}
func (c *importCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "Import a site from another system"
cmd.Long = `Import a site from another system.
Import requires a subcommand, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`."
cmd.RunE = nil
return nil
}
func (c *importCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
c.r = cd.Root.Command.(*rootCommand)
return nil
}
func (i *importCommand) createConfigFromJekyll(fs afero.Fs, inpath string, kind metadecoders.Format, jekyllConfig map[string]any) (err error) {
title := "My New Hugo Site"
baseURL := "http://example.org/"
for key, value := range jekyllConfig {
lowerKey := strings.ToLower(key)
switch lowerKey {
case "title":
if str, ok := value.(string); ok {
title = str
}
case "url":
if str, ok := value.(string); ok {
baseURL = str
}
}
}
in := map[string]any{
"baseURL": baseURL,
"title": title,
"languageCode": "en-us",
"disablePathToLower": true,
}
var buf bytes.Buffer
err = parser.InterfaceToConfig(in, kind, &buf)
if err != nil {
return err
}
return helpers.WriteToDisk(filepath.Join(inpath, "hugo."+string(kind)), &buf, fs)
}
func (c *importCommand) getJekyllDirInfo(fs afero.Fs, jekyllRoot string) (map[string]bool, bool) {
postDirs := make(map[string]bool)
hasAnyPost := false
if entries, err := os.ReadDir(jekyllRoot); err == nil {
for _, entry := range entries {
if entry.IsDir() {
subDir := filepath.Join(jekyllRoot, entry.Name())
if isPostDir, hasAnyPostInDir := c.retrieveJekyllPostDir(fs, subDir); isPostDir {
postDirs[entry.Name()] = hasAnyPostInDir
if hasAnyPostInDir {
hasAnyPost = true
}
}
}
}
}
return postDirs, hasAnyPost
}
func (c *importCommand) createSiteFromJekyll(jekyllRoot, targetDir string, jekyllPostDirs map[string]bool) error {
fs := &afero.OsFs{}
if exists, _ := helpers.Exists(targetDir, fs); exists {
if isDir, _ := helpers.IsDir(targetDir, fs); !isDir {
return errors.New("target path \"" + targetDir + "\" exists but is not a directory")
}
isEmpty, _ := helpers.IsEmpty(targetDir, fs)
if !isEmpty && !c.force {
return errors.New("target path \"" + targetDir + "\" exists and is not empty")
}
}
jekyllConfig := c.loadJekyllConfig(fs, jekyllRoot)
mkdir(targetDir, "layouts")
mkdir(targetDir, "content")
mkdir(targetDir, "archetypes")
mkdir(targetDir, "static")
mkdir(targetDir, "data")
mkdir(targetDir, "themes")
c.createConfigFromJekyll(fs, targetDir, "yaml", jekyllConfig)
c.copyJekyllFilesAndFolders(jekyllRoot, filepath.Join(targetDir, "static"), jekyllPostDirs)
return nil
}
func (c *importCommand) convertJekyllContent(m any, content string) (string, error) {
metadata, _ := maps.ToStringMapE(m)
lines := strings.Split(content, "\n")
var resultLines []string
for _, line := range lines {
resultLines = append(resultLines, strings.Trim(line, "\r\n"))
}
content = strings.Join(resultLines, "\n")
excerptSep := "<!--more-->"
if value, ok := metadata["excerpt_separator"]; ok {
if str, strOk := value.(string); strOk {
content = strings.Replace(content, strings.TrimSpace(str), excerptSep, -1)
}
}
replaceList := []struct {
re *regexp.Regexp
replace string
}{
{regexp.MustCompile("(?i)<!-- more -->"), "<!--more-->"},
{regexp.MustCompile(`\{%\s*raw\s*%\}\s*(.*?)\s*\{%\s*endraw\s*%\}`), "$1"},
{regexp.MustCompile(`{%\s*endhighlight\s*%}`), "{{< / highlight >}}"},
}
for _, replace := range replaceList {
content = replace.re.ReplaceAllString(content, replace.replace)
}
replaceListFunc := []struct {
re *regexp.Regexp
replace func(string) string
}{
// Octopress image tag: http://octopress.org/docs/plugins/image-tag/
{regexp.MustCompile(`{%\s+img\s*(.*?)\s*%}`), c.replaceImageTag},
{regexp.MustCompile(`{%\s*highlight\s*(.*?)\s*%}`), c.replaceHighlightTag},
}
for _, replace := range replaceListFunc {
content = replace.re.ReplaceAllStringFunc(content, replace.replace)
}
var buf bytes.Buffer
if len(metadata) != 0 {
err := parser.InterfaceToFrontMatter(m, metadecoders.YAML, &buf)
if err != nil {
return "", err
}
}
buf.WriteString(content)
return buf.String(), nil
}
func (c *importCommand) convertJekyllMetaData(m any, postName string, postDate time.Time, draft bool) (any, error) {
metadata, err := maps.ToStringMapE(m)
if err != nil {
return nil, err
}
if draft {
metadata["draft"] = true
}
for key, value := range metadata {
lowerKey := strings.ToLower(key)
switch lowerKey {
case "layout":
delete(metadata, key)
case "permalink":
if str, ok := value.(string); ok {
metadata["url"] = str
}
delete(metadata, key)
case "category":
if str, ok := value.(string); ok {
metadata["categories"] = []string{str}
}
delete(metadata, key)
case "excerpt_separator":
if key != lowerKey {
delete(metadata, key)
metadata[lowerKey] = value
}
case "date":
if str, ok := value.(string); ok {
re := regexp.MustCompile(`(\d+):(\d+):(\d+)`)
r := re.FindAllStringSubmatch(str, -1)
if len(r) > 0 {
hour, _ := strconv.Atoi(r[0][1])
minute, _ := strconv.Atoi(r[0][2])
second, _ := strconv.Atoi(r[0][3])
postDate = time.Date(postDate.Year(), postDate.Month(), postDate.Day(), hour, minute, second, 0, time.UTC)
}
}
delete(metadata, key)
}
}
metadata["date"] = postDate.Format(time.RFC3339)
return metadata, nil
}
func (c *importCommand) convertJekyllPost(path, relPath, targetDir string, draft bool) error {
log.Println("Converting", path)
filename := filepath.Base(path)
postDate, postName, err := c.parseJekyllFilename(filename)
if err != nil {
c.r.Printf("Failed to parse filename '%s': %s. Skipping.", filename, err)
return nil
}
log.Println(filename, postDate, postName)
targetFile := filepath.Join(targetDir, relPath)
targetParentDir := filepath.Dir(targetFile)
os.MkdirAll(targetParentDir, 0o777)
contentBytes, err := os.ReadFile(path)
if err != nil {
c.r.logger.Errorln("Read file error:", path)
return err
}
pf, err := pageparser.ParseFrontMatterAndContent(bytes.NewReader(contentBytes))
if err != nil {
return fmt.Errorf("failed to parse file %q: %s", filename, err)
}
newmetadata, err := c.convertJekyllMetaData(pf.FrontMatter, postName, postDate, draft)
if err != nil {
return fmt.Errorf("failed to convert metadata for file %q: %s", filename, err)
}
content, err := c.convertJekyllContent(newmetadata, string(pf.Content))
if err != nil {
return fmt.Errorf("failed to convert content for file %q: %s", filename, err)
}
fs := hugofs.Os
if err := helpers.WriteToDisk(targetFile, strings.NewReader(content), fs); err != nil {
return fmt.Errorf("failed to save file %q: %s", filename, err)
}
return nil
}
func (c *importCommand) copyJekyllFilesAndFolders(jekyllRoot, dest string, jekyllPostDirs map[string]bool) (err error) {
fs := hugofs.Os
fi, err := fs.Stat(jekyllRoot)
if err != nil {
return err
}
if !fi.IsDir() {
return errors.New(jekyllRoot + " is not a directory")
}
err = os.MkdirAll(dest, fi.Mode())
if err != nil {
return err
}
entries, err := os.ReadDir(jekyllRoot)
if err != nil {
return err
}
for _, entry := range entries {
sfp := filepath.Join(jekyllRoot, entry.Name())
dfp := filepath.Join(dest, entry.Name())
if entry.IsDir() {
if entry.Name()[0] != '_' && entry.Name()[0] != '.' {
if _, ok := jekyllPostDirs[entry.Name()]; !ok {
err = hugio.CopyDir(fs, sfp, dfp, nil)
if err != nil {
c.r.logger.Errorln(err)
}
}
}
} else {
lowerEntryName := strings.ToLower(entry.Name())
exceptSuffix := []string{
".md", ".markdown", ".html", ".htm",
".xml", ".textile", "rakefile", "gemfile", ".lock",
}
isExcept := false
for _, suffix := range exceptSuffix {
if strings.HasSuffix(lowerEntryName, suffix) {
isExcept = true
break
}
}
if !isExcept && entry.Name()[0] != '.' && entry.Name()[0] != '_' {
err = hugio.CopyFile(fs, sfp, dfp)
if err != nil {
c.r.logger.Errorln(err)
}
}
}
}
return nil
}
func (c *importCommand) importFromJekyll(args []string) error {
jekyllRoot, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
return newUserError("path error:", args[0])
}
targetDir, err := filepath.Abs(filepath.Clean(args[1]))
if err != nil {
return newUserError("path error:", args[1])
}
c.r.Println("Import Jekyll from:", jekyllRoot, "to:", targetDir)
if strings.HasPrefix(filepath.Dir(targetDir), jekyllRoot) {
return newUserError("abort: target path should not be inside the Jekyll root")
}
fs := afero.NewOsFs()
jekyllPostDirs, hasAnyPost := c.getJekyllDirInfo(fs, jekyllRoot)
if !hasAnyPost {
return errors.New("abort: jekyll root contains neither posts nor drafts")
}
err = c.createSiteFromJekyll(jekyllRoot, targetDir, jekyllPostDirs)
if err != nil {
return newUserError(err)
}
c.r.Println("Importing...")
fileCount := 0
callback := func(path string, fi hugofs.FileMetaInfo) error {
if fi.IsDir() {
return nil
}
relPath, err := filepath.Rel(jekyllRoot, path)
if err != nil {
return newUserError("get rel path error:", path)
}
relPath = filepath.ToSlash(relPath)
draft := false
switch {
case strings.Contains(relPath, "_posts/"):
relPath = filepath.Join("content/post", strings.Replace(relPath, "_posts/", "", -1))
case strings.Contains(relPath, "_drafts/"):
relPath = filepath.Join("content/draft", strings.Replace(relPath, "_drafts/", "", -1))
draft = true
default:
return nil
}
fileCount++
return c.convertJekyllPost(path, relPath, targetDir, draft)
}
for jekyllPostDir, hasAnyPostInDir := range jekyllPostDirs {
if hasAnyPostInDir {
if err = helpers.Walk(hugofs.Os, filepath.Join(jekyllRoot, jekyllPostDir), callback); err != nil {
return err
}
}
}
c.r.Println("Congratulations!", fileCount, "post(s) imported!")
c.r.Println("Now, start Hugo by yourself:\n")
c.r.Println("cd " + args[1])
c.r.Println("git init")
c.r.Println("git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke")
c.r.Println("echo \"theme = 'ananke'\" > hugo.toml")
c.r.Println("hugo server")
return nil
}
func (c *importCommand) loadJekyllConfig(fs afero.Fs, jekyllRoot string) map[string]any {
path := filepath.Join(jekyllRoot, "_config.yml")
exists, err := helpers.Exists(path, fs)
if err != nil || !exists {
c.r.Println("_config.yaml not found: Is the specified Jekyll root correct?")
return nil
}
f, err := fs.Open(path)
if err != nil {
return nil
}
defer f.Close()
b, err := io.ReadAll(f)
if err != nil {
return nil
}
m, err := metadecoders.Default.UnmarshalToMap(b, metadecoders.YAML)
if err != nil {
return nil
}
return m
}
func (c *importCommand) parseJekyllFilename(filename string) (time.Time, string, error) {
re := regexp.MustCompile(`(\d+-\d+-\d+)-(.+)\..*`)
r := re.FindAllStringSubmatch(filename, -1)
if len(r) == 0 {
return htime.Now(), "", errors.New("filename not match")
}
postDate, err := time.Parse("2006-1-2", r[0][1])
if err != nil {
return htime.Now(), "", err
}
postName := r[0][2]
return postDate, postName, nil
}
func (c *importCommand) replaceHighlightTag(match string) string {
r := regexp.MustCompile(`{%\s*highlight\s*(.*?)\s*%}`)
parts := r.FindStringSubmatch(match)
lastQuote := rune(0)
f := func(c rune) bool {
switch {
case c == lastQuote:
lastQuote = rune(0)
return false
case lastQuote != rune(0):
return false
case unicode.In(c, unicode.Quotation_Mark):
lastQuote = c
return false
default:
return unicode.IsSpace(c)
}
}
// splitting string by space but considering quoted section
items := strings.FieldsFunc(parts[1], f)
result := bytes.NewBufferString("{{< highlight ")
result.WriteString(items[0]) // language
options := items[1:]
for i, opt := range options {
opt = strings.Replace(opt, "\"", "", -1)
if opt == "linenos" {
opt = "linenos=table"
}
if i == 0 {
opt = " \"" + opt
}
if i < len(options)-1 {
opt += ","
} else if i == len(options)-1 {
opt += "\""
}
result.WriteString(opt)
}
result.WriteString(" >}}")
return result.String()
}
func (c *importCommand) replaceImageTag(match string) string {
r := regexp.MustCompile(`{%\s+img\s*(\p{L}*)\s+([\S]*/[\S]+)\s+(\d*)\s*(\d*)\s*(.*?)\s*%}`)
result := bytes.NewBufferString("{{< figure ")
parts := r.FindStringSubmatch(match)
// Index 0 is the entire string, ignore
c.replaceOptionalPart(result, "class", parts[1])
c.replaceOptionalPart(result, "src", parts[2])
c.replaceOptionalPart(result, "width", parts[3])
c.replaceOptionalPart(result, "height", parts[4])
// title + alt
part := parts[5]
if len(part) > 0 {
splits := strings.Split(part, "'")
lenSplits := len(splits)
if lenSplits == 1 {
c.replaceOptionalPart(result, "title", splits[0])
} else if lenSplits == 3 {
c.replaceOptionalPart(result, "title", splits[1])
} else if lenSplits == 5 {
c.replaceOptionalPart(result, "title", splits[1])
c.replaceOptionalPart(result, "alt", splits[3])
}
}
result.WriteString(">}}")
return result.String()
}
func (c *importCommand) replaceOptionalPart(buffer *bytes.Buffer, partName string, part string) {
if len(part) > 0 {
buffer.WriteString(partName + "=\"" + part + "\" ")
}
}
func (c *importCommand) retrieveJekyllPostDir(fs afero.Fs, dir string) (bool, bool) {
if strings.HasSuffix(dir, "_posts") || strings.HasSuffix(dir, "_drafts") {
isEmpty, _ := helpers.IsEmpty(dir, fs)
return true, !isEmpty
}
if entries, err := os.ReadDir(dir); err == nil {
for _, entry := range entries {
if entry.IsDir() {
subDir := filepath.Join(dir, entry.Name())
if isPostDir, hasAnyPost := c.retrieveJekyllPostDir(fs, subDir); isPostDir {
return isPostDir, hasAnyPost
}
}
}
}
return false, true
}

View file

@ -1,614 +0,0 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"errors"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/afero"
"github.com/spf13/cast"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
func init() {
importCmd.AddCommand(importJekyllCmd)
}
var importCmd = &cobra.Command{
Use: "import",
Short: "Import your site from others.",
Long: `Import your site from other web site generators like Jekyll.
Import requires a subcommand, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.",
RunE: nil,
}
var importJekyllCmd = &cobra.Command{
Use: "jekyll",
Short: "hugo import from Jekyll",
Long: `hugo import from Jekyll.
Import from Jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.",
RunE: importFromJekyll,
}
func init() {
importJekyllCmd.Flags().Bool("force", false, "allow import into non-empty target directory")
}
func importFromJekyll(cmd *cobra.Command, args []string) error {
if len(args) < 2 {
return newUserError(`Import from Jekyll requires two paths, e.g. ` + "`hugo import jekyll jekyll_root_path target_path`.")
}
jekyllRoot, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
return newUserError("Path error:", args[0])
}
targetDir, err := filepath.Abs(filepath.Clean(args[1]))
if err != nil {
return newUserError("Path error:", args[1])
}
jww.INFO.Println("Import Jekyll from:", jekyllRoot, "to:", targetDir)
if strings.HasPrefix(filepath.Dir(targetDir), jekyllRoot) {
return newUserError("Target path should not be inside the Jekyll root, aborting.")
}
forceImport, _ := cmd.Flags().GetBool("force")
fs := afero.NewOsFs()
jekyllPostDirs, hasAnyPost := getJekyllDirInfo(fs, jekyllRoot)
if !hasAnyPost {
return errors.New("Your Jekyll root contains neither posts nor drafts, aborting.")
}
site, err := createSiteFromJekyll(jekyllRoot, targetDir, jekyllPostDirs, forceImport)
if err != nil {
return newUserError(err)
}
jww.FEEDBACK.Println("Importing...")
fileCount := 0
callback := func(path string, fi os.FileInfo, err error) error {
if err != nil {
return err
}
if fi.IsDir() {
return nil
}
relPath, err := filepath.Rel(jekyllRoot, path)
if err != nil {
return newUserError("Get rel path error:", path)
}
relPath = filepath.ToSlash(relPath)
draft := false
switch {
case strings.Contains(relPath, "_posts/"):
relPath = filepath.Join("content/post", strings.Replace(relPath, "_posts/", "", -1))
case strings.Contains(relPath, "_drafts/"):
relPath = filepath.Join("content/draft", strings.Replace(relPath, "_drafts/", "", -1))
draft = true
default:
return nil
}
fileCount++
return convertJekyllPost(site, path, relPath, targetDir, draft)
}
for jekyllPostDir, hasAnyPostInDir := range jekyllPostDirs {
if hasAnyPostInDir {
if err = helpers.SymbolicWalk(hugofs.Os, filepath.Join(jekyllRoot, jekyllPostDir), callback); err != nil {
return err
}
}
}
jww.FEEDBACK.Println("Congratulations!", fileCount, "post(s) imported!")
jww.FEEDBACK.Println("Now, start Hugo by yourself:\n" +
"$ git clone https://github.com/spf13/herring-cove.git " + args[1] + "/themes/herring-cove")
jww.FEEDBACK.Println("$ cd " + args[1] + "\n$ hugo server --theme=herring-cove")
jww.FEEDBACK.Println("Congratulations!", fileCount, "post(s) imported!")
jww.FEEDBACK.Println("Now, start Hugo by yourself:\n" +
"$ git clone https://github.com/spf13/herring-cove.git " + args[1] + "/themes/herring-cove")
jww.FEEDBACK.Println("$ cd " + args[1] + "\n$ hugo server --theme=herring-cove")
return nil
}
func getJekyllDirInfo(fs afero.Fs, jekyllRoot string) (map[string]bool, bool) {
postDirs := make(map[string]bool)
hasAnyPost := false
if entries, err := ioutil.ReadDir(jekyllRoot); err == nil {
for _, entry := range entries {
if entry.IsDir() {
subDir := filepath.Join(jekyllRoot, entry.Name())
if isPostDir, hasAnyPostInDir := retrieveJekyllPostDir(fs, subDir); isPostDir {
postDirs[entry.Name()] = hasAnyPostInDir
if hasAnyPostInDir {
hasAnyPost = true
}
}
}
}
}
return postDirs, hasAnyPost
}
func retrieveJekyllPostDir(fs afero.Fs, dir string) (bool, bool) {
if strings.HasSuffix(dir, "_posts") || strings.HasSuffix(dir, "_drafts") {
isEmpty, _ := helpers.IsEmpty(dir, fs)
return true, !isEmpty
}
if entries, err := ioutil.ReadDir(dir); err == nil {
for _, entry := range entries {
if entry.IsDir() {
subDir := filepath.Join(dir, entry.Name())
if isPostDir, hasAnyPost := retrieveJekyllPostDir(fs, subDir); isPostDir {
return isPostDir, hasAnyPost
}
}
}
}
return false, true
}
func createSiteFromJekyll(jekyllRoot, targetDir string, jekyllPostDirs map[string]bool, force bool) (*hugolib.Site, error) {
s, err := hugolib.NewSiteDefaultLang()
if err != nil {
return nil, err
}
fs := s.Fs.Source
if exists, _ := helpers.Exists(targetDir, fs); exists {
if isDir, _ := helpers.IsDir(targetDir, fs); !isDir {
return nil, errors.New("Target path \"" + targetDir + "\" already exists but not a directory")
}
isEmpty, _ := helpers.IsEmpty(targetDir, fs)
if !isEmpty && !force {
return nil, errors.New("Target path \"" + targetDir + "\" already exists and is not empty")
}
}
jekyllConfig := loadJekyllConfig(fs, jekyllRoot)
mkdir(targetDir, "layouts")
mkdir(targetDir, "content")
mkdir(targetDir, "archetypes")
mkdir(targetDir, "static")
mkdir(targetDir, "data")
mkdir(targetDir, "themes")
createConfigFromJekyll(fs, targetDir, "yaml", jekyllConfig)
copyJekyllFilesAndFolders(jekyllRoot, filepath.Join(targetDir, "static"), jekyllPostDirs)
return s, nil
}
func loadJekyllConfig(fs afero.Fs, jekyllRoot string) map[string]interface{} {
path := filepath.Join(jekyllRoot, "_config.yml")
exists, err := helpers.Exists(path, fs)
if err != nil || !exists {
jww.WARN.Println("_config.yaml not found: Is the specified Jekyll root correct?")
return nil
}
f, err := fs.Open(path)
if err != nil {
return nil
}
defer f.Close()
b, err := ioutil.ReadAll(f)
if err != nil {
return nil
}
c, err := parser.HandleYAMLMetaData(b)
if err != nil {
return nil
}
return c.(map[string]interface{})
}
func createConfigFromJekyll(fs afero.Fs, inpath string, kind string, jekyllConfig map[string]interface{}) (err error) {
title := "My New Hugo Site"
baseURL := "http://example.org/"
for key, value := range jekyllConfig {
lowerKey := strings.ToLower(key)
switch lowerKey {
case "title":
if str, ok := value.(string); ok {
title = str
}
case "url":
if str, ok := value.(string); ok {
baseURL = str
}
}
}
in := map[string]interface{}{
"baseURL": baseURL,
"title": title,
"languageCode": "en-us",
"disablePathToLower": true,
}
kind = parser.FormatSanitize(kind)
var buf bytes.Buffer
err = parser.InterfaceToConfig(in, parser.FormatToLeadRune(kind), &buf)
if err != nil {
return err
}
return helpers.WriteToDisk(filepath.Join(inpath, "config."+kind), &buf, fs)
}
func copyFile(source string, dest string) error {
sf, err := os.Open(source)
if err != nil {
return err
}
defer sf.Close()
df, err := os.Create(dest)
if err != nil {
return err
}
defer df.Close()
_, err = io.Copy(df, sf)
if err == nil {
si, err := os.Stat(source)
if err != nil {
err = os.Chmod(dest, si.Mode())
if err != nil {
return err
}
}
}
return nil
}
func copyDir(source string, dest string) error {
fi, err := os.Stat(source)
if err != nil {
return err
}
if !fi.IsDir() {
return errors.New(source + " is not a directory")
}
err = os.MkdirAll(dest, fi.Mode())
if err != nil {
return err
}
entries, err := ioutil.ReadDir(source)
for _, entry := range entries {
sfp := filepath.Join(source, entry.Name())
dfp := filepath.Join(dest, entry.Name())
if entry.IsDir() {
err = copyDir(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
} else {
err = copyFile(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
return nil
}
func copyJekyllFilesAndFolders(jekyllRoot, dest string, jekyllPostDirs map[string]bool) (err error) {
fi, err := os.Stat(jekyllRoot)
if err != nil {
return err
}
if !fi.IsDir() {
return errors.New(jekyllRoot + " is not a directory")
}
err = os.MkdirAll(dest, fi.Mode())
if err != nil {
return err
}
entries, err := ioutil.ReadDir(jekyllRoot)
for _, entry := range entries {
sfp := filepath.Join(jekyllRoot, entry.Name())
dfp := filepath.Join(dest, entry.Name())
if entry.IsDir() {
if entry.Name()[0] != '_' && entry.Name()[0] != '.' {
if _, ok := jekyllPostDirs[entry.Name()]; !ok {
err = copyDir(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
} else {
lowerEntryName := strings.ToLower(entry.Name())
exceptSuffix := []string{".md", ".markdown", ".html", ".htm",
".xml", ".textile", "rakefile", "gemfile", ".lock"}
isExcept := false
for _, suffix := range exceptSuffix {
if strings.HasSuffix(lowerEntryName, suffix) {
isExcept = true
break
}
}
if !isExcept && entry.Name()[0] != '.' && entry.Name()[0] != '_' {
err = copyFile(sfp, dfp)
if err != nil {
jww.ERROR.Println(err)
}
}
}
}
return nil
}
func parseJekyllFilename(filename string) (time.Time, string, error) {
re := regexp.MustCompile(`(\d+-\d+-\d+)-(.+)\..*`)
r := re.FindAllStringSubmatch(filename, -1)
if len(r) == 0 {
return time.Now(), "", errors.New("filename not match")
}
postDate, err := time.Parse("2006-1-2", r[0][1])
if err != nil {
return time.Now(), "", err
}
postName := r[0][2]
return postDate, postName, nil
}
func convertJekyllPost(s *hugolib.Site, path, relPath, targetDir string, draft bool) error {
jww.TRACE.Println("Converting", path)
filename := filepath.Base(path)
postDate, postName, err := parseJekyllFilename(filename)
if err != nil {
jww.WARN.Printf("Failed to parse filename '%s': %s. Skipping.", filename, err)
return nil
}
jww.TRACE.Println(filename, postDate, postName)
targetFile := filepath.Join(targetDir, relPath)
targetParentDir := filepath.Dir(targetFile)
os.MkdirAll(targetParentDir, 0777)
contentBytes, err := ioutil.ReadFile(path)
if err != nil {
jww.ERROR.Println("Read file error:", path)
return err
}
psr, err := parser.ReadFrom(bytes.NewReader(contentBytes))
if err != nil {
jww.ERROR.Println("Parse file error:", path)
return err
}
metadata, err := psr.Metadata()
if err != nil {
jww.ERROR.Println("Processing file error:", path)
return err
}
newmetadata, err := convertJekyllMetaData(metadata, postName, postDate, draft)
if err != nil {
jww.ERROR.Println("Convert metadata error:", path)
return err
}
jww.TRACE.Println(newmetadata)
content := convertJekyllContent(newmetadata, string(psr.Content()))
page, err := s.NewPage(filename)
if err != nil {
jww.ERROR.Println("New page error", filename)
return err
}
page.SetDir(targetParentDir)
page.SetSourceContent([]byte(content))
page.SetSourceMetaData(newmetadata, parser.FormatToLeadRune("yaml"))
page.SaveSourceAs(targetFile)
jww.TRACE.Println("Target file:", targetFile)
return nil
}
func convertJekyllMetaData(m interface{}, postName string, postDate time.Time, draft bool) (interface{}, error) {
url := postDate.Format("/2006/01/02/") + postName + "/"
metadata, err := cast.ToStringMapE(m)
if err != nil {
return nil, err
}
if draft {
metadata["draft"] = true
}
for key, value := range metadata {
lowerKey := strings.ToLower(key)
switch lowerKey {
case "layout":
delete(metadata, key)
case "permalink":
if str, ok := value.(string); ok {
url = str
}
delete(metadata, key)
case "category":
if str, ok := value.(string); ok {
metadata["categories"] = []string{str}
}
delete(metadata, key)
case "excerpt_separator":
if key != lowerKey {
delete(metadata, key)
metadata[lowerKey] = value
}
case "date":
if str, ok := value.(string); ok {
re := regexp.MustCompile(`(\d+):(\d+):(\d+)`)
r := re.FindAllStringSubmatch(str, -1)
if len(r) > 0 {
hour, _ := strconv.Atoi(r[0][1])
minute, _ := strconv.Atoi(r[0][2])
second, _ := strconv.Atoi(r[0][3])
postDate = time.Date(postDate.Year(), postDate.Month(), postDate.Day(), hour, minute, second, 0, time.UTC)
}
}
delete(metadata, key)
}
}
metadata["url"] = url
metadata["date"] = postDate.Format(time.RFC3339)
return metadata, nil
}
func convertJekyllContent(m interface{}, content string) string {
metadata, _ := cast.ToStringMapE(m)
lines := strings.Split(content, "\n")
var resultLines []string
for _, line := range lines {
resultLines = append(resultLines, strings.Trim(line, "\r\n"))
}
content = strings.Join(resultLines, "\n")
excerptSep := "<!--more-->"
if value, ok := metadata["excerpt_separator"]; ok {
if str, strOk := value.(string); strOk {
content = strings.Replace(content, strings.TrimSpace(str), excerptSep, -1)
}
}
replaceList := []struct {
re *regexp.Regexp
replace string
}{
{regexp.MustCompile("(?i)<!-- more -->"), "<!--more-->"},
{regexp.MustCompile(`\{%\s*raw\s*%\}\s*(.*?)\s*\{%\s*endraw\s*%\}`), "$1"},
{regexp.MustCompile(`{%\s*highlight\s*(.*?)\s*%}`), "{{< highlight $1 >}}"},
{regexp.MustCompile(`{%\s*endhighlight\s*%}`), "{{< / highlight >}}"},
}
for _, replace := range replaceList {
content = replace.re.ReplaceAllString(content, replace.replace)
}
replaceListFunc := []struct {
re *regexp.Regexp
replace func(string) string
}{
// Octopress image tag: http://octopress.org/docs/plugins/image-tag/
{regexp.MustCompile(`{%\s+img\s*(.*?)\s*%}`), replaceImageTag},
}
for _, replace := range replaceListFunc {
content = replace.re.ReplaceAllStringFunc(content, replace.replace)
}
return content
}
func replaceImageTag(match string) string {
r := regexp.MustCompile(`{%\s+img\s*(\p{L}*)\s+([\S]*/[\S]+)\s+(\d*)\s*(\d*)\s*(.*?)\s*%}`)
result := bytes.NewBufferString("{{< figure ")
parts := r.FindStringSubmatch(match)
// Index 0 is the entire string, ignore
replaceOptionalPart(result, "class", parts[1])
replaceOptionalPart(result, "src", parts[2])
replaceOptionalPart(result, "width", parts[3])
replaceOptionalPart(result, "height", parts[4])
// title + alt
part := parts[5]
if len(part) > 0 {
splits := strings.Split(part, "'")
lenSplits := len(splits)
if lenSplits == 1 {
replaceOptionalPart(result, "title", splits[0])
} else if lenSplits == 3 {
replaceOptionalPart(result, "title", splits[1])
} else if lenSplits == 5 {
replaceOptionalPart(result, "title", splits[1])
replaceOptionalPart(result, "alt", splits[3])
}
}
result.WriteString(">}}")
return result.String()
}
func replaceOptionalPart(buffer *bytes.Buffer, partName string, part string) {
if len(part) > 0 {
buffer.WriteString(partName + "=\"" + part + "\" ")
}
}

View file

@ -1,126 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"encoding/json"
"github.com/stretchr/testify/assert"
"testing"
"time"
)
func TestParseJekyllFilename(t *testing.T) {
filenameArray := []string{
"2015-01-02-test.md",
"2012-03-15-中文.markup",
}
expectResult := []struct {
postDate time.Time
postName string
}{
{time.Date(2015, time.January, 2, 0, 0, 0, 0, time.UTC), "test"},
{time.Date(2012, time.March, 15, 0, 0, 0, 0, time.UTC), "中文"},
}
for i, filename := range filenameArray {
postDate, postName, err := parseJekyllFilename(filename)
assert.Equal(t, err, nil)
assert.Equal(t, expectResult[i].postDate.Format("2006-01-02"), postDate.Format("2006-01-02"))
assert.Equal(t, expectResult[i].postName, postName)
}
}
func TestConvertJekyllMetadata(t *testing.T) {
testDataList := []struct {
metadata interface{}
postName string
postDate time.Time
draft bool
expect string
}{
{map[interface{}]interface{}{}, "testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{}, "testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), true,
`{"date":"2015-10-01T00:00:00Z","draft":true,"url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{"Permalink": "/permalink.html", "layout": "post"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/permalink.html"}`},
{map[interface{}]interface{}{"permalink": "/permalink.html"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/permalink.html"}`},
{map[interface{}]interface{}{"category": nil, "permalink": 123},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{"Excerpt_Separator": "sep"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"date":"2015-10-01T00:00:00Z","excerpt_separator":"sep","url":"/2015/10/01/testPost/"}`},
{map[interface{}]interface{}{"category": "book", "layout": "post", "Others": "Goods", "Date": "2015-10-01 12:13:11"},
"testPost", time.Date(2015, 10, 1, 0, 0, 0, 0, time.UTC), false,
`{"Others":"Goods","categories":["book"],"date":"2015-10-01T12:13:11Z","url":"/2015/10/01/testPost/"}`},
}
for _, data := range testDataList {
result, err := convertJekyllMetaData(data.metadata, data.postName, data.postDate, data.draft)
assert.Equal(t, nil, err)
jsonResult, err := json.Marshal(result)
assert.Equal(t, nil, err)
assert.Equal(t, data.expect, string(jsonResult))
}
}
func TestConvertJekyllContent(t *testing.T) {
testDataList := []struct {
metadata interface{}
content string
expect string
}{
{map[interface{}]interface{}{},
`Test content\n<!-- more -->\npart2 content`, `Test content\n<!--more-->\npart2 content`},
{map[interface{}]interface{}{},
`Test content\n<!-- More -->\npart2 content`, `Test content\n<!--more-->\npart2 content`},
{map[interface{}]interface{}{"excerpt_separator": "<!--sep-->"},
`Test content\n<!--sep-->\npart2 content`, `Test content\n<!--more-->\npart2 content`},
{map[interface{}]interface{}{}, "{% raw %}text{% endraw %}", "text"},
{map[interface{}]interface{}{}, "{%raw%} text2 {%endraw %}", "text2"},
{map[interface{}]interface{}{},
"{% highlight go %}\nvar s int\n{% endhighlight %}",
"{{< highlight go >}}\nvar s int\n{{< / highlight >}}"},
// Octopress image tag
{map[interface{}]interface{}{},
"{% img http://placekitten.com/890/280 %}",
"{{< figure src=\"http://placekitten.com/890/280\" >}}"},
{map[interface{}]interface{}{},
"{% img left http://placekitten.com/320/250 Place Kitten #2 %}",
"{{< figure class=\"left\" src=\"http://placekitten.com/320/250\" title=\"Place Kitten #2\" >}}"},
{map[interface{}]interface{}{},
"{% img right http://placekitten.com/300/500 150 250 'Place Kitten #3' %}",
"{{< figure class=\"right\" src=\"http://placekitten.com/300/500\" width=\"150\" height=\"250\" title=\"Place Kitten #3\" >}}"},
{map[interface{}]interface{}{},
"{% img right http://placekitten.com/300/500 150 250 'Place Kitten #4' 'An image of a very cute kitten' %}",
"{{< figure class=\"right\" src=\"http://placekitten.com/300/500\" width=\"150\" height=\"250\" title=\"Place Kitten #4\" alt=\"An image of a very cute kitten\" >}}"},
{map[interface{}]interface{}{},
"{% img http://placekitten.com/300/500 150 250 'Place Kitten #4' 'An image of a very cute kitten' %}",
"{{< figure src=\"http://placekitten.com/300/500\" width=\"150\" height=\"250\" title=\"Place Kitten #4\" alt=\"An image of a very cute kitten\" >}}"},
{map[interface{}]interface{}{},
"{% img right /placekitten/300/500 'Place Kitten #4' 'An image of a very cute kitten' %}",
"{{< figure class=\"right\" src=\"/placekitten/300/500\" title=\"Place Kitten #4\" alt=\"An image of a very cute kitten\" >}}"},
}
for _, data := range testDataList {
result := convertJekyllContent(data.metadata, data.content)
assert.Equal(t, data.expect, result)
}
}

View file

@ -1,85 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"syscall"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
func init() {
checkCmd.AddCommand(limit)
}
var limit = &cobra.Command{
Use: "ulimit",
Short: "Check system ulimit settings",
Long: `Hugo will inspect the current ulimit settings on the system.
This is primarily to ensure that Hugo can watch enough files on some OSs`,
RunE: func(cmd *cobra.Command, args []string) error {
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return newSystemError("Error Getting Rlimit ", err)
}
jww.FEEDBACK.Println("Current rLimit:", rLimit)
jww.FEEDBACK.Println("Attempting to increase limit")
rLimit.Max = 999999
rLimit.Cur = 999999
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return newSystemError("Error Setting rLimit ", err)
}
err = syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
return newSystemError("Error Getting rLimit ", err)
}
jww.FEEDBACK.Println("rLimit after change:", rLimit)
return nil
},
}
func tweakLimit() {
var rLimit syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
jww.ERROR.Println("Unable to obtain rLimit", err)
}
if rLimit.Cur < rLimit.Max {
rLimit.Max = 64000
rLimit.Cur = 64000
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
jww.WARN.Println("Unable to increase number of open files limit", err)
}
}
}

View file

@ -1,32 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// +build !darwin
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
func tweakLimit() {
// nothing to do
}

View file

@ -1,4 +1,4 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -14,148 +14,200 @@
package commands
import (
"context"
"encoding/csv"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/resources/page"
"github.com/gohugoio/hugo/resources/resource"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
func init() {
listCmd.AddCommand(listDraftsCmd)
listCmd.AddCommand(listFutureCmd)
listCmd.AddCommand(listExpiredCmd)
listCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
listCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
}
// newListCommand creates a new list command and its subcommands.
func newListCommand() *listCommand {
createRecord := func(workingDir string, p page.Page) []string {
return []string{
filepath.ToSlash(strings.TrimPrefix(p.File().Filename(), workingDir+string(os.PathSeparator))),
p.Slug(),
p.Title(),
p.Date().Format(time.RFC3339),
p.ExpiryDate().Format(time.RFC3339),
p.PublishDate().Format(time.RFC3339),
strconv.FormatBool(p.Draft()),
p.Permalink(),
p.Kind(),
p.Section(),
}
}
var listCmd = &cobra.Command{
Use: "list",
Short: "Listing out various types of content",
Long: `Listing out various types of content.
List requires a subcommand, e.g. ` + "`hugo list drafts`.",
RunE: nil,
}
var listDraftsCmd = &cobra.Command{
Use: "drafts",
Short: "List all drafts",
Long: `List all of the drafts in your content directory.`,
RunE: func(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig()
list := func(cd *simplecobra.Commandeer, r *rootCommand, shouldInclude func(page.Page) bool, opts ...any) error {
bcfg := hugolib.BuildCfg{SkipRender: true}
cfg := flagsToCfg(cd, nil)
for i := 0; i < len(opts); i += 2 {
cfg.Set(opts[i].(string), opts[i+1])
}
h, err := r.Build(cd, bcfg, cfg)
if err != nil {
return err
}
c, err := newCommandeer(cfg)
if err != nil {
writer := csv.NewWriter(r.StdOut)
defer writer.Flush()
writer.Write([]string{
"path",
"slug",
"title",
"date",
"expiryDate",
"publishDate",
"draft",
"permalink",
"kind",
"section",
})
for _, p := range h.Pages() {
if shouldInclude(p) {
record := createRecord(h.Conf.BaseConfig().WorkingDir, p)
if err := writer.Write(record); err != nil {
return err
}
c.Set("buildDrafts", true)
sites, err := hugolib.NewHugoSites(*cfg)
if err != nil {
return newSystemError("Error creating sites", err)
}
if err := sites.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return newSystemError("Error Processing Source Content", err)
}
for _, p := range sites.Pages() {
if p.IsDraft() {
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
}
}
return nil
}
return &listCommand{
commands: []simplecobra.Commander{
&simpleCommand{
name: "drafts",
short: "List draft content",
long: `List draft content.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
shouldInclude := func(p page.Page) bool {
if !p.Draft() || p.File() == nil {
return false
}
return true
}
return list(cd, r, shouldInclude,
"buildDrafts", true,
"buildFuture", true,
"buildExpired", true,
)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
&simpleCommand{
name: "future",
short: "List future content",
long: `List content with a future publication date.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
shouldInclude := func(p page.Page) bool {
if !resource.IsFuture(p) || p.File() == nil {
return false
}
return true
}
return list(cd, r, shouldInclude,
"buildFuture", true,
"buildDrafts", true,
)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
&simpleCommand{
name: "expired",
short: "List expired content",
long: `List content with a past expiration date.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
shouldInclude := func(p page.Page) bool {
if !resource.IsExpired(p) || p.File() == nil {
return false
}
return true
}
return list(cd, r, shouldInclude,
"buildExpired", true,
"buildDrafts", true,
)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
&simpleCommand{
name: "all",
short: "List all content",
long: `List all content including draft, future, and expired.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
shouldInclude := func(p page.Page) bool {
return p.File() != nil
}
return list(cd, r, shouldInclude, "buildDrafts", true, "buildFuture", true, "buildExpired", true)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
&simpleCommand{
name: "published",
short: "List published content",
long: `List content that is not draft, future, or expired.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
shouldInclude := func(p page.Page) bool {
return !p.Draft() && !resource.IsFuture(p) && !resource.IsExpired(p) && p.File() != nil
}
return list(cd, r, shouldInclude)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
},
},
}
}
var listFutureCmd = &cobra.Command{
Use: "future",
Short: "List all posts dated in the future",
Long: `List all of the posts in your content directory which will be
posted in the future.`,
RunE: func(cmd *cobra.Command, args []string) error {
type listCommand struct {
commands []simplecobra.Commander
}
cfg, err := InitializeConfig()
if err != nil {
return err
}
func (c *listCommand) Commands() []simplecobra.Commander {
return c.commands
}
c, err := newCommandeer(cfg)
if err != nil {
return err
}
c.Set("buildFuture", true)
sites, err := hugolib.NewHugoSites(*cfg)
if err != nil {
return newSystemError("Error creating sites", err)
}
if err := sites.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return newSystemError("Error Processing Source Content", err)
}
for _, p := range sites.Pages() {
if p.IsFuture() {
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
}
}
func (c *listCommand) Name() string {
return "list"
}
func (c *listCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
// Do nothing.
return nil
},
}
var listExpiredCmd = &cobra.Command{
Use: "expired",
Short: "List all posts already expired",
Long: `List all of the posts in your content directory which has already
expired.`,
RunE: func(cmd *cobra.Command, args []string) error {
func (c *listCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "List content"
cmd.Long = `List content.
cfg, err := InitializeConfig()
if err != nil {
return err
}
c, err := newCommandeer(cfg)
if err != nil {
return err
}
c.Set("buildExpired", true)
sites, err := hugolib.NewHugoSites(*cfg)
if err != nil {
return newSystemError("Error creating sites", err)
}
if err := sites.Build(hugolib.BuildCfg{SkipRender: true}); err != nil {
return newSystemError("Error Processing Source Content", err)
}
for _, p := range sites.Pages() {
if p.IsExpired() {
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
}
}
List requires a subcommand, e.g. hugo list drafts`
cmd.RunE = nil
return nil
}
func (c *listCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
return nil
},
}

View file

@ -1,66 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.Print the version number of Hug
package commands
import (
"reflect"
"sort"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
var configCmd = &cobra.Command{
Use: "config",
Short: "Print the site configuration",
Long: `Print the site configuration, both default and custom settings.`,
}
func init() {
configCmd.RunE = printConfig
}
func printConfig(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig(configCmd)
if err != nil {
return err
}
allSettings := cfg.Cfg.(*viper.Viper).AllSettings()
var separator string
if allSettings["metadataformat"] == "toml" {
separator = " = "
} else {
separator = ": "
}
var keys []string
for k := range allSettings {
keys = append(keys, k)
}
sort.Strings(keys)
for _, k := range keys {
kv := reflect.ValueOf(allSettings[k])
if kv.Kind() == reflect.String {
jww.FEEDBACK.Printf("%s%s\"%+v\"\n", k, separator, allSettings[k])
} else {
jww.FEEDBACK.Printf("%s%s%+v\n", k, separator, allSettings[k])
}
}
return nil
}

344
commands/mod.go Normal file
View file

@ -0,0 +1,344 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"context"
"errors"
"os"
"path/filepath"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/modules/npm"
"github.com/spf13/cobra"
)
const commonUsageMod = `
Note that Hugo will always start out by resolving the components defined in the site
configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided),
Go Modules, or a folder inside the themes directory, in that order.
See https://gohugo.io/hugo-modules/ for more information.
`
// buildConfigCommands creates a new config command and its subcommands.
func newModCommands() *modCommands {
var (
clean bool
pattern string
all bool
)
npmCommand := &simpleCommand{
name: "npm",
short: "Various npm helpers",
long: `Various npm (Node package manager) helpers.`,
commands: []simplecobra.Commander{
&simpleCommand{
name: "pack",
short: "Experimental: Prepares and writes a composite package.json file for your project",
long: `Prepares and writes a composite package.json file for your project.
On first run it creates a "package.hugo.json" in the project root if not already there. This file will be used as a template file
with the base dependency set.
This set will be merged with all "package.hugo.json" files found in the dependency tree, picking the version closest to the project.
This command is marked as 'Experimental'. We think it's a great idea, so it's not likely to be
removed from Hugo, but we need to test this out in "real life" to get a feel of it,
so this may/will change in future versions of Hugo.
`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.Hugo(flagsToCfg(cd, nil))
if err != nil {
return err
}
return npm.Pack(h.BaseFs.ProjectSourceFs, h.BaseFs.AssetsWithDuplicatesPreserved.Fs)
},
},
},
}
return &modCommands{
commands: []simplecobra.Commander{
&simpleCommand{
name: "init",
short: "Initialize this project as a Hugo Module",
long: `Initialize this project as a Hugo Module.
It will try to guess the module path, but you may help by passing it as an argument, e.g:
hugo mod init github.com/gohugoio/testshortcodes
Note that Hugo Modules supports multi-module projects, so you can initialize a Hugo Module
inside a subfolder on GitHub, as one example.
`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.getOrCreateHugo(flagsToCfg(cd, nil), true)
if err != nil {
return err
}
var initPath string
if len(args) >= 1 {
initPath = args[0]
}
c := h.Configs.ModulesClient
if err := c.Init(initPath); err != nil {
return err
}
return nil
},
},
&simpleCommand{
name: "verify",
short: "Verify dependencies",
long: `Verify checks that the dependencies of the current module, which are stored in a local downloaded source cache, have not been modified since being downloaded.`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
cmd.Flags().BoolVarP(&clean, "clean", "", false, "delete module cache for dependencies that fail verification")
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
conf, err := r.ConfigFromProvider(configKey{counter: r.configVersionID.Load()}, flagsToCfg(cd, nil))
if err != nil {
return err
}
client := conf.configs.ModulesClient
return client.Verify(clean)
},
},
&simpleCommand{
name: "graph",
short: "Print a module dependency graph",
long: `Print a module dependency graph with information about module status (disabled, vendored).
Note that for vendored modules, that is the version listed and not the one from go.mod.
`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
cmd.Flags().BoolVarP(&clean, "clean", "", false, "delete module cache for dependencies that fail verification")
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
conf, err := r.ConfigFromProvider(configKey{counter: r.configVersionID.Load()}, flagsToCfg(cd, nil))
if err != nil {
return err
}
client := conf.configs.ModulesClient
return client.Graph(os.Stdout)
},
},
&simpleCommand{
name: "clean",
short: "Delete the Hugo Module cache for the current project",
long: `Delete the Hugo Module cache for the current project.`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
cmd.Flags().StringVarP(&pattern, "pattern", "", "", `pattern matching module paths to clean (all if not set), e.g. "**hugo*"`)
_ = cmd.RegisterFlagCompletionFunc("pattern", cobra.NoFileCompletions)
cmd.Flags().BoolVarP(&all, "all", "", false, "clean entire module cache")
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.Hugo(flagsToCfg(cd, nil))
if err != nil {
return err
}
if all {
modCache := h.ResourceSpec.FileCaches.ModulesCache()
count, err := modCache.Prune(true)
r.Printf("Deleted %d files from module cache.", count)
return err
}
return h.Configs.ModulesClient.Clean(pattern)
},
},
&simpleCommand{
name: "tidy",
short: "Remove unused entries in go.mod and go.sum",
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.Hugo(flagsToCfg(cd, nil))
if err != nil {
return err
}
return h.Configs.ModulesClient.Tidy()
},
},
&simpleCommand{
name: "vendor",
short: "Vendor all module dependencies into the _vendor directory",
long: `Vendor all module dependencies into the _vendor directory.
If a module is vendored, that is where Hugo will look for it's dependencies.
`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.Hugo(flagsToCfg(cd, nil))
if err != nil {
return err
}
return h.Configs.ModulesClient.Vendor()
},
},
&simpleCommand{
name: "get",
short: "Resolves dependencies in your current Hugo project",
long: `
Resolves dependencies in your current Hugo project.
Some examples:
Install the latest version possible for a given module:
hugo mod get github.com/gohugoio/testshortcodes
Install a specific version:
hugo mod get github.com/gohugoio/testshortcodes@v0.3.0
Install the latest versions of all direct module dependencies:
hugo mod get
hugo mod get ./... (recursive)
Install the latest versions of all module dependencies (direct and indirect):
hugo mod get -u
hugo mod get -u ./... (recursive)
Run "go help get" for more information. All flags available for "go get" is also relevant here.
` + commonUsageMod,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.DisableFlagParsing = true
cmd.ValidArgsFunction = cobra.NoFileCompletions
},
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
// We currently just pass on the flags we get to Go and
// need to do the flag handling manually.
if len(args) == 1 && (args[0] == "-h" || args[0] == "--help") {
return errHelp
}
var lastArg string
if len(args) != 0 {
lastArg = args[len(args)-1]
}
if lastArg == "./..." {
args = args[:len(args)-1]
// Do a recursive update.
dirname, err := os.Getwd()
if err != nil {
return err
}
// Sanity chesimplecobra. We do recursive walking and want to avoid
// accidents.
if len(dirname) < 5 {
return errors.New("must not be run from the file system root")
}
filepath.Walk(dirname, func(path string, info os.FileInfo, err error) error {
if info.IsDir() {
return nil
}
if info.Name() == "go.mod" {
// Found a module.
dir := filepath.Dir(path)
cfg := config.New()
cfg.Set("workingDir", dir)
conf, err := r.ConfigFromProvider(configKey{counter: r.configVersionID.Add(1)}, flagsToCfg(cd, cfg))
if err != nil {
return err
}
r.Println("Update module in", conf.configs.Base.WorkingDir)
client := conf.configs.ModulesClient
return client.Get(args...)
}
return nil
})
return nil
} else {
conf, err := r.ConfigFromProvider(configKey{counter: r.configVersionID.Load()}, flagsToCfg(cd, nil))
if err != nil {
return err
}
client := conf.configs.ModulesClient
return client.Get(args...)
}
},
},
npmCommand,
},
}
}
type modCommands struct {
r *rootCommand
commands []simplecobra.Commander
}
func (c *modCommands) Commands() []simplecobra.Commander {
return c.commands
}
func (c *modCommands) Name() string {
return "mod"
}
func (c *modCommands) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
_, err := c.r.ConfigFromProvider(configKey{counter: c.r.configVersionID.Load()}, nil)
if err != nil {
return err
}
// config := conf.configs.Base
return nil
}
func (c *modCommands) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "Manage modules"
cmd.Long = `Various helpers to help manage the modules in your project's dependency graph.
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git).
This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor".
` + commonUsageMod
cmd.RunE = nil
return nil
}
func (c *modCommands) PreRun(cd, runner *simplecobra.Commandeer) error {
c.r = cd.Root.Command.(*rootCommand)
return nil
}

View file

@ -1,4 +1,4 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -15,385 +15,213 @@ package commands
import (
"bytes"
"errors"
"fmt"
"os"
"context"
"path/filepath"
"strings"
"time"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/create"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
"github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/afero"
"github.com/gohugoio/hugo/create/skeletons"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
"github.com/spf13/viper"
)
var (
configFormat string
contentEditor string
func newNewCommand() *newCommand {
var (
force bool
contentType string
)
format string
)
func init() {
newSiteCmd.Flags().StringVarP(&configFormat, "format", "f", "toml", "config & frontmatter format")
newSiteCmd.Flags().Bool("force", false, "init inside non-empty directory")
newCmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create")
newCmd.PersistentFlags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
newCmd.PersistentFlags().SetAnnotation("source", cobra.BashCompSubdirsInDir, []string{})
newCmd.Flags().StringVar(&contentEditor, "editor", "", "edit new content with this editor, if provided")
newCmd.AddCommand(newSiteCmd)
newCmd.AddCommand(newThemeCmd)
}
var newCmd = &cobra.Command{
Use: "new [path]",
Short: "Create new content for your site",
Long: `Create a new content file and automatically set the date and title.
var c *newCommand
c = &newCommand{
commands: []simplecobra.Commander{
&simpleCommand{
name: "content",
use: "content [path]",
short: "Create new content",
long: `Create a new content file and automatically set the date and title.
It will guess which kind of file to create based on the path provided.
You can also specify the kind with ` + "`-k KIND`" + `.
If archetypes are provided in your theme or site, they will be used.`,
RunE: NewContent,
}
var newSiteCmd = &cobra.Command{
Use: "site [path]",
Short: "Create a new site (skeleton)",
Long: `Create a new site in the provided directory.
The new site will have the correct structure, but no content or theme yet.
Use ` + "`hugo new [contentPath]`" + ` to create new content.`,
RunE: NewSite,
}
var newThemeCmd = &cobra.Command{
Use: "theme [name]",
Short: "Create a new theme",
Long: `Create a new theme (skeleton) called [name] in the current directory.
New theme is a skeleton. Please add content to the touched files. Add your
name to the copyright line in the license and adjust the theme.toml file
as you see fit.`,
RunE: NewTheme,
}
// NewContent adds new content to a Hugo site.
func NewContent(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig()
if err != nil {
return err
}
c, err := newCommandeer(cfg)
if err != nil {
return err
}
if cmd.Flags().Changed("editor") {
c.Set("newContentEditor", contentEditor)
}
If archetypes are provided in your theme or site, they will be used.
Ensure you run this within the root directory of your site.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
if len(args) < 1 {
return newUserError("path needs to be provided")
}
createPath := args[0]
var kind string
createPath, kind = newContentPathSection(createPath)
if contentType != "" {
kind = contentType
h, err := r.Hugo(flagsToCfg(cd, nil))
if err != nil {
return err
}
ps, err := helpers.NewPathSpec(cfg.Fs, cfg.Cfg)
return create.NewContent(h, contentType, args[0], force)
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) != 0 {
return []string{}, cobra.ShellCompDirectiveNoFileComp
}
return []string{}, cobra.ShellCompDirectiveNoFileComp | cobra.ShellCompDirectiveFilterDirs
}
cmd.Flags().StringVarP(&contentType, "kind", "k", "", "content type to create")
cmd.Flags().String("editor", "", "edit new content with this editor, if provided")
_ = cmd.RegisterFlagCompletionFunc("editor", cobra.NoFileCompletions)
cmd.Flags().BoolVarP(&force, "force", "f", false, "overwrite file if it already exists")
applyLocalFlagsBuildConfig(cmd, r)
},
},
&simpleCommand{
name: "site",
use: "site [path]",
short: "Create a new site",
long: `Create a new site at the specified path.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
if len(args) < 1 {
return newUserError("path needs to be provided")
}
createpath, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
return err
}
// If a site isn't in use in the archetype template, we can skip the build.
siteFactory := func(filename string, siteUsed bool) (*hugolib.Site, error) {
if !siteUsed {
return hugolib.NewSite(*cfg)
cfg := config.New()
cfg.Set("workingDir", createpath)
cfg.Set("publishDir", "public")
conf, err := r.ConfigFromProvider(configKey{counter: r.configVersionID.Load()}, flagsToCfg(cd, cfg))
if err != nil {
return err
}
var s *hugolib.Site
if err := c.initSites(); err != nil {
return nil, err
sourceFs := conf.fs.Source
err = skeletons.CreateSite(createpath, sourceFs, force, format)
if err != nil {
return err
}
if err := Hugo.Build(hugolib.BuildCfg{SkipRender: true, PrintStats: false}); err != nil {
return nil, err
r.Printf("Congratulations! Your new Hugo site was created in %s.\n\n", createpath)
r.Println(c.newSiteNextStepsText(createpath, format))
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) != 0 {
return []string{}, cobra.ShellCompDirectiveNoFileComp
}
return []string{}, cobra.ShellCompDirectiveNoFileComp | cobra.ShellCompDirectiveFilterDirs
}
cmd.Flags().BoolVarP(&force, "force", "f", false, "init inside non-empty directory")
cmd.Flags().StringVar(&format, "format", "toml", "preferred file format (toml, yaml or json)")
_ = cmd.RegisterFlagCompletionFunc("format", cobra.FixedCompletions([]string{"toml", "yaml", "json"}, cobra.ShellCompDirectiveNoFileComp))
},
},
&simpleCommand{
name: "theme",
use: "theme [name]",
short: "Create a new theme",
long: `Create a new theme with the specified name in the ./themes directory.
This generates a functional theme including template examples and sample content.`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
if len(args) < 1 {
return newUserError("theme name needs to be provided")
}
cfg := config.New()
cfg.Set("publishDir", "public")
conf, err := r.ConfigFromProvider(configKey{counter: r.configVersionID.Load()}, flagsToCfg(cd, cfg))
if err != nil {
return err
}
sourceFs := conf.fs.Source
createpath := paths.AbsPathify(conf.configs.Base.WorkingDir, filepath.Join(conf.configs.Base.ThemesDir, args[0]))
r.Println("Creating new theme in", createpath)
err = skeletons.CreateTheme(createpath, sourceFs, format)
if err != nil {
return err
}
s = Hugo.Sites[0]
if len(Hugo.Sites) > 1 {
// Find the best match.
for _, ss := range Hugo.Sites {
if strings.Contains(createPath, "."+ss.Language.Lang) {
s = ss
break
return nil
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
if len(args) != 0 {
return []string{}, cobra.ShellCompDirectiveNoFileComp
}
return []string{}, cobra.ShellCompDirectiveNoFileComp | cobra.ShellCompDirectiveFilterDirs
}
}
return s, nil
cmd.Flags().StringVar(&format, "format", "toml", "preferred file format (toml, yaml or json)")
_ = cmd.RegisterFlagCompletionFunc("format", cobra.FixedCompletions([]string{"toml", "yaml", "json"}, cobra.ShellCompDirectiveNoFileComp))
},
},
},
}
return create.NewContent(ps, siteFactory, kind, createPath)
return c
}
func doNewSite(fs *hugofs.Fs, basepath string, force bool) error {
archeTypePath := filepath.Join(basepath, "archetypes")
dirs := []string{
filepath.Join(basepath, "layouts"),
filepath.Join(basepath, "content"),
archeTypePath,
filepath.Join(basepath, "static"),
filepath.Join(basepath, "data"),
filepath.Join(basepath, "themes"),
}
type newCommand struct {
rootCmd *rootCommand
if exists, _ := helpers.Exists(basepath, fs.Source); exists {
if isDir, _ := helpers.IsDir(basepath, fs.Source); !isDir {
return errors.New(basepath + " already exists but not a directory")
}
commands []simplecobra.Commander
}
isEmpty, _ := helpers.IsEmpty(basepath, fs.Source)
func (c *newCommand) Commands() []simplecobra.Commander {
return c.commands
}
switch {
case !isEmpty && !force:
return errors.New(basepath + " already exists and is not empty")
case !isEmpty && force:
all := append(dirs, filepath.Join(basepath, "config."+configFormat))
for _, path := range all {
if exists, _ := helpers.Exists(path, fs.Source); exists {
return errors.New(path + " already exists")
}
}
}
}
for _, dir := range dirs {
if err := fs.Source.MkdirAll(dir, 0777); err != nil {
return fmt.Errorf("Failed to create dir: %s", err)
}
}
createConfig(fs, basepath, configFormat)
// Create a defaul archetype file.
helpers.SafeWriteToDisk(filepath.Join(archeTypePath, "default.md"),
strings.NewReader(create.ArchetypeTemplateTemplate), fs.Source)
jww.FEEDBACK.Printf("Congratulations! Your new Hugo site is created in %s.\n\n", basepath)
jww.FEEDBACK.Println(nextStepsText())
func (c *newCommand) Name() string {
return "new"
}
func (c *newCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args []string) error {
return nil
}
func nextStepsText() string {
func (c *newCommand) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "Create new content"
cmd.Long = `Create a new content file and automatically set the date and title.
It will guess which kind of file to create based on the path provided.
You can also specify the kind with ` + "`-k KIND`" + `.
If archetypes are provided in your theme or site, they will be used.
Ensure you run this within the root directory of your site.`
cmd.RunE = nil
return nil
}
func (c *newCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
c.rootCmd = cd.Root.Command.(*rootCommand)
return nil
}
func (c *newCommand) newSiteNextStepsText(path string, format string) string {
format = strings.ToLower(format)
var nextStepsText bytes.Buffer
nextStepsText.WriteString(`Just a few more steps and you're ready to go:
nextStepsText.WriteString(`Just a few more steps...
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/, or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new `)
1. Change the current directory to ` + path + `.
2. Create or install a theme:
- Create a new theme with the command "hugo new theme <THEMENAME>"
- Or, install a theme from https://themes.gohugo.io/
3. Edit hugo.` + format + `, setting the "theme" property to the theme name.
4. Create new content with the command "hugo new content `)
nextStepsText.WriteString(filepath.Join("<SECTIONNAME>", "<FILENAME>.<FORMAT>"))
nextStepsText.WriteString(`".
3. Start the built-in live server via "hugo server".
5. Start the embedded web server with the command "hugo server --buildDrafts".
Visit https://gohugo.io/ for quickstart guide and full documentation.`)
See documentation at https://gohugo.io/.`)
return nextStepsText.String()
}
// NewSite creates a new Hugo site and initializes a structured Hugo directory.
func NewSite(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return newUserError("path needs to be provided")
}
createpath, err := filepath.Abs(filepath.Clean(args[0]))
if err != nil {
return newUserError(err)
}
forceNew, _ := cmd.Flags().GetBool("force")
return doNewSite(hugofs.NewDefault(viper.New()), createpath, forceNew)
}
// NewTheme creates a new Hugo theme.
func NewTheme(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig()
if err != nil {
return err
}
if len(args) < 1 {
return newUserError("theme name needs to be provided")
}
c, err := newCommandeer(cfg)
if err != nil {
return err
}
createpath := c.PathSpec().AbsPathify(filepath.Join(c.Cfg.GetString("themesDir"), args[0]))
jww.INFO.Println("creating theme at", createpath)
if x, _ := helpers.Exists(createpath, cfg.Fs.Source); x {
return newUserError(createpath, "already exists")
}
mkdir(createpath, "layouts", "_default")
mkdir(createpath, "layouts", "partials")
touchFile(cfg.Fs.Source, createpath, "layouts", "index.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "404.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "_default", "list.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "_default", "single.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "partials", "header.html")
touchFile(cfg.Fs.Source, createpath, "layouts", "partials", "footer.html")
mkdir(createpath, "archetypes")
archDefault := []byte("+++\n+++\n")
err = helpers.WriteToDisk(filepath.Join(createpath, "archetypes", "default.md"), bytes.NewReader(archDefault), cfg.Fs.Source)
if err != nil {
return err
}
mkdir(createpath, "static", "js")
mkdir(createpath, "static", "css")
by := []byte(`The MIT License (MIT)
Copyright (c) ` + time.Now().Format("2006") + ` YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
`)
err = helpers.WriteToDisk(filepath.Join(createpath, "LICENSE.md"), bytes.NewReader(by), cfg.Fs.Source)
if err != nil {
return err
}
createThemeMD(cfg.Fs, createpath)
return nil
}
func mkdir(x ...string) {
p := filepath.Join(x...)
err := os.MkdirAll(p, 0777) // before umask
if err != nil {
jww.FATAL.Fatalln(err)
}
}
func touchFile(fs afero.Fs, x ...string) {
inpath := filepath.Join(x...)
mkdir(filepath.Dir(inpath))
err := helpers.WriteToDisk(inpath, bytes.NewReader([]byte{}), fs)
if err != nil {
jww.FATAL.Fatalln(err)
}
}
func createThemeMD(fs *hugofs.Fs, inpath string) (err error) {
by := []byte(`# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "` + strings.Title(helpers.MakeTitle(filepath.Base(inpath))) + `"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE.md"
description = ""
homepage = "http://example.com/"
tags = []
features = []
min_version = "0.25"
[author]
name = ""
homepage = ""
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""
`)
err = helpers.WriteToDisk(filepath.Join(inpath, "theme.toml"), bytes.NewReader(by), fs.Source)
if err != nil {
return
}
return nil
}
func newContentPathSection(path string) (string, string) {
// Forward slashes is used in all examples. Convert if needed.
// Issue #1133
createpath := filepath.FromSlash(path)
var section string
// assume the first directory is the section (kind)
if strings.Contains(createpath[1:], helpers.FilePathSeparator) {
section = helpers.GuessSection(createpath)
}
return createpath, section
}
func createConfig(fs *hugofs.Fs, inpath string, kind string) (err error) {
in := map[string]string{
"baseURL": "http://example.org/",
"title": "My New Hugo Site",
"languageCode": "en-us",
}
kind = parser.FormatSanitize(kind)
var buf bytes.Buffer
err = parser.InterfaceToConfig(in, parser.FormatToLeadRune(kind), &buf)
if err != nil {
return err
}
return helpers.WriteToDisk(filepath.Join(inpath, "config."+kind), &buf, fs.Source)
}

View file

@ -1,122 +0,0 @@
// Copyright 2016 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"path/filepath"
"testing"
"github.com/gohugoio/hugo/hugofs"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
// Issue #1133
func TestNewContentPathSectionWithForwardSlashes(t *testing.T) {
p, s := newContentPathSection("/post/new.md")
assert.Equal(t, filepath.FromSlash("/post/new.md"), p)
assert.Equal(t, "post", s)
}
func checkNewSiteInited(fs *hugofs.Fs, basepath string, t *testing.T) {
paths := []string{
filepath.Join(basepath, "layouts"),
filepath.Join(basepath, "content"),
filepath.Join(basepath, "archetypes"),
filepath.Join(basepath, "static"),
filepath.Join(basepath, "data"),
filepath.Join(basepath, "config.toml"),
}
for _, path := range paths {
_, err := fs.Source.Stat(path)
require.NoError(t, err)
}
}
func TestDoNewSite(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, doNewSite(fs, basepath, false))
checkNewSiteInited(fs, basepath, t)
}
func TestDoNewSite_noerror_base_exists_but_empty(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
require.NoError(t, doNewSite(fs, basepath, false))
}
func TestDoNewSite_error_base_exists(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
_, err := fs.Source.Create(filepath.Join(basepath, "foo"))
require.NoError(t, err)
// Since the directory already exists and isn't empty, expect an error
require.Error(t, doNewSite(fs, basepath, false))
}
func TestDoNewSite_force_empty_dir(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
require.NoError(t, doNewSite(fs, basepath, true))
checkNewSiteInited(fs, basepath, t)
}
func TestDoNewSite_error_force_dir_inside_exists(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
contentPath := filepath.Join(basepath, "content")
require.NoError(t, fs.Source.MkdirAll(contentPath, 777))
require.Error(t, doNewSite(fs, basepath, true))
}
func TestDoNewSite_error_force_config_inside_exists(t *testing.T) {
basepath := filepath.Join("base", "blog")
_, fs := newTestCfg()
configPath := filepath.Join(basepath, "config.toml")
require.NoError(t, fs.Source.MkdirAll(basepath, 777))
_, err := fs.Source.Create(configPath)
require.NoError(t, err)
require.Error(t, doNewSite(fs, basepath, true))
}
func newTestCfg() (*viper.Viper, *hugofs.Fs) {
v := viper.New()
fs := hugofs.NewMem(v)
v.SetFs(fs.Source)
return v, fs
}

View file

@ -1,6 +1,4 @@
// +build release
// Copyright 2017-present The Hugo Authors. All rights reserved.
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -16,53 +14,40 @@
package commands
import (
"errors"
"context"
"github.com/bep/simplecobra"
"github.com/gohugoio/hugo/releaser"
"github.com/spf13/cobra"
)
func init() {
HugoCmd.AddCommand(createReleaser().cmd)
}
type releaseCommandeer struct {
cmd *cobra.Command
version string
skipPublish bool
try bool
// Note: This is a command only meant for internal use and must be run
// via "go run -tags release main.go release" on the actual code base that is in the release.
func newReleaseCommand() simplecobra.Commander {
var (
step int
}
skipPush bool
try bool
)
func createReleaser() *releaseCommandeer {
// Note: This is a command only meant for internal use and must be run
// via "go run -tags release main.go release" on the actual code base that is in the release.
r := &releaseCommandeer{
cmd: &cobra.Command{
Use: "release",
Short: "Release a new version of Hugo.",
Hidden: true,
return &simpleCommand{
name: "release",
short: "Release a new version of Hugo",
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
rel, err := releaser.New(skipPush, try, step)
if err != nil {
return err
}
return rel.Run()
},
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.Hidden = true
cmd.ValidArgsFunction = cobra.NoFileCompletions
cmd.PersistentFlags().BoolVarP(&skipPush, "skip-push", "", false, "skip pushing to remote")
cmd.PersistentFlags().BoolVarP(&try, "try", "", false, "no changes")
cmd.PersistentFlags().IntVarP(&step, "step", "", 0, "step to run (1: set new version 2: prepare next dev version)")
_ = cmd.RegisterFlagCompletionFunc("step", cobra.FixedCompletions([]string{"1", "2"}, cobra.ShellCompDirectiveNoFileComp))
},
}
r.cmd.RunE = func(cmd *cobra.Command, args []string) error {
return r.release()
}
r.cmd.PersistentFlags().StringVarP(&r.version, "rel", "r", "", "new release version, i.e. 0.25.1")
r.cmd.PersistentFlags().IntVarP(&r.step, "step", "s", -1, "release step, defaults to -1 for all steps.")
r.cmd.PersistentFlags().BoolVarP(&r.skipPublish, "skip-publish", "", false, "skip all publishing pipes of the release")
r.cmd.PersistentFlags().BoolVarP(&r.try, "try", "", false, "simulate a release, i.e. no changes")
return r
}
func (r *releaseCommandeer) release() error {
if r.version == "" {
return errors.New("must set the --rel flag to the relevant version number")
}
return releaser.New(r.version, r.step, r.skipPublish, r.try).Run()
}

File diff suppressed because it is too large Load diff

View file

@ -1,58 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"testing"
"github.com/spf13/viper"
)
func TestFixURL(t *testing.T) {
type data struct {
TestName string
CLIBaseURL string
CfgBaseURL string
AppendPort bool
Port int
Result string
}
tests := []data{
{"Basic http localhost", "", "http://foo.com", true, 1313, "http://localhost:1313/"},
{"Basic https production, http localhost", "", "https://foo.com", true, 1313, "http://localhost:1313/"},
{"Basic subdir", "", "http://foo.com/bar", true, 1313, "http://localhost:1313/bar/"},
{"Basic production", "http://foo.com", "http://foo.com", false, 80, "http://foo.com/"},
{"Production subdir", "http://foo.com/bar", "http://foo.com/bar", false, 80, "http://foo.com/bar/"},
{"No http", "", "foo.com", true, 1313, "//localhost:1313/"},
{"Override configured port", "", "foo.com:2020", true, 1313, "//localhost:1313/"},
{"No http production", "foo.com", "foo.com", false, 80, "//foo.com/"},
{"No http production with port", "foo.com", "foo.com", true, 2020, "//foo.com:2020/"},
{"No config", "", "", true, 1313, "//localhost:1313/"},
}
for i, test := range tests {
v := viper.New()
baseURL = test.CLIBaseURL
v.Set("baseURL", test.CfgBaseURL)
serverAppend = test.AppendPort
serverPort = test.Port
result, err := fixURL(v, baseURL)
if err != nil {
t.Errorf("Test #%d %s: unexpected error %s", i, test.TestName, err)
}
if result != test.Result {
t.Errorf("Test #%d %s: expected %q, got %q", i, test.TestName, test.Result, result)
}
}
}

View file

@ -1,155 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"bytes"
"errors"
"os"
"time"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/cobra"
)
var undraftCmd = &cobra.Command{
Use: "undraft path/to/content",
Short: "Undraft resets the content's draft status",
Long: `Undraft resets the content's draft status
and updates the date to the current date and time.
If the content's draft status is 'False', nothing is done.`,
RunE: Undraft,
}
// Undraft publishes the specified content by setting its draft status
// to false and setting its publish date to now. If the specified content is
// not a draft, it will log an error.
func Undraft(cmd *cobra.Command, args []string) error {
cfg, err := InitializeConfig()
if err != nil {
return err
}
if len(args) < 1 {
return newUserError("a piece of content needs to be specified")
}
location := args[0]
// open the file
f, err := cfg.Fs.Source.Open(location)
if err != nil {
return err
}
// get the page from file
p, err := parser.ReadFrom(f)
f.Close()
if err != nil {
return err
}
w, err := undraftContent(p)
if err != nil {
return newSystemErrorF("an error occurred while undrafting %q: %s", location, err)
}
f, err = cfg.Fs.Source.OpenFile(location, os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil {
return newSystemErrorF("%q not be undrafted due to error opening file to save changes: %q\n", location, err)
}
defer f.Close()
_, err = w.WriteTo(f)
if err != nil {
return newSystemErrorF("%q not be undrafted due to save error: %q\n", location, err)
}
return nil
}
// undraftContent: if the content is a draft, change its draft status to
// 'false' and set the date to time.Now(). If the draft status is already
// 'false', don't do anything.
func undraftContent(p parser.Page) (bytes.Buffer, error) {
var buff bytes.Buffer
// get the metadata; easiest way to see if it's a draft
meta, err := p.Metadata()
if err != nil {
return buff, err
}
// since the metadata was obtainable, we can also get the key/value separator for
// Front Matter
fm := p.FrontMatter()
if fm == nil {
return buff, errors.New("Front Matter was found, nothing was finalized")
}
var isDraft, gotDate bool
var date string
L:
for k, v := range meta.(map[string]interface{}) {
switch k {
case "draft":
if !v.(bool) {
return buff, errors.New("not a Draft: nothing was done")
}
isDraft = true
if gotDate {
break L
}
case "date":
date = v.(string) // capture the value to make replacement easier
gotDate = true
if isDraft {
break L
}
}
}
// if draft wasn't found in FrontMatter, it isn't a draft.
if !isDraft {
return buff, errors.New("not a Draft: nothing was done")
}
// get the front matter as bytes and split it into lines
var lineEnding []byte
fmLines := bytes.Split(fm, []byte("\n"))
if len(fmLines) == 1 { // if the result is only 1 element, try to split on dos line endings
fmLines = bytes.Split(fm, []byte("\r\n"))
if len(fmLines) == 1 {
return buff, errors.New("unable to split FrontMatter into lines")
}
lineEnding = append(lineEnding, []byte("\r\n")...)
} else {
lineEnding = append(lineEnding, []byte("\n")...)
}
// Write the front matter lines to the buffer, replacing as necessary
for _, v := range fmLines {
pos := bytes.Index(v, []byte("draft"))
if pos != -1 {
continue
}
pos = bytes.Index(v, []byte("date"))
if pos != -1 { // if date field wasn't found, add it
v = bytes.Replace(v, []byte(date), []byte(time.Now().Format(time.RFC3339)), 1)
}
buff.Write(v)
buff.Write(lineEnding)
}
// append the actual content
buff.Write(p.Content())
return buff, nil
}

View file

@ -1,87 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
// TODO Support Mac Encoding (\r)
import (
"bytes"
"strings"
"testing"
"time"
"github.com/gohugoio/hugo/parser"
)
var (
jsonFM = "{\n \"date\": \"12-04-06\",\n \"title\": \"test json\"\n}"
jsonDraftFM = "{\n \"draft\": true,\n \"date\": \"12-04-06\",\n \"title\":\"test json\"\n}"
tomlFM = "+++\n date= \"12-04-06\"\n title= \"test toml\"\n+++"
tomlDraftFM = "+++\n draft= true\n date= \"12-04-06\"\n title=\"test toml\"\n+++"
yamlFM = "---\n date: \"12-04-06\"\n title: \"test yaml\"\n---"
yamlDraftFM = "---\n draft: true\n date: \"12-04-06\"\n title: \"test yaml\"\n---"
yamlYesDraftFM = "---\n draft: yes\n date: \"12-04-06\"\n title: \"test yaml\"\n---"
)
func TestUndraftContent(t *testing.T) {
tests := []struct {
fm string
expectedErr string
}{
{jsonFM, "not a Draft: nothing was done"},
{jsonDraftFM, ""},
{tomlFM, "not a Draft: nothing was done"},
{tomlDraftFM, ""},
{yamlFM, "not a Draft: nothing was done"},
{yamlDraftFM, ""},
{yamlYesDraftFM, ""},
}
for i, test := range tests {
r := bytes.NewReader([]byte(test.fm))
p, _ := parser.ReadFrom(r)
res, err := undraftContent(p)
if test.expectedErr != "" {
if err == nil {
t.Errorf("[%d] Expected error, got none", i)
continue
}
if err.Error() != test.expectedErr {
t.Errorf("[%d] Expected %q, got %q", i, test.expectedErr, err)
continue
}
} else {
r = bytes.NewReader(res.Bytes())
p, _ = parser.ReadFrom(r)
meta, err := p.Metadata()
if err != nil {
t.Errorf("[%d] unexpected error %q", i, err)
continue
}
for k, v := range meta.(map[string]interface{}) {
if k == "draft" {
if v.(bool) {
t.Errorf("[%d] Expected %q to be \"false\", got \"true\"", i, k)
continue
}
}
if k == "date" {
if !strings.HasPrefix(v.(string), time.Now().Format("2006-01-02")) {
t.Errorf("[%d] Expected %v to start with %v", i, v.(string), time.Now().Format("2006-01-02"))
}
}
}
}
}
}

View file

@ -1,80 +0,0 @@
// Copyright 2015 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package commands
import (
"os"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugolib"
"github.com/kardianos/osext"
"github.com/spf13/cobra"
jww "github.com/spf13/jwalterweatherman"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of Hugo",
Long: `All software has versions. This is Hugo's.`,
RunE: func(cmd *cobra.Command, args []string) error {
printHugoVersion()
return nil
},
}
func printHugoVersion() {
if hugolib.BuildDate == "" {
setBuildDate() // set the build date from executable's mdate
} else {
formatBuildDate() // format the compile time
}
if hugolib.CommitHash == "" {
jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, runtime.GOOS, runtime.GOARCH, hugolib.BuildDate)
} else {
jww.FEEDBACK.Printf("Hugo Static Site Generator v%s-%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, strings.ToUpper(hugolib.CommitHash), runtime.GOOS, runtime.GOARCH, hugolib.BuildDate)
}
}
// setBuildDate checks the ModTime of the Hugo executable and returns it as a
// formatted string. This assumes that the executable name is Hugo, if it does
// not exist, an empty string will be returned. This is only called if the
// hugolib.BuildDate wasn't set during compile time.
//
// osext is used for cross-platform.
func setBuildDate() {
fname, _ := osext.Executable()
dir, err := filepath.Abs(filepath.Dir(fname))
if err != nil {
jww.ERROR.Println(err)
return
}
fi, err := os.Lstat(filepath.Join(dir, filepath.Base(fname)))
if err != nil {
jww.ERROR.Println(err)
return
}
t := fi.ModTime()
hugolib.BuildDate = t.Format(time.RFC3339)
}
// formatBuildDate formats the hugolib.BuildDate according to the value in
// .Params.DateFormat, if it's set.
func formatBuildDate() {
t, _ := time.Parse("2006-01-02T15:04:05-0700", hugolib.BuildDate)
hugolib.BuildDate = t.Format(time.RFC3339)
}

View file

@ -0,0 +1,152 @@
// Copyright 2019 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collections
import (
"fmt"
"reflect"
)
// Append appends from to a slice to and returns the resulting slice.
// If length of from is one and the only element is a slice of same type as to,
// it will be appended.
func Append(to any, from ...any) (any, error) {
if len(from) == 0 {
return to, nil
}
tov, toIsNil := indirect(reflect.ValueOf(to))
toIsNil = toIsNil || to == nil
var tot reflect.Type
if !toIsNil {
if tov.Kind() == reflect.Slice {
// Create a copy of tov, so we don't modify the original.
c := reflect.MakeSlice(tov.Type(), tov.Len(), tov.Len()+len(from))
reflect.Copy(c, tov)
tov = c
}
if tov.Kind() != reflect.Slice {
return nil, fmt.Errorf("expected a slice, got %T", to)
}
tot = tov.Type().Elem()
if tot.Kind() == reflect.Slice {
totvt := tot.Elem()
fromvs := make([]reflect.Value, len(from))
for i, f := range from {
fromv := reflect.ValueOf(f)
fromt := fromv.Type()
if fromt.Kind() == reflect.Slice {
fromt = fromt.Elem()
}
if totvt != fromt {
return nil, fmt.Errorf("cannot append slice of %s to slice of %s", fromt, totvt)
} else {
fromvs[i] = fromv
}
}
return reflect.Append(tov, fromvs...).Interface(), nil
}
toIsNil = tov.Len() == 0
if len(from) == 1 {
fromv := reflect.ValueOf(from[0])
if !fromv.IsValid() {
// from[0] is nil
return appendToInterfaceSliceFromValues(tov, fromv)
}
fromt := fromv.Type()
if fromt.Kind() == reflect.Slice {
fromt = fromt.Elem()
}
if fromv.Kind() == reflect.Slice {
if toIsNil {
// If we get nil []string, we just return the []string
return from[0], nil
}
// If we get []string []string, we append the from slice to to
if tot == fromt {
return reflect.AppendSlice(tov, fromv).Interface(), nil
} else if !fromt.AssignableTo(tot) {
// Fall back to a []interface{} slice.
return appendToInterfaceSliceFromValues(tov, fromv)
}
}
}
}
if toIsNil {
return Slice(from...), nil
}
for _, f := range from {
fv := reflect.ValueOf(f)
if !fv.IsValid() || !fv.Type().AssignableTo(tot) {
// Fall back to a []interface{} slice.
tov, _ := indirect(reflect.ValueOf(to))
return appendToInterfaceSlice(tov, from...)
}
tov = reflect.Append(tov, fv)
}
return tov.Interface(), nil
}
func appendToInterfaceSliceFromValues(slice1, slice2 reflect.Value) ([]any, error) {
var tos []any
for _, slice := range []reflect.Value{slice1, slice2} {
if !slice.IsValid() {
tos = append(tos, nil)
continue
}
for i := range slice.Len() {
tos = append(tos, slice.Index(i).Interface())
}
}
return tos, nil
}
func appendToInterfaceSlice(tov reflect.Value, from ...any) ([]any, error) {
var tos []any
for i := range tov.Len() {
tos = append(tos, tov.Index(i).Interface())
}
tos = append(tos, from...)
return tos, nil
}
// indirect is borrowed from the Go stdlib: 'text/template/exec.go'
// TODO(bep) consolidate
func indirect(v reflect.Value) (rv reflect.Value, isNil bool) {
for ; v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface; v = v.Elem() {
if v.IsNil() {
return v, true
}
if v.Kind() == reflect.Interface && v.NumMethod() > 0 {
break
}
}
return v, false
}

View file

@ -0,0 +1,213 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collections
import (
"html/template"
"reflect"
"testing"
qt "github.com/frankban/quicktest"
)
func TestAppend(t *testing.T) {
t.Parallel()
c := qt.New(t)
for i, test := range []struct {
start any
addend []any
expected any
}{
{[]string{"a", "b"}, []any{"c"}, []string{"a", "b", "c"}},
{[]string{"a", "b"}, []any{"c", "d", "e"}, []string{"a", "b", "c", "d", "e"}},
{[]string{"a", "b"}, []any{[]string{"c", "d", "e"}}, []string{"a", "b", "c", "d", "e"}},
{[]string{"a"}, []any{"b", template.HTML("c")}, []any{"a", "b", template.HTML("c")}},
{nil, []any{"a", "b"}, []string{"a", "b"}},
{nil, []any{nil}, []any{nil}},
{[]any{}, []any{[]string{"c", "d", "e"}}, []string{"c", "d", "e"}},
{
tstSlicers{&tstSlicer{"a"}, &tstSlicer{"b"}},
[]any{&tstSlicer{"c"}},
tstSlicers{&tstSlicer{"a"}, &tstSlicer{"b"}, &tstSlicer{"c"}},
},
{
&tstSlicers{&tstSlicer{"a"}, &tstSlicer{"b"}},
[]any{&tstSlicer{"c"}},
tstSlicers{
&tstSlicer{"a"},
&tstSlicer{"b"},
&tstSlicer{"c"},
},
},
{
testSlicerInterfaces{&tstSlicerIn1{"a"}, &tstSlicerIn1{"b"}},
[]any{&tstSlicerIn1{"c"}},
testSlicerInterfaces{&tstSlicerIn1{"a"}, &tstSlicerIn1{"b"}, &tstSlicerIn1{"c"}},
},
// https://github.com/gohugoio/hugo/issues/5361
{
[]string{"a", "b"},
[]any{tstSlicers{&tstSlicer{"a"}, &tstSlicer{"b"}}},
[]any{"a", "b", &tstSlicer{"a"}, &tstSlicer{"b"}},
},
{
[]string{"a", "b"},
[]any{&tstSlicer{"a"}},
[]any{"a", "b", &tstSlicer{"a"}},
},
// Errors
{"", []any{[]string{"a", "b"}}, false},
// No string concatenation.
{
"ab",
[]any{"c"},
false,
},
{[]string{"a", "b"}, []any{nil}, []any{"a", "b", nil}},
{[]string{"a", "b"}, []any{nil, "d", nil}, []any{"a", "b", nil, "d", nil}},
{[]any{"a", nil, "c"}, []any{"d", nil, "f"}, []any{"a", nil, "c", "d", nil, "f"}},
{[]string{"a", "b"}, []any{}, []string{"a", "b"}},
} {
result, err := Append(test.start, test.addend...)
if b, ok := test.expected.(bool); ok && !b {
c.Assert(err, qt.Not(qt.IsNil))
continue
}
c.Assert(err, qt.IsNil)
c.Assert(result, qt.DeepEquals, test.expected, qt.Commentf("test: [%d] %v", i, test))
}
}
// #11093
func TestAppendToMultiDimensionalSlice(t *testing.T) {
t.Parallel()
c := qt.New(t)
for _, test := range []struct {
to any
from []any
expected any
}{
{
[][]string{{"a", "b"}},
[]any{[]string{"c", "d"}},
[][]string{
{"a", "b"},
{"c", "d"},
},
},
{
[][]string{{"a", "b"}},
[]any{[]string{"c", "d"}, []string{"e", "f"}},
[][]string{
{"a", "b"},
{"c", "d"},
{"e", "f"},
},
},
{
[][]string{{"a", "b"}},
[]any{[]int{1, 2}},
false,
},
} {
result, err := Append(test.to, test.from...)
if b, ok := test.expected.(bool); ok && !b {
c.Assert(err, qt.Not(qt.IsNil))
} else {
c.Assert(err, qt.IsNil)
c.Assert(result, qt.DeepEquals, test.expected)
}
}
}
func TestAppendShouldMakeACopyOfTheInputSlice(t *testing.T) {
t.Parallel()
c := qt.New(t)
slice := make([]string, 0, 100)
slice = append(slice, "a", "b")
result, err := Append(slice, "c")
c.Assert(err, qt.IsNil)
slice[0] = "d"
c.Assert(result, qt.DeepEquals, []string{"a", "b", "c"})
c.Assert(slice, qt.DeepEquals, []string{"d", "b"})
}
func TestIndirect(t *testing.T) {
t.Parallel()
c := qt.New(t)
type testStruct struct {
Field string
}
var (
nilPtr *testStruct
nilIface interface{} = nil
nonNilIface interface{} = &testStruct{Field: "hello"}
)
tests := []struct {
name string
input any
wantKind reflect.Kind
wantNil bool
}{
{
name: "nil pointer",
input: nilPtr,
wantKind: reflect.Ptr,
wantNil: true,
},
{
name: "nil interface",
input: nilIface,
wantKind: reflect.Invalid,
wantNil: false,
},
{
name: "non-nil pointer to struct",
input: &testStruct{Field: "abc"},
wantKind: reflect.Struct,
wantNil: false,
},
{
name: "non-nil interface holding pointer",
input: nonNilIface,
wantKind: reflect.Struct,
wantNil: false,
},
{
name: "plain value",
input: testStruct{Field: "xyz"},
wantKind: reflect.Struct,
wantNil: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
v := reflect.ValueOf(tt.input)
got, isNil := indirect(v)
c.Assert(got.Kind(), qt.Equals, tt.wantKind)
c.Assert(isNil, qt.Equals, tt.wantNil)
})
}
}

View file

@ -0,0 +1,21 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package collections contains common Hugo functionality related to collection
// handling.
package collections
// Grouper defines a very generic way to group items by a given key.
type Grouper interface {
Group(key any, items any) (any, error)
}

View file

@ -0,0 +1,20 @@
// Copyright 2020 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collections
type Order interface {
// Ordinal is a zero-based ordinal that represents the order of an object
// in a collection.
Ordinal() int
}

View file

@ -0,0 +1,95 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collections
import (
"reflect"
"sort"
)
// Slicer defines a very generic way to create a typed slice. This is used
// in collections.Slice template func to get types such as Pages, PageGroups etc.
// instead of the less useful []interface{}.
type Slicer interface {
Slice(items any) (any, error)
}
// Slice returns a slice of all passed arguments.
func Slice(args ...any) any {
if len(args) == 0 {
return args
}
first := args[0]
firstType := reflect.TypeOf(first)
if firstType == nil {
return args
}
if g, ok := first.(Slicer); ok {
v, err := g.Slice(args)
if err == nil {
return v
}
// If Slice fails, the items are not of the same type and
// []interface{} is the best we can do.
return args
}
if len(args) > 1 {
// This can be a mix of types.
for i := 1; i < len(args); i++ {
if firstType != reflect.TypeOf(args[i]) {
// []interface{} is the best we can do
return args
}
}
}
slice := reflect.MakeSlice(reflect.SliceOf(firstType), len(args), len(args))
for i, arg := range args {
slice.Index(i).Set(reflect.ValueOf(arg))
}
return slice.Interface()
}
// StringSliceToInterfaceSlice converts ss to []interface{}.
func StringSliceToInterfaceSlice(ss []string) []any {
result := make([]any, len(ss))
for i, s := range ss {
result[i] = s
}
return result
}
type SortedStringSlice []string
// Contains returns true if s is in ss.
func (ss SortedStringSlice) Contains(s string) bool {
i := sort.SearchStrings(ss, s)
return i < len(ss) && ss[i] == s
}
// Count returns the number of times s is in ss.
func (ss SortedStringSlice) Count(s string) int {
var count int
i := sort.SearchStrings(ss, s)
for i < len(ss) && ss[i] == s {
count++
i++
}
return count
}

View file

@ -0,0 +1,172 @@
// Copyright 2019 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collections
import (
"errors"
"testing"
qt "github.com/frankban/quicktest"
)
var (
_ Slicer = (*tstSlicer)(nil)
_ Slicer = (*tstSlicerIn1)(nil)
_ Slicer = (*tstSlicerIn2)(nil)
_ testSlicerInterface = (*tstSlicerIn1)(nil)
_ testSlicerInterface = (*tstSlicerIn1)(nil)
)
type testSlicerInterface interface {
Name() string
}
type testSlicerInterfaces []testSlicerInterface
type tstSlicerIn1 struct {
TheName string
}
type tstSlicerIn2 struct {
TheName string
}
type tstSlicer struct {
TheName string
}
func (p *tstSlicerIn1) Slice(in any) (any, error) {
items := in.([]any)
result := make(testSlicerInterfaces, len(items))
for i, v := range items {
switch vv := v.(type) {
case testSlicerInterface:
result[i] = vv
default:
return nil, errors.New("invalid type")
}
}
return result, nil
}
func (p *tstSlicerIn2) Slice(in any) (any, error) {
items := in.([]any)
result := make(testSlicerInterfaces, len(items))
for i, v := range items {
switch vv := v.(type) {
case testSlicerInterface:
result[i] = vv
default:
return nil, errors.New("invalid type")
}
}
return result, nil
}
func (p *tstSlicerIn1) Name() string {
return p.TheName
}
func (p *tstSlicerIn2) Name() string {
return p.TheName
}
func (p *tstSlicer) Slice(in any) (any, error) {
items := in.([]any)
result := make(tstSlicers, len(items))
for i, v := range items {
switch vv := v.(type) {
case *tstSlicer:
result[i] = vv
default:
return nil, errors.New("invalid type")
}
}
return result, nil
}
type tstSlicers []*tstSlicer
func TestSlice(t *testing.T) {
t.Parallel()
c := qt.New(t)
for i, test := range []struct {
args []any
expected any
}{
{[]any{"a", "b"}, []string{"a", "b"}},
{[]any{&tstSlicer{"a"}, &tstSlicer{"b"}}, tstSlicers{&tstSlicer{"a"}, &tstSlicer{"b"}}},
{[]any{&tstSlicer{"a"}, "b"}, []any{&tstSlicer{"a"}, "b"}},
{[]any{}, []any{}},
{[]any{nil}, []any{nil}},
{[]any{5, "b"}, []any{5, "b"}},
{[]any{&tstSlicerIn1{"a"}, &tstSlicerIn2{"b"}}, testSlicerInterfaces{&tstSlicerIn1{"a"}, &tstSlicerIn2{"b"}}},
{[]any{&tstSlicerIn1{"a"}, &tstSlicer{"b"}}, []any{&tstSlicerIn1{"a"}, &tstSlicer{"b"}}},
} {
errMsg := qt.Commentf("[%d] %v", i, test.args)
result := Slice(test.args...)
c.Assert(test.expected, qt.DeepEquals, result, errMsg)
}
}
func TestSortedStringSlice(t *testing.T) {
t.Parallel()
c := qt.New(t)
var s SortedStringSlice = []string{"a", "b", "b", "b", "c", "d"}
c.Assert(s.Contains("a"), qt.IsTrue)
c.Assert(s.Contains("b"), qt.IsTrue)
c.Assert(s.Contains("z"), qt.IsFalse)
c.Assert(s.Count("b"), qt.Equals, 3)
c.Assert(s.Count("z"), qt.Equals, 0)
c.Assert(s.Count("a"), qt.Equals, 1)
}
func TestStringSliceToInterfaceSlice(t *testing.T) {
t.Parallel()
c := qt.New(t)
tests := []struct {
name string
in []string
want []any
}{
{
name: "empty slice",
in: []string{},
want: []any{},
},
{
name: "single element",
in: []string{"hello"},
want: []any{"hello"},
},
{
name: "multiple elements",
in: []string{"a", "b", "c"},
want: []any{"a", "b", "c"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := StringSliceToInterfaceSlice(tt.in)
c.Assert(got, qt.DeepEquals, tt.want)
})
}
}

View file

@ -0,0 +1,82 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collections
import "slices"
import "sync"
// Stack is a simple LIFO stack that is safe for concurrent use.
type Stack[T any] struct {
items []T
zero T
mu sync.RWMutex
}
func NewStack[T any]() *Stack[T] {
return &Stack[T]{}
}
func (s *Stack[T]) Push(item T) {
s.mu.Lock()
defer s.mu.Unlock()
s.items = append(s.items, item)
}
func (s *Stack[T]) Pop() (T, bool) {
s.mu.Lock()
defer s.mu.Unlock()
if len(s.items) == 0 {
return s.zero, false
}
item := s.items[len(s.items)-1]
s.items = s.items[:len(s.items)-1]
return item, true
}
func (s *Stack[T]) Peek() (T, bool) {
s.mu.RLock()
defer s.mu.RUnlock()
if len(s.items) == 0 {
return s.zero, false
}
return s.items[len(s.items)-1], true
}
func (s *Stack[T]) Len() int {
s.mu.RLock()
defer s.mu.RUnlock()
return len(s.items)
}
func (s *Stack[T]) Drain() []T {
s.mu.Lock()
defer s.mu.Unlock()
items := s.items
s.items = nil
return items
}
func (s *Stack[T]) DrainMatching(predicate func(T) bool) []T {
s.mu.Lock()
defer s.mu.Unlock()
var items []T
for i := len(s.items) - 1; i >= 0; i-- {
if predicate(s.items[i]) {
items = append(items, s.items[i])
s.items = slices.Delete(s.items, i, i+1)
}
}
return items
}

View file

@ -0,0 +1,77 @@
package collections
import (
"testing"
qt "github.com/frankban/quicktest"
)
func TestNewStack(t *testing.T) {
t.Parallel()
c := qt.New(t)
s := NewStack[int]()
c.Assert(s, qt.IsNotNil)
}
func TestStackBasic(t *testing.T) {
t.Parallel()
c := qt.New(t)
s := NewStack[int]()
c.Assert(s.Len(), qt.Equals, 0)
s.Push(1)
s.Push(2)
s.Push(3)
c.Assert(s.Len(), qt.Equals, 3)
top, ok := s.Peek()
c.Assert(ok, qt.Equals, true)
c.Assert(top, qt.Equals, 3)
popped, ok := s.Pop()
c.Assert(ok, qt.Equals, true)
c.Assert(popped, qt.Equals, 3)
c.Assert(s.Len(), qt.Equals, 2)
_, _ = s.Pop()
_, _ = s.Pop()
_, ok = s.Pop()
c.Assert(ok, qt.Equals, false)
}
func TestStackDrain(t *testing.T) {
t.Parallel()
c := qt.New(t)
s := NewStack[string]()
s.Push("a")
s.Push("b")
got := s.Drain()
c.Assert(got, qt.DeepEquals, []string{"a", "b"})
c.Assert(s.Len(), qt.Equals, 0)
}
func TestStackDrainMatching(t *testing.T) {
t.Parallel()
c := qt.New(t)
s := NewStack[int]()
s.Push(1)
s.Push(2)
s.Push(3)
s.Push(4)
got := s.DrainMatching(func(v int) bool { return v%2 == 0 })
c.Assert(got, qt.DeepEquals, []int{4, 2})
c.Assert(s.Drain(), qt.DeepEquals, []int{1, 3})
}

View file

@ -0,0 +1,49 @@
// Copyright 2020 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package constants
// Error/Warning IDs.
// Do not change these values.
const (
// IDs for remote errors in tpl/data.
ErrRemoteGetJSON = "error-remote-getjson"
ErrRemoteGetCSV = "error-remote-getcsv"
WarnFrontMatterParamsOverrides = "warning-frontmatter-params-overrides"
WarnRenderShortcodesInHTML = "warning-rendershortcodes-in-html"
WarnGoldmarkRawHTML = "warning-goldmark-raw-html"
WarnPartialSuperfluousPrefix = "warning-partial-superfluous-prefix"
WarnHomePageIsLeafBundle = "warning-home-page-is-leaf-bundle"
)
// Field/method names with special meaning.
const (
FieldRelPermalink = "RelPermalink"
FieldPermalink = "Permalink"
)
// IsFieldRelOrPermalink returns whether the given name is a RelPermalink or Permalink.
func IsFieldRelOrPermalink(name string) bool {
return name == FieldRelPermalink || name == FieldPermalink
}
// Resource transformations.
const (
ResourceTransformationFingerprint = "fingerprint"
)
// IsResourceTransformationPermalinkHash returns whether the given name is a resource transformation that changes the permalink based on the content.
func IsResourceTransformationPermalinkHash(name string) bool {
return name == ResourceTransformationFingerprint
}

2
common/docs.go Normal file
View file

@ -0,0 +1,2 @@
// Package common provides common helper functionality for Hugo.
package common

194
common/hashing/hashing.go Normal file
View file

@ -0,0 +1,194 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package hashing provides common hashing utilities.
package hashing
import (
"crypto/md5"
"encoding/hex"
"io"
"strconv"
"sync"
"github.com/cespare/xxhash/v2"
"github.com/gohugoio/hashstructure"
"github.com/gohugoio/hugo/identity"
)
// XXHashFromReader calculates the xxHash for the given reader.
func XXHashFromReader(r io.Reader) (uint64, int64, error) {
h := getXxHashReadFrom()
defer putXxHashReadFrom(h)
size, err := io.Copy(h, r)
if err != nil {
return 0, 0, err
}
return h.Sum64(), size, nil
}
// XxHashFromReaderHexEncoded calculates the xxHash for the given reader
// and returns the hash as a hex encoded string.
func XxHashFromReaderHexEncoded(r io.Reader) (string, error) {
h := getXxHashReadFrom()
defer putXxHashReadFrom(h)
_, err := io.Copy(h, r)
if err != nil {
return "", err
}
hash := h.Sum(nil)
return hex.EncodeToString(hash), nil
}
// XXHashFromString calculates the xxHash for the given string.
func XXHashFromString(s string) (uint64, error) {
h := xxhash.New()
h.WriteString(s)
return h.Sum64(), nil
}
// XxHashFromStringHexEncoded calculates the xxHash for the given string
// and returns the hash as a hex encoded string.
func XxHashFromStringHexEncoded(f string) string {
h := xxhash.New()
h.WriteString(f)
hash := h.Sum(nil)
return hex.EncodeToString(hash)
}
// MD5FromStringHexEncoded returns the MD5 hash of the given string.
func MD5FromStringHexEncoded(f string) string {
h := md5.New()
h.Write([]byte(f))
return hex.EncodeToString(h.Sum(nil))
}
// HashString returns a hash from the given elements.
// It will panic if the hash cannot be calculated.
// Note that this hash should be used primarily for identity, not for change detection as
// it in the more complex values (e.g. Page) will not hash the full content.
func HashString(vs ...any) string {
hash := HashUint64(vs...)
return strconv.FormatUint(hash, 10)
}
// HashStringHex returns a hash from the given elements as a hex encoded string.
// See HashString for more information.
func HashStringHex(vs ...any) string {
hash := HashUint64(vs...)
return strconv.FormatUint(hash, 16)
}
var hashOptsPool = sync.Pool{
New: func() any {
return &hashstructure.HashOptions{
Hasher: xxhash.New(),
}
},
}
func getHashOpts() *hashstructure.HashOptions {
return hashOptsPool.Get().(*hashstructure.HashOptions)
}
func putHashOpts(opts *hashstructure.HashOptions) {
opts.Hasher.Reset()
hashOptsPool.Put(opts)
}
// HashUint64 returns a hash from the given elements.
// It will panic if the hash cannot be calculated.
// Note that this hash should be used primarily for identity, not for change detection as
// it in the more complex values (e.g. Page) will not hash the full content.
func HashUint64(vs ...any) uint64 {
var o any
if len(vs) == 1 {
o = toHashable(vs[0])
} else {
elements := make([]any, len(vs))
for i, e := range vs {
elements[i] = toHashable(e)
}
o = elements
}
hash, err := Hash(o)
if err != nil {
panic(err)
}
return hash
}
// Hash returns a hash from vs.
func Hash(vs ...any) (uint64, error) {
hashOpts := getHashOpts()
defer putHashOpts(hashOpts)
var v any = vs
if len(vs) == 1 {
v = vs[0]
}
return hashstructure.Hash(v, hashOpts)
}
type keyer interface {
Key() string
}
// For structs, hashstructure.Hash only works on the exported fields,
// so rewrite the input slice for known identity types.
func toHashable(v any) any {
switch t := v.(type) {
case keyer:
return t.Key()
case identity.IdentityProvider:
return t.GetIdentity()
default:
return v
}
}
type xxhashReadFrom struct {
buff []byte
*xxhash.Digest
}
func (x *xxhashReadFrom) ReadFrom(r io.Reader) (int64, error) {
for {
n, err := r.Read(x.buff)
if n > 0 {
x.Digest.Write(x.buff[:n])
}
if err != nil {
if err == io.EOF {
err = nil
}
return int64(n), err
}
}
}
var xXhashReadFromPool = sync.Pool{
New: func() any {
return &xxhashReadFrom{Digest: xxhash.New(), buff: make([]byte, 48*1024)}
},
}
func getXxHashReadFrom() *xxhashReadFrom {
return xXhashReadFromPool.Get().(*xxhashReadFrom)
}
func putXxHashReadFrom(h *xxhashReadFrom) {
h.Reset()
xXhashReadFromPool.Put(h)
}

View file

@ -0,0 +1,157 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package hashing
import (
"fmt"
"math"
"strings"
"sync"
"testing"
qt "github.com/frankban/quicktest"
)
func TestXxHashFromReader(t *testing.T) {
c := qt.New(t)
s := "Hello World"
r := strings.NewReader(s)
got, size, err := XXHashFromReader(r)
c.Assert(err, qt.IsNil)
c.Assert(size, qt.Equals, int64(len(s)))
c.Assert(got, qt.Equals, uint64(7148569436472236994))
}
func TestXxHashFromReaderPara(t *testing.T) {
c := qt.New(t)
var wg sync.WaitGroup
for i := range 10 {
i := i
wg.Add(1)
go func() {
defer wg.Done()
for j := range 100 {
s := strings.Repeat("Hello ", i+j+1*42)
r := strings.NewReader(s)
got, size, err := XXHashFromReader(r)
c.Assert(size, qt.Equals, int64(len(s)))
c.Assert(err, qt.IsNil)
expect, _ := XXHashFromString(s)
c.Assert(got, qt.Equals, expect)
}
}()
}
wg.Wait()
}
func TestXxHashFromString(t *testing.T) {
c := qt.New(t)
s := "Hello World"
got, err := XXHashFromString(s)
c.Assert(err, qt.IsNil)
c.Assert(got, qt.Equals, uint64(7148569436472236994))
}
func TestXxHashFromStringHexEncoded(t *testing.T) {
c := qt.New(t)
s := "The quick brown fox jumps over the lazy dog"
got := XxHashFromStringHexEncoded(s)
// Facit: https://asecuritysite.com/encryption/xxhash?val=The%20quick%20brown%20fox%20jumps%20over%20the%20lazy%20dog
c.Assert(got, qt.Equals, "0b242d361fda71bc")
}
func BenchmarkXXHashFromReader(b *testing.B) {
r := strings.NewReader("Hello World")
b.ResetTimer()
for i := 0; i < b.N; i++ {
XXHashFromReader(r)
r.Seek(0, 0)
}
}
func BenchmarkXXHashFromString(b *testing.B) {
s := "Hello World"
b.ResetTimer()
for i := 0; i < b.N; i++ {
XXHashFromString(s)
}
}
func BenchmarkXXHashFromStringHexEncoded(b *testing.B) {
s := "The quick brown fox jumps over the lazy dog"
b.ResetTimer()
for i := 0; i < b.N; i++ {
XxHashFromStringHexEncoded(s)
}
}
func TestHashString(t *testing.T) {
c := qt.New(t)
c.Assert(HashString("a", "b"), qt.Equals, "3176555414984061461")
c.Assert(HashString("ab"), qt.Equals, "7347350983217793633")
var vals []any = []any{"a", "b", tstKeyer{"c"}}
c.Assert(HashString(vals...), qt.Equals, "4438730547989914315")
c.Assert(vals[2], qt.Equals, tstKeyer{"c"})
}
type tstKeyer struct {
key string
}
func (t tstKeyer) Key() string {
return t.key
}
func (t tstKeyer) String() string {
return "key: " + t.key
}
func BenchmarkHashString(b *testing.B) {
word := " hello "
var tests []string
for i := 1; i <= 5; i++ {
sentence := strings.Repeat(word, int(math.Pow(4, float64(i))))
tests = append(tests, sentence)
}
b.ResetTimer()
for _, test := range tests {
b.Run(fmt.Sprintf("n%d", len(test)), func(b *testing.B) {
for i := 0; i < b.N; i++ {
HashString(test)
}
})
}
}
func BenchmarkHashMap(b *testing.B) {
m := map[string]any{}
for i := range 1000 {
m[fmt.Sprintf("key%d", i)] = i
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
HashString(m)
}
}

View file

@ -0,0 +1,46 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package hcontext
import "context"
// ContextDispatcher is a generic interface for setting and getting values from a context.
type ContextDispatcher[T any] interface {
Set(ctx context.Context, value T) context.Context
Get(ctx context.Context) T
}
// NewContextDispatcher creates a new ContextDispatcher with the given key.
func NewContextDispatcher[T any, R comparable](key R) ContextDispatcher[T] {
return keyInContext[T, R]{
id: key,
}
}
type keyInContext[T any, R comparable] struct {
zero T
id R
}
func (f keyInContext[T, R]) Get(ctx context.Context) T {
v := ctx.Value(f.id)
if v == nil {
return f.zero
}
return v.(T)
}
func (f keyInContext[T, R]) Set(ctx context.Context, value T) context.Context {
return context.WithValue(ctx, f.id, value)
}

View file

@ -0,0 +1,170 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package herrors contains common Hugo errors and error related utilities.
package herrors
import (
"io"
"path/filepath"
"strings"
"github.com/gohugoio/hugo/common/text"
)
// LineMatcher contains the elements used to match an error to a line
type LineMatcher struct {
Position text.Position
Error error
LineNumber int
Offset int
Line string
}
// LineMatcherFn is used to match a line with an error.
// It returns the column number or 0 if the line was found, but column could not be determined. Returns -1 if no line match.
type LineMatcherFn func(m LineMatcher) int
// SimpleLineMatcher simply matches by line number.
var SimpleLineMatcher = func(m LineMatcher) int {
if m.Position.LineNumber == m.LineNumber {
// We found the line, but don't know the column.
return 0
}
return -1
}
// NopLineMatcher is a matcher that always returns 1.
// This will effectively give line 1, column 1.
var NopLineMatcher = func(m LineMatcher) int {
return 1
}
// OffsetMatcher is a line matcher that matches by offset.
var OffsetMatcher = func(m LineMatcher) int {
if m.Offset+len(m.Line) >= m.Position.Offset {
// We found the line, but return 0 to signal that we want to determine
// the column from the error.
return 0
}
return -1
}
// ContainsMatcher is a line matcher that matches by line content.
func ContainsMatcher(text string) func(m LineMatcher) int {
return func(m LineMatcher) int {
if idx := strings.Index(m.Line, text); idx != -1 {
return idx + 1
}
return -1
}
}
// ErrorContext contains contextual information about an error. This will
// typically be the lines surrounding some problem in a file.
type ErrorContext struct {
// If a match will contain the matched line and up to 2 lines before and after.
// Will be empty if no match.
Lines []string
// The position of the error in the Lines above. 0 based.
LinesPos int
// The position of the content in the file. Note that this may be different from the error's position set
// in FileError.
Position text.Position
// The lexer to use for syntax highlighting.
// https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages
ChromaLexer string
}
func chromaLexerFromType(fileType string) string {
switch fileType {
case "html", "htm":
return "go-html-template"
}
return fileType
}
func extNoDelimiter(filename string) string {
return strings.TrimPrefix(filepath.Ext(filename), ".")
}
func chromaLexerFromFilename(filename string) string {
if strings.Contains(filename, "layouts") {
return "go-html-template"
}
ext := extNoDelimiter(filename)
return chromaLexerFromType(ext)
}
func locateErrorInString(src string, matcher LineMatcherFn) *ErrorContext {
return locateError(strings.NewReader(src), &fileError{}, matcher)
}
func locateError(r io.Reader, le FileError, matches LineMatcherFn) *ErrorContext {
if le == nil {
panic("must provide an error")
}
ectx := &ErrorContext{LinesPos: -1, Position: text.Position{Offset: -1}}
b, err := io.ReadAll(r)
if err != nil {
return ectx
}
lines := strings.Split(string(b), "\n")
lineNo := 0
posBytes := 0
for li, line := range lines {
lineNo = li + 1
m := LineMatcher{
Position: le.Position(),
Error: le,
LineNumber: lineNo,
Offset: posBytes,
Line: line,
}
v := matches(m)
if ectx.LinesPos == -1 && v != -1 {
ectx.Position.LineNumber = lineNo
ectx.Position.ColumnNumber = v
break
}
posBytes += len(line)
}
if ectx.Position.LineNumber > 0 {
low := max(ectx.Position.LineNumber-3, 0)
if ectx.Position.LineNumber > 2 {
ectx.LinesPos = 2
} else {
ectx.LinesPos = ectx.Position.LineNumber - 1
}
high := min(ectx.Position.LineNumber+2, len(lines))
ectx.Lines = lines[low:high]
}
return ectx
}

View file

@ -0,0 +1,152 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package herrors contains common Hugo errors and error related utilities.
package herrors
import (
"strings"
"testing"
qt "github.com/frankban/quicktest"
)
func TestErrorLocator(t *testing.T) {
c := qt.New(t)
lineMatcher := func(m LineMatcher) int {
if strings.Contains(m.Line, "THEONE") {
return 1
}
return -1
}
lines := `LINE 1
LINE 2
LINE 3
LINE 4
This is THEONE
LINE 6
LINE 7
LINE 8
`
location := locateErrorInString(lines, lineMatcher)
pos := location.Position
c.Assert(location.Lines, qt.DeepEquals, []string{"LINE 3", "LINE 4", "This is THEONE", "LINE 6", "LINE 7"})
c.Assert(pos.LineNumber, qt.Equals, 5)
c.Assert(location.LinesPos, qt.Equals, 2)
locate := func(s string, m LineMatcherFn) *ErrorContext {
ctx := locateErrorInString(s, m)
return ctx
}
c.Assert(locate(`This is THEONE`, lineMatcher).Lines, qt.DeepEquals, []string{"This is THEONE"})
location = locateErrorInString(`L1
This is THEONE
L2
`, lineMatcher)
pos = location.Position
c.Assert(pos.LineNumber, qt.Equals, 2)
c.Assert(location.LinesPos, qt.Equals, 1)
c.Assert(location.Lines, qt.DeepEquals, []string{"L1", "This is THEONE", "L2", ""})
location = locate(`This is THEONE
L2
`, lineMatcher)
c.Assert(location.LinesPos, qt.Equals, 0)
c.Assert(location.Lines, qt.DeepEquals, []string{"This is THEONE", "L2", ""})
location = locate(`L1
This THEONE
`, lineMatcher)
c.Assert(location.Lines, qt.DeepEquals, []string{"L1", "This THEONE", ""})
c.Assert(location.LinesPos, qt.Equals, 1)
location = locate(`L1
L2
This THEONE
`, lineMatcher)
c.Assert(location.Lines, qt.DeepEquals, []string{"L1", "L2", "This THEONE", ""})
c.Assert(location.LinesPos, qt.Equals, 2)
location = locateErrorInString("NO MATCH", lineMatcher)
pos = location.Position
c.Assert(pos.LineNumber, qt.Equals, 0)
c.Assert(location.LinesPos, qt.Equals, -1)
c.Assert(len(location.Lines), qt.Equals, 0)
lineMatcher = func(m LineMatcher) int {
if m.LineNumber == 6 {
return 1
}
return -1
}
location = locateErrorInString(`A
B
C
D
E
F
G
H
I
J`, lineMatcher)
pos = location.Position
c.Assert(location.Lines, qt.DeepEquals, []string{"D", "E", "F", "G", "H"})
c.Assert(pos.LineNumber, qt.Equals, 6)
c.Assert(location.LinesPos, qt.Equals, 2)
// Test match EOF
lineMatcher = func(m LineMatcher) int {
if m.LineNumber == 4 {
return 1
}
return -1
}
location = locateErrorInString(`A
B
C
`, lineMatcher)
pos = location.Position
c.Assert(location.Lines, qt.DeepEquals, []string{"B", "C", ""})
c.Assert(pos.LineNumber, qt.Equals, 4)
c.Assert(location.LinesPos, qt.Equals, 2)
offsetMatcher := func(m LineMatcher) int {
if m.Offset == 1 {
return 1
}
return -1
}
location = locateErrorInString(`A
B
C
D
E`, offsetMatcher)
pos = location.Position
c.Assert(location.Lines, qt.DeepEquals, []string{"A", "B", "C", "D"})
c.Assert(pos.LineNumber, qt.Equals, 2)
c.Assert(location.LinesPos, qt.Equals, 1)
}

187
common/herrors/errors.go Normal file
View file

@ -0,0 +1,187 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Package herrors contains common Hugo errors and error related utilities.
package herrors
import (
"errors"
"fmt"
"io"
"os"
"regexp"
"runtime"
"runtime/debug"
"strings"
"time"
)
// PrintStackTrace prints the current stacktrace to w.
func PrintStackTrace(w io.Writer) {
buf := make([]byte, 1<<16)
runtime.Stack(buf, true)
fmt.Fprintf(w, "%s", buf)
}
// ErrorSender is a, typically, non-blocking error handler.
type ErrorSender interface {
SendError(err error)
}
// Recover is a helper function that can be used to capture panics.
// Put this at the top of a method/function that crashes in a template:
//
// defer herrors.Recover()
func Recover(args ...any) {
if r := recover(); r != nil {
fmt.Println("ERR:", r)
args = append(args, "stacktrace from panic: \n"+string(debug.Stack()), "\n")
fmt.Println(args...)
}
}
// IsTimeoutError returns true if the given error is or contains a TimeoutError.
func IsTimeoutError(err error) bool {
return errors.Is(err, &TimeoutError{})
}
type TimeoutError struct {
Duration time.Duration
}
func (e *TimeoutError) Error() string {
return fmt.Sprintf("timeout after %s", e.Duration)
}
func (e *TimeoutError) Is(target error) bool {
_, ok := target.(*TimeoutError)
return ok
}
// errMessage wraps an error with a message.
type errMessage struct {
msg string
err error
}
func (e *errMessage) Error() string {
return e.msg
}
func (e *errMessage) Unwrap() error {
return e.err
}
// IsFeatureNotAvailableError returns true if the given error is or contains a FeatureNotAvailableError.
func IsFeatureNotAvailableError(err error) bool {
return errors.Is(err, &FeatureNotAvailableError{})
}
// ErrFeatureNotAvailable denotes that a feature is unavailable.
//
// We will, at least to begin with, make some Hugo features (SCSS with libsass) optional,
// and this error is used to signal those situations.
var ErrFeatureNotAvailable = &FeatureNotAvailableError{Cause: errors.New("this feature is not available in your current Hugo version, see https://goo.gl/YMrWcn for more information")}
// FeatureNotAvailableError is an error type used to signal that a feature is not available.
type FeatureNotAvailableError struct {
Cause error
}
func (e *FeatureNotAvailableError) Unwrap() error {
return e.Cause
}
func (e *FeatureNotAvailableError) Error() string {
return e.Cause.Error()
}
func (e *FeatureNotAvailableError) Is(target error) bool {
_, ok := target.(*FeatureNotAvailableError)
return ok
}
// Must panics if err != nil.
func Must(err error) {
if err != nil {
panic(err)
}
}
// IsNotExist returns true if the error is a file not found error.
// Unlike os.IsNotExist, this also considers wrapped errors.
func IsNotExist(err error) bool {
if os.IsNotExist(err) {
return true
}
// os.IsNotExist does not consider wrapped errors.
if os.IsNotExist(errors.Unwrap(err)) {
return true
}
return false
}
// IsExist returns true if the error is a file exists error.
// Unlike os.IsExist, this also considers wrapped errors.
func IsExist(err error) bool {
if os.IsExist(err) {
return true
}
// os.IsExist does not consider wrapped errors.
if os.IsExist(errors.Unwrap(err)) {
return true
}
return false
}
var nilPointerErrRe = regexp.MustCompile(`at <(.*)>: error calling (.*?): runtime error: invalid memory address or nil pointer dereference`)
const deferredPrefix = "__hdeferred/"
var deferredStringToRemove = regexp.MustCompile(`executing "__hdeferred/.*?" `)
// ImproveRenderErr improves the error message for rendering errors.
func ImproveRenderErr(inErr error) (outErr error) {
outErr = inErr
msg := improveIfNilPointerMsg(inErr)
if msg != "" {
outErr = &errMessage{msg: msg, err: outErr}
}
if strings.Contains(inErr.Error(), deferredPrefix) {
msg := deferredStringToRemove.ReplaceAllString(inErr.Error(), "executing ")
outErr = &errMessage{msg: msg, err: outErr}
}
return
}
func improveIfNilPointerMsg(inErr error) string {
m := nilPointerErrRe.FindStringSubmatch(inErr.Error())
if len(m) == 0 {
return ""
}
call := m[1]
field := m[2]
parts := strings.Split(call, ".")
if len(parts) < 2 {
return ""
}
receiverName := parts[len(parts)-2]
receiver := strings.Join(parts[:len(parts)-1], ".")
s := fmt.Sprintf(" %s is nil; wrap it in if or with: {{ with %s }}{{ .%s }}{{ end }}", receiverName, receiver, field)
return nilPointerErrRe.ReplaceAllString(inErr.Error(), s)
}

View file

@ -0,0 +1,45 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package herrors
import (
"errors"
"fmt"
"testing"
qt "github.com/frankban/quicktest"
"github.com/spf13/afero"
)
func TestIsNotExist(t *testing.T) {
c := qt.New(t)
c.Assert(IsNotExist(afero.ErrFileNotFound), qt.Equals, true)
c.Assert(IsNotExist(afero.ErrFileExists), qt.Equals, false)
c.Assert(IsNotExist(afero.ErrDestinationExists), qt.Equals, false)
c.Assert(IsNotExist(nil), qt.Equals, false)
c.Assert(IsNotExist(fmt.Errorf("foo")), qt.Equals, false)
// os.IsNotExist returns false for wrapped errors.
c.Assert(IsNotExist(fmt.Errorf("foo: %w", afero.ErrFileNotFound)), qt.Equals, true)
}
func TestIsFeatureNotAvailableError(t *testing.T) {
c := qt.New(t)
c.Assert(IsFeatureNotAvailableError(ErrFeatureNotAvailable), qt.Equals, true)
c.Assert(IsFeatureNotAvailableError(&FeatureNotAvailableError{}), qt.Equals, true)
c.Assert(IsFeatureNotAvailableError(errors.New("asdf")), qt.Equals, false)
}

View file

@ -0,0 +1,430 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable lfmtaw or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package herrors
import (
"encoding/json"
"errors"
"fmt"
"io"
"path/filepath"
"github.com/bep/godartsass/v2"
"github.com/bep/golibsass/libsass/libsasserrors"
"github.com/gohugoio/hugo/common/paths"
"github.com/gohugoio/hugo/common/text"
"github.com/pelletier/go-toml/v2"
"github.com/spf13/afero"
"github.com/tdewolff/parse/v2"
)
// FileError represents an error when handling a file: Parsing a config file,
// execute a template etc.
type FileError interface {
error
// ErrorContext holds some context information about the error.
ErrorContext() *ErrorContext
text.Positioner
// UpdatePosition updates the position of the error.
UpdatePosition(pos text.Position) FileError
// UpdateContent updates the error with a new ErrorContext from the content of the file.
UpdateContent(r io.Reader, linematcher LineMatcherFn) FileError
// SetFilename sets the filename of the error.
SetFilename(filename string) FileError
}
// Unwrapper can unwrap errors created with fmt.Errorf.
type Unwrapper interface {
Unwrap() error
}
var (
_ FileError = (*fileError)(nil)
_ Unwrapper = (*fileError)(nil)
)
func (fe *fileError) SetFilename(filename string) FileError {
fe.position.Filename = filename
return fe
}
func (fe *fileError) UpdatePosition(pos text.Position) FileError {
oldFilename := fe.Position().Filename
if pos.Filename != "" && fe.fileType == "" {
_, fe.fileType = paths.FileAndExtNoDelimiter(filepath.Clean(pos.Filename))
}
if pos.Filename == "" {
pos.Filename = oldFilename
}
fe.position = pos
return fe
}
func (fe *fileError) UpdateContent(r io.Reader, linematcher LineMatcherFn) FileError {
if linematcher == nil {
linematcher = SimpleLineMatcher
}
var (
posle = fe.position
ectx *ErrorContext
)
if posle.LineNumber <= 1 && posle.Offset > 0 {
// Try to locate the line number from the content if offset is set.
ectx = locateError(r, fe, func(m LineMatcher) int {
if posle.Offset >= m.Offset && posle.Offset < m.Offset+len(m.Line) {
lno := posle.LineNumber - m.Position.LineNumber + m.LineNumber
m.Position = text.Position{LineNumber: lno}
return linematcher(m)
}
return -1
})
} else {
ectx = locateError(r, fe, linematcher)
}
if ectx.ChromaLexer == "" {
if fe.fileType != "" {
ectx.ChromaLexer = chromaLexerFromType(fe.fileType)
} else {
ectx.ChromaLexer = chromaLexerFromFilename(fe.Position().Filename)
}
}
fe.errorContext = ectx
if ectx.Position.LineNumber > 0 {
fe.position.LineNumber = ectx.Position.LineNumber
}
if ectx.Position.ColumnNumber > 0 {
fe.position.ColumnNumber = ectx.Position.ColumnNumber
}
return fe
}
type fileError struct {
position text.Position
errorContext *ErrorContext
fileType string
cause error
}
func (e *fileError) ErrorContext() *ErrorContext {
return e.errorContext
}
// Position returns the text position of this error.
func (e fileError) Position() text.Position {
return e.position
}
func (e *fileError) Error() string {
return fmt.Sprintf("%s: %s", e.position, e.causeString())
}
func (e *fileError) causeString() string {
if e.cause == nil {
return ""
}
switch v := e.cause.(type) {
// Avoid repeating the file info in the error message.
case godartsass.SassError:
return v.Message
case libsasserrors.Error:
return v.Message
default:
return v.Error()
}
}
func (e *fileError) Unwrap() error {
return e.cause
}
// NewFileError creates a new FileError that wraps err.
// It will try to extract the filename and line number from err.
func NewFileError(err error) FileError {
// Filetype is used to determine the Chroma lexer to use.
fileType, pos := extractFileTypePos(err)
return &fileError{cause: err, fileType: fileType, position: pos}
}
// NewFileErrorFromName creates a new FileError that wraps err.
// The value for name should identify the file, the best
// being the full filename to the file on disk.
func NewFileErrorFromName(err error, name string) FileError {
// Filetype is used to determine the Chroma lexer to use.
fileType, pos := extractFileTypePos(err)
pos.Filename = name
if fileType == "" {
_, fileType = paths.FileAndExtNoDelimiter(filepath.Clean(name))
}
return &fileError{cause: err, fileType: fileType, position: pos}
}
// NewFileErrorFromPos will use the filename and line number from pos to create a new FileError, wrapping err.
func NewFileErrorFromPos(err error, pos text.Position) FileError {
// Filetype is used to determine the Chroma lexer to use.
fileType, _ := extractFileTypePos(err)
if fileType == "" {
_, fileType = paths.FileAndExtNoDelimiter(filepath.Clean(pos.Filename))
}
return &fileError{cause: err, fileType: fileType, position: pos}
}
func NewFileErrorFromFileInErr(err error, fs afero.Fs, linematcher LineMatcherFn) FileError {
fe := NewFileError(err)
pos := fe.Position()
if pos.Filename == "" {
return fe
}
f, realFilename, err2 := openFile(pos.Filename, fs)
if err2 != nil {
return fe
}
pos.Filename = realFilename
defer f.Close()
return fe.UpdateContent(f, linematcher)
}
func NewFileErrorFromFileInPos(err error, pos text.Position, fs afero.Fs, linematcher LineMatcherFn) FileError {
if err == nil {
panic("err is nil")
}
f, realFilename, err2 := openFile(pos.Filename, fs)
if err2 != nil {
return NewFileErrorFromPos(err, pos)
}
pos.Filename = realFilename
defer f.Close()
return NewFileErrorFromPos(err, pos).UpdateContent(f, linematcher)
}
// NewFileErrorFromFile is a convenience method to create a new FileError from a file.
func NewFileErrorFromFile(err error, filename string, fs afero.Fs, linematcher LineMatcherFn) FileError {
if err == nil {
panic("err is nil")
}
f, realFilename, err2 := openFile(filename, fs)
if err2 != nil {
return NewFileErrorFromName(err, realFilename)
}
defer f.Close()
return NewFileErrorFromName(err, realFilename).UpdateContent(f, linematcher)
}
func openFile(filename string, fs afero.Fs) (afero.File, string, error) {
realFilename := filename
// We want the most specific filename possible in the error message.
fi, err2 := fs.Stat(filename)
if err2 == nil {
if s, ok := fi.(interface {
Filename() string
}); ok {
realFilename = s.Filename()
}
}
f, err2 := fs.Open(filename)
if err2 != nil {
return nil, realFilename, err2
}
return f, realFilename, nil
}
// Cause returns the underlying error, that is,
// it unwraps errors until it finds one that does not implement
// the Unwrap method.
// For a shallow variant, see Unwrap.
func Cause(err error) error {
type unwrapper interface {
Unwrap() error
}
for err != nil {
cause, ok := err.(unwrapper)
if !ok {
break
}
err = cause.Unwrap()
}
return err
}
// Unwrap returns the underlying error or itself if it does not implement Unwrap.
func Unwrap(err error) error {
if u := errors.Unwrap(err); u != nil {
return u
}
return err
}
func extractFileTypePos(err error) (string, text.Position) {
err = Unwrap(err)
var fileType string
// LibSass, DartSass
if pos := extractPosition(err); pos.LineNumber > 0 || pos.Offset > 0 {
_, fileType = paths.FileAndExtNoDelimiter(pos.Filename)
return fileType, pos
}
// Default to line 1 col 1 if we don't find any better.
pos := text.Position{
Offset: -1,
LineNumber: 1,
ColumnNumber: 1,
}
// JSON errors.
offset, typ := extractOffsetAndType(err)
if fileType == "" {
fileType = typ
}
if offset >= 0 {
pos.Offset = offset
}
// The error type from the minifier contains line number and column number.
if line, col := extractLineNumberAndColumnNumber(err); line >= 0 {
pos.LineNumber = line
pos.ColumnNumber = col
return fileType, pos
}
// Look in the error message for the line number.
for _, handle := range lineNumberExtractors {
lno, col := handle(err)
if lno > 0 {
pos.ColumnNumber = col
pos.LineNumber = lno
break
}
}
if fileType == "" && pos.Filename != "" {
_, fileType = paths.FileAndExtNoDelimiter(pos.Filename)
}
return fileType, pos
}
// UnwrapFileError tries to unwrap a FileError from err.
// It returns nil if this is not possible.
func UnwrapFileError(err error) FileError {
for err != nil {
switch v := err.(type) {
case FileError:
return v
default:
err = errors.Unwrap(err)
}
}
return nil
}
// UnwrapFileErrors tries to unwrap all FileError.
func UnwrapFileErrors(err error) []FileError {
var errs []FileError
for err != nil {
if v, ok := err.(FileError); ok {
errs = append(errs, v)
}
err = errors.Unwrap(err)
}
return errs
}
// UnwrapFileErrorsWithErrorContext tries to unwrap all FileError in err that has an ErrorContext.
func UnwrapFileErrorsWithErrorContext(err error) []FileError {
var errs []FileError
for err != nil {
if v, ok := err.(FileError); ok && v.ErrorContext() != nil {
errs = append(errs, v)
}
err = errors.Unwrap(err)
}
return errs
}
func extractOffsetAndType(e error) (int, string) {
switch v := e.(type) {
case *json.UnmarshalTypeError:
return int(v.Offset), "json"
case *json.SyntaxError:
return int(v.Offset), "json"
default:
return -1, ""
}
}
func extractLineNumberAndColumnNumber(e error) (int, int) {
switch v := e.(type) {
case *parse.Error:
return v.Line, v.Column
case *toml.DecodeError:
return v.Position()
}
return -1, -1
}
func extractPosition(e error) (pos text.Position) {
switch v := e.(type) {
case godartsass.SassError:
span := v.Span
start := span.Start
filename, _ := paths.UrlStringToFilename(span.Url)
pos.Filename = filename
pos.Offset = start.Offset
pos.ColumnNumber = start.Column
case libsasserrors.Error:
pos.Filename = v.File
pos.LineNumber = v.Line
pos.ColumnNumber = v.Column
}
return
}
// TextSegmentError is an error with a text segment attached.
type TextSegmentError struct {
Segment string
Err error
}
func (e TextSegmentError) Unwrap() error {
return e.Err
}
func (e TextSegmentError) Error() string {
return e.Err.Error()
}

View file

@ -0,0 +1,80 @@
// Copyright 2024 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package herrors
import (
"errors"
"fmt"
"strings"
"testing"
"github.com/gohugoio/hugo/common/text"
qt "github.com/frankban/quicktest"
)
func TestNewFileError(t *testing.T) {
t.Parallel()
c := qt.New(t)
fe := NewFileErrorFromName(errors.New("bar"), "foo.html")
c.Assert(fe.Error(), qt.Equals, `"foo.html:1:1": bar`)
lines := ""
for i := 1; i <= 100; i++ {
lines += fmt.Sprintf("line %d\n", i)
}
fe.UpdatePosition(text.Position{LineNumber: 32, ColumnNumber: 2})
c.Assert(fe.Error(), qt.Equals, `"foo.html:32:2": bar`)
fe.UpdatePosition(text.Position{LineNumber: 0, ColumnNumber: 0, Offset: 212})
fe.UpdateContent(strings.NewReader(lines), nil)
c.Assert(fe.Error(), qt.Equals, `"foo.html:32:0": bar`)
errorContext := fe.ErrorContext()
c.Assert(errorContext, qt.IsNotNil)
c.Assert(errorContext.Lines, qt.DeepEquals, []string{"line 30", "line 31", "line 32", "line 33", "line 34"})
c.Assert(errorContext.LinesPos, qt.Equals, 2)
c.Assert(errorContext.ChromaLexer, qt.Equals, "go-html-template")
}
func TestNewFileErrorExtractFromMessage(t *testing.T) {
t.Parallel()
c := qt.New(t)
for i, test := range []struct {
in error
offset int
lineNumber int
columnNumber int
}{
{errors.New("no line number for you"), 0, 1, 1},
{errors.New(`template: _default/single.html:4:15: executing "_default/single.html" at <.Titles>: can't evaluate field Titles in type *hugolib.PageOutput`), 0, 4, 15},
{errors.New("parse failed: template: _default/bundle-resource-meta.html:11: unexpected in operand"), 0, 11, 1},
{errors.New(`failed:: template: _default/bundle-resource-meta.html:2:7: executing "main" at <.Titles>`), 0, 2, 7},
{errors.New(`failed to load translations: (6, 7): was expecting token =, but got "g" instead`), 0, 6, 7},
{errors.New(`execute of template failed: template: index.html:2:5: executing "index.html" at <partial "foo.html" .>: error calling partial: "/layouts/partials/foo.html:3:6": execute of template failed: template: partials/foo.html:3:6: executing "partials/foo.html" at <.ThisDoesNotExist>: can't evaluate field ThisDoesNotExist in type *hugolib.pageStat`), 0, 2, 5},
} {
got := NewFileErrorFromName(test.in, "test.txt")
errMsg := qt.Commentf("[%d][%T]", i, got)
pos := got.Position()
c.Assert(pos.LineNumber, qt.Equals, test.lineNumber, errMsg)
c.Assert(pos.ColumnNumber, qt.Equals, test.columnNumber, errMsg)
c.Assert(errors.Unwrap(got), qt.Not(qt.IsNil))
}
}

View file

@ -0,0 +1,63 @@
// Copyright 2018 The Hugo Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package herrors
import (
"regexp"
"strconv"
)
var lineNumberExtractors = []lineNumberExtractor{
// Template/shortcode parse errors
newLineNumberErrHandlerFromRegexp(`:(\d+):(\d*):`),
newLineNumberErrHandlerFromRegexp(`:(\d+):`),
// YAML parse errors
newLineNumberErrHandlerFromRegexp(`line (\d+):`),
// i18n bundle errors
newLineNumberErrHandlerFromRegexp(`\((\d+),\s(\d*)`),
}
type lineNumberExtractor func(e error) (int, int)
func newLineNumberErrHandlerFromRegexp(expression string) lineNumberExtractor {
re := regexp.MustCompile(expression)
return extractLineNo(re)
}
func extractLineNo(re *regexp.Regexp) lineNumberExtractor {
return func(e error) (int, int) {
if e == nil {
panic("no error")
}
col := 1
s := e.Error()
m := re.FindStringSubmatch(s)
if len(m) >= 2 {
lno, _ := strconv.Atoi(m[1])
if len(m) > 2 {
col, _ = strconv.Atoi(m[2])
}
if col <= 0 {
col = 1
}
return lno, col
}
return 0, col
}
}

Some files were not shown because too many files have changed in this diff Show more