From a22bd0d5aabcf8fcec6aade5996c50120a9c00b8 Mon Sep 17 00:00:00 2001 From: Surya Sankar Date: Thu, 14 Feb 2019 20:01:16 +0530 Subject: [PATCH 1/2] added the plugin files and README --- v8/hide_input_cells/README.md | 1 + v8/hide_input_cells/hide_input_cells.plugin | 12 +++++++++++ v8/hide_input_cells/hide_input_cells.py | 24 +++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 v8/hide_input_cells/README.md create mode 100644 v8/hide_input_cells/hide_input_cells.plugin create mode 100644 v8/hide_input_cells/hide_input_cells.py diff --git a/v8/hide_input_cells/README.md b/v8/hide_input_cells/README.md new file mode 100644 index 00000000..7fb7c5fd --- /dev/null +++ b/v8/hide_input_cells/README.md @@ -0,0 +1 @@ +This plugin hides the input cells from the html file which was generated from a jupyter notebook. \ No newline at end of file diff --git a/v8/hide_input_cells/hide_input_cells.plugin b/v8/hide_input_cells/hide_input_cells.plugin new file mode 100644 index 00000000..cd33d179 --- /dev/null +++ b/v8/hide_input_cells/hide_input_cells.plugin @@ -0,0 +1,12 @@ +[Core] +Name = hide_input_cells +Module = hide_input_cells + +[Nikola] +PluginCategory = ConfigPlugin +MinVersion = 7.1.0+ + +[Documentation] +Author = Surya Sankar +Version = 0.0.1 +Description = Hide all input cells diff --git a/v8/hide_input_cells/hide_input_cells.py b/v8/hide_input_cells/hide_input_cells.py new file mode 100644 index 00000000..ab3333bf --- /dev/null +++ b/v8/hide_input_cells/hide_input_cells.py @@ -0,0 +1,24 @@ +from __future__ import unicode_literals +from nikola.plugin_categories import ConfigPlugin +from nikola import utils +from nikola.utils import LOGGER + +import re + + +class HideInputCells(ConfigPlugin): + def set_site(self, site): + site.template_hooks['extra_head'].append( + """ + + + """ + ) + return super(HideInputCells, self).set_site(site) From a0914bc58cde0d66bd60ba3cb8912229b01353b7 Mon Sep 17 00:00:00 2001 From: Surya Sankar Date: Thu, 14 Feb 2019 20:32:55 +0530 Subject: [PATCH 2/2] fixing indentation issues. Removing unnecessary imports --- v8/hide_input_cells/hide_input_cells.py | 34 +++++++++++-------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/v8/hide_input_cells/hide_input_cells.py b/v8/hide_input_cells/hide_input_cells.py index ab3333bf..75e21da2 100644 --- a/v8/hide_input_cells/hide_input_cells.py +++ b/v8/hide_input_cells/hide_input_cells.py @@ -1,24 +1,20 @@ from __future__ import unicode_literals from nikola.plugin_categories import ConfigPlugin -from nikola import utils -from nikola.utils import LOGGER - -import re class HideInputCells(ConfigPlugin): - def set_site(self, site): - site.template_hooks['extra_head'].append( - """ - - - """ - ) - return super(HideInputCells, self).set_site(site) + def set_site(self, site): + site.template_hooks['extra_head'].append( + """ + + + """ + ) + return super(HideInputCells, self).set_site(site)