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
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
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
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
0918e087ec
resources: Replace error handling in GetRemote with try (note)
...
Closes #13216
2025-01-06 12:22:17 +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
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
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
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
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
Bjørn Erik Pedersen
5ab38de363
Fix Sass imports on the form index.{scss,sass}
...
Fixes #13123
2024-12-10 13:33:27 +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
Bjørn Erik Pedersen
8d92042ab9
dartsass: Fix error message
...
Closes #13065
2024-11-18 17:14:56 +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
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
a7df536a52
Add site.Store and hugo.Store and Shortcode.Store
...
Closes #13021
2024-11-13 12:41:16 +01:00
Bjørn Erik Pedersen
2c3efc8106
Alias Page.Scratch to Page.Store (note)
...
Fixes #13016
2024-11-06 09:49:23 +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
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
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
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
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
Joe Mooring
d1ba52f3c3
tests: Address deprecation warnings and errors
2024-09-29 10:49:26 +02:00
Joe Mooring
4c02a52f7c
resources/page: Validate predefined front matter dates
...
Closes #10717
2024-09-27 11:19:27 +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
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
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
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
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
5f667f8796
Fix missing method NameNormalized panic
...
Closes #12795
2024-08-25 23:17:26 +02:00
Bjørn Erik Pedersen
01008ba512
Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrder
...
See #12776
2024-08-17 16:47:50 +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
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
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
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
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