Skip to content

Commit b07d63f

Browse files
committed
Remove try-qutip URL hardcoding (jupyterlib seems happier with relative links now).
1 parent 240d69e commit b07d63f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

website/create_index.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
""" Script for generating indexes of the notebook. """
22

33
import argparse
4-
import os
54
import pathlib
65
import re
7-
import urllib.parse
86

97
from jinja2 import (
108
Environment,
@@ -37,7 +35,6 @@ class Notebook:
3735
""" Notebook object for use in rendering templates. """
3836

3937
NBVIEWER_URL_PREFIX = "https://nbviewer.org/urls/qutip.org/qutip-tutorials/"
40-
TRY_QUTIP_URL_PREFIX = "https://qutip.org/try-qutip/lab/index.html?"
4138

4239
def __init__(self, title, tutorial_folder, path):
4340
self.tutorial_folder = tutorial_folder
@@ -52,10 +49,7 @@ def __init__(self, title, tutorial_folder, path):
5249
self.tutorial_ipynb_path = self.tutorial_md_path.with_suffix(".ipynb")
5350

5451
self.nbviewer_url = self.NBVIEWER_URL_PREFIX + self.web_ipynb_path.as_posix()
55-
self.try_qutip_url = (
56-
self.TRY_QUTIP_URL_PREFIX +
57-
urllib.parse.urlencode({"path": "tutorials/" + self.tutorial_ipynb_path.as_posix()})
58-
)
52+
self.try_qutip_url = "./tutorials/" + self.tutorial_ipynb_path.as_posix()
5953

6054

6155
def get_title(path):

0 commit comments

Comments
 (0)