1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

transform: Add missing GoDoc

This commit is contained in:
Bjørn Erik Pedersen
2016-07-06 23:23:44 +02:00
parent 39fe42cf6b
commit 223073c6fd
2 changed files with 5 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ import (
var metaTagsCheck = regexp.MustCompile(`(?i)<meta\s+name=['|"]?generator['|"]?`)
var hugoGeneratorTag = fmt.Sprintf(`<meta name="generator" content="Hugo %s" />`, helpers.HugoVersion())
// HugoGeneratorInject injects a meta generator tag for Hugo if none present.
func HugoGeneratorInject(ct contentTransformer) {
if metaTagsCheck.Match(ct.Content()) {
ct.Write(ct.Content())