Debian Codegraph @

testscripts/commands/hugo_gc_mixed_case_cache_dir.txt

raw
1 # In Hugo v0.123 we started lowercasing the content paths, but on case-insensitive
2 # filesystems existing caches keep their mixed-case dir names (e.g. MyBundle).
3 # The pruner would then consider those entries unused and remove them on every
4 # hugo --gc. See issue 15101.
5
6 [!caseinsensitivefs] skip
7
8 base64decode pixel.png.txt content/MyBundle/pix.png
9
10 hugo
11
12 stdout 'Processed images │ 1 '
13 tree resources/_gen
14 stdout 'pix_hu_51638841a22bb583.png'
15
16 # Simulate a cache created by an older Hugo version.
17 mv resources/_gen/images/mybundle resources/_gen/images/MyBundle
18
19 hugo --gc
20 stdout 'Cleaned │ 0 '
21
22 tree resources/_gen
23 stdout 'pix_hu_51638841a22bb583.png'
24
25 -- hugo.toml --
26 disableKinds = ["term", "taxonomy", "home"]
27 -- layouts/all.html --
28 All.
29 -- layouts/page.html --
30 {{ $pix := .Resources.Get "pix.png" }}
31 {{ $resized := $pix.Resize "10x10" }}
32 Resized: {{ $resized.RelPermalink }}
33 -- content/MyBundle/index.md --
34 ---
35 title: MyBundle
36 ---
37 -- pixel.png.txt --
38 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==