layout.html 911 Bytes
Newer Older
Yuge Zhang's avatar
Yuge Zhang committed
1
2
3
4
5
6
7
8
9
10
{% extends "!layout.html" %}

{#- TO INJECT INFORMATION FROM READTHEDOCS HERE #}
{% block scripts %}
  {{ super() }}
  {% if versions %}
  <script type="text/javascript">
    READTHEDOCS_VERSIONS = {{ versions | tojson }}
  </script>
  {% endif %}
11
12
13
14
15
16
17
18
19
20
  <script type="text/javascript">
    // for gallery links
    GIT_COMMIT_ID = "{{ git_commit_id }}";
    PAGENAME = "{{ pagename }}";
    GALLERY_LINKS = {
      colab: "{{ pathto('_static/img/gallery-colab.svg', 1) }}",
      notebook: "{{ pathto('_static/img/gallery-download.svg', 1) }}",
      github: "{{ pathto('_static/img/gallery-github.svg', 1) }}"
    }
  </script>
Yuge Zhang's avatar
Yuge Zhang committed
21
22
23
24
25
26
27
28
29
30
{% endblock %}

{#- REPLACE ATTRIBUTES INSTANTLY TO DISABLE SOME HOOKS #}
{% block footer_scripts %}
<script type="text/javascript">
  // try to disable original hook for md-source.
  $('*[data-md-source="github"]').attr("data-md-source", "nni");
</script>
{{ super() }}
{% endblock %}