mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
230a495941
93f7baf80 netlify: Hugo 0.92.2 ecd8a6b6b Merge branch 'tempv0.92.2' ee04caf9f Fix validation of Page Kind in cascade target map 3fce03ed2 Remove the "check" command 70ad71b25 Fix typo (#1651) dfd1dc570 Fix internal link (#1650) b5e0e0d38 Update rotten Fedora package link 78276390a Add missing word in types.md (#1645) 45eb945f8 Remove hugo gen autocomplete 2f84d0896 netlify: Hugo 0.92.1 b55f5773b Update complement.md 7013ee43e Remove deprecated RSSLink from page variables 1c3fb6ed3 Remove deprecated page vars (#1638) 9bd0af3ab Update union.md 4576487a0 Update symdiff.md 58f1b26c7 Update starter-kits.md (#1521) 285356c1d Move inline partials section (#1635) 4d08625d2 Improve directions for editing Win 10 path env var (#1632) 41d9c7804 Update page content (#1629) d05536cad Removed unpaired quote character (#1630) 3b0fdcd88 netlify: Bump to Hugo 0.92.0 cdb068346 docs: Regenerate docshelper 778503ca8 Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb' 2d2401c91 docs: Add dependency table to maintainance page 6bc95c386 Add hugo.Deps 19d0b5e23 docs. Regen CLI docs 76a750d96 docs: Regenerate CLI docs 70156962a docs: Regenerate docshelper git-subtree-dir: docs git-subtree-split: 93f7baf80bd03176ad44701cd2452433d492ea0b
81 lines
3.7 KiB
Markdown
81 lines
3.7 KiB
Markdown
---
|
|
title: "hugo new"
|
|
slug: hugo_new
|
|
url: /commands/hugo_new/
|
|
---
|
|
## hugo new
|
|
|
|
Create new content for your site
|
|
|
|
### Synopsis
|
|
|
|
Create a new content file and automatically set the date and title.
|
|
It will guess which kind of file to create based on the path provided.
|
|
|
|
You can also specify the kind with `-k KIND`.
|
|
|
|
If archetypes are provided in your theme or site, they will be used.
|
|
|
|
Ensure you run this within the root directory of your site.
|
|
|
|
```
|
|
hugo new [path] [flags]
|
|
```
|
|
|
|
### Options
|
|
|
|
```
|
|
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
|
|
-D, --buildDrafts include content marked as draft
|
|
-E, --buildExpired include expired content
|
|
-F, --buildFuture include content with publishdate in the future
|
|
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
|
|
--cleanDestinationDir remove files from destination not found in static directories
|
|
-c, --contentDir string filesystem path to content directory
|
|
-d, --destination string filesystem path to write files to
|
|
--disableKinds strings disable different kind of pages (home, RSS etc.)
|
|
--editor string edit new content with this editor, if provided
|
|
--enableGitInfo add Git revision, date and author info to the pages
|
|
--forceSyncStatic copy all files when static is changed.
|
|
--gc enable to run some cleanup tasks (remove unused cache files) after the build
|
|
-h, --help help for new
|
|
--i18n-warnings print missing translations
|
|
--ignoreCache ignores the cache directory
|
|
-k, --kind string content type to create
|
|
-l, --layoutDir string filesystem path to layout directory
|
|
--minify minify any supported output format (HTML, XML etc.)
|
|
--noChmod don't sync permission mode of files
|
|
--noTimes don't sync modification time of files
|
|
--panicOnWarning panic on first WARNING log
|
|
--path-warnings print warnings on duplicate target paths etc.
|
|
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
|
|
--print-mem print memory usage to screen at intervals
|
|
--templateMetrics display metrics about template executions
|
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
|
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
|
--trace file write trace to file (not useful in general)
|
|
```
|
|
|
|
### Options inherited from parent commands
|
|
|
|
```
|
|
--config string config file (default is path/config.yaml|json|toml)
|
|
--configDir string config dir (default "config")
|
|
--debug debug output
|
|
-e, --environment string build environment
|
|
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
|
|
--log enable Logging
|
|
--logFile string log File path (if set, logging enabled automatically)
|
|
--quiet build in quiet mode
|
|
-s, --source string filesystem path to read files relative from
|
|
--themesDir string filesystem path to themes directory
|
|
-v, --verbose verbose output
|
|
--verboseLog verbose logging
|
|
```
|
|
|
|
### SEE ALSO
|
|
|
|
* [hugo](/commands/hugo/) - hugo builds your site
|
|
* [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton)
|
|
* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme
|
|
|