diff --git a/lemoncurry/templates/lemoncurry/layout.html b/lemoncurry/templates/lemoncurry/layout.html index ad23434..23cd92e 100644 --- a/lemoncurry/templates/lemoncurry/layout.html +++ b/lemoncurry/templates/lemoncurry/layout.html @@ -30,7 +30,11 @@ {% block main %}{% endblock %} - + diff --git a/lemoncurry/templatetags/lemoncurry_tags.py b/lemoncurry/templatetags/lemoncurry_tags.py index 816a12e..ed8b6ff 100644 --- a/lemoncurry/templatetags/lemoncurry_tags.py +++ b/lemoncurry/templatetags/lemoncurry_tags.py @@ -1,8 +1,19 @@ +import json +from os.path import join + from django import template from django.conf import settings register = template.Library() + +@register.simple_tag +def get_package_json(): + with open(join(settings.BASE_DIR, 'package.json')) as f: + package = json.load(f) + return package + + @register.simple_tag def site_name(): return settings.LEMONCURRY_SITE_NAME