Parses PHK (PhoenixKit) XML-style markup into an AST.
Example input:
<Page slug="home">
<Hero variant="split-image">
<Headline>Welcome to PhoenixKit</Headline>
<Subheadline>Build faster with {{framework}}</Subheadline>
<CTA primary="true" action="/signup">Get Started</CTA>
</Hero>
</Page>Output AST:
%{
type: :page,
attributes: %{slug: "home"},
children: [
%{
type: :hero,
attributes: %{variant: "split-image"},
children: [
%{type: :headline, content: "Welcome to PhoenixKit"},
%{type: :subheadline, content: "Build faster with {{framework}}"},
%{type: :cta, attributes: %{primary: "true", action: "/signup"}, content: "Get Started"}
]
}
]
}
Summary
Functions
Parses PHK XML content into an AST.