Please let me know where that appears in the documentation.
v0.111.3
$ hugo list all
path,slug,title,date,expiryDate,publishDate,draft,permalink
content/posts/post-3.md,,Post 3,2023-05-25T16:40:35-07:00,2023-04-25T16:43:22-07:00,2023-05-25T16:40:35-07:00,false,https://example.org/posts/post-3/
content/posts/post-2.md,,Post 2,2023-05-25T16:40:34-07:00,0001-01-01T00:00:00Z,2023-05-25T16:40:34-07:00,true,https://example.org/posts/post-2/
content/posts/post-1.md,,Post 1,2023-05-25T16:40:33-07:00,0001-01-01T00:00:00Z,2023-05-25T16:40:33-07:00,true,https://example.org/posts/post-1/
$ hugo list expired
content/posts/post-3.md,2023-04-25T16:43:22-07:00
v0.112.3
$ hugo list all
path,slug,title,date,expiryDate,publishDate,draft,permalink
content/posts/post-3.md,,Post 3,2023-05-25T16:40:35-07:00,2023-04-25T16:43:22-07:00,2023-05-25T16:40:35-07:00,false,https://example.org/posts/post-3/
content/posts/post-2.md,,Post 2,2023-05-25T16:40:34-07:00,0001-01-01T00:00:00Z,2023-05-25T16:40:34-07:00,true,https://example.org/posts/post-2/
content/posts/post-1.md,,Post 1,2023-05-25T16:40:33-07:00,0001-01-01T00:00:00Z,2023-05-25T16:40:33-07:00,true,https://example.org/posts/post-1/
content/_index.md,,@@TITLE@@,2021-01-01T00:00:00Z,0001-01-01T00:00:00Z,2021-01-01T00:00:00Z,false,https://example.org/
$ hugo list expired
path,slug,title,date,expiryDate,publishDate,draft,permalink
content/posts/post-3.md,,Post 3,2023-05-25T16:40:35-07:00,2023-04-25T16:43:22-07:00,2023-05-25T16:40:35-07:00,false,https://example.org/posts/post-3/
So with the latest release we have consistent output with all commands.
Was there a version that supported the --format
flag when listing content? I went back to v0.54.0 and didn’t see the flag.
$ hugo version
Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
$ hugo list help
Listing out various types of content.
List requires a subcommand, e.g. `hugo list drafts`.
Usage:
hugo list [command]
Available Commands:
drafts List all drafts
expired List all posts already expired
future List all posts dated in the future
Flags:
-h, --help help for list
-s, --source string filesystem path to read files relative from
Global Flags:
--config string config file (default is path/config.yaml|json|toml)
--configDir string config dir (default "config")
--debug debug output
--log enable Logging
--logFile string log File path (if set, logging enabled automatically)
--quiet build in quiet mode
-v, --verbose verbose output
--verboseLog verbose logging
Use "hugo list [command] --help" for more information about a command.