Documentation sidebar fixes.
@@ -27,7 +27,7 @@ def generate_sidebar(conf, conf_api):
'', '.. DO NOT MODIFY! THIS PAGE IS AUTOGENERATED!', ''
]
- url_base = 'https://tiledb-inc-tiledb.readthedocs-hosted.com'
+ url_base = 'https://docs.tiledb.io'
lang = 'en'
def toctree(name):
@@ -48,9 +48,15 @@ def generate_sidebar(conf, conf_api):
lines.append(' %s <%s>' % args)
def write_api(project, desc, rst_page):
- if project != conf_api:
+ # From non-root project to root project link
+ if project == 'tiledb' and conf_api != 'tiledb':
+ args = desc, url_base, lang, version, rst_page
+ lines.append(' %s API <%s/%s/%s/%s.html>' % args)
+ # From anything to non-root project link
+ elif project != conf_api:
args = desc, url_base, project, lang, version, rst_page
lines.append(' %s API <%s/projects/%s/%s/%s/%s.html>' % args)
+ # Local project link
else:
args = desc, rst_page
lines.append(' %s API <%s>' % args)
@@ -65,6 +71,12 @@ def generate_sidebar(conf, conf_api):
write('Usage', 'usage')
endl()
+ toctree('API Reference')
+ write_api('tiledb', 'C', 'c-api')
+ write_api('tiledb', 'C++', 'c++-api')
+ write_api('tiledb-py', 'Python', 'python-api')
+ endl()
+
toctree('TileDB 101')
write('Data Model', 'tiledb101/data-model')
write('Basic Concepts', 'tiledb101/basic-concepts')
@@ -85,10 +97,4 @@ def generate_sidebar(conf, conf_api):
write('Consistency', 'tiledb101/consistency')
endl()
- toctree('API Reference')
- write_api('tiledb', 'C', 'c-api')
- write_api('tiledb', 'C++', 'c++-api')
- write_api('tiledb-py', 'Python', 'python-api')
- endl()
-
write_if_changed('_sidebar.rst.inc', '\n'.join(lines))
