Skip to content

Commit

Permalink
Move HTML generation to newer-style templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ageorgou committed Oct 4, 2022
1 parent 0a2add1 commit 383f477
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ default: _site
%.png: %.uml plantuml.jar Makefile
java -Djava.awt.headless=true -jar plantuml.jar -p < $< > $@

%.html: %.nbconvert.ipynb Makefile jekyll.tpl
jupyter nbconvert --to html --template jekyll.tpl --stdout $< > $@
%.html: %.nbconvert.ipynb Makefile jekyll_template
jupyter nbconvert --to html --template jekyll_template --stdout $< > $@

%.v2.ipynb: %.nbconvert.ipynb
jupyter nbconvert --to notebook --nbformat 2 --stdout $< > $@
Expand Down
6 changes: 6 additions & 0 deletions jekyll_template/conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"base_template": "basic",
"mimetypes": {
"text/html": true
}
}
2 changes: 1 addition & 1 deletion jekyll.tpl → jekyll_template/index.html.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- extends 'basic.tpl' -%}
{%- extends 'basic/index.html.j2' -%}
{%- block header -%}
---
title: {% if 'jekyll' in nb['metadata'] %} {{nb['metadata']['jekyll']['display_name']}} {% endif %}
Expand Down

0 comments on commit 383f477

Please sign in to comment.