Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in overlapping content when ignoring everything #13007

Closed
bep opened this issue Nov 4, 2024 · 1 comment · Fixed by #13008
Closed

Bug in overlapping content when ignoring everything #13007

bep opened this issue Nov 4, 2024 · 1 comment · Fixed by #13008
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Nov 4, 2024

Discovered while adding test cases for #12912.

A little hard to explain, but this test setup did not work as expected:

-- hugo.toml --
theme = "t1"
[[module.mounts]]
source = 'content'
target = 'content'
[[module.mounts]]
source = 'content2'
target = 'content/c2'
[[module.mounts]]
source = 'content3'
target = 'content/watchdisabled'
disableWatch = true
[[module.mounts]]
source = 'content4'
target = 'content/excludedsome'
excludeFiles = 'p1.md'
[[module.mounts]]
source = 'content5'
target = 'content/excludedall'
excludeFiles = '/**'
[[module.mounts]]
source = "hugo_stats.json"
target = "assets/watching/hugo_stats.json"
-- hugo_stats.json --
Some stats.
-- content/foo.md --
foo
-- content2/bar.md --
-- themes/t1/layouts/_default/single.html --
{{ .Content }}
-- themes/t1/static/f1.txt --
-- content3/p1.md --
-- content4/p1.md --
-- content4/p2.md --
-- content5/p3.md --
-- content5/p4.md --

The excludeFiles = '/**' effectively excluded the entire mount (correct), but due to a logic error in the code, we skipped all the other content mounts mounted to the same target root.

I don't suspect this to be a common setup, though.

@bep bep added the Bug label Nov 4, 2024
@bep bep added this to the v0.137.0 milestone Nov 4, 2024
@bep bep self-assigned this Nov 4, 2024
bep added a commit to bep/hugo that referenced this issue Nov 4, 2024
@bep bep closed this as completed in #13008 Nov 4, 2024
@bep bep closed this as completed in fcdc454 Nov 4, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant