Help us shape the future of Go! Take the 2026 Go Developer Survey

create

package
v0.153.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package create provides functions to create new content.

Index

Constants

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

`
)

Variables

This section is empty.

Functions

func NewContent

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

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

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL