Skip to content

archetect/basic-catalog-starter.archetype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A basic Archetect Catalog starter

This is an Archetect archetype.

Rendering

To generate a new Catalog from this Archetype, copy and execute the following command:

archetect render https://github.com/archetect/basic-catalog-starter.archetype.git

Archetype Layout

Archetect has flexibility in how an archetype is laid out. However, the defaults, as used in this archetype, should cover the vast majority of cases.

Archetype Configuration

The ~/.archetype.yaml manifest contains configuration for this archetype, including:

  • The minimum Archetect version required to render this archetype (required).
  • Any component Archetypes this archetype may compose (optional).
  • Customized locations for the main script, content root directory, templating macros and layouts directory, and scripting modules directory (optional).

Archetype Script

The ./archetype.rhai script contains the logic for building up a context model, usually through interactive prompting, and rendering content.

Contents Directory

The ./contents directory contains the files and directories, by convention, that will be rendered into the newly generated archetype.

This directory can be referenced by a Directory type in Rhai, and rendered. You may also break the contents up into sub-directories within this directory for more complex archetypes, or archetypes that require conditional rendering.

let context = #{};

context.first_name = "John";
context.last_name = "Doe";

// Render everything in ./contents
render(Directory("contents"), context);

// Only render ./contents/manifests
render(Directory("contents/manifests"), context);

About

An Archetect Catalog starter archetype

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published