sp-codes.de/src/_data/eleventyComputed.js

5 lines
235 B
JavaScript

module.exports = {
service: (data) => data.services.find(s => s.id === data.service),
title: (data) => data.title || data.service?.name || "",
summary: (data) => data.summary || data.service?.summary?.[data.locale] || ""
}