|
16 | 16 | import sys |
17 | 17 | sys.path.insert(0, os.path.abspath('../../src')) |
18 | 18 |
|
| 19 | +github_org = "pvlib" |
| 20 | +github_repo = "solposx" |
| 21 | + |
19 | 22 | # -- Project information ----------------------------------------------------- |
20 | 23 |
|
21 | 24 | project = 'solposx' |
|
62 | 65 |
|
63 | 66 | # https://sphinx-book-theme.readthedocs.io/en/stable/reference.html |
64 | 67 | html_theme_options = { |
65 | | - "repository_url": "https://github.com/pvlib/solposx", |
| 68 | + "repository_url": f"https://github.com/{github_org}/{github_repo}", |
66 | 69 | "path_to_docs": "docs/source/", |
67 | 70 | "use_issues_button": True, |
68 | 71 | "use_repository_button": True, |
|
91 | 94 | } |
92 | 95 |
|
93 | 96 | extlinks = { |
94 | | - "issue": ("https://github.com/pvlib/solposx/issues/%s", "GH%s"), |
95 | | - "pull": ("https://github.com/pvlib/solposx/pull/%s", "GH%s"), |
| 97 | + "issue": (f"https://github.com/{github_org}/{github_repo}/issues/%s", "GH%s"), |
| 98 | + "pull": (f"https://github.com/{github_org}/{github_repo}/pull/%s", "GH%s"), |
96 | 99 | "ghuser": ("https://github.com/%s", "@%s"), |
97 | 100 | "doi": ("http://dx.doi.org/%s", "DOI: %s"), |
98 | 101 | } |
@@ -122,7 +125,7 @@ def get_source_base_url(): |
122 | 125 | """ |
123 | 126 | repo_url = os.environ.get( |
124 | 127 | "READTHEDOCS_GIT_CLONE_URL", |
125 | | - default="https://github.com/pvlib/solposx.git", |
| 128 | + default=f"https://github.com/{github_org}/{github_repo}.git", |
126 | 129 | ).rstrip(".git") # remove .git suffix if present, as it could be present |
127 | 130 | READTHEDOCS_ENV = os.environ.get("READTHEDOCS", None) == "True" |
128 | 131 | READTHEDOCS_VERSION = os.environ.get("READTHEDOCS_VERSION", None) |
|
0 commit comments