package create

import "github.com/gohugoio/hugo/resources/resource_factories/create"

Package create contains functions for to create Resource objects. This will typically non-files.

Index

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client contains methods to create Resource objects. tasks to Resource objects.

func New

func New(rs *resources.Spec) *Client

New creates a new Client with the given specification.

func (*Client) FromString

func (c *Client) FromString(targetPath, content string) (resource.Resource, error)

FromString creates a new Resource from a string with the given relative target path.

func (*Client) Get

func (c *Client) Get(fs afero.Fs, filename string) (resource.Resource, error)

Get creates a new Resource by opening the given filename in the given filesystem.

Source Files

create.go

Version
v0.54.0
Published
Feb 1, 2019
Platform
windows/amd64
Imports
5 packages
Last checked
51 minutes ago

Tools for package owners.