MCPcopy
hub / github.com/vinta/awesome-python / build_category_json_ld

Function build_category_json_ld

website/build.py:216–239  ·  view source on GitHub ↗
(
    name: str,
    url: str,
    description: str,
    entries: Sequence[TemplateEntry],
    breadcrumbs: Sequence[tuple[str, str]],
)

Source from the content-addressed store, hash-verified

214
215
216def build_category_json_ld(
217 name: str,
218 url: str,
219 description: str,
220 entries: Sequence[TemplateEntry],
221 breadcrumbs: Sequence[tuple[str, str]],
222) -> dict:
223 return {
224 "@context": "https://schema.org",
225 "@graph": [
226 _website_node(),
227 {
228 "@type": "CollectionPage",
229 "@id": url,
230 "name": name,
231 "url": url,
232 "description": description,
233 "isPartOf": ISPARTOF_WEBSITE,
234 "inLanguage": "en",
235 "mainEntity": _item_list_payload(entries),
236 },
237 build_breadcrumb_json_ld(breadcrumbs),
238 ],
239 }
240
241
242def build_sponsorship_json_ld() -> dict:

Callers 1

render_categoryFunction · 0.85

Calls 3

_website_nodeFunction · 0.85
_item_list_payloadFunction · 0.85
build_breadcrumb_json_ldFunction · 0.85

Tested by

no test coverage detected