| 190 | |
| 191 | |
| 192 | def category_meta_description(name: str, entry_count: int, description: str, parent_name: str | None = None) -> str: |
| 193 | target = f"{name} for {parent_name}" if parent_name else name |
| 194 | count_sentence = f"Explore {entry_count} curated Python projects in {target}." |
| 195 | if description: |
| 196 | lead = description if description.endswith((".", "!", "?")) else f"{description}." |
| 197 | return f"{lead} {count_sentence}" |
| 198 | return f"{count_sentence} Part of the Awesome Python catalog." |
| 199 | |
| 200 | |
| 201 | def build_breadcrumb_json_ld(items: Sequence[tuple[str, str]]) -> dict: |