Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change CHANGELOG for changelog in doc generation #746

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ website:
- text: FAQ
file: faq.qmd
- text: Changelog
file: CHANGELOG.qmd
file: changelog.qmd
- icon: github
href: https://github.com/bambinos/bambi

Expand Down
2 changes: 1 addition & 1 deletion docs/post_render.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import os

# Remove CHANGELOG
os.remove("CHANGELOG.qmd")
os.remove("changelog.qmd")
4 changes: 2 additions & 2 deletions docs/pre_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

# Copy CHANGELOG file to 'docs' and change its extension to '.qmd'
shutil.copyfile("../CHANGELOG.md", "CHANGELOG.md")
os.rename("CHANGELOG.md", "CHANGELOG.qmd")
os.rename("CHANGELOG.md", "changelog.qmd")

# Remove TOC from it
lines = """---
toc: false
pagetitle: "Changelog"
---
"""
with open("CHANGELOG.qmd", "r+") as file:
with open("changelog.qmd", "r+") as file:
file_data = file.read()
file.seek(0, 0)
file.write(lines + "\n" + file_data)
Loading