Commit 9ed554f8 authored by Benjamin Canou's avatar Benjamin Canou

Docs: update links to generated odoc

parent 9f4ff764
Pipeline #25483800 passed with stages
in 18 minutes and 7 seconds
......@@ -29,8 +29,8 @@ def package_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
branch = os.environ.get('CI_COMMIT_REF_NAME', 'master')
project_url = os.environ.get('CI_PROJECT_URL', 'https://gitlab.com/tezos/tezos')
src_url = project_url + "/tree/" + branch + "/" + src
if os.path.isdir('_build/api/odoc/'+lib):
if os.path.isdir(os.path.join('_build','api','odoc',lib,lib.replace('-','_').capitalize())):
if os.path.isdir('_build/api/odoc/_html/'+lib):
if os.path.isdir(os.path.join('_build','api','odoc','_html',lib,lib.replace('-','_').capitalize())):
lib = lib + '/' + lib.replace('-','_').capitalize()
url = "api/api-inline.html#" + lib + '/index.html'
for i in range(1,rel_lvl):
......
......@@ -4,7 +4,7 @@ Online OCaml Documentation
.. raw:: html
<iframe id="docframe" height="100%" width="100%" src="../api/odoc/index.html"></iframe>
<iframe id="docframe" height="100%" width="100%" src="../api/odoc/_html/index.html"></iframe>
<style>
@media (max-width: 771px) {
#docframe { border:none; position: fixed; top: 70px; bottom: 0; right: 0; left: 0; }
......@@ -15,5 +15,5 @@ Online OCaml Documentation
</style>
<script language="JavaScript">
if (window.location.hash.endsWith(".html"))
document.getElementById('docframe').src = "../api/odoc/" + window.location.hash.slice(1)
document.getElementById('docframe').src = "../api/odoc/_html/" + window.location.hash.slice(1)
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment