hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

hugo_new.md (4017B)

    1 ---
    2 title: "hugo new"
    3 slug: hugo_new
    4 url: /commands/hugo_new/
    5 ---
    6 ## hugo new
    7 
    8 Create new content for your site
    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 site, they will be used.
   18 
   19 Ensure you run this within the root directory of your site.
   20 
   21 ```
   22 hugo new [path] [flags]
   23 ```
   24 
   25 ### Options
   26 
   27 ```
   28   -b, --baseURL string         hostname (and path) to the root, e.g. https://spf13.com/
   29   -D, --buildDrafts            include content marked as draft
   30   -E, --buildExpired           include expired content
   31   -F, --buildFuture            include content with publishdate in the future
   32       --cacheDir string        filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
   33       --cleanDestinationDir    remove files from destination not found in static directories
   34   -c, --contentDir string      filesystem path to content directory
   35   -d, --destination string     filesystem path to write files to
   36       --disableKinds strings   disable different kind of pages (home, RSS etc.)
   37       --editor string          edit new content with this editor, if provided
   38       --enableGitInfo          add Git revision, date, author, and CODEOWNERS info to the pages
   39       --forceSyncStatic        copy all files when static is changed.
   40       --gc                     enable to run some cleanup tasks (remove unused cache files) after the build
   41   -h, --help                   help for new
   42       --ignoreCache            ignores the cache directory
   43   -k, --kind string            content type to create
   44   -l, --layoutDir string       filesystem path to layout directory
   45       --minify                 minify any supported output format (HTML, XML etc.)
   46       --noBuildLock            don't create .hugo_build.lock file
   47       --noChmod                don't sync permission mode of files
   48       --noTimes                don't sync modification time of files
   49       --panicOnWarning         panic on first WARNING log
   50       --poll string            set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
   51       --printI18nWarnings      print missing translations
   52       --printMemoryUsage       print memory usage to screen at intervals
   53       --printPathWarnings      print warnings on duplicate target paths etc.
   54       --printUnusedTemplates   print warnings on unused templates.
   55       --templateMetrics        display metrics about template executions
   56       --templateMetricsHints   calculate some improvement hints when combined with --templateMetrics
   57   -t, --theme strings          themes to use (located in /themes/THEMENAME/)
   58       --trace file             write trace to file (not useful in general)
   59 ```
   60 
   61 ### Options inherited from parent commands
   62 
   63 ```
   64       --clock string               set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
   65       --config string              config file (default is path/config.yaml|json|toml)
   66       --configDir string           config dir (default "config")
   67       --debug                      debug output
   68   -e, --environment string         build environment
   69       --ignoreVendorPaths string   ignores any _vendor for module paths matching the given Glob pattern
   70       --log                        enable Logging
   71       --logFile string             log File path (if set, logging enabled automatically)
   72       --quiet                      build in quiet mode
   73   -s, --source string              filesystem path to read files relative from
   74       --themesDir string           filesystem path to themes directory
   75   -v, --verbose                    verbose output
   76       --verboseLog                 verbose logging
   77 ```
   78 
   79 ### SEE ALSO
   80 
   81 * [hugo](/commands/hugo/)	 - hugo builds your site
   82 * [hugo new site](/commands/hugo_new_site/)	 - Create a new site (skeleton)
   83 * [hugo new theme](/commands/hugo_new_theme/)	 - Create a new theme
   84