Packs: jobs, payment-links, podcast, recipes, related-posts, table-of-contents. Engine, for what packs can't carry: - pageData: schema.org objects for what packs put on a page (FAQPage from faq sections, LocalBusiness from location, Person, Recipe and JobPosting by layout). The starter's partials/schema.html writes them; older sites can add the same two lines. - feed_format: podcast: RSS with the iTunes fields, each episode's audio as an enclosure with its real size (podcast_category, podcast_email, podcast_explicit). - closed: whether a date (a job's closes:) is over in the site's time zone. Closed openings leave lists and aren't advertised to search engines. - related: pages in the same collection sharing the most tags. - headings: a rendered page's h2 and h3 headings, for a table of contents. - formatDate takes a date YAML already parsed (closes: 2026-11-15). The bundled-packs test covers all seventeen, including the structured data, a closed job, the podcast feed, related posts and the table of contents.
22 lines
1.3 KiB
HTML
22 lines
1.3 KiB
HTML
{{ define "main" }}
|
|
<link rel="stylesheet" href="{{ asset "packs/recipes/recipes.css" }}">
|
|
<article class="wrap page recipe">
|
|
{{ with index .Site.Lists .Collection }}<p class="eyebrow"><a href="{{ .Path }}">{{ .Title }}</a></p>{{ end }}
|
|
<h1>{{ .Title }}</h1>
|
|
{{ with .Summary }}<p class="lede">{{ . }}</p>{{ end }}
|
|
{{ with .Params.photo }}<img class="rc-hero" src="{{ . }}" alt="{{ $.Params.photo_alt }}">{{ end }}
|
|
{{ $prep := default 0 .Params.prep_minutes }}{{ $cook := default 0 .Params.cook_minutes }}
|
|
<dl class="rc-facts">
|
|
{{ if gt $prep 0 }}<div><dt>Prep</dt><dd>{{ $prep }} min</dd></div>{{ end }}
|
|
{{ if gt $cook 0 }}<div><dt>Cook</dt><dd>{{ $cook }} min</dd></div>{{ end }}
|
|
{{ if and (gt $prep 0) (gt $cook 0) }}<div><dt>Total</dt><dd>{{ add $prep $cook }} min</dd></div>{{ end }}
|
|
{{ with .Params.servings }}<div><dt>Makes</dt><dd>{{ . }}</dd></div>{{ end }}
|
|
</dl>
|
|
<div class="rc-body">
|
|
{{ with .Params.ingredients }}<section class="rc-ingredients"><h2>Ingredients</h2><ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul></section>{{ end }}
|
|
{{ with .Params.steps }}<section class="rc-steps"><h2>Method</h2><ol>{{ range . }}<li>{{ . }}</li>{{ end }}</ol></section>{{ end }}
|
|
</div>
|
|
{{ with .Content }}<div class="prose">{{ . }}</div>{{ end }}
|
|
</article>
|
|
{{ end }}
|