You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/12/27 01:58:13 UTC

[GitHub] [tvm] guberti commented on a diff in pull request #13627: [DRAFT][docs] Add "Open with Colab" button to documentation

guberti commented on code in PR #13627:
URL: https://github.com/apache/tvm/pull/13627#discussion_r1057398674


##########
docs/conf.py:
##########
@@ -84,6 +84,100 @@ def git_describe_version(original_version):
 version = git_describe_version(tvm.__version__)
 release = version
 
+
+# Generate the
+COLAB_HTML_HEADER = """
+.. DO NOT EDIT.
+.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
+.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
+.. "{0}"
+.. LINE NUMBERS ARE GIVEN BELOW.
+
+.. only:: html
+
+    .. note::
+        :class: sphx-glr-download-link-note
+
+        This tutorial can be used interactively with Google Colab! You can also click
+        :ref:`here <sphx_glr_download_{1}>` to run the Jupyter notebook locally.
+
+        .. image:: https://raw.githubusercontent.com/guberti/web-data/main/images/utilities/colab_button.svg

Review Comment:
   During the Hackathon, I redid this image to be a cleaner SVG. I've got a PR out to update this and remove the `png` version - see https://github.com/tlc-pack/web-data/pull/18.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org