UNPKG

contentful-hugo

Version:

Node module that pulls data from Contentful and turns it into markdown files for Hugo. Can be used with other Static Site Generators, but has some Hugo specific features.

29 lines (23 loc) 865 B
<!-- For all entries you have access to the following parameters through .Get "id", "contentType", and "parentContentType" --> {{- $contentType := .Get "contentType" -}} <!-- render custom block or call partial depending on the contentType and/or parentContentType --> {{- if eq $contentType "__custom-content-type__" -}} <!-- fallback message --> {{- else -}} <span style=" background: <<BACKGROUND_COLOR>>; color: <<TEXT_COLOR>>; border: 1px solid <<BORDER_COLOR>>; padding: 0px 5px; border-radius: 5px;" > <span><strong>Unconfigured Inline Entry</strong></span> (<span>id: {{ .Get "id" }},</span> <span>contentType: {{ .Get "contentType" }},</span> <span>parentContentType: {{ .Get "parentContentType" }}</span>) </span> {{- end -}}