From 0fd1bc9690ce7b1be70fcc2a3fc845549da7d660 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 13 Apr 2015 15:07:49 -0500 Subject: Add JSON-LD search engine configuration Implemented as documented here: http://googlewebmastercentral.blogspot.com/2014/09/improved-sitelinks-search-box.html Signed-off-by: Dan McGee --- public/views.py | 2 ++ templates/base.html | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/public/views.py b/public/views.py index 7dd0528c..16f5db22 100644 --- a/public/views.py +++ b/public/views.py @@ -25,10 +25,12 @@ def index(request): else: def updates(): return get_recent_updates() + domain = "%s://%s" % (request.scheme, request.META['HTTP_HOST']) context = { 'news_updates': News.objects.order_by('-postdate', '-id')[:15], 'pkg_updates': updates, 'staff_groups': StaffGroup.objects.all(), + 'domain': domain, } return render(request, 'public/index.html', context) diff --git a/templates/base.html b/templates/base.html index f6fe99e5..fae2037e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -81,6 +81,18 @@ the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.

+ {% block script_block %}{% endblock %} -- cgit v1.2.3-55-g3dc8