Last active
December 10, 2015 20:08
-
-
Save jaddison/4485805 to your computer and use it in GitHub Desktop.
django-simple-templates base.html example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load spurl %} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
{# the `head-gace-js` block is what you would override in your original template to enable a Google Analytics Content Experiment #} | |
{% block head-gace-js %}{% endblock %} | |
{# by placing this canonical link in your base.html <head> section, all A/B template pages benefit - no duplicate content penalties #} | |
<link rel="canonical" href="{% block head-canonical %}{% spurl base=request.get_full_path remove_query_param='ab' %}{% endblock %}"> | |
{# all other <head> section links, scripts, etc... #} | |
</head> | |
<body> | |
{% block content %}{% endblock %} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment