resources.Publish
Returns the given resource after publishing it.
- Syntax
- resources.Publish RESOURCE
- Returns
- resource.Resource
Use this method with global resources, page resources, or remote resources.
The resources.Publish function writes the given resource to the public directory and returns the resource, making it useful within a template pipeline.
{{ resources.Get "main.js" | js.Build | resources.Publish }}This is equivalent to:
{{ (resources.Get "main.js" | js.Build).Publish }}See the Publish method for the non-pipeline form.
Last updated:
October 2, 2026
:
content: Refer to directories by their component or default names (b6efb06e8)
Improve this page