From 6e0f014ee51c21d483e43e6d3a8ad49c74c5e06f Mon Sep 17 00:00:00 2001 From: mhucka Date: Mon, 6 Jul 2026 22:24:13 +0000 Subject: [PATCH] Don't add package name to `site_path` The base `site_path` parameter value is used to construct the absolute URLs for the table of contents and redirects. Past organizations of the DevSite-based API documentation for OpenFermion must have been slightly different. To make things work correctly today, the value of `site_path` in dev_tools/docs/build_api_docs.py must omit the `openfermion` part, because the Python API generator (`tensorflow_docs.api_generator`) automatically appends the Python package's namespace (`openfermion`) to the base `site_path`. This change only affects the metadata links generated in the `_toc.yaml` and `_redirects.yaml` files used for the web site served internally by Google. --- dev_tools/docs/build_api_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev_tools/docs/build_api_docs.py b/dev_tools/docs/build_api_docs.py index 6e5f6aa67..6e8bde7cb 100644 --- a/dev_tools/docs/build_api_docs.py +++ b/dev_tools/docs/build_api_docs.py @@ -35,7 +35,7 @@ flags.DEFINE_bool("search_hints", True, "Include metadata search hints in the generated files") -flags.DEFINE_string("site_path", "/reference/python/openfermion", "Path prefix in the _toc.yaml") +flags.DEFINE_string("site_path", "/reference/python", "Path prefix in the _toc.yaml") FLAGS = flags.FLAGS