From f32c938961b6660bd87b5b4789bec9a01dcd1bec Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 18 Jul 2023 15:41:34 -0400 Subject: [PATCH] fix: Update conf paths to match the new docs layout. --- docs/conf.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 01352852467c..33225f5719bf 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 @@ -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: @@ -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, @@ -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