Skip to content

Commit

Permalink
Define html_baseurl and html_context in conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aphearin committed Sep 9, 2024
1 parent f881071 commit 615decf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
#

import os
from datetime import datetime, timezone
from importlib import metadata

Expand Down Expand Up @@ -79,6 +80,20 @@
html_static_path = ["_static"]
html_style = "halotools.css"

# Set canonical URL from the Read the Docs Domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

html_context = {
"default_mode": "light",
"to_be_indexed": ["stable", "latest"],
"is_development": False,
"github_user": "astropy",
"github_repo": "halotools",
"github_version": "master",
"doc_path": "docs",
# Tell Jinja2 templates the build is running on Read the Docs
"READTHEDOCS": os.environ.get("READTHEDOCS", "") == "True",
}
# -- Options for LaTeX output -------------------------------------------------

# Grouping the document tree into LaTeX files. List of tuples
Expand Down

0 comments on commit 615decf

Please sign in to comment.