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
Bjørn Erik Pedersen
7f0f50b133
Make cascade front matter order deterministic
...
Fixes #12594
2025-01-23 09:45:47 +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
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
76993369a0
For render hooks, only fallback to HTML (or the defaultOutputFormat) template
...
Closes #13242
2025-01-15 19:59:58 +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
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
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
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
d913f46a8b
Fix server refresh on 404 template changes
...
Fixes #13209
2025-01-02 11:21:25 +01:00
Joe Mooring
b3f32949cb
hugolib: Fix fallbacks for menu entry Name and Title
...
Closes #13161
2024-12-19 08:47:53 +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
Bjørn Erik Pedersen
744b8566ec
Fix a rebuild on resource rename case
2024-12-16 08:33:10 +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
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
Joe Mooring
54398f8d57
tpl/tplimpl: Escape Markdown attributes in render hooks and shortcodes
2024-12-09 17:58:57 +01:00
Joe Mooring
b529859008
markup/tableofcontents: Cast Fragments.ToHTML args to int
...
Closes #13107
2024-12-04 21:37:06 +01: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
Bjørn Erik Pedersen
e917401c71
Make sure term is always set
...
Fixes #13063
2024-11-18 16:20:25 +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
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
d4de780edc
Fix extra newline/paragraphs issue with .RenderShortcodes
...
Fixes #13051
2024-11-16 17:51:11 +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
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
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
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
Bjørn Erik Pedersen
cb6e27b32a
hugolib/commands: Fix stuck server error issues
...
Fixes #11378
2024-10-24 13:34:11 +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
Julia Evans
5bb22b6b4e
hugolib: Make .Site.Author deprecation warning clearer
...
Fixes #12269
2024-10-14 09:16:11 +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
e079145373
hugolib: Move hugolib/site_new.go into hugolib/site.go
2024-09-17 10:15:14 +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
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
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
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
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
371246de25
hugolib: Add a test for overriding _internal templates
2024-08-28 08:17:16 +02:00
Bjørn Erik Pedersen
5f667f8796
Fix missing method NameNormalized panic
...
Closes #12795
2024-08-25 23:17:26 +02:00