mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 13:40:38 +03:00
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:
parent
4245a4514d
commit
c2fb221209
12 changed files with 182 additions and 52 deletions
|
@ -21,7 +21,6 @@ import (
|
|||
"html/template"
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/hugofs/files"
|
||||
"github.com/gohugoio/hugo/markup/converter"
|
||||
"github.com/gohugoio/hugo/markup/tableofcontents"
|
||||
|
||||
|
@ -59,8 +58,6 @@ var (
|
|||
// PageNop implements Page, but does nothing.
|
||||
type nopPage int
|
||||
|
||||
var noOpPathInfo = media.DefaultPathParser.Parse(files.ComponentFolderContent, "no-op.md")
|
||||
|
||||
func (p *nopPage) Aliases() []string {
|
||||
return nil
|
||||
}
|
||||
|
@ -338,7 +335,7 @@ func (p *nopPage) Path() string {
|
|||
}
|
||||
|
||||
func (p *nopPage) PathInfo() *paths.Path {
|
||||
return noOpPathInfo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *nopPage) Permalink() string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue