Compose index.md from the existing front matter and the README body.
(front_matter: str, readme_text: str)
| 69 | |
| 70 | |
| 71 | def build_index(front_matter: str, readme_text: str) -> str: |
| 72 | """Compose index.md from the existing front matter and the README body.""" |
| 73 | |
| 74 | if not front_matter: |
| 75 | raise ValueError( |
| 76 | f"{display_path(INDEX)} is missing a Jekyll front matter block. " |
| 77 | "Restore the front matter manually before running the sync." |
| 78 | ) |
| 79 | |
| 80 | return f"{front_matter}\n{readme_text}" |
| 81 | |
| 82 | |
| 83 | def main() -> int: |