(blog_dir: Path)
| 211 | |
| 212 | |
| 213 | def discover_posts(blog_dir: Path) -> list[Post]: |
| 214 | posts: list[Post] = [] |
| 215 | for path in sorted(blog_dir.glob("*.md")): |
| 216 | if path.name.startswith("_"): |
| 217 | continue |
| 218 | post = parse_post(path) |
| 219 | if post is not None: |
| 220 | posts.append(post) |
| 221 | posts.sort(key=lambda p: p.date) |
| 222 | return posts |
| 223 | |
| 224 | |
| 225 | def select_candidate( |
no test coverage detected