summaryrefslogtreecommitdiffstats
path: root/hugolib
AgeCommit message (Collapse)Author
8 daysRename hstring.RenderedHTML => hstring.HTMLBjørn Erik Pedersen
And add a comment about why it exists.
8 daysMake all renderhook Text methods return template.HTMLBjørn Erik Pedersen
8 daysAdd Markdown render hooks for tablesBjørn Erik Pedersen
Fixes #9316 Fixes #12811
10 daysAdd Page.Contents with scope supportBjørn Erik Pedersen
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
12 dayshugolib: Add a test for overriding _internal templatesBjørn Erik Pedersen
2024-08-25Fix missing method NameNormalized panicBjørn Erik Pedersen
Closes #12795
2024-08-17Add config options page.nextPrevSortOrder/nextPrevInSectionSortOrderBjørn Erik Pedersen
See #12776
2024-08-14resources: Add URI GetRemote errorb10c
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-09Add build time math renderingBjørn Erik Pedersen
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-07markup: Add blockquote render hooksBjørn Erik Pedersen
Closes #12590
2024-08-07Add render hooks for inline and block passthrough snippetsBjørn Erik Pedersen
Fixes #11927
2024-08-05Fix deprecation errorsBjørn Erik Pedersen
2024-08-01resources/page: Expand parmalinks tokens in `url`n1xx1
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-07-31Shorten processed image filenamesBjørn Erik Pedersen
Fixes #12688 Fixes #12656
2024-07-31Consolidate all hashing to the common/hashing packageBjørn Erik Pedersen
And remove now unsued hashing funcs.
2024-07-31identity: Use xxHash in hashstructure (note)Bjørn Erik Pedersen
``` 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-20Switch EXIF libraryBjørn Erik Pedersen
Closes #10855 Closes #8586 Closes #8996
2024-07-17deps: Upgrade github.com/bep/gitmap v1.4.0 => v1.6.0 (note)Bjørn Erik Pedersen
Closes #8627
2024-07-04Fix site.GetPage, never do short lookups for paths with leadig slashBjørn Erik Pedersen
Fixes #12638
2024-07-01Fix it so publishDate rolls up to section, taxonomy, or term pagesBjørn Erik Pedersen
Fixes #12438
2024-06-25Add css.TailwindCSSBjørn Erik Pedersen
Closes #12618 Closes #12620
2024-06-23Implement deferBjørn Erik Pedersen
Closes #8086 Closes #12589
2024-06-22Fix Erroridf/Warnidf mixed case issueBjørn Erik Pedersen
Fixes #12617
2024-06-19Speed up GetTermsBjørn Erik Pedersen
```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-08resources/page: Let GroupByParam return nil instead of errorJoe Mooring
Closes #12578
2024-06-08Add option to not generate aliases for first page of pagination pagesBjørn Erik Pedersen
Also consolidate the pagination configuration into a struct. Closes #12572
2024-06-05Misc remote HTTP/content adapter enhancementsBjørn Erik Pedersen
* Recover from server errors * Improve go adapter rebuilds when adding new content See #12502 Fixes #12570
2024-06-04Add a HTTP cache for remote resources.Bjørn Erik Pedersen
Fixes #12502 Closes #11891
2024-06-02content adapter: Fix site.GetPage using the base part of the pathBjørn Erik Pedersen
Fixes #12561
2024-06-01resources/page: Deprecate .Sites.First in favor of .Sites.DefaultJoe Mooring
Closes #12513
2024-06-01content adapter: Handle <!--more--> separator in content.valueBjørn Erik Pedersen
Closes #12556
2024-05-30content adapter: Fix server crash on partial editBjørn Erik Pedersen
Fixes #12538
2024-05-30content adapter: Add support for menus in AddPageBjørn Erik Pedersen
Fixes #12507
2024-05-30content adapter: Fix issue with content starting out with a shortcodeBjørn Erik Pedersen
Fixes #12544
2024-05-23hugolib: Allow override of sitemap file nameJoe Mooring
Closes #12525
2024-05-17Also warn about duplicate content paths with --printPathWarningsBjørn Erik Pedersen
Closes #12511
2024-05-15Fix mixed case Page params handling in content adaptersBjørn Erik Pedersen
Fixes #12497
2024-05-15Fix paths with dots issue with content adaptersBjørn Erik Pedersen
Fixes #12493
2024-05-14Create pages from _content.gotmplBjørn Erik Pedersen
Closes #12427 Closes #12485 Closes #6310 Closes #5074
2024-05-05Fix one more resource change eviction logic issueBjørn Erik Pedersen
This is how we should have fixed #1239. Fixes #12456
2024-05-04Make the cache eviction logic for stale entities more robustBjørn Erik Pedersen
Fixes #12458
2024-05-02resources/page: Pull internal Page methods into its own interfaceBjørn Erik Pedersen
So it doesn't get visible when passing it to `jsonify`.
2024-05-01Fix rebuilds on cascade deletes/renamesBjørn Erik Pedersen
And also avoid reading sub directories on simple changes to branch `_index.md` files. Fixes #12449
2024-05-01commands: Print "Webserver is ..." right before "Total ..."Bjørn Erik Pedersen
Also fix it so * It's not printed when running `hugo -w` * It'd printed for all kinds of rebuilds Fixes #12384
2024-04-30Make sure replaced pages gets marked as staleBjørn Erik Pedersen
Fixes #12436
2024-04-25config: Setups with only one active language can never be multihostBjørn Erik Pedersen
Fixes #12288
2024-04-25Fix rebuilds when running hugo -wBjørn Erik Pedersen
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-22markup/goldmark: Fix data race in the hugocontext wrapperBjørn Erik Pedersen
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-22tpl: Escape .Title in built-in image and link render hooksBjørn Erik Pedersen
Co-authored-by: Joe Mooring <joe@mooring.com>
2024-04-20Only add root sections to the section pages menuBjørn Erik Pedersen
Fixes #12399