Commit graph

2323 commits

Author SHA1 Message Date
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
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
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
665ac949bd markup: Add blockquote render hooks
Closes #12590
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
Bjørn Erik Pedersen
69455fa422
Fix deprecation errors 2024-08-05 19:23:53 +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