Add gendoc command
authorbep <bjorn.erik.pedersen@gmail.com>
Wed, 13 May 2015 13:31:30 +0000 (15:31 +0200)
committerspf13 <steve.francia@gmail.com>
Tue, 19 May 2015 14:57:21 +0000 (10:57 -0400)
Using the new, great auto-doc in Cobra.

This commit also contains a current result of that command added to a commands section in docs.

Fixes #1136

23 files changed:
commands/gendoc.go [new file with mode: 0644]
commands/hugo.go
docs/config.toml
docs/content/commands/hugo.md [new file with mode: 0644]
docs/content/commands/hugo_benchmark.md [new file with mode: 0644]
docs/content/commands/hugo_check.md [new file with mode: 0644]
docs/content/commands/hugo_config.md [new file with mode: 0644]
docs/content/commands/hugo_convert.md [new file with mode: 0644]
docs/content/commands/hugo_convert_toJSON.md [new file with mode: 0644]
docs/content/commands/hugo_convert_toTOML.md [new file with mode: 0644]
docs/content/commands/hugo_convert_toYAML.md [new file with mode: 0644]
docs/content/commands/hugo_gendoc.md [new file with mode: 0644]
docs/content/commands/hugo_help.md [new file with mode: 0644]
docs/content/commands/hugo_list.md [new file with mode: 0644]
docs/content/commands/hugo_list_drafts.md [new file with mode: 0644]
docs/content/commands/hugo_list_future.md [new file with mode: 0644]
docs/content/commands/hugo_new.md [new file with mode: 0644]
docs/content/commands/hugo_new_site.md [new file with mode: 0644]
docs/content/commands/hugo_new_theme.md [new file with mode: 0644]
docs/content/commands/hugo_server.md [new file with mode: 0644]
docs/content/commands/hugo_undraft.md [new file with mode: 0644]
docs/content/commands/hugo_version.md [new file with mode: 0644]
docs/layouts/section/commands.html [new file with mode: 0644]

diff --git a/commands/gendoc.go b/commands/gendoc.go
new file mode 100644 (file)
index 0000000..b8b07a0
--- /dev/null
@@ -0,0 +1,59 @@
+package commands
+
+import (
+       "fmt"
+       "github.com/spf13/cobra"
+       "github.com/spf13/hugo/helpers"
+       "github.com/spf13/hugo/hugofs"
+       "path"
+       "path/filepath"
+       "strings"
+       "time"
+)
+
+const gendocFrontmatterTemplate = `---
+date: %s
+title: "%s"
+slug: %s
+url: %s
+---
+`
+
+var gendocdir string
+var gendocCmd = &cobra.Command{
+       Use:   "gendoc",
+       Short: "Generate Markdown documentation for the Hugo CLI.",
+       Long: `Generate Markdown documentation for the Hugo CLI.
+       
+       This command is, mostly, used to create up-to-date documentation for gohugo.io.
+       
+       It creates one Markdown file per command with front matter suitable for rendering in Hugo.
+       `,
+
+       Run: func(cmd *cobra.Command, args []string) {
+               if !strings.HasSuffix(gendocdir, helpers.FilePathSeparator) {
+                       gendocdir += helpers.FilePathSeparator
+               }
+               if found, _ := helpers.Exists(gendocdir, hugofs.OsFs); !found {
+                       hugofs.OsFs.Mkdir(gendocdir, 0777)
+               }
+               now := time.Now().Format(time.RFC3339)
+               prepender := func(filename string) string {
+                       name := filepath.Base(filename)
+                       base := strings.TrimSuffix(name, path.Ext(name))
+                       url := "/commands/" + strings.ToLower(base) + "/"
+                       return fmt.Sprintf(gendocFrontmatterTemplate, now, strings.Replace(base, "_", " ", -1), base, url)
+               }
+
+               linkHandler := func(name string) string {
+                       base := strings.TrimSuffix(name, path.Ext(name))
+                       return "/commands/" + strings.ToLower(base) + "/"
+               }
+
+               cobra.GenMarkdownTreeCustom(cmd.Root(), gendocdir, prepender, linkHandler)
+       },
+}
+
+func init() {
+       gendocCmd.PersistentFlags().StringVar(&gendocdir, "dir", "/tmp/hugodoc/", "the directory to write the doc.")
+}
index 098301f3bdac4b386cdb21486dedd2f945c9e72d..84c94a3ef11cab887f90c8c0d83f48d3d123cc9b 100644 (file)
@@ -77,6 +77,7 @@ func AddCommands() {
        HugoCmd.AddCommand(listCmd)
        HugoCmd.AddCommand(undraftCmd)
        HugoCmd.AddCommand(genautocompleteCmd)
+       HugoCmd.AddCommand(gendocCmd)
 }
 
 //Initializes flags
index 81fc277b6cd2a832f31919b81f8e1b9a18c0c25c..824c21fb12d8a1e0441e5f6cd331ab46cf8b8d2b 100644 (file)
@@ -34,6 +34,12 @@ MetaDataFormat = "yaml"
     identifier = "getting started"
     pre = "<i class='fa fa-road'></i>"
     weight = -100
+[[menu.main]]
+    name = "Hugo Commands"
+    identifier = "commands"
+    pre = "<i class='fa fa-space-shuttle'></i>"
+    weight = -95
+    url = "/commands/"
 [[menu.main]]
     name = "Content"
     identifier = "content"
diff --git a/docs/content/commands/hugo.md b/docs/content/commands/hugo.md
new file mode 100644 (file)
index 0000000..5346110
--- /dev/null
@@ -0,0 +1,63 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo"
+slug: hugo
+url: /commands/hugo/
+---
+## hugo
+
+Hugo is a very fast static site generator
+
+### Synopsis
+
+
+A Fast and Flexible Static Site Generator built with
+love by spf13 and friends in Go.
+
+Complete documentation is available at http://gohugo.io
+
+```
+hugo
+```
+
+### Options
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+  -h, --help=false: help for hugo
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --noTimes=false: Don't sync modification time of files
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+  -w, --watch=false: watch filesystem for changes and recreate as needed
+```
+
+### SEE ALSO
+* [hugo benchmark](/commands/hugo_benchmark/)   - Benchmark hugo by building a site a number of times
+* [hugo check](/commands/hugo_check/)   - Check content in the source directory
+* [hugo config](/commands/hugo_config/)         - Print the site configuration
+* [hugo convert](/commands/hugo_convert/)       - Convert will modify your content to different formats
+* [hugo gendoc](/commands/hugo_gendoc/)         - Generate Markdown documentation for the Hugo CLI.
+* [hugo help](/commands/hugo_help/)     - Help about any command
+* [hugo list](/commands/hugo_list/)     - Listing out various types of content
+* [hugo new](/commands/hugo_new/)       - Create new content for your site
+* [hugo server](/commands/hugo_server/)         - Hugo runs its own webserver to render the files
+* [hugo undraft](/commands/hugo_undraft/)       - Undraft changes the content's draft status from 'True' to 'False'
+* [hugo version](/commands/hugo_version/)       - Print the version number of Hugo
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.405595583 +0000 UTC
diff --git a/docs/content/commands/hugo_benchmark.md b/docs/content/commands/hugo_benchmark.md
new file mode 100644 (file)
index 0000000..240e7e5
--- /dev/null
@@ -0,0 +1,57 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo benchmark"
+slug: hugo_benchmark
+url: /commands/hugo_benchmark/
+---
+## hugo benchmark
+
+Benchmark hugo by building a site a number of times
+
+### Synopsis
+
+
+Hugo can build a site many times over and analyze the
+running process creating a benchmark.
+
+```
+hugo benchmark
+```
+
+### Options
+
+```
+  -n, --count=13: number of times to build the site
+      --cpuprofile="": path/filename for the CPU profile file
+  -h, --help=false: help for benchmark
+      --memprofile="": path/filename for the memory profile file
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.401475254 +0000 UTC
diff --git a/docs/content/commands/hugo_check.md b/docs/content/commands/hugo_check.md
new file mode 100644 (file)
index 0000000..250aec5
--- /dev/null
@@ -0,0 +1,54 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo check"
+slug: hugo_check
+url: /commands/hugo_check/
+---
+## hugo check
+
+Check content in the source directory
+
+### Synopsis
+
+
+Hugo will perform some basic analysis on the
+    content provided and will give feedback.
+
+```
+hugo check
+```
+
+### Options
+
+```
+  -h, --help=false: help for check
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.401086213 +0000 UTC
diff --git a/docs/content/commands/hugo_config.md b/docs/content/commands/hugo_config.md
new file mode 100644 (file)
index 0000000..69d77b9
--- /dev/null
@@ -0,0 +1,53 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo config"
+slug: hugo_config
+url: /commands/hugo_config/
+---
+## hugo config
+
+Print the site configuration
+
+### Synopsis
+
+
+Print the site configuration, both default and custom settings
+
+```
+hugo config
+```
+
+### Options
+
+```
+  -h, --help=false: help for config
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.400622559 +0000 UTC
diff --git a/docs/content/commands/hugo_convert.md b/docs/content/commands/hugo_convert.md
new file mode 100644 (file)
index 0000000..f1789a4
--- /dev/null
@@ -0,0 +1,54 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo convert"
+slug: hugo_convert
+url: /commands/hugo_convert/
+---
+## hugo convert
+
+Convert will modify your content to different formats
+
+### Synopsis
+
+
+Convert will modify your content to different formats
+
+### Options
+
+```
+  -h, --help=false: help for convert
+  -o, --output="": filesystem path to write files to
+      --unsafe=false: enable less safe operations, please backup first
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+* [hugo convert toJSON](/commands/hugo_convert_tojson/)         - Convert front matter to JSON
+* [hugo convert toTOML](/commands/hugo_convert_totoml/)         - Convert front matter to TOML
+* [hugo convert toYAML](/commands/hugo_convert_toyaml/)         - Convert front matter to YAML
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.402534559 +0000 UTC
diff --git a/docs/content/commands/hugo_convert_toJSON.md b/docs/content/commands/hugo_convert_toJSON.md
new file mode 100644 (file)
index 0000000..8cee8fc
--- /dev/null
@@ -0,0 +1,56 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo convert toJSON"
+slug: hugo_convert_toJSON
+url: /commands/hugo_convert_tojson/
+---
+## hugo convert toJSON
+
+Convert front matter to JSON
+
+### Synopsis
+
+
+toJSON will convert all front matter in the content
+       directory to use JSON for the front matter
+
+```
+hugo convert toJSON
+```
+
+### Options
+
+```
+  -h, --help=false: help for toJSON
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+  -o, --output="": filesystem path to write files to
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+      --unsafe=false: enable less safe operations, please backup first
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo convert](/commands/hugo_convert/)       - Convert will modify your content to different formats
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.401801119 +0000 UTC
diff --git a/docs/content/commands/hugo_convert_toTOML.md b/docs/content/commands/hugo_convert_toTOML.md
new file mode 100644 (file)
index 0000000..13d1bd4
--- /dev/null
@@ -0,0 +1,56 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo convert toTOML"
+slug: hugo_convert_toTOML
+url: /commands/hugo_convert_totoml/
+---
+## hugo convert toTOML
+
+Convert front matter to TOML
+
+### Synopsis
+
+
+toTOML will convert all front matter in the content
+       directory to use TOML for the front matter
+
+```
+hugo convert toTOML
+```
+
+### Options
+
+```
+  -h, --help=false: help for toTOML
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+  -o, --output="": filesystem path to write files to
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+      --unsafe=false: enable less safe operations, please backup first
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo convert](/commands/hugo_convert/)       - Convert will modify your content to different formats
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.402055756 +0000 UTC
diff --git a/docs/content/commands/hugo_convert_toYAML.md b/docs/content/commands/hugo_convert_toYAML.md
new file mode 100644 (file)
index 0000000..404e7f0
--- /dev/null
@@ -0,0 +1,56 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo convert toYAML"
+slug: hugo_convert_toYAML
+url: /commands/hugo_convert_toyaml/
+---
+## hugo convert toYAML
+
+Convert front matter to YAML
+
+### Synopsis
+
+
+toYAML will convert all front matter in the content
+       directory to use YAML for the front matter
+
+```
+hugo convert toYAML
+```
+
+### Options
+
+```
+  -h, --help=false: help for toYAML
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+  -o, --output="": filesystem path to write files to
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+      --unsafe=false: enable less safe operations, please backup first
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo convert](/commands/hugo_convert/)       - Convert will modify your content to different formats
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.402296833 +0000 UTC
diff --git a/docs/content/commands/hugo_gendoc.md b/docs/content/commands/hugo_gendoc.md
new file mode 100644 (file)
index 0000000..42d29af
--- /dev/null
@@ -0,0 +1,54 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo gendoc"
+slug: hugo_gendoc
+url: /commands/hugo_gendoc/
+---
+## hugo gendoc
+
+Generate Markdown documentation for the Hugo CLI.
+
+### Synopsis
+
+
+Generate Markdown documentation for the Hugo CLI.
+
+```
+hugo gendoc
+```
+
+### Options
+
+```
+      --dir="/tmp/hugodoc/": the directory to write the doc.
+  -h, --help=false: help for gendoc
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.404218224 +0000 UTC
diff --git a/docs/content/commands/hugo_help.md b/docs/content/commands/hugo_help.md
new file mode 100644 (file)
index 0000000..75e3a63
--- /dev/null
@@ -0,0 +1,54 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo help"
+slug: hugo_help
+url: /commands/hugo_help/
+---
+## hugo help
+
+Help about any command
+
+### Synopsis
+
+
+Help provides help for any command in the application.
+    Simply type hugo help [path to command] for full details.
+
+```
+hugo help [command]
+```
+
+### Options
+
+```
+  -h, --help=false: help for help
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.404433721 +0000 UTC
diff --git a/docs/content/commands/hugo_list.md b/docs/content/commands/hugo_list.md
new file mode 100644 (file)
index 0000000..14046f6
--- /dev/null
@@ -0,0 +1,51 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo list"
+slug: hugo_list
+url: /commands/hugo_list/
+---
+## hugo list
+
+Listing out various types of content
+
+### Synopsis
+
+
+Listing out various types of content. List requires a subcommand, eg. hugo list drafts
+
+### Options
+
+```
+  -h, --help=false: help for list
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+* [hugo list drafts](/commands/hugo_list_drafts/)       - List all drafts
+* [hugo list future](/commands/hugo_list_future/)       - List all posts dated in the future
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.403804713 +0000 UTC
diff --git a/docs/content/commands/hugo_list_drafts.md b/docs/content/commands/hugo_list_drafts.md
new file mode 100644 (file)
index 0000000..21654a8
--- /dev/null
@@ -0,0 +1,53 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo list drafts"
+slug: hugo_list_drafts
+url: /commands/hugo_list_drafts/
+---
+## hugo list drafts
+
+List all drafts
+
+### Synopsis
+
+
+List all of the drafts in your content directory
+
+```
+hugo list drafts
+```
+
+### Options
+
+```
+  -h, --help=false: help for drafts
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo list](/commands/hugo_list/)     - Listing out various types of content
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.403394546 +0000 UTC
diff --git a/docs/content/commands/hugo_list_future.md b/docs/content/commands/hugo_list_future.md
new file mode 100644 (file)
index 0000000..6785e66
--- /dev/null
@@ -0,0 +1,53 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo list future"
+slug: hugo_list_future
+url: /commands/hugo_list_future/
+---
+## hugo list future
+
+List all posts dated in the future
+
+### Synopsis
+
+
+List all of the posts in your content directory who will be posted in the future
+
+```
+hugo list future
+```
+
+### Options
+
+```
+  -h, --help=false: help for future
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo list](/commands/hugo_list/)     - Listing out various types of content
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.403594998 +0000 UTC
diff --git a/docs/content/commands/hugo_new.md b/docs/content/commands/hugo_new.md
new file mode 100644 (file)
index 0000000..7c031c7
--- /dev/null
@@ -0,0 +1,61 @@
+---
+date: 2015-05-13T11:12:54+02:00
+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.
+
+
+```
+hugo new [path]
+```
+
+### Options
+
+```
+  -f, --format="toml": frontmatter format
+  -h, --help=false: help for new
+  -k, --kind="": Content type to create
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+* [hugo new site](/commands/hugo_new_site/)     - Create a new site (skeleton)
+* [hugo new theme](/commands/hugo_new_theme/)   - Create a new theme
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.403185059 +0000 UTC
diff --git a/docs/content/commands/hugo_new_site.md b/docs/content/commands/hugo_new_site.md
new file mode 100644 (file)
index 0000000..4c7ed5b
--- /dev/null
@@ -0,0 +1,57 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo new site"
+slug: hugo_new_site
+url: /commands/hugo_new_site/
+---
+## hugo new site
+
+Create a new site (skeleton)
+
+### Synopsis
+
+
+Create a new site in the provided directory.
+The new site will have the correct structure, but no content or theme yet.
+Use 'hugo new [contentPath]' to create new content.
+       
+
+```
+hugo new site [path]
+```
+
+### Options
+
+```
+  -f, --format="toml": config & frontmatter format
+  -h, --help=false: help for site
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo new](/commands/hugo_new/)       - Create new content for your site
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.402745422 +0000 UTC
diff --git a/docs/content/commands/hugo_new_theme.md b/docs/content/commands/hugo_new_theme.md
new file mode 100644 (file)
index 0000000..2a37293
--- /dev/null
@@ -0,0 +1,57 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo new theme"
+slug: hugo_new_theme
+url: /commands/hugo_new_theme/
+---
+## hugo new theme
+
+Create a new theme
+
+### Synopsis
+
+
+Create a new theme (skeleton) called [name] in the current directory.
+New theme is a skeleton. Please add content to the touched files. Add your
+name to the copyright line in the license and adjust the theme.toml file
+as you see fit.
+       
+
+```
+hugo new theme [name]
+```
+
+### Options
+
+```
+  -h, --help=false: help for theme
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo new](/commands/hugo_new/)       - Create new content for your site
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.402953514 +0000 UTC
diff --git a/docs/content/commands/hugo_server.md b/docs/content/commands/hugo_server.md
new file mode 100644 (file)
index 0000000..d1c21f0
--- /dev/null
@@ -0,0 +1,62 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo server"
+slug: hugo_server
+url: /commands/hugo_server/
+---
+## hugo server
+
+Hugo runs its own webserver to render the files
+
+### Synopsis
+
+
+Hugo is able to run its own high performance web server.
+Hugo will render all the files defined in the source directory and
+serve them up.
+
+```
+hugo server
+```
+
+### Options
+
+```
+      --appendPort=true: append port to baseurl
+      --bind="127.0.0.1": interface to which the server will bind
+      --disableLiveReload=false: watch without enabling live browser reload on rebuild
+  -h, --help=false: help for server
+      --meminterval=100: interval to poll memory usage (requires --memstats)
+      --memstats="": log memory usage to this file
+  -p, --port=1313: port on which the server will listen
+  -w, --watch=false: watch filesystem for changes and recreate as needed
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.399785024 +0000 UTC
diff --git a/docs/content/commands/hugo_undraft.md b/docs/content/commands/hugo_undraft.md
new file mode 100644 (file)
index 0000000..45a2c57
--- /dev/null
@@ -0,0 +1,53 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo undraft"
+slug: hugo_undraft
+url: /commands/hugo_undraft/
+---
+## hugo undraft
+
+Undraft changes the content's draft status from 'True' to 'False'
+
+### Synopsis
+
+
+Undraft changes the content's draft status from 'True' to 'False' and updates the date to the current date and time. If the content's draft status is 'False', nothing is done
+
+```
+hugo undraft path/to/content
+```
+
+### Options
+
+```
+  -h, --help=false: help for undraft
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.404004999 +0000 UTC
diff --git a/docs/content/commands/hugo_version.md b/docs/content/commands/hugo_version.md
new file mode 100644 (file)
index 0000000..35bd55c
--- /dev/null
@@ -0,0 +1,53 @@
+---
+date: 2015-05-13T11:12:54+02:00
+title: "hugo version"
+slug: hugo_version
+url: /commands/hugo_version/
+---
+## hugo version
+
+Print the version number of Hugo
+
+### Synopsis
+
+
+All software has versions. This is Hugo's
+
+```
+hugo version
+```
+
+### Options
+
+```
+  -h, --help=false: help for version
+```
+
+### Options inherited from parent commands
+
+```
+  -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+  -D, --buildDrafts=false: include content marked as draft
+  -F, --buildFuture=false: include content with datePublished in the future
+      --cacheDir="": filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
+      --config="": config file (default is path/config.yaml|json|toml)
+  -d, --destination="": filesystem path to write files to
+      --disableRSS=false: Do not build RSS files
+      --disableSitemap=false: Do not build Sitemap file
+      --editor="": edit new content with this editor, if provided
+      --ignoreCache=false: Ignores the cache directory for reading but still writes to it
+      --log=false: Enable Logging
+      --logFile="": Log File path (if set, logging enabled automatically)
+      --pluralizeListTitles=true: Pluralize titles in lists using inflect
+  -s, --source="": filesystem path to read files relative from
+      --stepAnalysis=false: display memory and timing of different steps of the program
+  -t, --theme="": theme to use (located in /themes/THEMENAME/)
+      --uglyUrls=false: if true, use /filename.html instead of /filename/
+  -v, --verbose=false: verbose output
+      --verboseLog=false: verbose logging
+```
+
+### SEE ALSO
+* [hugo](/commands/hugo/)       - Hugo is a very fast static site generator
+
+###### Auto generated by spf13/cobra at 2015-05-13 09:12:54.40015844 +0000 UTC
diff --git a/docs/layouts/section/commands.html b/docs/layouts/section/commands.html
new file mode 100644 (file)
index 0000000..893dea2
--- /dev/null
@@ -0,0 +1,9 @@
+{{ partial "header.html" . }}
+<h1>Hugo Commands</h1>
+<p>This is an autogenerated and up-to-date (thanks to <a href="https://github.com/spf13/cobra">Cobra</a>) documentation for all the CLI commands in Hugo.</p>
+<ul>
+{{ range .Data.Pages }}
+<li><a href="{{ .URL }}">{{ .Title }}</a></li>
+{{ end }}
+</ul>
+{{ partial "footer.html" . }}