Skip to content

Commit 4fbfcf2

Browse files
author
Kayla Wilkins
committed
adding microdata to events and changelog
1 parent baf2ced commit 4fbfcf2

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

src/components/2_molecules/changelog-item.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,36 @@ import React from "react";
22
import PropTypes from "prop-types";
33

44
const ChangelogItem = ({ title, date, version, html }) => (
5-
<div className="flex flex-wrap">
5+
<div
6+
className="flex flex-wrap"
7+
itemscope=""
8+
itemtype="http://schema.org/CreativeWork"
9+
>
10+
<meta itemprop="author" content="Linode" />
611
<div className="w-full md:w-1/4 py-2 md:p-6 md:text-right mt-1 flex items-center md:block">
7-
<div className="timeago mr-4 md:mr-0" dateTime="">
12+
<div
13+
className="timeago mr-4 md:mr-0"
14+
dateTime=""
15+
itemprop="datePublished"
16+
>
817
{date}
918
</div>
1019
<div className="text-BaseBlue md:mt-3 flex md:block ">
11-
<span className="changelog-product" />
12-
{version && <div className="text-BaseBlue ml-4 md:ml-0">{version}</div>}
20+
<span className="changelog-product" itemprop="name" />
21+
{version && (
22+
<div className="text-BaseBlue ml-4 md:ml-0" itemprop="version">
23+
{version}
24+
</div>
25+
)}
1326
</div>
1427
</div>
1528
<div className="w-full md:w-3/4 py-2 md:p-6">
16-
<h2 className="mt-0 text-2xl font-normal">{title}</h2>
29+
<h2 className="mt-0 text-2xl font-normal" itemprop="alternativeHeadline">
30+
{title}
31+
</h2>
1732
<div
1833
className="changelog-entry"
34+
itemprop="disambiguatingDescription"
1935
dangerouslySetInnerHTML={{ __html: html }}
2036
/>
2137
</div>

src/pages/index.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,15 @@ const IndexPage = ({ data }) => {
117117
<article
118118
className="w-full md:w-1/3 px-4 mb-4 md:mb-8"
119119
key={edge.node.id}
120+
itemscope=""
121+
itemtype="http://schema.org/ExhibitionEvent"
120122
>
123+
<meta
124+
itemprop="attendee"
125+
itemscope
126+
itemtype="http://schema.org/Organization"
127+
content="Linode"
128+
/>
121129
<div className="p-8 h-full bg-ThemeCell tile">
122130
<header>
123131
<h3 className="mt-0 mb-4 font-normal">
@@ -126,16 +134,31 @@ const IndexPage = ({ data }) => {
126134
className="text-black tile-link"
127135
target="_blank"
128136
rel="noopener noreferrer"
137+
itemprop="url"
129138
>
130-
{frontmatter.title}
139+
<span itemprop="name">{frontmatter.title}</span>
131140
</a>
132141
</h3>
133142
</header>
134143
<section>
135-
<div>{frontmatter.location}</div>
136-
<div>{frontmatter.start_date}</div>
144+
<div
145+
itemprop="location"
146+
itemscope
147+
itemtype="http://schema.org/Place"
148+
>
149+
<span itemprop="address">{frontmatter.location}</span>
150+
</div>
151+
<div>
152+
<time
153+
itemprop="startDate"
154+
datetime={frontmatter.start_date}
155+
>
156+
{frontmatter.start_date}
157+
</time>
158+
</div>
137159
{edge.node.html && (
138160
<p
161+
itemprop="description"
139162
dangerouslySetInnerHTML={{ __html: edge.node.html }}
140163
/>
141164
)}

0 commit comments

Comments
 (0)