struct

Hwaro::Services::ContentInfo

Inherits JSON::Serializable < Struct < Value < Object

Information about a content file

Constructors

new(path : String, title : String, draft : Bool, date : Time | Nil, state : PublishState, expires : Time | Nil = nil, generated_from : String | Nil = nil, generated_source : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

date
Source
date=(date : Time | Nil)
Source
draft

Kept for compatibility with existing --json consumers: true when the file is a draft (its own flag or one cascaded from a parent section).

Source
draft=(draft : Bool)

Kept for compatibility with existing --json consumers: true when the file is a draft (its own flag or one cascaded from a parent section).

Source
expires
Source
expires=(expires : Time | Nil)
Source
generated_from

Provenance of a [[content.generate]] page ("data.products"); nil for authored files. Omitted from JSON when nil, so existing --json consumers see no new key on authored entries.

Source
generated_from=(generated_from : String | Nil)

Provenance of a [[content.generate]] page ("data.products"); nil for authored files. Omitted from JSON when nil, so existing --json consumers see no new key on authored entries.

Source
generated_source

The planned source document (front matter, plus the body only for a plain body field spec) of a [[content.generate]] page, which has no file at path for tool stats to read its taxonomies from. Never emitted.

Source
generated_source=(generated_source : String | Nil)

The planned source document (front matter, plus the body only for a plain body field spec) of a [[content.generate]] page, which has no file at path for tool stats to read its taxonomies from. Never emitted.

Source
path
Source
path=(path : String)
Source
published?

Will a default hwaro build publish this file?

Source
status

published | draft | future | expired — what a default build does with this file. Only published files are actually shipped.

Source
status=(status : String)

published | draft | future | expired — what a default build does with this file. Only published files are actually shipped.

Source
title
Source
title=(title : String)
Source

Nested types