Skip to content

Commit 4e5cfd8

Browse files
author
paul van genuchten
authored
remove schema-org microdata, because it is now embedded as json-ld (#575)
resolves #574
1 parent c111140 commit 4e5cfd8

File tree

13 files changed

+75
-130
lines changed

13 files changed

+75
-130
lines changed

pygeoapi/templates/collection.html

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,10 @@
55
/ <a href="./{{ data['id'] }}">{{ data['title'] }}</a>
66
{% endblock %}
77
{% block body %}
8-
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
9-
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
10-
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
11-
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
12-
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
13-
</span>
14-
<h1 itemprop="name">{{ data['title'] }}</h1>
15-
<meta itemprop="url" content="{{ config['server']['url'] }}" />
16-
<p itemprop="description">{{ data['description'] }}</p>
17-
<p itemprop="keywords">
8+
<section id="collection" >
9+
<h1>{{ data['title'] }}</h1>
10+
<p>{{ data['description'] }}</p>
11+
<p>
1812
{% for kw in data['keywords'] %}
1913
<mark class="tag">{{ kw }}</mark>
2014
{% endfor %}
@@ -24,17 +18,15 @@ <h3>Queryables</h3>
2418
<ul>
2519
<li>
2620
<div>
27-
<meta itemprop="encodingFormat" content="text/html" />
28-
<a title="Display Queryables" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/queryables">
21+
<a title="Display Queryables" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/queryables">
2922
Display Queryables of "{{ data['title'] }}"</a></div>
3023
</li>
3124
</ul>
3225
<h3>View</h3>
3326
<ul>
3427
<li>
35-
<div itemprop="distribution" itemscope itemtype="https://schema.org/DataDownload">
36-
<meta itemprop="encodingFormat" content="text/html" />
37-
<a title="Browse Items" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/items">
28+
<div>
29+
<a title="Browse Items" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/items">
3830
Browse through the items of "{{ data['title'] }}"</a></div>
3931
</li>
4032
</ul>
@@ -44,8 +36,7 @@ <h3>Tiles</h3>
4436
<ul>
4537
<li>
4638
<div>
47-
<meta itemprop="encodingFormat" content="text/html" />
48-
<a title="Display Tiles" itemprop="contentURL" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/tiles">Display Tiles of "{{ data['title'] }}"</a>
39+
<a title="Display Tiles" href="{{ config['server']['url'] }}/collections/{{ data['id'] }}/tiles">Display Tiles of "{{ data['title'] }}"</a>
4940
</div>
5041
</li>
5142
</ul>
@@ -55,10 +46,9 @@ <h3>Tiles</h3>
5546
<h3>Links</h3>
5647
<ul>
5748
{% for link in data['links'] %}
58-
<li itemprop="distribution" itemscope itemtype="https://schema.org/DataDownload">
59-
<a itemprop="contentURL" title="{{ link['rel'] }}" href="{{ link['href'] }}">
60-
<span itemprop="name">{{ link['title'] }}</span> (<span itemprop="encodingFormat">{{ link['type'] }}</span>)
61-
<meta itemprop="inLanguage" content="{{ link['hreflang'] }}" />
49+
<li>
50+
<a title="{{ link['rel'] }}" href="{{ link['href'] }}">
51+
<span>{{ link['title'] }}</span> (<span>{{ link['type'] }}</span>)
6252
</a></li>
6353
{% endfor %}
6454
</ul>

pygeoapi/templates/collections.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
/ <a href="./collections">Collections</a>
55
{% endblock %}
66
{% block body %}
7-
<section id="collections" itemscope itemtype="https://schema.org/DataCatalog">
8-
<meta itemprop="url" content="{{ config['server']['url'] }}" />
9-
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
10-
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
11-
<h2>Collections in this service</h2>
7+
<section id="collections">
8+
<h1>Collections in this service</h1>
129
<table class="striped">
1310
<thead>
1411
<tr>
@@ -18,14 +15,13 @@ <h2>Collections in this service</h2>
1815
</thead>
1916
<tbody>
2017
{% for k, v in filter_dict_by_key_value(config['resources'], 'type', 'collection').items() %}
21-
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
18+
<tr>
2219
<td data-label="name">
23-
<meta itemprop="url" content="{{ config['server']['url'] }}/collections/{{ k }}" />
2420
<a title="{{ v['title'] | striptags | truncate }}"
2521
href="{{ config['server']['url'] }}/collections/{{ k }}">
26-
<span itemprop="name">{{ v['title'] | striptags | truncate }}</span></a>
22+
<span>{{ v['title'] | striptags | truncate }}</span></a>
2723
</td>
28-
<td itemprop="description" data-label="description">
24+
<td data-label="description">
2925
{{ v['description'] | striptags | truncate }}
3026
</td>
3127
</tr>

pygeoapi/templates/domainset.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@
55
/ <a href="../../../collections/{{ data['id'] }}">{{ data['title'] }}</a>
66
{% endblock %}
77
{% block body %}
8-
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
9-
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
10-
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
11-
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
12-
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
13-
</span>
14-
<h1 itemprop="name">{{ data['title'] }}</h1>
15-
<meta itemprop="url" content="{{ config['server']['url'] }}" />
16-
<p itemprop="description">{{ data['description'] }}</p>
8+
<section id="collection">
9+
<h1>{{ data['title'] }}</h1>
10+
<p>{{ data['description'] }}</p>
1711
<h3>Coverage domain set</h3>
1812
<h4>Axis labels</h4>
1913
<ul>

pygeoapi/templates/landing_page.html

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
{% block body %}
44

55
<br/>
6-
<section id="collections" itemscope itemtype="https://schema.org/DataCatalog">
7-
<meta itemprop="url" content="{{ config['server']['url'] }}" />
6+
<section id="collections">
87
<div class="row">
98
<div class="col-md-8 col-sm-12">
109

1110
<section id="identification">
12-
<h1 itemprop="name">{{ config['metadata']['identification']['title'] }}</h1>
13-
<p itemprop="description">{{ config['metadata']['identification']['description'] }}</p>
11+
<h1>{{ config['metadata']['identification']['title'] }}</h1>
12+
<p>{{ config['metadata']['identification']['description'] }}</p>
1413

15-
<p itemprop="keywords">
14+
<p>
1615
{% for kw in config['metadata']['identification']['keywords'] %}
1716
<mark class="tag">{{ kw }}</mark>
1817
{% endfor %}
@@ -36,7 +35,7 @@ <h1 itemprop="name">{{ config['metadata']['identification']['title'] }}</h1>
3635
License
3736
</div>
3837
<div class="col-sm-8">
39-
<a itemprop="license" href="{{ config['metadata']['license']['url'] }}">
38+
<a href="{{ config['metadata']['license']['url'] }}">
4039
{{ config['metadata']['license']['name'] or config['metadata']['license']['url'] }}</a>
4140
</div>
4241
</div>
@@ -82,14 +81,14 @@ <h2>Conformance</h2>
8281
</p>
8382
</section>
8483
</div>
85-
<div class="col-md-4 col-sm-12" itemprop="provider" itemscope itemtype="https://schema.org/Organization">
84+
<div class="col-md-4 col-sm-12">
8685
<div class="card fluid">
8786
<div class="section dark">
8887
<b>Provider</b>
8988
</div>
9089
<div class="section">
91-
<b itemprop="name">{{ config['metadata']['provider']['name'] }}</b><br/>
92-
<a itemprop="url" href="{{ config['metadata']['provider']['url'] }}">{{ config['metadata']['provider']['url'] }}</a><br/>
90+
<b>{{ config['metadata']['provider']['name'] }}</b><br/>
91+
<a href="{{ config['metadata']['provider']['url'] }}">{{ config['metadata']['provider']['url'] }}</a><br/>
9392
</div>
9493
</div>
9594
<div class="card fluid">
@@ -98,35 +97,35 @@ <h2>Conformance</h2>
9897
</div>
9998
<div class="section">
10099
<b>Address</b><br/>
101-
<div class="section" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
102-
<span itemprop="streetAddress">{{ config['metadata']['contact']['address'] }}</span><br/>
103-
<span itemprop="addressLocality">{{ config['metadata']['contact']['city'] }}</span>,
104-
<span itemprop="addressRegion">{{ config['metadata']['contact']['stateorprovince'] }}</span><br/>
105-
<span itemprop="postalCode">{{ config['metadata']['contact']['postalcode'] }}</span><br/>
106-
<span itemprop="addressCountry">{{ config['metadata']['contact']['country'] }}</span>
100+
<div class="section">
101+
<span>{{ config['metadata']['contact']['address'] }}</span><br/>
102+
<span>{{ config['metadata']['contact']['city'] }}</span>,
103+
<span>{{ config['metadata']['contact']['stateorprovince'] }}</span><br/>
104+
<span>{{ config['metadata']['contact']['postalcode'] }}</span><br/>
105+
<span>{{ config['metadata']['contact']['country'] }}</span>
107106
</div>
108-
<div itemprop="contactPoint" itemscope itemtype="https://schema.org/ContactPoint">
107+
<div>
109108
<b>Email</b><br/>
110-
<span itemprop="Email"><a href="mailto:{{ config['metadata']['contact']['email'] }}">{{ config['metadata']['contact']['email'] }}</a></span><br/>
109+
<span><a href="mailto:{{ config['metadata']['contact']['email'] }}">{{ config['metadata']['contact']['email'] }}</a></span><br/>
111110
{% if config['metadata']['contact']['phone'] %}
112111
<b>Telephone</b><br/>
113-
<span itemprop="Telephone"><a href="tel:{{ config['metadata']['contact']['phone'] }}">{{ config['metadata']['contact']['phone'] }}</a></span><br/>
112+
<span><a href="tel:{{ config['metadata']['contact']['phone'] }}">{{ config['metadata']['contact']['phone'] }}</a></span><br/>
114113
{% endif %}
115114
{% if config['metadata']['contact']['fax'] %}
116115
<b>Fax</b><br/>
117-
<span itemprop="faxNumber"><a href="tel:{{ config['metadata']['contact']['fax'] }}">{{ config['metadata']['contact']['fax'] }}</a></span><br/>
116+
<span><a href="tel:{{ config['metadata']['contact']['fax'] }}">{{ config['metadata']['contact']['fax'] }}</a></span><br/>
118117
{% endif %}
119118
{% if config['metadata']['contact']['url'] %}
120119
<b>Contact URL</b><br/>
121-
<span itemprop="url"><a href="{{ config['metadata']['contact']['url'] }}">{{ config['metadata']['contact']['url'] }}</a></span><br/>
120+
<span><a href="{{ config['metadata']['contact']['url'] }}">{{ config['metadata']['contact']['url'] }}</a></span><br/>
122121
{% endif %}
123122
{% if config['metadata']['contact']['hours'] %}
124123
<b>Hours</b><br/>
125-
<span itemprop="hoursAvailable">{{ config['metadata']['contact']['hours'] }}</span><br/>
124+
<span>{{ config['metadata']['contact']['hours'] }}</span><br/>
126125
{% endif %}
127126
{% if config['metadata']['contact']['instructions'] %}
128127
<b>Contact instructions</b><br/>
129-
<span itemprop="contactType">{{ config['metadata']['contact']['instructions'] }}</span>
128+
<span>{{ config['metadata']['contact']['instructions'] }}</span>
130129
{% endif %}
131130
</div>
132131
</div>

pygeoapi/templates/process.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
/ <a href="./{{ data['id'] }}">{{ data['title'] }}</a>
66
{% endblock %}
77
{% block body %}
8-
<section id="processes" itemscope itemtype="https://schema.org/WebAPI">
9-
<h2 itemprop="name">{{ data['title'] }}</h2>
10-
<div itemprop="description">{{ data['description'] }}</div>
11-
<meta itemprop="url" content="{{ config['server']['url'] }}/processes/{{ data['id'] }}" />
8+
<section id="processes">
9+
<h2>{{ data['title'] }}</h2>
10+
<div>{{ data['description'] }}</div>
1211
<div class="row">
1312
<div class="col-sm-12 col-md-6">
1413
<table class="striped">
@@ -22,10 +21,10 @@ <h2 itemprop="name">{{ data['title'] }}</h2>
2221
</thead>
2322
<tbody>
2423
{% for input_ in data['inputs'] %}
25-
<tr itemprop="parameter" itemscope itemtype="https://schema.org/Parameter">
26-
<td itemprop="id" data-label="name">{{ input_['id'] }}</td>
27-
<td itemprop="name" data-label="title">{{ input_['title'] }}</td>
28-
<td itemprop="description" data-label="description">
24+
<tr>
25+
<td data-label="name">{{ input_['id'] }}</td>
26+
<td data-label="title">{{ input_['title'] }}</td>
27+
<td data-label="description">
2928
{{ input_['description'] | striptags | truncate }}
3029
</td>
3130
</tr>
@@ -38,7 +37,7 @@ <h2>Links</h2>
3837
<ul>
3938
{% for link in data['links'] %}
4039
<li>
41-
<a itemprop="documentation" title="{{ link['rel'] }}" href="{{ link['href'] }}">
40+
<a title="{{ link['rel'] }}" href="{{ link['href'] }}">
4241
{{ link['title'] }} ({{ link['type'] }})
4342
</a></li>
4443
{% endfor %}

pygeoapi/templates/processes.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ <h2>Processes available on this service</h2>
1919
</thead>
2020
<tbody>
2121
{% for p in data['processes'] %}
22-
<tr itemscope itemtype="https://schema.org/WebAPI">
23-
<td itemprop="name" data-label="name">
24-
<meta itemprop="url" content="{{ config['server']['url'] }}/processes/{{ p['id'] }}" />
22+
<tr>
23+
<td data-label="name">
2524
<a title="{{ p['title'] | striptags | truncate }}" href="{{ config['server']['url'] }}/processes/{{ p['id'] }}">{{ p['title'] | striptags | truncate }}</a>
2625
</td>
27-
<td itemprop="description" data-label="description">
26+
<td data-label="description">
2827
{{ p['description'] | striptags | truncate }}
2928
</td>
3029
</tr>

pygeoapi/templates/queryables.html

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,10 @@
66
/ <a href="./{{ data['id'] }}queryables">Queryables</a>
77
{% endblock %}
88
{% block body %}
9-
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
10-
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
11-
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
12-
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
13-
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
14-
</span>
15-
<h1 itemprop="name">{{ data['title'] }}</h1>
16-
<meta itemprop="url" content="{{ config['server']['url'] }}" />
17-
<p itemprop="description">{{ data['description'] }}</p>
18-
<p itemprop="keywords">
9+
<section id="collection">
10+
<h1>{{ data['title'] }}</h1>
11+
<p>{{ data['description'] }}</p>
12+
<p>
1913
{% for kw in data['keywords'] %}
2014
<mark class="tag">{{ kw }}</mark>
2115
{% endfor %}

pygeoapi/templates/rangetype.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@
55
/ <a href="../../../collections/{{ data['id'] }}">{{ data['title'] }}</a>
66
{% endblock %}
77
{% block body %}
8-
<section id="collection" itemscope itemtype="https://schema.org/Dataset">
9-
<span itemprop="includedInDataCatalog" itemscope itemtype="https://schema.org/DataCatalog">
10-
<meta itemprop="url" content="{{ config['server']['url'] }}/collections" />
11-
<meta itemprop="name" content="{{ config['metadata']['identification']['title'] | striptags }}" />
12-
<meta itemprop="description" content="{{ config['metadata']['identification']['description'] | striptags }}" />
13-
</span>
14-
<h1 itemprop="name">{{ data['title'] }}</h1>
15-
<meta itemprop="url" content="{{ config['server']['url'] }}" />
16-
<p itemprop="description">{{ data['description'] }}</p>
8+
<section id="collection">
9+
<h1>{{ data['title'] }}</h1>
10+
<p>{{ data['description'] }}</p>
1711
<h3>Coverage range type</h3>
1812
<h4>Fields</h4>
1913
<ul>

pygeoapi/templates/stac/catalog.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ <h2>Links</h2>
2020
<tbody>
2121
{% for link in data['links'] %}
2222
{% if link['type'] == 'text/html' and link['rel'] in ['child', 'item'] %}
23-
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
23+
<tr>
2424
<td data-label="name">
25-
<meta itemprop="url" content="{{ link['href'] }}"/>
2625
<a title="{{ link['href'] }}" href="{{ link['href'] }}">
27-
<span itemprop="name">{{ link['href'] | get_path_basename }}</span></a>
26+
<span>{{ link['href'] | get_path_basename }}</span></a>
2827
</td>
2928
</tr>
3029
{% endif %}

pygeoapi/templates/stac/item.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,10 @@ <h4>Assets</h4>
3434
</thead>
3535
<tbody>
3636
{% for k, link in data['assets'].items() %}
37-
<tr itemprop="dataset" itemscope itemtype="https://schema.org/Dataset">
37+
<tr>
3838
<td data-label="name">
39-
<meta itemprop="url" content="{{ link['href'] }}"/>
4039
<a title="{{ link['href'] }}" href="{{ link['href'] }}">
41-
<span itemprop="name">{{ link['href'] | get_path_basename }}</span></a>
40+
<span>{{ link['href'] | get_path_basename }}</span></a>
4241
</td>
4342
</tr>
4443
{% endfor %}

0 commit comments

Comments
 (0)