Add ContentTypes to config

This is an empty struct for now, but we will most likely expand on that.

```
[contentTypes]
  [contentTypes.'text/markdown']
```

The above means that only Markdown will be considered a content type. E.g. HTML will be treated as plain text.

Fixes #12274
This commit is contained in:
Bjørn Erik Pedersen
2025-02-07 10:29:35 +01:00
parent 4245a4514d
commit c2fb221209
12 changed files with 182 additions and 52 deletions

View File

@@ -132,6 +132,7 @@ func (fi *File) p() *paths.Path {
return fi.fim.Meta().PathInfo.Unnormalized()
}
// Used in tests.
func NewFileInfoFrom(path, filename string) *File {
meta := &hugofs.FileMeta{
Filename: filename,