Skip to content

Commit 7c71194

Browse files
committed
Simplify the sphinx conf.py file
1 parent f948033 commit 7c71194

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

doc/conf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"sphinx_design",
4545
"sphinx_gallery.gen_gallery",
4646
]
47-
github_repo = "GenericMappingTools/pygmt"
4847

4948
# Suppress warnings
5049
suppress_warnings = [
@@ -214,8 +213,8 @@
214213
# Theme config
215214
html_theme = "sphinx_rtd_theme"
216215
html_theme_options = {}
217-
repository = "GenericMappingTools/pygmt"
218-
repository_url = "https://github.com/GenericMappingTools/pygmt"
216+
github_repo = "GenericMappingTools/pygmt"
217+
repository_url = f"https://github.com/{github_repo}"
219218
if __commit__:
220219
commit_link = (
221220
f'<a href="{repository_url}/commit/{ __commit__ }">{ __commit__[:8] }</a>'
@@ -254,7 +253,7 @@
254253
strict=True,
255254
)
256255
),
257-
"github_repo": repository,
256+
"github_repo": github_repo,
258257
"github_version": "main",
259258
"commit": commit_link,
260259
}

0 commit comments

Comments
 (0)