mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Image resource refactor
This commit pulls most of the image related logic into its own package, to make it easier to reason about and extend. This is also a rewrite of the transformation logic used in Hugo Pipes, mostly to allow constructs like the one below: {{ ($myimg | fingerprint ).Width }} Fixes #5903 Fixes #6234 Fixes #6266
This commit is contained in:
@@ -42,8 +42,7 @@ import (
|
||||
)
|
||||
|
||||
func TestPageBundlerSiteRegular(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
c := qt.New(t)
|
||||
baseBaseURL := "https://example.com"
|
||||
|
||||
for _, baseURLPath := range []string{"", "/hugo"} {
|
||||
@@ -55,15 +54,14 @@ func TestPageBundlerSiteRegular(t *testing.T) {
|
||||
}
|
||||
ugly := ugly
|
||||
canonify := canonify
|
||||
t.Run(fmt.Sprintf("ugly=%t,canonify=%t,path=%s", ugly, canonify, baseURLPathId),
|
||||
func(t *testing.T) {
|
||||
t.Parallel()
|
||||
c.Run(fmt.Sprintf("ugly=%t,canonify=%t,path=%s", ugly, canonify, baseURLPathId),
|
||||
func(c *qt.C) {
|
||||
c.Parallel()
|
||||
baseURL := baseBaseURL + baseURLPath
|
||||
relURLBase := baseURLPath
|
||||
if canonify {
|
||||
relURLBase = ""
|
||||
}
|
||||
c := qt.New(t)
|
||||
fs, cfg := newTestBundleSources(t)
|
||||
cfg.Set("baseURL", baseURL)
|
||||
cfg.Set("canonifyURLs", canonify)
|
||||
|
Reference in New Issue
Block a user