2023-01-04 17:24:36 +00:00
|
|
|
# Test the hugo list commands.
|
|
|
|
|
|
|
|
hugo list drafts
|
|
|
|
! stderr .
|
2023-05-22 07:49:58 +00:00
|
|
|
stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
|
|
|
|
stdout 'content/draft.md,draft,The Draft,2019-01-01T00:00:00Z,2032-01-01T00:00:00Z,2018-01-01T00:00:00Z,true,https://example.org/draft/'
|
|
|
|
stdout 'draftexpired.md'
|
|
|
|
stdout 'draftfuture.md'
|
|
|
|
! stdout '/expired.md'
|
2023-01-04 17:24:36 +00:00
|
|
|
|
|
|
|
hugo list future
|
2023-05-22 07:49:58 +00:00
|
|
|
stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
|
|
|
|
stdout 'future.md'
|
|
|
|
stdout 'draftfuture.md'
|
|
|
|
! stdout 'expired.md'
|
2023-01-04 17:24:36 +00:00
|
|
|
|
|
|
|
hugo list expired
|
2023-05-22 07:49:58 +00:00
|
|
|
stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
|
|
|
|
stdout 'expired.md'
|
|
|
|
stdout 'draftexpired.md'
|
|
|
|
! stdout 'future.md'
|
2023-01-04 17:24:36 +00:00
|
|
|
|
|
|
|
hugo list all
|
2023-05-22 07:49:58 +00:00
|
|
|
stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
|
|
|
|
stdout 'future.md'
|
|
|
|
stdout 'draft.md'
|
|
|
|
stdout 'expired.md'
|
|
|
|
stdout 'draftexpired.md'
|
|
|
|
stdout 'draftfuture.md'
|
2023-01-04 17:24:36 +00:00
|
|
|
|
2024-02-17 11:32:25 +00:00
|
|
|
hugo list expired --clock 2000-01-01T00:00:00Z
|
|
|
|
! stdout 'expired.md'
|
|
|
|
|
2023-01-04 17:24:36 +00:00
|
|
|
-- hugo.toml --
|
|
|
|
baseURL = "https://example.org/"
|
|
|
|
disableKinds = ["taxonomy", "term"]
|
|
|
|
-- content/draft.md --
|
|
|
|
---
|
2023-05-22 07:49:58 +00:00
|
|
|
title: "The Draft"
|
|
|
|
slug: "draft"
|
2023-01-04 17:24:36 +00:00
|
|
|
draft: true
|
|
|
|
date: 2019-01-01
|
2023-05-22 07:49:58 +00:00
|
|
|
expiryDate: 2032-01-01
|
|
|
|
publishDate: 2018-01-01
|
2023-01-04 17:24:36 +00:00
|
|
|
---
|
|
|
|
-- content/expired.md --
|
|
|
|
---
|
|
|
|
date: 2018-01-01
|
|
|
|
expiryDate: 2019-01-01
|
|
|
|
---
|
|
|
|
-- content/future.md --
|
|
|
|
---
|
|
|
|
date: 2030-01-01
|
2023-05-21 08:16:25 +00:00
|
|
|
---
|
|
|
|
-- content/draftfuture.md --
|
|
|
|
---
|
|
|
|
date: 2030-01-01
|
|
|
|
draft: true
|
|
|
|
---
|
|
|
|
-- content/draftexpired.md --
|
|
|
|
---
|
|
|
|
date: 2018-01-01
|
|
|
|
expiryDate: 2019-01-01
|
|
|
|
draft: true
|
2023-01-04 17:24:36 +00:00
|
|
|
---
|