summaryrefslogtreecommitdiffstats
path: root/commands/genman.go
AgeCommit message (Collapse)Author
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-04-24Automate the Hugo release processBjørn Erik Pedersen
This commit adds a work flow aroung GoReleaser to get the Hugo release process automated and more uniform: * It can be run fully automated or in two steps to allow for manual edits of the relase notes. * It supports both patch and full releases. * It fetches author, issue, repo info. etc. for the release notes from GitHub. * The file names produced are mainly the same as before, but we no use tar.gz as archive for all Unix versions. * There isn't a fully automated CI setup in place yet, but the release tag is marked in the commit message with "[ci deploy]" Fixes #3358
2017-04-06all: Handle all errorsBjørn Erik Pedersen
As reported by `errcheck`.
2017-02-04all: Refactor to nonglobal file systemsBjørn Erik Pedersen
Updates #2701 Fixes #2951
2016-03-31Add readFile template funcBjørn Erik Pedersen
This also includes a refactor of the hugofs package and its usage. The motivation for that is: The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...) Fixes #1551
2015-12-24update to use cobra's sub package docSteve Francia
2015-12-10Add copyright header to that source files that don’t have one.Anthony Fok
See #1646
2015-12-02Improve error handling in commandsBjørn Erik Pedersen
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department. This enables a more centralized error handling approach. This commit introduces that by changing all the command funcs to `RunE`: * The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only. * The usage text is now only shown on invalid arguments etc. (user errors) Fixes #1502
2015-12-02Enable dirname and filename completion for more flagsAnthony Fok
These flags are: * --source (-s), --cacheDir, --destination (-d) and --logFile * --completionfile and --dir.
2015-11-28Support setting target directory in `hugo gen man`Anthony Fok
Fixes #1627
2015-11-23Restructure the gen commandsBjørn Erik Pedersen
Fixes #1603
2015-11-22Add commands/genman.go to autogenerate man pagesAnthony Fok
Fixes #1369