aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources/resource_transformers
AgeCommit message (Collapse)Author
13 daysAdd js.BatchBjørn Erik Pedersen
Fixes #12626 Closes #7499 Closes #9978 Closes #12879 Closes #13113 Fixes #13116
2024-12-10Fix Sass imports on the form index.{scss,sass}Bjørn Erik Pedersen
Fixes #13123
2024-11-21dartsass: Fix nilpointer on Close when Dart Sass isn't installedBjørn Erik Pedersen
Fixes #13076
2024-11-18dartsass: Fix error messageBjørn Erik Pedersen
Closes #13065
2024-11-18dartsass: Add silenceDeprecations optionBjørn Erik Pedersen
Fixes #13045
2024-11-18dartsass: Remove support for v1 of the protocol/binary (note)Bjørn Erik Pedersen
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-01resources: Address Dart Sass deprecation of global built-in functionsJoe Mooring
See https://github.com/sass/dart-sass/releases/tag/1.80.0 Fixes #12961
2024-10-06tailwind: Pin Tailwind 4 test to alpha 26 or laterJoe Mooring
2024-09-29tests: Address deprecation warnings and errorsJoe Mooring
2024-09-27tailwind: Pin Tailwind 4 test to alpha 24Bjørn Erik Pedersen
See #12880
2024-09-16libsass: Resolve directory paths to directory index filesJoe Mooring
Closes #12851
2024-09-15dartsass: Resolve directory paths to directory index filesJoe Mooring
Closes #12849
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-31identity: Upgrade to github.com/mitchellh/hashstructure/v2 v2.0.2Bjørn Erik Pedersen
``` name old time/op new time/op delta HashString/n28-10 131ns ± 7% 133ns ±19% ~ (p=0.343 n=4+4) HashString/n112-10 237ns ± 5% 241ns ± 3% ~ (p=0.229 n=4+4) HashString/n448-10 688ns ± 3% 687ns ± 1% ~ (p=0.886 n=4+4) HashString/n1792-10 2.51µs ± 3% 2.56µs ± 3% ~ (p=0.200 n=4+4) HashString/n7168-10 10.1µs ± 2% 10.0µs ± 4% ~ (p=0.686 n=4+4) name old alloc/op new alloc/op delta HashString/n28-10 80.0B ± 0% 80.0B ± 0% ~ (all equal) HashString/n112-10 160B ± 0% 160B ± 0% ~ (all equal) HashString/n448-10 496B ± 0% 496B ± 0% ~ (all equal) HashString/n1792-10 1.84kB ± 0% 1.84kB ± 0% ~ (all equal) HashString/n7168-10 8.24kB ± 0% 8.24kB ± 0% ~ (all equal) name old allocs/op new allocs/op delta HashString/n28-10 4.00 ± 0% 4.00 ± 0% ~ (all equal) HashString/n112-10 4.00 ± 0% 4.00 ± 0% ~ (all equal) HashString/n448-10 4.00 ± 0% 4.00 ± 0% ~ (all equal) HashString/n1792-10 4.00 ± 0% 4.00 ± 0% ~ (all equal) HashString/n7168-10 4.00 ± 0% 4.00 ± 0% ~ (all equal) ``` Closes #11644
2024-07-20Switch EXIF libraryBjørn Erik Pedersen
Closes #10855 Closes #8586 Closes #8996
2024-06-25Add css.TailwindCSSBjørn Erik Pedersen
Closes #12618 Closes #12620
2024-06-13resources: Update Dart Sass error messageJoe Mooring
2024-06-08js: Support more recent targets with js.Build / esbuildBjørn Erik Pedersen
Closes #12575
2024-05-05Fix one more resource change eviction logic issueBjørn Erik Pedersen
This is how we should have fixed #1239. Fixes #12456
2024-04-20Fix partial rebuilds for SCSS fetched with GetMatch and similarBjørn Erik Pedersen
Fixes #12395
2024-04-08babel: Run go fmtBjørn Erik Pedersen
2024-04-08babel: Close file before removingguangwu
2024-03-15all: Typo fixesChristian Oliff
2024-03-01Fix and add integration test for the Bootstrap SCSS module for both Dart ↵Bjørn Erik Pedersen
Sass and Libsass This fixes the reverse filesystem lookup (absolute filename to path relative to the composite filesystem). The old logic had some assumptions about the locality of the actual files that didn't work in more complex scenarios. This commit now also adds the popular Bootstrap SCSS Hugo module to the CI build (both for libsass and dartsass transpiler), so we can hopefully avoid similar future breakage. Fixes #12178
2024-02-24tocss: Fix the import resolving from absolute to relative assets pathsBjørn Erik Pedersen
Fixes #12137
2024-02-23js: Support JSX and JSXImportSourceOptionsBenjamin Altpeter
Fixes #12118
2024-02-20Fix dart sass import regressionBjørn Erik Pedersen
Fixes #12072
2024-01-28all: Run gofumpt -l -w .Bjørn Erik Pedersen
2024-01-28testing: Simplify some integration testsBjørn Erik Pedersen
2024-01-28testing: Rename integration_test.go to PACKAGE_integration_test.goBjørn Erik Pedersen
Primary motivation making them easier to find in the code editor.
2024-01-27all: Rework page store, add a dynacache, improve partial rebuilds, and some ↵develop2024Bjørn Erik Pedersen
general spring cleaning There are some breaking changes in this commit, see #11455. Closes #11455 Closes #11549 This fixes a set of bugs (see issue list) and it is also paying some technical debt accumulated over the years. We now build with Staticcheck enabled in the CI build. The performance should be about the same as before for regular sized Hugo sites, but it should perform and scale much better to larger data sets, as objects that uses lots of memory (e.g. rendered Markdown, big JSON files read into maps with transform.Unmarshal etc.) will now get automatically garbage collected if needed. Performance on partial rebuilds when running the server in fast render mode should be the same, but the change detection should be much more accurate. A list of the notable new features: * A new dependency tracker that covers (almost) all of Hugo's API and is used to do fine grained partial rebuilds when running the server. * A new and simpler tree document store which allows fast lookups and prefix-walking in all dimensions (e.g. language) concurrently. * You can now configure an upper memory limit allowing for much larger data sets and/or running on lower specced PCs. We have lifted the "no resources in sub folders" restriction for branch bundles (e.g. sections). Memory Limit * Hugos will, by default, set aside a quarter of the total system memory, but you can set this via the OS environment variable HUGO_MEMORYLIMIT (in gigabytes). This is backed by a partitioned LRU cache used throughout Hugo. A cache that gets dynamically resized in low memory situations, allowing Go's Garbage Collector to free the memory. New Dependency Tracker: Hugo has had a rule based coarse grained approach to server rebuilds that has worked mostly pretty well, but there have been some surprises (e.g. stale content). This is now revamped with a new dependency tracker that can quickly calculate the delta given a changed resource (e.g. a content file, template, JS file etc.). This handles transitive relations, e.g. $page -> js.Build -> JS import, or $page1.Content -> render hook -> site.GetPage -> $page2.Title, or $page1.Content -> shortcode -> partial -> site.RegularPages -> $page2.Content -> shortcode ..., and should also handle changes to aggregated values (e.g. site.Lastmod) effectively. This covers all of Hugo's API with 2 known exceptions (a list that may not be fully exhaustive): Changes to files loaded with template func os.ReadFile may not be handled correctly. We recommend loading resources with resources.Get Changes to Hugo objects (e.g. Page) passed in the template context to lang.Translate may not be detected correctly. We recommend having simple i18n templates without too much data context passed in other than simple types such as strings and numbers. Note that the cachebuster configuration (when A changes then rebuild B) works well with the above, but we recommend that you revise that configuration, as it in most situations should not be needed. One example where it is still needed is with TailwindCSS and using changes to hugo_stats.json to trigger new CSS rebuilds. Document Store: Previously, a little simplified, we split the document store (where we store pages and resources) in a tree per language. This worked pretty well, but the structure made some operations harder than they needed to be. We have now restructured it into one Radix tree for all languages. Internally the language is considered to be a dimension of that tree, and the tree can be viewed in all dimensions concurrently. This makes some operations re. language simpler (e.g. finding translations is just a slice range), but the idea is that it should also be relatively inexpensive to add more dimensions if needed (e.g. role). Fixes #10169 Fixes #10364 Fixes #10482 Fixes #10630 Fixes #10656 Fixes #10694 Fixes #10918 Fixes #11262 Fixes #11439 Fixes #11453 Fixes #11457 Fixes #11466 Fixes #11540 Fixes #11551 Fixes #11556 Fixes #11654 Fixes #11661 Fixes #11663 Fixes #11664 Fixes #11669 Fixes #11671 Fixes #11807 Fixes #11808 Fixes #11809 Fixes #11815 Fixes #11840 Fixes #11853 Fixes #11860 Fixes #11883 Fixes #11904 Fixes #7388 Fixes #7425 Fixes #7436 Fixes #7544 Fixes #7882 Fixes #7960 Fixes #8255 Fixes #8307 Fixes #8863 Fixes #8927 Fixes #9192 Fixes #9324
2023-10-02resources/integrity: Return string instead of template.HTMLAttrJoe Mooring
Closes #11513
2023-07-17Improve error messages for PostCSS etc.Bjørn Erik Pedersen
Fixes #9730
2023-07-13js: Pass tsconfig.json to esBuildJoe Mooring
Note that esBuild only inspects/honors certain fields. See https://esbuild.github.io/content-types/#tsconfig-json. Fixes #11232
2023-06-19tocss/dartsas: Avoid using Logf for the internal Dart Sass loggingBjørn Erik Pedersen
As that does not work when percentages are used in the log messages.
2023-06-19all: Fix typos in function names and commentsOleksandr Redko
2023-06-18Replace the old log setup, with structured logging etc.Bjørn Erik Pedersen
Fixes #11124
2023-06-12Upgrade to v2 of the Dart Sass Embedded ProtocolBjørn Erik Pedersen
Fixes #11059
2023-06-12Fix indented SASS imports for Dart SassBjørn Erik Pedersen
Fixes #11074
2023-05-28Fix Processed images count regression for multiple languagesBjørn Erik Pedersen
Fixes #11002
2023-05-22Revert "postcss: Improve validation of option 'config'"Bjørn Erik Pedersen
This reverts commit 9a0370e8eb71fed3ac04984020b6aa95c43f22ab. Closes #10990
2023-05-22postcss: Improve validation of option 'config'Andreas Deininger
2023-05-18all: Fix comments for exported functions and packagesOleksandr Redko
2023-05-16Create a struct with all of Hugo's config optionsBjørn Erik Pedersen
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-03-20resources.functions: improve validationAndreas Deininger
2023-03-20resources: Fix typos in error message and variablesOleksandr Redko
2023-03-02Correct typos in Go commentsOleksandr Redko
2023-03-01Replace deprecated ioutil with io and osOleksandr Redko
https://pkg.go.dev/io/ioutil is deprecated since Go 1.16.
2023-02-25Add a page template funcBjørn Erik Pedersen
Fixes #9339
2023-02-24dartsass: Import CSS without extension at compile timeJoe Mooring
Applicable to Dart Sass only: - Sass imports with the .css extension indicate a plain CSS @import. - Sass imports without the .css extension are imported at compile time. Fixes #10592