Skip to content

Commit 97125bb

Browse files
committed
fix: Remove attempts at page-specific metadata extraction
1 parent 2bf0414 commit 97125bb

2 files changed

Lines changed: 12 additions & 22 deletions

File tree

src/_templates/layout.html

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
{% extends "!layout.html" %}
2-
32
{%- block extrahead %}
43
{{ super() }}
5-
6-
{% set metadata = meta if meta is defined and meta is not none else {} %}
74
{% set site_name = "University of Alabama Libraries Scholarly API Cookbook" %}
85
{% set base = (html_baseurl or "https://ua-libraries-research-data-services.github.io/UALIB_ScholarlyAPI_Cookbook/") %}
96
{% set page_url = base ~ pagename ~ ('' if pagename.endswith('.html') else '.html') %}
10-
11-
{# Prefer page description; fallback to a global site description #}
12-
{% set site_desc = "Example tutorials for working with scholarly APIs for academic scholarly research and teaching using Python and R." %}
13-
{% set page_desc = metadata.get("description") %}
14-
{% set desc = page_desc or site_desc %}
15-
16-
{% set og_title = metadata.get("og:title") or (title|striptags) %}
17-
{% set og_type = metadata.get("og:type") or "website" %}
18-
19-
<!-- Canonical Link -->
7+
<!-- Canonical Link and Sitemap -->
208
<link rel="canonical" href="{{ page_url }}" />
21-
9+
<link rel="sitemap" type="application/xml" title="Sitemap" href="{{ base }}sitemap.xml">
10+
{% set og_title = title|striptags %}
11+
{% set site_desc = "Example tutorials for working with scholarly APIs for academic research and teaching using Python and R." %}
2212
<!-- Open Graph -->
2313
<meta property="og:site_name" content="{{ site_name }}" />
2414
<meta property="og:title" content="{{ og_title }}" />
25-
<meta property="og:description" content="{{ desc }}" />
26-
<meta property="og:type" content="{{ og_type }}" />
15+
<meta property="og:description" content="{{ site_desc }}" />
16+
<meta property="og:type" content="website" />
2717
<meta property="og:url" content="{{ page_url }}" />
28-
18+
<!-- Twitter Card -->
19+
<meta name="twitter:card" content="summary_large_image" />
20+
<meta name="twitter:title" content="{{ og_title }}" />
21+
<meta name="twitter:description" content="{{ site_desc }}" />
22+
<meta name="twitter:image" content="{{ base }}images/UALIB_logo.png">
23+
<meta name="twitter:image:alt" content="{{ title }}">
2924
<!-- LD+JSON -->
3025
<script type="application/ld+json">
3126
{
@@ -102,5 +97,4 @@
10297
]
10398
}
10499
</script>
105-
106100
{%- endblock %}

src/about/introduction.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. meta::
2-
:title: Scholarly API Cookbook Introduction
3-
:og:type: article
4-
51
Introduction
62
%%%%%%%%%%%%%%
73

0 commit comments

Comments
 (0)