hugo/hugolib
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 #11946
2024-01-31 09:18:22 +01:00
..
doctree all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
filesystems all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
paths all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
testdata
testsite
404_test.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
alias.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
alias_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
breaking_changes_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
cascade_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
codeowners.go
collections.go
collections_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
config.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
config_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
configdir_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
content_factory.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
content_factory_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
content_map.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
content_map_page.go Fix recent regression .Resources.Get for resources with spaces in filename 2024-01-30 20:12:03 +01:00
content_map_test.go Filter out duplicate content resource files 2024-01-31 09:18:22 +01:00
content_render_hooks_test.go Create default link and image render hooks 2024-01-30 20:12:19 +01:00
datafiles_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
dates_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
disableKinds_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
embedded_shortcodes_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
embedded_templates_test.go
fileInfo.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
fileInfo_test.go
frontmatter_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
gitinfo.go
hugo_modules_test.go Port some integration tests to new test setup 2024-01-28 11:29:23 +01:00
hugo_sites.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
hugo_sites_build.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_sites_build_errors_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_sites_build_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_sites_multihost_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_sites_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_smoke_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugolib_integration_test.go testing: Rename integration_test.go to PACKAGE_integration_test.go 2024-01-28 11:41:59 +01:00
image_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
integrationtest_builder.go Add warnidf template function 2024-01-30 20:12:03 +01:00
language_content_dir_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
language_test.go all: Run gofumpt -l -w . 2024-01-28 23:14:09 +01:00
menu_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
minify_publisher_test.go
mount_filters_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
page__common.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
page__content.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
page__data.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page__fragments_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page__menus.go
page__meta.go Emit a warning that can be turned off when overwriting built-in .Params values 2024-01-30 20:12:03 +01:00
page__new.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
page__output.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page__paginator.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page__paths.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
page__per_output.go Create default link and image render hooks 2024-01-30 20:12:19 +01:00
page__position.go
page__ref.go
page__tree.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page_kinds.go
page_permalink_test.go
page_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
page_unwrap.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
page_unwrap_test.go
pagebundler_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pagecollections.go Create default link and image render hooks 2024-01-30 20:12:19 +01:00
pagecollections_test.go Create default link and image render hooks 2024-01-30 20:12:19 +01:00
pages_capture.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pages_language_merge_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
pages_test.go
paginator_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
params_test.go Emit a warning that can be turned off when overwriting built-in .Params values 2024-01-30 20:12:03 +01:00
permalinker.go
prune_resources.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
rebuild_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
rendershortcodes_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
renderstring_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
resource_chain_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
robotstxt_test.go
rss_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
securitypolicies_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
shortcode.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
shortcode_page.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
shortcode_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
site.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_benchmark_new_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_new.go Add warnidf template function 2024-01-30 20:12:03 +01:00
site_output.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_output_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_render.go Add path, kind and lang to content front matter 2024-01-30 20:12:03 +01:00
site_sections.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
site_sections_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_stats_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
site_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
site_url_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
siteJSONEncode_test.go
sitemap_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
taxonomy_test.go testing: Simplify some integration tests 2024-01-28 22:17:22 +01:00
template_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
testhelpers_test.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00