mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Fix Resource.ResourceType so it always returns MIME's main type
The one exception being for the Page, which does not have a MIME type, in which you will get the value `page`. Fixes #8052
This commit is contained in:
@@ -707,7 +707,7 @@ func newTestBundleSources(t testing.TB) (*hugofs.Fs, *viper.Viper) {
|
||||
cfg.Set("contentDir", "base")
|
||||
cfg.Set("baseURL", "https://example.com")
|
||||
cfg.Set("mediaTypes", map[string]interface{}{
|
||||
"text/bepsays": map[string]interface{}{
|
||||
"bepsays/bep": map[string]interface{}{
|
||||
"suffixes": []string{"bep"},
|
||||
},
|
||||
})
|
||||
@@ -1234,7 +1234,7 @@ title: %q
|
||||
b.Build(BuildCfg{})
|
||||
|
||||
b.AssertFileContent("public/bundle/index.html", `
|
||||
json|sub/data.json|
|
||||
application|sub/data.json|
|
||||
page|bundle p1|
|
||||
page|bundle sub index|
|
||||
page|bundle sub p2|
|
||||
|
Reference in New Issue
Block a user