Skip to content

Commit

Permalink
Fix RTDs compatibility with custom domains (#328)
Browse files Browse the repository at this point in the history
* Fix RTDs compatilibity with custom domain

* Update conf.py

* Update conf.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
dfm and pre-commit-ci[bot] authored Jul 18, 2024
1 parent 4f59b4e commit 7f7cac7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os

from pkg_resources import DistributionNotFound, get_distribution

try:
__version__ = get_distribution("exoplanet").version
except DistributionNotFound:
__version__ = "unknown version"

# Support canonical URL
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
if os.environ.get("READTHEDOCS", "") == "True":
html_context = {"READTHEDOCS": True}

# General stuff
extensions = [
Expand Down

0 comments on commit 7f7cac7

Please sign in to comment.