1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2025-03-21 02:02:26 +00:00
hugo/hugofs
Bjørn Erik Pedersen 70423f0c0c
Filter out duplicate content resource files
We do a slight normalisation of the content paths (lower case, replacing " " with "-") and remove andy language identifier before inserting them into the content tree.

This means that, given that that the default content language is `en`:

```
index.md
index.html
Foo Bar.txt
foo-bar.txt
foo-bar.en.txt
Foo-Bar.txt
```

The bundle above will be reduced to one content file with one resource (`foo-bar.txt`).

Before this commit, what version of the `foo-bar.txt` you ended up with was undeterministic. No  we pick the first determined by sort order.

Note that the sort order is stable, but we recommend avoiding situations like the above.

Closes 
2024-01-31 09:18:22 +01:00
..
files
glob all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
component_fs.go Filter out duplicate content resource files 2024-01-31 09:18:22 +01:00
createcounting_fs.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
decorators.go
dirsmerger.go
fileinfo.go
fileinfo_test.go
filename_filter_fs.go
filename_filter_fs_test.go
fs.go
fs_test.go
glob.go
glob_test.go
hasbytes_fs.go
hashing_fs.go
hashing_fs_test.go
noop_fs.go
openfiles_fs.go
rootmapping_fs.go
rootmapping_fs_test.go
stacktracer_fs.go
walk.go
walk_test.go