knocean / knode

Knowledge Development Environment
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Implement template system #9

Closed jamesaoverton closed 7 years ago

jamesaoverton commented 7 years ago

The first version will load template definitions from JSON, then look for a special predicate IRI, and when present it will use the template and currently defined predicates to add new statements to the current subject. A new statement block will have a key to track which template it came from.

The first verison will insist that the required predicates have exactly one value.

Templates will be named by IRIs (like everything else). They will have a list of required predicates, used for substitutions, and a list of statements to add. Template statements will have a :content key that can contain {predicate name} for string substitution.

Later we will write the templates in Knotation instead of JSON. Depends on multiline strings #7.

Later we will generate pages with documentation for each template.

Template systems inevitably evolve into full programming languages. We're trying to resist that.