Debian Codegraph @

docs/content/en/commands/hugo_new_content.md

raw
1 ---
2 title: "hugo new content"
3 slug: hugo_new_content
4 url: /commands/hugo_new_content/
5 ---
6 ## hugo new content
7
8 Create new content
9
10 ### Synopsis
11
12 Create a new content file and automatically set the date and title.
13 It will guess which kind of file to create based on the path provided.
14
15 You can also specify the kind with `-k KIND`.
16
17 If archetypes are provided in your theme or project, they will be used.
18
19 Ensure you run this within the root directory of your project.
20
21 ```
22 hugo new content [path] [flags]
23 ```
24
25 ### Options
26
27 ```
28 -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/
29 --cacheDir string filesystem path to cache directory
30 -c, --contentDir string filesystem path to content directory
31 --editor string edit new content with this editor, if provided
32 -f, --force overwrite file if it already exists
33 -h, --help help for content
34 -k, --kind string content type to create
35 --renderSegments strings named segments to render (configured in the segments config)
36 -t, --theme strings themes to use (located in /themes/THEMENAME/)
37 ```
38
39 ### Options inherited from parent commands
40
41 ```
42 --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
43 --config string config file (default is hugo.yaml|json|toml)
44 --configDir string config dir (default "config")
45 -d, --destination string filesystem path to write files to
46 -e, --environment string build environment
47 --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
48 --logLevel string log level (debug|info|warn|error)
49 --noBuildLock don't create .hugo_build.lock file
50 --quiet build in quiet mode
51 -M, --renderToMemory render to memory (mostly useful when running the server)
52 -s, --source string filesystem path to read files relative from
53 --themesDir string filesystem path to themes directory
54 ```
55
56 ### SEE ALSO
57
58 * [hugo new](/commands/hugo_new/) - Create new content