Skip to content

Commit 3be1fbd

Browse files
authored
Add comprehensive structured data markup for enhanced SEO (#28)
1 parent 876fc48 commit 3be1fbd

File tree

9 files changed

+350
-4
lines changed

9 files changed

+350
-4
lines changed

html/base.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
44
<title>{{ title }}</title>
55
<meta http-equiv="content-type" content="text/html; charset=utf-8">
@@ -18,6 +18,14 @@
1818
<meta property="og:type" content="website" />
1919
<meta name="twitter:card" content="summary_large_image" />
2020

21+
{% if url %}
22+
<link rel="canonical" href="{{ SITE_URL }}{{ url }}" />
23+
<meta property="og:url" content="{{ SITE_URL }}{{ url }}" />
24+
{% else %}
25+
<link rel="canonical" href="{{ SITE_URL }}/" />
26+
<meta property="og:url" content="{{ SITE_URL }}/" />
27+
{% endif %}
28+
2129
<link rel="apple-touch-icon" href="{{ SITE_URL }}/favicon.png" />
2230

2331
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />

html/best.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,52 @@
11
{% extends "base.html" %}
2+
3+
{% block extra_head %}
4+
<script type="application/ld+json">
5+
{
6+
"@context": "https://schema.org",
7+
"@type": "CollectionPage",
8+
"name": "{{ title }}",
9+
"description": "{{ description }}",
10+
"url": "{{ SITE_URL }}/best/",
11+
"mainEntity": {
12+
"@type": "ItemList",
13+
"name": "Best Vegan Restaurants in San Francisco Bay Area",
14+
"description": "The official V.I.L.F list of the best vegan restaurants in the San Francisco Bay Area, ranked by taste and value",
15+
"numberOfItems": {{ places|length }},
16+
"itemListOrder": "https://schema.org/ItemListOrderDescending",
17+
"itemListElement": [
18+
{% for place in places %}
19+
{
20+
"@type": "ListItem",
21+
"position": {{ loop.index }},
22+
"item": {
23+
"@type": "Restaurant",
24+
"name": "{{ place.name }}",
25+
"url": "{{ SITE_URL }}{{ place.url }}",
26+
"address": {
27+
"@type": "PostalAddress",
28+
"streetAddress": "{{ place.address }}",
29+
"addressLocality": "{{ place.area }}",
30+
"addressRegion": "CA",
31+
"addressCountry": "US"
32+
},
33+
"servesCuisine": "{{ place.cuisine }}",
34+
"aggregateRating": {
35+
"@type": "AggregateRating",
36+
"ratingValue": "{{ (place.taste + 1) }}",
37+
"bestRating": "4",
38+
"worstRating": "1",
39+
"ratingCount": "1"
40+
}
41+
}
42+
}{% if not loop.last %},{% endif %}
43+
{% endfor %}
44+
]
45+
}
46+
}
47+
</script>
48+
{% endblock %}
49+
250
{% block content %}
351
<section class="content">
452
<h1 class="page-header">The Official V.I.L.F List</h1>

html/cuisine.html

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,74 @@
11
{% extends "base.html" %}
2+
3+
{% block extra_head %}
4+
<script type="application/ld+json">
5+
{
6+
"@context": "https://schema.org",
7+
"@type": "CollectionPage",
8+
"name": "{{ title }}",
9+
"description": "{{ description }}",
10+
"url": "{{ SITE_URL }}/cuisines/{{ cuisine.lower().replace(' ','-') }}/",
11+
"mainEntity": {
12+
"@type": "ItemList",
13+
"name": "Vegan {{ cuisine }} Restaurants in San Francisco Bay Area",
14+
"description": "A curated list of the best vegan {{ cuisine }} restaurants in the San Francisco Bay Area",
15+
"numberOfItems": {{ places|length }},
16+
"itemListElement": [
17+
{% for place in places %}
18+
{
19+
"@type": "ListItem",
20+
"position": {{ loop.index }},
21+
"item": {
22+
"@type": "Restaurant",
23+
"name": "{{ place.name }}",
24+
"url": "{{ SITE_URL }}{{ place.url }}",
25+
"address": {
26+
"@type": "PostalAddress",
27+
"streetAddress": "{{ place.address }}",
28+
"addressLocality": "{{ place.area }}",
29+
"addressRegion": "CA",
30+
"addressCountry": "US"
31+
},
32+
"servesCuisine": "{{ place.cuisine }}",
33+
"aggregateRating": {
34+
"@type": "AggregateRating",
35+
"ratingValue": "{{ (place.taste + 1) }}",
36+
"bestRating": "4",
37+
"worstRating": "1",
38+
"ratingCount": "1"
39+
}
40+
}
41+
}{% if not loop.last %},{% endif %}
42+
{% endfor %}
43+
]
44+
},
45+
"breadcrumb": {
46+
"@type": "BreadcrumbList",
47+
"itemListElement": [
48+
{
49+
"@type": "ListItem",
50+
"position": 1,
51+
"name": "Home",
52+
"item": "{{ SITE_URL }}/"
53+
},
54+
{
55+
"@type": "ListItem",
56+
"position": 2,
57+
"name": "Cuisines",
58+
"item": "{{ SITE_URL }}/cuisines/"
59+
},
60+
{
61+
"@type": "ListItem",
62+
"position": 3,
63+
"name": "{{ cuisine }}",
64+
"item": "{{ SITE_URL }}/cuisines/{{ cuisine.lower().replace(' ','-') }}/"
65+
}
66+
]
67+
}
68+
}
69+
</script>
70+
{% endblock %}
71+
272
{% block content %}
373
<section class="content">
474
<h1 class="page-header">Vegan {{ cuisine }} food in the San Francisco Bay Area</h1>

html/latest.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,60 @@
11
{% extends "base.html" %}
2+
3+
{% block extra_head %}
4+
<script type="application/ld+json">
5+
{
6+
"@context": "https://schema.org",
7+
"@type": "CollectionPage",
8+
"name": "{{ title }}",
9+
"description": "{{ description }}",
10+
"url": "{{ SITE_URL }}/latest/",
11+
"mainEntity": {
12+
"@type": "ItemList",
13+
"name": "Latest Vegan Restaurant Reviews in San Francisco Bay Area",
14+
"description": "The most recent vegan restaurant reviews from V.I.L.F in the San Francisco Bay Area",
15+
"numberOfItems": {{ places|length }},
16+
"itemListOrder": "https://schema.org/ItemListOrderDescending",
17+
"itemListElement": [
18+
{% for place in places %}
19+
{
20+
"@type": "ListItem",
21+
"position": {{ loop.index }},
22+
"item": {
23+
"@type": "Review",
24+
"itemReviewed": {
25+
"@type": "Restaurant",
26+
"name": "{{ place.name }}",
27+
"url": "{{ SITE_URL }}{{ place.url }}",
28+
"address": {
29+
"@type": "PostalAddress",
30+
"streetAddress": "{{ place.address }}",
31+
"addressLocality": "{{ place.area }}",
32+
"addressRegion": "CA",
33+
"addressCountry": "US"
34+
},
35+
"servesCuisine": "{{ place.cuisine }}"
36+
},
37+
"reviewRating": {
38+
"@type": "Rating",
39+
"ratingValue": "{{ (place.taste + 1) }}",
40+
"bestRating": "4",
41+
"worstRating": "1"
42+
},
43+
"author": {
44+
"@type": "Organization",
45+
"name": "Vegans In Love with Food"
46+
},
47+
"datePublished": "{{ place.visited }}",
48+
"reviewBody": "{{ place.blurb | replace('"', '\\"') }}"
49+
}
50+
}{% if not loop.last %},{% endif %}
51+
{% endfor %}
52+
]
53+
}
54+
}
55+
</script>
56+
{% endblock %}
57+
258
{% block content %}
359
<section class="content">
460
<h1 class="page-header">Latest Reviews</h1>

html/map.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,69 @@
22
{% block extra_head %}
33
<script src="https://unpkg.com/maplibre-gl@1.15.2/dist/maplibre-gl.js"></script>
44
<link href="https://unpkg.com/maplibre-gl@1.15.2/dist/maplibre-gl.css" rel="stylesheet" />
5+
6+
<script type="application/ld+json">
7+
{
8+
"@context": "https://schema.org",
9+
"@type": "WebSite",
10+
"name": "Vegans In Love with Food",
11+
"alternateName": "V.I.L.F",
12+
"url": "{{ SITE_URL }}",
13+
"description": "{{ description }}",
14+
"potentialAction": {
15+
"@type": "SearchAction",
16+
"target": {
17+
"@type": "EntryPoint",
18+
"urlTemplate": "{{ SITE_URL }}/cuisines/{search_term_string}/"
19+
},
20+
"query-input": "required name=search_term_string"
21+
},
22+
"publisher": {
23+
"@type": "Organization",
24+
"name": "Vegans In Love with Food",
25+
"url": "{{ SITE_URL }}",
26+
"logo": "{{ SITE_URL }}/favicon.png",
27+
"sameAs": [
28+
"https://www.instagram.com/VILF_SF/",
29+
"https://news.vilf.org"
30+
]
31+
}
32+
}
33+
</script>
34+
35+
<script type="application/ld+json">
36+
{
37+
"@context": "https://schema.org",
38+
"@type": "Organization",
39+
"name": "Vegans In Love with Food",
40+
"alternateName": "V.I.L.F",
41+
"url": "{{ SITE_URL }}",
42+
"logo": "{{ SITE_URL }}/favicon.png",
43+
"description": "A collaborative and critical project that aims to showcase the ubiquity of good vegan food in the San Francisco Bay Area",
44+
"foundingLocation": {
45+
"@type": "Place",
46+
"name": "San Francisco Bay Area",
47+
"geo": {
48+
"@type": "GeoCoordinates",
49+
"latitude": 37.7749,
50+
"longitude": -122.4194
51+
}
52+
},
53+
"areaServed": {
54+
"@type": "Place",
55+
"name": "San Francisco Bay Area"
56+
},
57+
"contactPoint": {
58+
"@type": "ContactPoint",
59+
"email": "contact@vilf.org",
60+
"contactType": "customer service"
61+
},
62+
"sameAs": [
63+
"https://www.instagram.com/VILF_SF/",
64+
"https://news.vilf.org"
65+
]
66+
}
67+
</script>
568
{% endblock %}
669
{% block content %}
770

html/place.html

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,92 @@
11
{% extends "base.html" %}
2+
3+
{% block extra_head %}
4+
<script type="application/ld+json">
5+
{
6+
"@context": "https://schema.org",
7+
"@type": "Restaurant",
8+
"name": "{{ name }}",
9+
"description": "{{ description }}",
10+
"url": "{{ SITE_URL }}{{ url }}",
11+
"address": {
12+
"@type": "PostalAddress",
13+
"streetAddress": "{{ address }}",
14+
"addressLocality": "{{ area }}",
15+
"addressRegion": "CA",
16+
"addressCountry": "US"
17+
},
18+
"geo": {
19+
"@type": "GeoCoordinates",
20+
"latitude": {{ lat }},
21+
"longitude": {{ lon }}
22+
},
23+
"servesCuisine": "{{ cuisine }}",
24+
"priceRange": "$",
25+
"acceptsReservations": "False",
26+
{% if phone %}"telephone": "{{ phone }}",{% endif %}
27+
{% if menu %}"hasMenu": "{{ menu }}",{% endif %}
28+
{% if food_image_path %}"image": "{{ SITE_URL }}{{ food_image_path }}",{% endif %}
29+
"aggregateRating": {
30+
"@type": "AggregateRating",
31+
"ratingValue": "{{ (taste + 1) }}",
32+
"bestRating": "4",
33+
"worstRating": "1",
34+
"ratingCount": "1"
35+
},
36+
"review": {
37+
"@type": "Review",
38+
"reviewRating": {
39+
"@type": "Rating",
40+
"ratingValue": "{{ (taste + 1) }}",
41+
"bestRating": "4",
42+
"worstRating": "1"
43+
},
44+
"author": {
45+
"@type": "Organization",
46+
"name": "Vegans In Love with Food"
47+
},
48+
"datePublished": "{{ visited }}",
49+
"reviewBody": "{{ blurb | replace('"', '\\"') }}",
50+
"publisher": {
51+
"@type": "Organization",
52+
"name": "Vegans In Love with Food",
53+
"url": "{{ SITE_URL }}"
54+
}
55+
},
56+
"openingHours": [],
57+
"paymentAccepted": "Cash, Credit Card",
58+
"currenciesAccepted": "USD"
59+
}
60+
</script>
61+
62+
<script type="application/ld+json">
63+
{
64+
"@context": "https://schema.org",
65+
"@type": "BreadcrumbList",
66+
"itemListElement": [
67+
{
68+
"@type": "ListItem",
69+
"position": 1,
70+
"name": "Home",
71+
"item": "{{ SITE_URL }}/"
72+
},
73+
{
74+
"@type": "ListItem",
75+
"position": 2,
76+
"name": "{{ cuisine }} Restaurants",
77+
"item": "{{ SITE_URL }}/cuisines/{{ cuisine.lower().replace(' ','-') }}/"
78+
},
79+
{
80+
"@type": "ListItem",
81+
"position": 3,
82+
"name": "{{ name }}",
83+
"item": "{{ SITE_URL }}{{ url }}"
84+
}
85+
]
86+
}
87+
</script>
88+
{% endblock %}
89+
290
{% block content %}
391
<section class="content">
492
<h1 class="name">{{ name }}</h1>

places/delah-coffee.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Delah Coffee
3-
cuisine: Yemeni
3+
cuisine: Middle Eastern
44
address: 370 4th St
55
area: Soma
66
lat: 37.78101652708919

places/yemen-kitchen.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Yemen Kitchen
3-
cuisine: Yemeni
3+
cuisine: Middle Eastern
44
address: 219 Jones St
55
area: Tenderloin
66
lat: 37.78332190211085

0 commit comments

Comments
 (0)