Skip to content

Commit

Permalink
Restored basic template from 5.x (#1431)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal authored Oct 1, 2020
1 parent 42cfece commit 0f645ba
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ HTML

Simplified HTML, using the classic jupyter look and feel.

- ``--template basic``

Base HTML, rendering with minimal structure and styles.

.. _convert_latex:

LaTeX
Expand Down
6 changes: 6 additions & 0 deletions nbconvert/exporters/tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,9 @@ def custom_highlight_code(source, language="python", metadata=None):
(output, resources) = HTMLExporter(template_name='classic', filters=filters).from_notebook_node(nb)
self.assertTrue("ADDED_TEXT" in output)

def test_basic_name(self):
"""
Can a HTMLExporter export using the 'basic' template?
"""
(output, resources) = HTMLExporter(template_name='basic').from_filename(self._get_notebook())
assert len(output) > 0
6 changes: 6 additions & 0 deletions share/jupyter/nbconvert/templates/basic/conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"base_template": "classic",
"mimetypes": {
"text/html": true
}
}
1 change: 1 addition & 0 deletions share/jupyter/nbconvert/templates/basic/index.html.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{%- extends 'classic/base.html.j2' -%}
2 changes: 0 additions & 2 deletions share/jupyter/nbconvert/templates/compatibility/basic.tpl

This file was deleted.

2 changes: 1 addition & 1 deletion share/jupyter/nbconvert/templates/compatibility/full.tpl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{{ resources.deprecated("This template is deprecated, please use lab/index.html.j2") }}
{%- extends 'lab/index.html.j2' -%}
{%- extends 'classic/index.html.j2' -%}

0 comments on commit 0f645ba

Please sign in to comment.