Skip to content

Commit fbe9bd1

Browse files
displagueJared Kobos
authored andcommitted
add microdata to the events and changelog (linode#239)
1 parent a767b4e commit fbe9bd1

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

themes/dlc/layouts/index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ <h2 class="text-BaseGreenDark font-normal">Events</h2>
4949
{{ range $events }}
5050
{{ $t := (time .Params.end_date) }}
5151
{{ if ge ($t) (now.Unix) }}
52-
<article class="w-full md:w-1/3 px-4 mb-4 md:mb-8 event-item">
52+
<article itemscope="" itemtype="http://schema.org/ExhibitionEvent" class="w-full md:w-1/3 px-4 mb-4 md:mb-8 event-item">
53+
<meta itemprop="attendee" itemscope itemtype="http://schema.org/Organization" content="Linode">
5354
<div class="p-8 h-full bg-ThemeCell tile">
5455
<header>
55-
<h3 class="mt-0 mb-4 font-normal"><a href="{{ .Params.event_url }}" class="text-black tile-link" target="_blank">{{ .Title | markdownify }}</a></h3>
56+
<h3 class="mt-0 mb-4 font-normal"><a itemprop="url" href="{{ .Params.event_url }}" class="text-black tile-link" target="_blank"><span itemprop="name">{{ .Title | markdownify }}</span></a></h3>
5657
</header>
5758
<section>
58-
<div>{{ .Params.location }}</div>
59-
<div>{{ dateFormat "Jan 2, 2006" .Params.start_date }}</div>
60-
<p>{{ .Content }}</p>
59+
<div itemprop="location" itemscope itemtype="http://schema.org/Place"><span itemprop="address">{{ .Params.location }}</span></div>
60+
<div><time itemprop="startDate" datetime="{{ dateFormat "2006-01-02" .Params.start_date }}">{{ dateFormat "Jan 2, 2006" .Params.start_date }}</time></div>
61+
<p itemprop="description">{{ .Content }}</p>
6162
</section>
6263
</div>
6364
</article>
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
<div class="flex flex-wrap">
1+
<div class="flex flex-wrap" itemscope="" itemtype="http://schema.org/CreativeWork">
2+
<meta itemprop="author" content="Linode">
23
<div class="w-full md:w-1/4 py-2 md:p-6 md:text-right mt-1 flex items-center md:block">
3-
<div class="timeago mr-4 md:mr-0" datetime='{{ .Date.Format "2006-01-02T15:04:05-07:00" }}'>{{ .Date }}</div>
4+
<div class="timeago mr-4 md:mr-0" datetime='{{ .Date.Format "2006-01-02T15:04:05-07:00" }}' itemprop="datePublished">{{ .Date }}</div>
45
<div class="text-BaseBlue md:mt-3 flex md:block ">
5-
<span class="changelog-product">{{ delimit .Params.changelog ", "}}</span>
6+
<span class="changelog-product" itemprop="name">{{ delimit .Params.changelog ", "}}</span>
67
{{ if .Params.version }}
7-
<div class="text-BaseBlue ml-4 md:ml-0">{{ .Params.version }}</div>
8+
<div class="text-BaseBlue ml-4 md:ml-0" itemprop="version">{{ .Params.version }}</div>
89
{{ end }}
910
</div>
1011
</div>
1112
<div class="w-full md:w-3/4 py-2 md:p-6">
12-
<h2 class="mt-0 text-2xl font-normal">{{ .Title | markdownify }}</h2>
13-
<div class="changelog-entry">{{ .Content | markdownify }}</div>
13+
<h2 class="mt-0 text-2xl font-normal" itemprop="alternativeHeadline">{{ .Title | markdownify }}</h2>
14+
<div class="changelog-entry" itemprop="disambiguatingDescription">{{ .Content | markdownify }}</div>
1415
</div>
1516
</div>

0 commit comments

Comments
 (0)