Open jmooring opened 7 months ago
It's not obvious to me what happens in the example above.
Do I need to clarify anything, or are you commenting about what's actually happening?
No, I'm just saying that I need to check how we treat the case above before I can determine if it's right or wrong or if its possible/practical to warn about it.
Hi, I'm also affected by this issue. In my case I am publishing mixed-language university notes, using either index.md
oder index.de.md
for my files depending on the language of the material.
# Abbreviated excerpts from my hugo.toml
languageCode = 'en-US'
[languages]
[languages.de]
languageCode = 'de-DE'
languageDirection = 'ltr'
languageName = 'Deutsch'
[languages.en]
languageCode = 'en-US'
languageDirection = 'ltr'
languageName = 'English'
Note the following example, the ai
and compiler-theory
branch bundles are localized as en-US
(my default language), while the ds
branch is German. Hugo v0.123.1 has completely removed the ability to see any images I have for German course notes.
content/notes/
├── ai
│ ├── csp.md
│ ├── _index.md
│ ├── mdp.md
│ ├── rl.md
│ └── search.md
├── compiler-theory
│ ├── _index.md
│ ├── lambdacalculus.md
│ ├── sml.md
│ └── types.md
├── ds
│ ├── algebra.de.md
│ ├── binomial.de.md
│ ├── counting.de.md
│ ├── graphs.de.md
│ ├── _index.de.md
│ ├── recursive.de.md
│ ├── solutions
│ │ ├── algebraische-strukturen.de.md
│ │ ├── graphentheorie
│ │ │ ├── adjgraph.png
│ │ │ ├── index.de.md
│ │ ├── _index.de.md
│ │ ├── kombinatorik.de.md
│ │ └── rekursionsgleichungen
│ │ ├── index.de.md
│ │ └── steine.png
│ ├── spicker
│ │ ├── index.de.md
│ │ ├── scan-back.jpg
│ │ └── scan.jpg
│ └── stirling.de.md
├── _index.de.md
├── _index.md
This may or may not be the same issue. Can you please share your site repo with us so that we don't have to recreate/guess?
Of course: https://github.com/j0hax/j0hax.github.io/
Multilingual pages are under /content/notes/
@j0hax I have opened a separate issue for your problem. See https://github.com/gohugoio/hugo/issues/12107.
Reference: https://discourse.gohugo.io/t/hugo-v0-123-0-images-are-not-showing-up-any-more/48359/9
This is a goofy setup to begin with, but maybe we should warn users if we're going to discard resources.
Build with v0.122.0
Build with v0.123.0
test case
```go func TestFoo(t *testing.T) { t.Parallel() files := ` -- config.toml -- disableKinds = ['rss','sitemap','taxonomy','term'] defaultContentLanguage = 'en' defaultContentLanguageInSubdir = true [languages.en] contentDir = 'content/en' weight = 1 [languages.de] contentDir = 'content/de' weight = 2 -- layouts/_default/list.html -- {{ .Title }} -- content/de/s1/files/_index.md -- --- title: irrelevant --- -- content/de/s1/files/a.txt -- I am de/s1/files/a.txt -- -- content/en/s1/files/b.txt -- I am en/s1/files/b.txt ` b := hugolib.Test(t, files) b.AssertFileExists("public/de/s1/files/index.html", true) b.AssertFileExists("public/en/s1/files/index.html", false) b.AssertFileExists("public/de/s1/files/a.txt", true) // This is the failing test: b.AssertFileExists("public/en/s1/files/b.txt", true) } ```