Skip to content

Commit 73fd738

Browse files
committed
Fix changelog URL pattern to "{repo}/changes/"
[noissue]
1 parent f198241 commit 73fd738

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/pulp_docs/mkdocs_macros.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,26 +150,26 @@ def _place_doc_files(src_dir: Path, docs_dir: Path, repo: Repo):
150150

151151
# Get changelog
152152
repo.status.has_changelog = False
153-
changes_dir = Path(docs_dir / "changes")
153+
changes_dir = Path(docs_dir)
154154
changes_dir.mkdir(exist_ok=True)
155155
for changelog_name in ("CHANGELOG.md", "CHANGES.md", "CHANGES.rst"):
156156
changelog_path = Path(src_dir / changelog_name)
157157
if changelog_path.exists():
158-
shutil.copy(changelog_path, changes_dir / "changelog.md")
158+
shutil.copy(changelog_path, changes_dir / "changes.md")
159159
repo.status.has_changelog = True
160160
return
161161

162162
# Create redirect message for nested packages
163163
if isinstance(repo, SubPackage):
164-
empty_changelog = changes_dir / "changelog.md"
165-
changes_url = f"site:{repo.subpackage_of}/changes/changelog/"
164+
empty_changelog = changes_dir / "changes.md"
165+
changes_url = f"site:{repo.subpackage_of}/changes/"
166166
empty_changelog.write_text(
167167
f"# Changelog\n\nThe changelog for this package is nested under [{repo.subpackage_of}]({changes_url})."
168168
)
169169
return
170170

171171
# Create placeholder, case it was not possible to fetch one
172-
empty_changelog = changes_dir / "changelog.md"
172+
empty_changelog = changes_dir / "changes.md"
173173
empty_changelog.write_text(
174174
"# Changelog\n\nThe repository does not provide a changelog or there was a problem fetching it."
175175
)
@@ -322,7 +322,7 @@ def get_repos(repo_type="content"):
322322
"version": "3.12.1",
323323
"rest_api_url": f"https://docs.pulpproject.org/{repo.name}/restapi.html",
324324
"codebase_url": f"https://github.com/{repo.owner}/{repo.name}",
325-
"changelog_url": f"site:{repo.name}/changes/changelog/",
325+
"changelog_url": f"site:{repo.name}/changes/",
326326
}
327327
for repo in repos_list
328328
]

src/pulp_docs/navigation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def grouped_by_persona(tmpdir: Path, repos: Repos):
5858
"""
5959
f = AgregationUtils(tmpdir, repos)
6060
SECTION_HOST = "pulp-docs"
61-
CHANGES_PATH = "{repo}/changes/changelog.md"
61+
CHANGES_PATH = "{repo}/changes.md"
6262

6363
# Manual section for each persona
6464
manual_nav = {}

0 commit comments

Comments
 (0)