Skip to content

Commit

Permalink
Merge branch 'develop' into feature/531_og_info
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasGe committed Jun 2, 2020
2 parents 06b9743 + cadcb3c commit fe68657
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 1 deletion.
7 changes: 7 additions & 0 deletions atramhasis/templates/concept.jinja2
Expand Up @@ -7,6 +7,13 @@
{% if concept.notes|length > 0 %}
<meta name="og:description" content="{{ concept.notes[0]|safe }}" />
{% endif %}
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="{{ request.registry.settings['twitter.site']}}" />
<meta name="twitter:title" content="{{ concept.label(request.locale_name).label|safe }}" />
{% if concept.notes|length > 0 %}
<meta name="twitter:description" content="{{ concept.notes[0]|safe }}" />
{% endif %}
<link rel="canonical" href="{{ request.route_url('concept', scheme_id=scheme_id, c_id=concept.concept_id) }}" />
{% endblock %}
{% block html_title %}{{ concept.label(request.locale_name).label|title }}{% endblock %}

Expand Down
7 changes: 7 additions & 0 deletions atramhasis/templates/conceptscheme.jinja2
Expand Up @@ -7,6 +7,13 @@
{% if conceptscheme.notes|length > 0 %}
<meta name="og:description" content="{{ conceptscheme.notes[0]|safe }}" />
{% endif %}
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="{{ request.registry.settings['twitter.site']}}" />
<meta name="twitter:title" content="{{ conceptscheme.title }}" />
{% if conceptscheme.notes|length > 0 %}
<meta name="twitter:description" content="{{ conceptscheme.notes[0]|safe }}" />
{% endif %}
<link rel="canonical" href="{{ request.route_url('conceptscheme', scheme_id=conceptscheme.scheme_id) }}" />
{% endblock %}
{% block html_title %}{{ conceptscheme.title }}{% endblock %}

Expand Down
5 changes: 4 additions & 1 deletion atramhasis/templates/home.jinja2
@@ -1,5 +1,8 @@
{% extends "layout.jinja2" %}

{% block head %}
{{ super() }}
<link rel="canonical" href="{{ request.route_url('home') }}" />
{% endblock %}
{% set app_package = app_package|default('atramhasis', true) %}
{% set copyright_year = copyright_year|default('2016-2017') %}

Expand Down
2 changes: 2 additions & 0 deletions atramhasis/templates/staticlayout.jinja2
Expand Up @@ -7,6 +7,7 @@
{% set copyright_year = copyright_year|default('2016-2017') %}

<head>
{% block head %}
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{ app_name }} - {% block html_title %}Base{% endblock %}</title>
Expand Down Expand Up @@ -35,6 +36,7 @@
{{ ga_tracker(ga_key) }}
{% endif %}
{% endblock %}
{% endblock %}
</head>
<body>
{% block vl_header %}
Expand Down
3 changes: 3 additions & 0 deletions development.ini
Expand Up @@ -61,6 +61,9 @@ atramhasis.rdf2hdt = /link/to/rdf2hdt
# If unspecified, defaults to src.
dojo.mode = src

# The Twitter @username the card should be attributed to.
twitter.site =

# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
Expand Down
3 changes: 3 additions & 0 deletions production.ini
Expand Up @@ -29,6 +29,9 @@ atramhasis.session_factory.secret = 1ts_4#s33kr33t
# If unspecified, defaults to src.
dojo.mode = dist

# The Twitter @username the card should be attributed to.
twitter.site = @@twitter.site@@

[server:main]
use = egg:waitress#main
host = 0.0.0.0
Expand Down

0 comments on commit fe68657

Please sign in to comment.