| 175 | |
| 176 | |
| 177 | def category_meta_title(name: str, parent_name: str | None = None) -> str: |
| 178 | if parent_name: |
| 179 | title = f"{name} for {parent_name} - Awesome Python" |
| 180 | if len(title) <= 60: |
| 181 | return title |
| 182 | title = f"{parent_name}: {name} - Awesome Python" |
| 183 | if len(title) <= 60: |
| 184 | return title |
| 185 | return f"{name} - Awesome Python" |
| 186 | title = f"{name} Python Libraries - Awesome Python" |
| 187 | if len(title) <= 60: |
| 188 | return title |
| 189 | return f"{name} - Awesome Python" |
| 190 | |
| 191 | |
| 192 | def category_meta_description(name: str, entry_count: int, description: str, parent_name: str | None = None) -> str: |