Skip to main content

artifact

Function artifact 

Source
pub fn artifact(ctx: &Context, version: &str) -> Result<Artifact, Error>
Expand description

The committed index, as majordomus generate site writes it to PATH.

Refuses rather than writes when two subjects claim one page, and when the rendered document carries anything generate::forbidden_in keeps out of published text.

use majordomus_cli::evidence::subject::{self, DOCUMENT, PATH, SCHEMA};
use majordomus_cli::synthetic::SyntheticRepository;

let repo = SyntheticRepository::small().unwrap();
let ctx = repo.context().unwrap();
let a = subject::artifact(&ctx, "0.0.0").unwrap();
assert_eq!(a.path, PATH);
assert_eq!(a.document, DOCUMENT);
assert_eq!(a.schema.as_deref(), Some(SCHEMA));
assert!(a.content.ends_with("}\n"));