-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving thebelab config to within the page instead of head
- Loading branch information
Showing
3 changed files
with
35 additions
and
34 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
jupyter_book/book_template/_includes/js/thebelab-page-config.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script type="text/x-thebe-config"> | ||
{%- if page.kernel_name %} | ||
{% assign kernelName = page.kernel_name %} | ||
{% else %} | ||
{% assign kernelName = "python3" %} | ||
{% endif -%} | ||
|
||
{%- if page.kernel_name %} | ||
{% if page.kernel_name contains "python" %} | ||
{% assign cm_language="python" %} | ||
{% else %} | ||
{% assign cm_language={{ page.kernel_name }} %} | ||
{% endif %} | ||
{% else %} | ||
{% assign cm_language="python" %} | ||
{% endif -%} | ||
{ | ||
requestKernel: true, | ||
binderOptions: { | ||
repo: "{{ site.binder_repo_org }}/{{ site.binder_repo_name }}", | ||
ref: "{{ site.binder_repo_branch }}", | ||
}, | ||
codeMirrorConfig: { | ||
theme: "{{ site.codemirror_theme }}", | ||
mode: "{{ cm_language }}" | ||
}, | ||
kernelOptions: { | ||
kernelName: "{{ kernelName }}", | ||
path: "{{ page.kernel_path }}" | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters