Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
coretl committed Mar 20, 2024
1 parent c8d79b6 commit eee5fde
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2.0.2-4-g97e238d
_commit: 2.0.2-7-g382820b
_src_path: gh:DiamondLightSource/python-copier-template
author_email: tom.cobb@diamond.ac.uk
author_name: Tom Cobb
Expand Down
7 changes: 5 additions & 2 deletions .github/pages/make_switcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ def get_versions(ref: str, add: Optional[str]) -> List[str]:

def write_json(path: Path, repository: str, versions: str):
org, repo_name = repository.split("/")
pages_url = f"https://{org}.github.io"
if repo_name != f"{org}.github.io":
# Only add the repo name if it isn't the source for the org pages site
pages_url += f"/{repo_name}"
struct = [
{"version": version, "url": f"https://{org}.github.io/{repo_name}/{version}/"}
for version in versions
{"version": version, "url": f"{pages_url}/{version}/"} for version in versions
]
text = json.dumps(struct, indent=2)
print(f"JSON switcher:\n{text}")
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
# A dictionary of values to pass into the template engine’s context for all pages
html_context = {
"github_user": github_user,
"github_repo": project,
"github_repo": github_repo,
"github_version": version,
"doc_path": "docs",
}
Expand Down

0 comments on commit eee5fde

Please sign in to comment.