summaryrefslogtreecommitdiffhomepage
path: root/output
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-12-10 08:02:15 +0100
committerBjørn Erik Pedersen <[email protected]>2019-12-12 09:59:34 +0100
commit167c01530bb295c8b8d35921eb27ffa5bee76dfe (patch)
tree338ba8c18bf8533bb0fec5506a12e78b656d6723 /output
parent4c804319f6db0b8459cc9b5df4a904fd2c55dedd (diff)
downloadhugo-167c01530bb295c8b8d35921eb27ffa5bee76dfe.tar.gz
hugo-167c01530bb295c8b8d35921eb27ffa5bee76dfe.zip
Create lightweight forks of text/template and html/template
This commit also removes support for Ace and Amber templates. Updates #6594
Diffstat (limited to 'output')
-rw-r--r--output/layout_base.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/output/layout_base.go b/output/layout_base.go
index b8930df82..772002e68 100644
--- a/output/layout_base.go
+++ b/output/layout_base.go
@@ -26,8 +26,7 @@ const (
)
var (
- aceTemplateInnerMarkers = [][]byte{[]byte("= content")}
- goTemplateInnerMarkers = [][]byte{[]byte("{{define"), []byte("{{ define"), []byte("{{- define"), []byte("{{-define")}
+ goTemplateInnerMarkers = [][]byte{[]byte("{{define"), []byte("{{ define"), []byte("{{- define"), []byte("{{-define")}
)
// TemplateNames represents a template naming scheme.
@@ -110,8 +109,8 @@ func CreateTemplateNames(d TemplateLookupDescriptor) (TemplateNames, error) {
id.Name = "_text/" + id.Name
}
- // Ace and Go templates may have both a base and inner template.
- if ext == "amber" || isShorthCodeOrPartial(name) {
+ // Go templates may have both a base and inner template.
+ if isShorthCodeOrPartial(name) {
// No base template support
return id, nil
}
@@ -128,10 +127,6 @@ func CreateTemplateNames(d TemplateLookupDescriptor) (TemplateNames, error) {
baseFilename = fmt.Sprintf("%s.%s", baseFileBase, ext)
}
- if ext == "ace" {
- innerMarkers = aceTemplateInnerMarkers
- }
-
// This may be a view that shouldn't have base template
// Have to look inside it to make sure
needsBase, err := d.ContainsAny(d.RelPath, innerMarkers)
@@ -152,7 +147,7 @@ func CreateTemplateNames(d TemplateLookupDescriptor) (TemplateNames, error) {
pathsToCheck := createPathsToCheck(pathDir, baseFilename, currBaseFilename)
// We may have language code and/or "terms" in the template name. We want the most specific,
- // but need to fall back to the baseof.html or baseof.ace if needed.
+ // but need to fall back to the baseof.html if needed.
// E.g. list-baseof.en.html and list-baseof.terms.en.html
// See #3893, #3856.
baseBaseFilename, currBaseBaseFilename := helpers.Filename(baseFilename), helpers.Filename(currBaseFilename)