Unverified Commit b95d1a8e authored by str4d's avatar str4d
Browse files

Customise the meta description to describe the URL

This is useful when pasting permalinks into apps that show the description in a
summary of the page.
parent 33b2a3d6
......@@ -2,7 +2,7 @@
<html>
<head>
<title>{% block title %}MyProject's Speed Center{% endblock %}</title>
<meta name="description" content="A performance analysis tool for software projects. It shows performance regresions and allows comparing different applications or implementations">
<meta name="description" content="{% block description %}A performance analysis tool for software projects. It shows performance regresions and allows comparing different applications or implementations{% endblock %}">
<meta name="keywords" content="performance, test, plots, charts">
<meta charset="UTF-8">
<link href="{{ STATIC_URL }}css/main.css" rel="stylesheet" type="text/css">
......
{% extends "codespeed/base_site.html" %}
{% block title %}{{ block.super }}: Changes{% endblock %}
{% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block navigation %}
{{ block.super }}
......
{% extends "codespeed/base_site.html" %}
{% block title %}{{ block.super }}: Timeline{% endblock %}
{% block description %}{% if pagedesc %}{{ pagedesc }}{% else %}{{ block.super }}{% endif %}{% endblock %}
{% block extra_head %}
{{ block.super }}
......
......@@ -463,11 +463,17 @@ def timeline(request):
defaultextr = "on"
# Information for template
if defaultbenchmark in ['grid', 'show_none']:
pagedesc = None
else:
pagedesc = "Results timeline for the '%s' benchmark (project %s)" % \
(defaultbenchmark, defaultproject)
executables = {}
for proj in Project.objects.filter(track=True):
executables[proj] = Executable.objects.filter(project=proj)
use_median_bands = hasattr(settings, 'USE_MEDIAN_BANDS') and settings.USE_MEDIAN_BANDS
return render_to_response('codespeed/timeline.html', {
'pagedesc': pagedesc,
'checkedexecutables': checkedexecutables,
'defaultbaseline': defaultbaseline,
'baseline': baseline,
......@@ -611,7 +617,10 @@ def changes(request):
]
revisionlists = json.dumps(revisionlists)
pagedesc = "Report of %s performance changes for commit %s on branch %s" % \
(defaultexecutable, selectedrevision.commitid, selectedrevision.branch)
return render_to_response('codespeed/changes.html', {
'pagedesc': pagedesc,
'defaultenvironment': defaultenv,
'defaultexecutable': defaultexecutable,
'selectedrevision': selectedrevision,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment