Files
jcoffey-dev 23e6ea4e44
ci / editor-ui (pull_request) Successful in 1m19s
ci / go (pull_request) Successful in 1m20s
Six more packs, search-engine data, podcast feeds
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.
2026-10-11 17:23:44 -07:00

39 lines
1.8 KiB
HTML

{{/* section
label: Buy buttons
about: Things to buy or book, each with a button that opens your payment provider's checkout.
fields:
- { name: heading, type: text }
- { name: intro, type: markdown }
- name: items
type: list
fields:
- { name: name, type: text, required: true }
- { name: price, type: text, help: "As you'd write it: $25, From €40." }
- { name: description, type: text }
- { name: image, type: image }
- { name: image_alt, type: text, label: What the picture shows }
- { name: link, type: link, required: true, label: Payment link, help: "From your provider: a Stripe Payment Link, a PayPal.me or hosted button link, a Square checkout link." }
- { name: button, type: text, default: Buy }
- { name: note, type: markdown, label: Below the buttons, help: Shipping, refunds, how to get in touch. }
*/}}
<link rel="stylesheet" href="{{ asset "packs/payment-links/payment.css" }}">
<section class="block buy">
<div class="wrap">
{{ with .Data.heading }}<h2>{{ . }}</h2>{{ end }}
{{ with .Data.intro }}<div class="intro">{{ markdownify . }}</div>{{ end }}
<ul class="buy-grid">
{{ range .Data.items }}
<li class="buy-item">
{{ if .image }}<img class="buy-picture" src="{{ .image }}" alt="{{ .image_alt }}" loading="lazy">{{ end }}
<h3>{{ .name }}</h3>
{{ with .price }}<p class="buy-price">{{ . }}</p>{{ end }}
{{ with .description }}<p class="buy-desc">{{ . }}</p>{{ end }}
<a class="btn primary buy-button" href="{{ .link }}" rel="noopener">{{ default "Buy" .button }}</a>
</li>
{{ end }}
</ul>
{{ with .Data.note }}<div class="buy-note">{{ markdownify . }}</div>{{ end }}
<p class="buy-secure">You'll pay on our payment provider's secure page.</p>
</div>
</section>