Reads a recipes file: the Markdown a plugin declares with
use Alternera.Plugin, recipes: "…", and the proxy's own recipe
files, in one format.
A recipe is a ##### section: its heading is the title, the paragraph
under it the description, then its YAML blocks, a pipeline and its tests
(a recipe with a private helper has three: the helper, the caller, the
tests). The description paragraph may hold category: <word> and
labels: key=value, key=value lines, which a search scores and which
strip/1 leaves out of the text a model reads. The sections after an
<!-- index --> line are index?: the proxy's aggregate recipes topic
lists them by one line instead of in full. The slug comes from the
title: lowercase, every run of other characters an underscore.
problems/1 is what the SDK's test kit (Plugin.Test.Contract) checks a
declared file with, so a plugin's own suite fails on a recipe the proxy
could not index.
Summary
Functions
The categories a recipe may name, the proxy's own and a tenant's alike.
The prose before a file's first recipe: the topic's introduction, as the proxy's aggregate recipes topic opens with it.
The recipes of a file's text, served under the guide topic topic.
What is wrong with a recipes file, as one line each; [] for a file the
proxy indexes whole: at least one recipe, each with a title no other
has, a description, a category of categories/0, well-formed labels and
two or three YAML blocks.
A slug from a title: lowercase, every run of other characters an underscore.
A file's text with each recipe's category: and labels: lines left out.
Types
Functions
@spec categories() :: [String.t()]
The categories a recipe may name, the proxy's own and a tenant's alike.
The prose before a file's first recipe: the topic's introduction, as the proxy's aggregate recipes topic opens with it.
The recipes of a file's text, served under the guide topic topic.
What is wrong with a recipes file, as one line each; [] for a file the
proxy indexes whole: at least one recipe, each with a title no other
has, a description, a category of categories/0, well-formed labels and
two or three YAML blocks.
A slug from a title: lowercase, every run of other characters an underscore.
A file's text with each recipe's category: and labels: lines left out.