diff --git a/{{cookiecutter.project_slug}}/app.py b/{{cookiecutter.project_slug}}/app.py index 40f163b..fe0f1f7 100644 --- a/{{cookiecutter.project_slug}}/app.py +++ b/{{cookiecutter.project_slug}}/app.py @@ -17,28 +17,9 @@ app = Site() app.output_path = "{{cookiecutter.output_path}}" -app.site_vars.update({ - "SITE_TITLE":"{{cookiecutter.SITE_TITLE}}", - "SITE_URL":"{{cookiecutter.SITE_URL}}", - "NAVIGATION":[ - { - "name": "Home", - "url": "/", - }, - {% if not cookiecutter.skip_collection %} - { - "name": "Collection Page", - "url": "/example-page.html", - }, - {% endif %} - {% if not cookiecutter.skip_blog %} - { - "name": "Blog", - "url": "/blog/blog.html", - }, - {% endif %} - ] - }) +app.site_vars.update( + {% include "templates/site_vars.html" %} +) @app.page class Index(Page): diff --git a/{{cookiecutter.project_slug}}/templates/site_vars.html b/{{cookiecutter.project_slug}}/templates/site_vars.html new file mode 100644 index 0000000..484e04d --- /dev/null +++ b/{{cookiecutter.project_slug}}/templates/site_vars.html @@ -0,0 +1,22 @@ +{ + "SITE_TITLE":"{{cookiecutter.SITE_TITLE}}", + "SITE_URL":"{{cookiecutter.SITE_URL}}", + "NAVIGATION":[ + { + "name": "Home", + "url": "/", + }, + {% if not cookiecutter.skip_collection %} + { + "name": "Collection Page", + "url": "/example-page.html", + }, + {% endif %} + {% if not cookiecutter.skip_blog %} + { + "name": "Blog", + "url": "/blog/blog.html", + }, + {% endif %} + ] +} \ No newline at end of file