-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 thebe #354
404 thebe #354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
qiskit_sphinx_theme/__init__.py
Outdated
if not doctree or doctree.traverse(ThebeButtonNode): | ||
thebe_js_files = ["_static/sphinx-thebe.js", "_static/thebelab-helper.js", "https://unpkg.com/thebelab@latest/lib/index.js"] | ||
context["script_files"] = [js_file for js_file in context["script_files"] if js_file not in thebe_js_files] | ||
|
||
thebe_css_files = ['_static/thebelab.css', '_static/sphinx-thebe.css'] | ||
context["css_files"] = [css_file for css_file in context["css_files"] if css_file not in thebe_css_files] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to early return if the condition is True.
if not doctree or doctree.traverse(ThebeButtonNode): | |
thebe_js_files = ["_static/sphinx-thebe.js", "_static/thebelab-helper.js", "https://unpkg.com/thebelab@latest/lib/index.js"] | |
context["script_files"] = [js_file for js_file in context["script_files"] if js_file not in thebe_js_files] | |
thebe_css_files = ['_static/thebelab.css', '_static/sphinx-thebe.css'] | |
context["css_files"] = [css_file for css_file in context["css_files"] if css_file not in thebe_css_files] | |
if not doctree or doctree.traverse(ThebeButtonNode): | |
return | |
thebe_js_files = ["_static/sphinx-thebe.js", "_static/thebelab-helper.js", "https://unpkg.com/thebelab@latest/lib/index.js"] | |
context["script_files"] = [js_file for js_file in context["script_files"] if js_file not in thebe_js_files] | |
thebe_css_files = ['_static/thebelab.css', '_static/sphinx-thebe.css'] | |
context["css_files"] = [css_file for css_file in context["css_files"] if css_file not in thebe_css_files] |
qiskit_sphinx_theme/__init__.py
Outdated
@@ -50,6 +73,7 @@ def setup(app): | |||
_overwrite_pygments_css, | |||
) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qiskit_sphinx_theme/__init__.py
Outdated
@@ -16,6 +16,7 @@ | |||
|
|||
from qiskit_sphinx_theme import directives, previous_releases, translations | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When opening a pull request, it's a good practice to look in GitHub at the diff. Are you making any changes you didn't realize? This is a good example of one. There's no reason to be adding these blank lines here. I suspect it was leftover from when you were iterating on the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thanks.
solve #291