Skip to content

Commit 7754a32

Browse files
committed
Better way to deal with jinja2/Jekyll (non) interaction
1 parent 7ad4d7d commit 7754a32

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

docs/_templates/layout.html

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
{% extends "cloud/layout.html" %}
1+
{%- extends "cloud/layout.html" -%}
2+
3+
{# We are not processing the output of these pages through Jekyll, so
4+
we need to set the variables referenced in the includes. #}
5+
{% set site = {"baseurl": "/psij-python"} %}
26

37
{% block scripts %}
48
{% include "../../web/_includes/head.html" %}
@@ -18,20 +22,10 @@
1822
{% include "../../web/_includes/footer.html" %}
1923
</v-app>
2024

21-
{# this has to be done manually because jinja2 and jekyll use the same escapes
22-
and including vueinit.html would make jinja2 complain (and jinja2 does not
23-
have a way of including a file as-is #}
24-
<script>
25-
v = new Vue({
26-
el: '#psij-app',
27-
vuetify: new Vuetify(),
28-
data: {
29-
maintabs: "docs"
30-
}
31-
});
32-
33-
hljs.highlightAll();
34-
</script>
25+
{# Same as above #}
26+
{% set page = {"tab": 2} %}
27+
{% include "../../web/_includes/vueinit.html" %}
28+
3529

3630
{% endblock %}
3731

0 commit comments

Comments
 (0)