Skip to content

Commit

Permalink
fix: Update conf paths to match the new docs layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
feanil committed Jul 18, 2023
1 parent a586c3b commit f32c938
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

from path import Path

root = Path('../..').abspath()
root = Path('..').abspath()

# Hack the PYTHONPATH to match what LMS and Studio use so all the code
# can be successfully imported
sys.path.insert(0, root)
sys.path.append(root / "docs/guides")
sys.path.append(root / "docs")


# Use a settings module that allows all LMS and Studio code to be imported
Expand Down Expand Up @@ -74,9 +74,8 @@

# code_annotations.(featuretoggles|settings) related settings.
edxplatform_repo_url = "https://github.com/openedx/edx-platform"
edxplatform_source_path = os.path.abspath(
os.path.join(os.path.dirname(__file__), "..", "..")
)
edxplatform_source_path = root

try:
edx_platform_version = git.Repo(search_parent_directories=True).head.object.hexsha
except git.InvalidGitRepositoryError:
Expand Down Expand Up @@ -136,7 +135,7 @@
html_theme_options = {
"repository_url": "https://github.com/openedx/edx-platform",
"repository_branch": "master",
"path_to_docs": "docs/guides",
"path_to_docs": "docs",
"home_page_in_toc": True,
"use_repository_button": True,
"use_issues_button": True,
Expand Down Expand Up @@ -308,7 +307,7 @@ def on_init(app): # lint-amnesty, pylint: disable=redefined-outer-name, unused-
Read the Docs won't run tox or custom shell commands, so we need this to
avoid checking in the generated reStructuredText files.
"""
docs_path = root / 'docs' / 'guides'
docs_path = root / 'docs'
apidoc_path = 'sphinx-apidoc'
if hasattr(sys, 'real_prefix'): # Check to see if we are in a virtualenv
# If we are, assemble the path manually
Expand Down

0 comments on commit f32c938

Please sign in to comment.