func (p *Page) determineMarkupType() string { // Try markup explicitly set in the frontmatter p.Markup = helpers.GuessType(p.Markup) if p.Markup == "unknown" { // Fall back to file extension (might also return "unknown") p.Markup = helpers.GuessType(p.Source.Ext()) } return p.Markup }
func (p *Page) guessMarkupType() string { // First try the explicitly set markup from the frontmatter if p.Markup != "" { format := helpers.GuessType(p.Markup) if format != "unknown" { return format } } return helpers.GuessType(p.Source.Ext()) }