Skip to content

Commit 4ca510a

Browse files
committed
📝 Docs: update split_readme.py to copy CHANGELOG.md and add it to the docs
1 parent c14d4be commit 4ca510a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ reference/vuegen
5050
sections_readme/contributing
5151
sections_readme/credits
5252
sections_readme/contact
53+
sections_readme/changelog
5354
```
5455

5556
```{toctree}

docs/split_readme.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def process_readme(readme_path, output_dir):
106106
else:
107107
raise ValueError(f"Section '{section_title}' not found in README")
108108

109-
# Include CONTRIBUTING.md with its own link references
109+
# Copy CONTRIBUTING.md with its own link references
110110
contrib_path = readme_path.parent / "CONTRIBUTING.md"
111111
try:
112112
raw_contrib = contrib_path.read_text()
@@ -124,6 +124,15 @@ def process_readme(readme_path, output_dir):
124124
except FileNotFoundError as e:
125125
raise FileNotFoundError(f"CONTRIBUTING.md not found at {contrib_path}") from e
126126

127+
# Copy CHANGELOG.md to the output directory
128+
changelog_path = readme_path.parent / "CHANGELOG.md"
129+
try:
130+
raw_changelog = changelog_path.read_text()
131+
(output_dir / "changelog.md").write_text(raw_changelog)
132+
print("Generated changelog.md")
133+
except FileNotFoundError as e:
134+
raise FileNotFoundError(f"CHANGELOG.md not found at {changelog_path}") from e
135+
127136

128137
if __name__ == "__main__":
129138
default_readme = Path(__file__).resolve().parent.parent / "README.md"

0 commit comments

Comments
 (0)