create

package
v0.125.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 37

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