Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-25 23:40:02 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-04-07 22:59:20 +0300
commit2f721f8ec69c52202815cd1b543ca4bf535c0901 (patch)
treecae7d1ee9ce867a4bffc70e94513f09e2aebe162 /tpl
parent8568928aa8e82a6bd7de4555c3703d8835fbd25b (diff)
Add basic "post resource publish support"
Fixes #7146
Diffstat (limited to 'tpl')
-rw-r--r--tpl/resources/resources.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go
index a1055632c..90fb58b4b 100644
--- a/tpl/resources/resources.go
+++ b/tpl/resources/resources.go
@@ -19,6 +19,8 @@ import (
"fmt"
"path/filepath"
+ "github.com/gohugoio/hugo/resources/postpub"
+
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/resources"
@@ -273,6 +275,10 @@ func (ns *Namespace) PostCSS(args ...interface{}) (resource.Resource, error) {
return ns.postcssClient.Process(r, options)
}
+func (ns *Namespace) PostProcess(r resource.Resource) (postpub.PostPublishedResource, error) {
+ return ns.deps.ResourceSpec.PostProcess(r)
+}
+
// We allow string or a map as the first argument in some cases.
func (ns *Namespace) resolveIfFirstArgIsString(args []interface{}) (resources.ResourceTransformer, string, bool) {
if len(args) != 2 {