You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matrix-spec-proposals/layouts/shortcodes/event.html

21 lines
700 B
HTML

{{/*
This template is used to render an event.
It expects to be passed an `event` parameter, which is the name of a schema file under
"data/event-schemas/schema". The file extension is omitted. For example:
{{% event event="m.accepted_terms" %}}
This template replaces the old {{*_event}} template.
*/}}
{{ $event_data := index .Site.Data "event-schemas" "schema" .Params.event }}
{{ $path := "event-schemas/schema" }}
{{ $event_data = partial "json-schema/resolve-refs" (dict "schema" $event_data "path" $path) }}
{{ $event_data := partial "json-schema/resolve-allof" $event_data }}
{{ partial "events/render-event" (dict "event_name" .Params.event "event_data" $event_data)}}