Skip to content

Commit

Permalink
Add Google Scholar meta data (#2191)
Browse files Browse the repository at this point in the history
* Add Google Scholar meta data

* Restrict to English and change Volume and Issue

* Remove Chapter from title and add other meta data
  • Loading branch information
tunetheweb authored May 6, 2021
1 parent a2b469e commit dec026b
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/templates/base/base_chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@
{% block image_height %}433{% endblock %}
{% block image_width %}866{% endblock %}

{% block meta %}
{{ super() }}
{% if lang == "en" %}
<meta name="citation_title" content="{{ self.citation_title() }}">
{% for author in metadata.get('authors') %}
{%- set authordata = config.contributors[author] if author in config.contributors else None -%}
<meta name="citation_author" content="{{ authordata.name if authordata.name else author }}">
{% endfor -%}
{% if date_published and date_published|length > 10 -%}
<meta name="citation_publication_date" content="{{ date_published[0:4] }}/{{ date_published[5:7] }}/{{ date_published[8:10] }}">
{% endif -%}
<meta name="citation_journal_title" content="{{ self.citation_journal_title() }}">
<meta name="citation_volume" content="{{ year|int - 2018 }}">
<meta name="citation_issue" content="{{ chapter_config.chapter_number }}">
<meta name="citation_publisher" content="HTTP Archive">
<meta name="citation_technical_report_institution" content="HTTP Archive">
<meta name="citation_language" content="{{ language }}">
<meta name="citation_fulltext_html_url" content="https://almanac.httparchive.org{{ url_for(request.endpoint, **get_view_args(lang=language.lang_code)) }}">
{% endif %}
{% endblock %}

{% block author_structured_data %}
{% for author in metadata.get('authors') %}{% if loop.length > 1 and loop.index == 1 %}[{% endif -%}
{% set authordata = config.contributors[author] if author in config.contributors else None -%}
Expand Down
2 changes: 2 additions & 0 deletions src/templates/en/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | The Web Almanac by HTTP Archive{% endblock %}
{% block citation_title %}The {{ year }} Web Almanac: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}The {{ year }} Web Almanac{% endblock %}

{% block description %}{{ metadata.get('description',metadata.get('title') + ' chapter of the ' + year + ' Web Almanac probing into the use of ' + metadata.get('description',metadata.get('title')) + ' on the web.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/es/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac por HTTP Archive{% endblock %}
{% block citation_title %}Web Almanac {{ year }}: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}Web Almanac {{ year }}{% endblock %}

{% block description %}{{ metadata.get('description','Capítulo' + metadata.get('title') + ' del Web Almanac '+ year + " explorando el uso de " + metadata.get('description',metadata.get('title')) + ' en la web.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/fr/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Le Web Almanac par HTTP Archive{% endblock %}
{% block citation_title %}Le Web Almanac {{ year }} : {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}Le Web Almanac {{ year }}{% endblock %}

{% block description %}{{ metadata.get('description','Chapitre' + metadata.get('title') + ' du Web Almanac'+ year + " explorant l’utilisation des " + metadata.get('description',metadata.get('title')) + ' sur le web.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/hi/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | HTTP Archive द्वारा Web Almanac{% endblock %}
{% block citation_title %}{{ year }} Web Almanac: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}{{ year }} Web Almanac{% endblock %}

{% block description %}{{ 'Web Almanac ' + year + ' के ' metadata.get('description',metadata.get('title') + ' अध्याय में ' + metadata.get('description',metadata.get('title')) + ' को कवर किया गया है!') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/it/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Il Web Almanac di HTTP Archive{% endblock %}
{% block citation_title %}Il Web Almanac {{ year }}: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}Il Web Almanac {{ year }}{% endblock %}

{% block description %}{{ metadata.get('description','Capitolo' + metadata.get('title') + ' del Web Almanac ' + year + ' esamina l\'uso di ' + metadata.get('description',metadata.get('title')) + ' sul web.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/ja/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | HTTP ArchiveによるWeb Almanac{% endblock %}
{% block citation_title %}{{ year }} Web Almanac: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}{{ year }} Web Almanac{% endblock %}

{% block description %}{{ metadata.get('description',metadata.get('title') + ' の章 ' + year + ' Web Almanacの使用状況を調べる ' + metadata.get('description',metadata.get('title')) + ' をウェブ上で公開しています。') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/nl/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | De Web Almanac door HTTP Archive{% endblock %}
{% block citation_title %}De {{ year }} Web Almanac: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}De {{ year }} Web Almanac{% endblock %}

{% block description %}{{ metadata.get('description',metadata.get('title') + ' hoofdstuk van de ' + year + ' Web Almanac waarin het gebruik van ' + metadata.get('description',metadata.get('title')) + ' op internet wordt onderzocht.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/pt/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac por HTTP Archive{% endblock %}
{% block citation_title %}Web Almanac {{ year }}: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}Web Almanac {{ year }}{% endblock %}

{% block description %}{{ metadata.get('description',metadata.get('title') + ' capítulo do ' + year + ' Web Almanac sondando o uso de ' + metadata.get('description',metadata.get('title')) + ' na web.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/ru/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base//base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac от HTTP Archive{% endblock %}
{% block citation_title %}Web Almanac за {{ year }} год: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}Web Almanac за {{ year }} год{% endblock %}

{% block description %}{{ 'Глава ' + metadata.get('description',metadata.get('title') + ' в Web Almanac за ' + year + ' год разбирает использование ' + metadata.get('description',metadata.get('title')) + ' в вебе.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/tr/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac HTTP Archive&#8217;dan {% endblock %}
{% block citation_title %}{{ year }} Web Almanac: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}{{ year }} Web Almanac{% endblock %}

{% block description %}{{ metadata.get('description', + year + ' Web Almanac&#8217;ın' + metadata.get('title') + ' bölümü ' + ' web üzerinde ' + metadata.get('description',metadata.get('title'))&#8217;ın + kullanımını araştırır.') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/uk/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac від HTTP Archive{% endblock %}
{% block citation_title %}Web Almanac {{ year }}: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}Web Almanac {{ year }}{% endblock %}

{% block description %}'Розділ ' + metadata.get('description',metadata.get('title')) + ' у Web Almanac ' + year + ' досліджує, як використовується ' + metadata.get('description',metadata.get('title')) + ' у вебі.'{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/zh-CN/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac 源于 HTTP Archive{% endblock %}
{% block citation_title %}{{ year }} Web Almanac网络年鉴: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}{{ year }} Web Almanac网络年鉴{% endblock %}

{% block description %}{{ metadata.get('description',metadata.get('title') + ' 章节 ' + year + ' 调查Web Almanac的使用状况 ' + metadata.get('description',metadata.get('title')) + ' 在 web中。') }}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions src/templates/zh-TW/base_chapter.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{% extends "base/base_chapter.html" %}

{% block title %}{{ metadata.get('title') }} | {{ year }} | Web Almanac 精粹自 HTTP Archive{% endblock %}
{% block citation_title %}{{ year }} Web Almanac: {{ metadata.get('title') }}{% endblock %}
{% block citation_journal_title %}{{ year }} Web Almanac{% endblock %}

{% block description %}{{ metadata.get('description',metadata.get('title') + ' 章節 ' + year + ' Web Almanac 探索使用狀況 ' + metadata.get('description',metadata.get('title')) + ' 在網路中。') }}{% endblock %}

Expand Down

0 comments on commit dec026b

Please sign in to comment.