mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
@@ -23,8 +23,10 @@ import (
|
||||
"github.com/gohugoio/hugo/transform"
|
||||
)
|
||||
|
||||
var metaTagsCheck = regexp.MustCompile(`(?i)<meta\s+name=['|"]?generator['|"]?`)
|
||||
var hugoGeneratorTag = fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, hugo.CurrentVersion)
|
||||
var (
|
||||
metaTagsCheck = regexp.MustCompile(`(?i)<meta\s+name=['|"]?generator['|"]?`)
|
||||
hugoGeneratorTag = fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, hugo.CurrentVersion)
|
||||
)
|
||||
|
||||
// HugoGenerator injects a meta generator tag for Hugo if none present.
|
||||
func HugoGenerator(ft transform.FromTo) error {
|
||||
@@ -51,5 +53,4 @@ func HugoGenerator(ft transform.FromTo) error {
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
@@ -57,5 +57,4 @@ func TestHugoGeneratorInject(t *testing.T) {
|
||||
t.Errorf("[%d] Expected \n%q got \n%q", i, this.expect, out.String())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user