Skip to content

Commit

Permalink
Merge pull request #3090 from szarnyasg/iss3075
Browse files Browse the repository at this point in the history
Update link tag in archived pages
  • Loading branch information
szarnyasg authored Jun 16, 2024
2 parents 836301b + 97f3c00 commit 75cc918
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/archive_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ def copy_file(source_path, target_path, version):
]
doc["redirect_from"] = redirect_from_field_to_archive

doc.content = doc.content.replace(
f"{{% link docs/",
f"{{% link docs/archive/{version}/",
)

of.write(frontmatter.dumps(doc))
else:
shutil.copy(source_path, target_path)
Expand Down Expand Up @@ -148,7 +153,7 @@ def archive_installation_page(version):
with open(f"_includes/installation.html") as main_installation_file, open(
f"docs/archive/{version}/installation/index.html", "w"
) as archived_installation_file:
installation_page = main_installation_file.read()
installation_page = "\n" + main_installation_file.read()
installation_page = installation_page.replace(" (Latest Release)", "")
installation_page = installation_page.replace(
"{{ site.currentduckdbversion }}", version
Expand Down

0 comments on commit 75cc918

Please sign in to comment.