From 383f4775449cee677b7f36acf83789d9c09d3fbc Mon Sep 17 00:00:00 2001 From: Anastasis Georgoulas Date: Mon, 3 Oct 2022 16:45:03 +0100 Subject: [PATCH] Move HTML generation to newer-style templates --- Makefile | 4 ++-- jekyll_template/conf.json | 6 ++++++ jekyll.tpl => jekyll_template/index.html.j2 | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 jekyll_template/conf.json rename jekyll.tpl => jekyll_template/index.html.j2 (82%) diff --git a/Makefile b/Makefile index 9acf49fa1..ebb55aa5e 100644 --- a/Makefile +++ b/Makefile @@ -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 $< > $@ diff --git a/jekyll_template/conf.json b/jekyll_template/conf.json new file mode 100644 index 000000000..2d3500a32 --- /dev/null +++ b/jekyll_template/conf.json @@ -0,0 +1,6 @@ +{ + "base_template": "basic", + "mimetypes": { + "text/html": true + } +} diff --git a/jekyll.tpl b/jekyll_template/index.html.j2 similarity index 82% rename from jekyll.tpl rename to jekyll_template/index.html.j2 index fb220cbf6..7e0f29bce 100644 --- a/jekyll.tpl +++ b/jekyll_template/index.html.j2 @@ -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 %}