(entries: Sequence[TemplateEntry], total_categories: int)
| 151 | |
| 152 | |
| 153 | def build_homepage_json_ld(entries: Sequence[TemplateEntry], total_categories: int) -> dict: |
| 154 | description = ( |
| 155 | "An opinionated guide to the best Python frameworks, libraries, and tools. " |
| 156 | f"Explore {len(entries)} curated projects across {total_categories} categories, " |
| 157 | "from AI and agents to data science and web development." |
| 158 | ) |
| 159 | return { |
| 160 | "@context": "https://schema.org", |
| 161 | "@graph": [ |
| 162 | _website_node(), |
| 163 | { |
| 164 | "@type": "CollectionPage", |
| 165 | "@id": SITE_URL, |
| 166 | "name": "Awesome Python", |
| 167 | "url": SITE_URL, |
| 168 | "description": description, |
| 169 | "isPartOf": ISPARTOF_WEBSITE, |
| 170 | "inLanguage": "en", |
| 171 | "mainEntity": _item_list_payload(entries), |
| 172 | }, |
| 173 | ], |
| 174 | } |
| 175 | |
| 176 | |
| 177 | def category_meta_title(name: str, parent_name: str | None = None) -> str: |
no test coverage detected