package create

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

Package create provides functions to create new content.

Index

Constants

const (
	// DefaultArchetypeTemplateTemplate is the template used in 'hugo new site'
	// and the template we use as a fall back.
	DefaultArchetypeTemplateTemplate = `---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

`
)

Functions

func NewContent

func NewContent(h *hugolib.HugoSites, kind, targetPath string) error

NewContent creates a new content file in h (or a full bundle if the archetype is a directory) in targetPath.

Source Files

content.go

Version
v0.97.0
Published
Apr 13, 2022
Platform
darwin/amd64
Imports
15 packages
Last checked
31 minutes ago

Tools for package owners.