jekyll-jupyter-notebook 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/doc/text/news.md +14 -0
- data/lib/jekyll-jupyter-notebook/tag.rb +11 -4
- data/lib/jekyll-jupyter-notebook/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425f800ab9b773e9a5af9360ba2715ca339d576fe1719deafdb3a328aa6c8ac8
|
4
|
+
data.tar.gz: 1f2cd269d33799891f4f79c547d785cb9e571f9a4b01cfcd18a115ce18bfd4f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9f20a00e845900a7f1e10eee2d9b23a92c9842f8e0838581be05552b72a7fe54bb9e1ddd94152428c90f3522d5fbc267887bef5dd3e8b9b4e084a395e93454
|
7
|
+
data.tar.gz: '074847bc947f0a7ed68d4ee9e1add0259dc7785adef09e712a3f7d0587c058fb2b516bed6bd06cbcf347fc1c0fac83ea40b440f669765757789b3abc2820b2ca'
|
data/README.md
CHANGED
@@ -42,14 +42,14 @@ Put a Jupyter Notebook (`sample.ipynb`) to the directory that has the target tex
|
|
42
42
|
Put the following tag into the target text:
|
43
43
|
|
44
44
|
```markdown
|
45
|
-
{% jupyter_notebook sample.ipynb %}
|
45
|
+
{% jupyter_notebook "sample.ipynb" %}
|
46
46
|
```
|
47
47
|
|
48
48
|
If you use kramdown as Markdown parser and get strange result, try to surround `{% jupyter_notebook ...%}` with `{::nomarkdown}` and `{:/nomarkdown}` like the following:
|
49
49
|
|
50
50
|
```markdown
|
51
51
|
{::nomarkdown}
|
52
|
-
{% jupyter_notebook sample.ipynb %}
|
52
|
+
{% jupyter_notebook "sample.ipynb" %}
|
53
53
|
{:/nomarkdown}
|
54
54
|
```
|
55
55
|
|
data/doc/text/news.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
## 0.0.4 - 2018-08-08
|
4
|
+
|
5
|
+
### Improvements
|
6
|
+
|
7
|
+
* Added support for variable for notebook path. Now, notebook path
|
8
|
+
must be string literal such as `"sample.ipynb"` not
|
9
|
+
`sample.ipynb`. `sample.ipynb` is still supported for backward
|
10
|
+
compatibility but it's obsoleted.
|
11
|
+
[GitHub#7][Patch by Josh Hills]
|
12
|
+
|
13
|
+
### Thanks
|
14
|
+
|
15
|
+
* Josh Hills
|
16
|
+
|
3
17
|
## 0.0.3 - 2018-03-31
|
4
18
|
|
5
19
|
### Improvements
|
@@ -16,17 +16,24 @@ module JekyllJupyterNotebook
|
|
16
16
|
class Tag < Liquid::Tag
|
17
17
|
Liquid::Template.register_tag("jupyter_notebook", self)
|
18
18
|
|
19
|
-
def initialize(tag_name, markup,
|
19
|
+
def initialize(tag_name, markup, parse_context)
|
20
20
|
super
|
21
|
-
@notebook_path = markup.strip
|
22
21
|
end
|
23
22
|
|
24
23
|
def syntax_example
|
25
|
-
"{% #{@tag_name} filename.ipynb %}"
|
24
|
+
"{% #{@tag_name} \"filename.ipynb\" %}"
|
26
25
|
end
|
27
26
|
|
28
27
|
def render(context)
|
29
|
-
|
28
|
+
variable = Liquid::Variable.new(@markup, @parse_context)
|
29
|
+
notebook_path = variable.render(context)
|
30
|
+
if notebook_path.nil?
|
31
|
+
Jekyll.logger.warn("Warning:",
|
32
|
+
"Jupyter Notebook path be string literal: " +
|
33
|
+
"<#{@markup.strip.inspect}>")
|
34
|
+
notebook_path = @markup.strip # For backward compatibility
|
35
|
+
end
|
36
|
+
notebook_html_path = "#{notebook_path}.html"
|
30
37
|
<<-HTML
|
31
38
|
<div
|
32
39
|
class="jupyter-notebook"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-jupyter-notebook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
|
-
rubygems_version:
|
136
|
+
rubygems_version: 3.0.0.beta1
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: Jekyll Jupyter Notebook plugin adds [Jupyter](http://jupyter.org/) Notebook
|