package data
import "github.com/gohugoio/hugo/tpl/data"
Package data provides template functions for working with external data sources.
Index ¶
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace provides template functions for the "data" namespace.
func New ¶
New returns a new instance of the data-namespaced template functions.
func (*Namespace) GetCSV ¶
GetCSV expects the separator sep and one or n-parts of a URL to a resource which can either be a local or a remote one. The data separator can be a comma, semi-colon, pipe, etc, but only one character. If you provide multiple parts for the URL they will be joined together to the final URL. GetCSV returns nil or a slice slice to use in a short code.
func (*Namespace) GetJSON ¶
GetJSON expects one or n-parts of a URL in args to a resource which can either be a local or a remote one. If you provide multiple parts they will be joined together to the final URL. GetJSON returns nil or parsed JSON to use in a short code.
Source Files ¶
- Version
- v0.145.0 (latest)
- Published
- Feb 26, 2025
- Platform
- linux/amd64
- Imports
- 24 packages
- Last checked
- 1 hour ago –
Tools for package owners.