Skip to content

Commit 043fbbe

Browse files
authored
Move site_vars to templates/site_vars.html (#17)
Closes #13
1 parent 07a1b70 commit 043fbbe

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

{{cookiecutter.project_slug}}/app.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,9 @@
1717
app = Site()
1818
app.output_path = "{{cookiecutter.output_path}}"
1919

20-
app.site_vars.update({
21-
"SITE_TITLE":"{{cookiecutter.SITE_TITLE}}",
22-
"SITE_URL":"{{cookiecutter.SITE_URL}}",
23-
"NAVIGATION":[
24-
{
25-
"name": "Home",
26-
"url": "/",
27-
},
28-
{% if not cookiecutter.skip_collection %}
29-
{
30-
"name": "Collection Page",
31-
"url": "/example-page.html",
32-
},
33-
{% endif %}
34-
{% if not cookiecutter.skip_blog %}
35-
{
36-
"name": "Blog",
37-
"url": "/blog/blog.html",
38-
},
39-
{% endif %}
40-
]
41-
})
20+
app.site_vars.update(
21+
{% include "templates/site_vars.html" %}
22+
)
4223

4324
@app.page
4425
class Index(Page):
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"SITE_TITLE":"{{cookiecutter.SITE_TITLE}}",
3+
"SITE_URL":"{{cookiecutter.SITE_URL}}",
4+
"NAVIGATION":[
5+
{
6+
"name": "Home",
7+
"url": "/",
8+
},
9+
{% if not cookiecutter.skip_collection %}
10+
{
11+
"name": "Collection Page",
12+
"url": "/example-page.html",
13+
},
14+
{% endif %}
15+
{% if not cookiecutter.skip_blog %}
16+
{
17+
"name": "Blog",
18+
"url": "/blog/blog.html",
19+
},
20+
{% endif %}
21+
]
22+
}

0 commit comments

Comments
 (0)