Commit graph

437 commits

Author SHA1 Message Date
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
hugoreleaser
d47225ce9e releaser: Bump versions for release of 0.112.5
[ci skip]
2023-05-29 06:43:02 +00: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
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
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
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
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
7c7baa6183 Add hugo.WorkingDir
Fixes #10969
2023-05-20 17:45:56 +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
7ce033a89d Support, but warn, about top level language custom params
Updates #10947
2023-05-17 22:13:29 +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
0988b76a78
Add a counter helper 2023-05-15 09:23:26 +02: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
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
Andreas Deininger
d55af2abf0 Run gofmt -s on source files 2023-03-12 10:32:29 +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
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
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
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
ce524d0b5e Add a page template func
Fixes #9339
2023-02-25 19:53:18 +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
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
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
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
e402d91ee1 Misc doc, code refactoring to improve documentation 2023-01-04 18:01:26 +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
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
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
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
5067775a6f
common/hugio: Fix multiWriteCloser.Close
Fixes #10505
2022-12-06 10:32:33 +01:00
hugoreleaser
2221b5b30a releaser: Bump versions for release of 0.107.0
[ci skip]
2022-11-24 13:59:45 +00: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