-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
383 lines (314 loc) · 14.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Microformats : Meaningful HTML</title>
<link rel="shortcut icon" type="image/svg+xml" href="/assets/images/microformats-logo.svg">
<link rel="stylesheet" media="all" href="/assets/css/bootstrap.min.css">
<link rel="stylesheet" media="all" href="/assets/styles.css">
</head>
<body>
<header class="jumbotron mb-5 h-card">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-3">
<a class="u-url" href="https://microformats.io/"><img alt="Microformats" class="u-logo"
src="/assets/images/microformats-logo.svg" /></a>
</div>
<div class="col-md-9 col-sm-12">
<h1><a class="p-name u-url" href="https://microformats.io/">Microformats</a></h1>
<p class="tagline text-muted">Meaningful HTML</p>
</div>
</div>
</div>
</header>
<main>
<div class="container">
<section id="what">
<h2>What are Microformats?</h2>
<p>Microformats are a simple way to add more meaning to your HTML.</p>
</section><!-- #what -->
<section id="how">
<h2>How do you use Microformats?</h2>
<p>It's easy! You probably already know how. It's just classes.</p>
<h3 class="example-heading">
<b>Example:</b>
Contact Information
</h3>
<div class="row">
<div class="col-sm-12 col-md-6">
<figure class="card">
<figcaption class="card-header">Plain HTML</figcaption>
<div class="card-block p-3">
<pre><code class="html"><div>
Emma Goldman<br>
123 Main St<br>
Some Town, CA<br>
90210
<a href="mailto:[email protected]">[email protected]</a><br>
<a href="https://twitter.com/emmagoldman">@emmagoldman</a>
</div></code></pre>
</div><!-- .card-block -->
<p class="card-footer">
This snippet of HTML is very common.
While you as a human can recognize that is contact information,
computers could use a few hints to understand it.
</p>
</figure><!-- .card -->
</div><!-- .col -->
<div class="col-sm-12 col-md-6">
<figure class="card">
<figcaption class="card-header">HTML + Microformats</figcaption>
<div class="card-block p-3">
<pre><code class="html"><div class="h-card">
<span class="p-name">Emma Goldman</span>
<span class="p-street-address">123 Main St</span>
<span class="p-locality">Some Town</span>, <span class="p-region">CA</span>
<span class="p-postal-code">90210</span>
<a class="u-email" href="mailto:[email protected]">[email protected]</a><br>
<a class="u-url" rel="me" href="https://twitter.com/emmagoldman">@emmagoldman</a>
</div></code></pre>
</div><!-- .card-block -->
<p class="card-footer">
By adding just a few HTML classes, you can turn this generic markup into
much more meaningful and semantic HTML.
</p>
</figure><!-- .card -->
</div><!-- .col -->
</div><!-- .row -->
<h3 class="example-heading">
<b>Example:</b>
Link to Person
</h3>
<div class="row">
<div class="col-sm-12 col-md-6">
<figure class="card">
<figcaption class="card-header">Plain HTML</figcaption>
<div class="card-block p-3">
<pre><code class="html"><a href="https://twitter.com/emmagoldman">@emmagoldman</a></code></pre>
</div><!-- .card-block -->
<p class="card-footer">
Or an even simpler example is just link.
</p>
</figure><!-- .card -->
</div><!-- .col -->
<div class="col-sm-12 col-md-6">
<figure class="card">
<figcaption class="card-header">HTML + Microformats</figcaption>
<div class="card-block p-3">
<pre><code class="html"><a class="h-card" href="https://twitter.com/emmagoldman">@emmagoldman</a></code></pre>
</div><!-- .card-block -->
<p class="card-footer">
All it needs is one <code>h-card</code> class on the link tag.
</p>
</figure><!-- .card -->
</div><!-- .col -->
</div><!-- .row -->
</section><!-- #how -->
<section id="why">
<h2>Why use Microformats?</h2>
<p>
By adding Microformats to your HTML, your website becomes more
understandable to various kinds of computers.
</p>
<ul>
<li>
Search engines can make sense of your HTML which allows them to display a better version
in their search results.
</li>
<li>
Browser extensions can enable your readers to download information to their contacts,
calendar, and maps apps.
</li>
<li>
Feed readers can be used to subscribe to your website's feeds (blog posts, bookmarks,
checkins, etc).
</li>
<li>
You can even use your website (with Microformats) to sign into other websites.
</li>
</ul>
</section><!-- #why -->
<section id="what-else">
<h2>What else are they good for?</h2>
<p>
In addition to <a href="https://microformats.org/wiki/h-card">people and organizations</a>,
Microformats can be used for:
<a href="https://microformats.org/wiki/h-feed">feeds</a>,
<a href="https://microformats.org/wiki/h-entry">blog posts</a>,
<a href="https://microformats.org/wiki/h-event">events</a>,
<a href="https://microformats.org/wiki/h-adr">locations</a>,
<a href="https://microformats.org/wiki/h-review">reviews</a>,
<a href="https://microformats.org/wiki/h-recipe">recipes</a>,
<a href="https://microformats.org/wiki/h-resume">resumes</a>,
and <a href="https://microformats.org/wiki/h-product">products</a>.
</p>
</section><!-- #what-else -->
<section id="in-the-wild" class="py-5 mb-5">
<h2 class="mb-5">Examples in the wild</h2>
<div class="row">
<div class="col-3">
<a target="blank" href="https://mastodon.social/about">
<img alt="Mastodon" src="/assets/images/examples/mastodon.png" />
</a>
</div>
<div class="col-6">
<a target="blank" href="https://indieweb.org">
<img alt="IndieWebCamp" src="/assets/images/examples/indie-web-camp.png" />
</a>
</div>
<div class="col-3">
<a target="blank" href="https://micro.blog">
<img alt="micro.blog" src="/assets/images/examples/micro-blog.png" />
</a>
</div>
</div>
</section><!-- #in-the-wild -->
<section id="developers">
<h2>Developers</h2>
<p>
Microformats are fully specced with a
<a href="https://github.com/microformats/tests">comprehensive test suite</a>
and are licensed as Public Domain allowing you to freely use them however you want.
</p>
</section><!-- #in-the-wild -->
<section id="parsing">
<h2>Parsing Microformats</h2>
<p>
If you're a developer working on an app or service,
you probably need JSON as your input format.
Don't worry.
There are several Microformats parsers written in multiple programming languages.
A parser will take a URL or a glob of HTML, understand it,
then convert it to JSON for your use.
</p>
<p>You can test your URL here (or HTML snippet on any of the parser sites).</p>
<form action="https://ruby.microformats.io/microformats" accept-charset="UTF-8" method="get"
class="form -inline mt-3 mb-3">
<input name="utf8" type="hidden" value="✓">
<div class="row">
<div class="col-sm-9">
<label class="sr-only" for="submission_url">Enter a URL</label>
<input id="submission_url" type="url" name="url" class="form-control form-control-lg mb-2 mr-sm-2 mb-sm-0"
placeholder="https://example.com/person.html">
</div>
<div class="col-sm-3">
<button type="submit" class="btn btn-primary btn-lg btn-block">Parse</button>
</div>
</div>
</form>
</section><!-- #parsing -->
<section id="parsers">
<h2>Parser Libraries</h2>
<p>Production ready parsers are available for: <a href="https://go.microformats.io">Go</a>, <a
href="https://node.microformats.io">Node</a>, <a href="https://php.microformats.io">PHP</a>, <a
href="https://python.microformats.io">Python</a>, <a href="https://ruby.microformats.io">Ruby</a>.</p>
<div class="row languages">
<div class="col-4 col-sm-2 offset-sm-1 language language-go">
<a class="btn btn-secondary btn-sm" href="https://go.microformats.io">Website</a>
<a class="btn btn-secondary btn-sm" href="https://github.com/willnorris/microformats">Library</a>
<a href="https://go.microformats.io"><img alt="Go" src="/assets/images/parsers/go.png" /></a>
</div>
<div class="col-4 col-sm-2 language language-node">
<a class="btn btn-secondary btn-sm" href="https://node.microformats.io">Website</a>
<a class="btn btn-secondary btn-sm" href="https://github.com/microformats/microformats-parser">Library</a>
<a href="https://node.microformats.io"><img alt="Node" src="/assets/images/parsers/node.svg" /></a>
</div>
<div class="col-4 col-sm-2 language language-php">
<a class="btn btn-secondary btn-sm" href="https://php.microformats.io">Website</a>
<a class="btn btn-secondary btn-sm" href="https://github.com/indieweb/php-mf2">Library</a>
<a href="https://php.microformats.io"><img alt="php" src="/assets/images/parsers/php.svg" /></a>
</div>
<div class="col-4 col-sm-2 offset-2 offset-sm-0 language language-python">
<a class="btn btn-secondary btn-sm" href="https://python.microformats.io">Website</a>
<a class="btn btn-secondary btn-sm" href="https://github.com/tommorris/mf2py">Library</a>
<a href="https://python.microformats.io"><img alt="Python" src="/assets/images/parsers/python.svg" /></a>
</div>
<div class="col-4 col-sm-2 language language-ruby">
<a class="btn btn-secondary btn-sm" href="https://ruby.microformats.io">Website</a>
<a class="btn btn-secondary btn-sm" href="https://github.com/indieweb/microformats-ruby">Library</a>
<a href="https://ruby.microformats.io"><img alt="Ruby" src="/assets/images/parsers/ruby.svg" /></a>
</div>
</div>
<p>
Other parsers are in-development for:
<a href="https://microformats.org/wiki/microformats2#Development_parsers">Erlang, Elixir, Haskell, Java, and more</a>.
</p>
<h3 class="example-heading">
<b>Example:</b>
Parsing Contact Information
</h3>
<div class="row">
<div class="col-sm-12 col-md-6">
<figure class="card">
<figcaption class="card-header">HTML + Microformats</figcaption>
<div class="card-block p-3">
<pre><code class="html"><div class="h-card">
<a class="p-name u-url" href="http://blog.lizardwrangler.com/">Mitchell Baker</a>
(<a class="p-org h-card" href="http://mozilla.org/">Mozilla Foundation</a>)
</div></code></pre>
</div><!-- .card-block -->
<p class="card-footer">
This is a simple <code>h-card</code> example.
</p>
</figure><!-- .card -->
</div><!-- .col -->
<div class="col-sm-12 col-md-6">
<figure class="card">
<figcaption class="card-header">HTML + Microformats</figcaption>
<div class="card-block p-3">
<pre><code class="json">{
"items": [{
"type": ["h-card"],
"properties": {
"url": ["http://blog.lizardwrangler.com/"],
"name": ["Mitchell Baker"],
"org": [{
"value": "Mozilla Foundation",
"type": ["h-card"],
"properties": {
"name": ["Mozilla Foundation"],
"url": ["http://mozilla.org/"]
}
}]
}
}],
"rels": {},
"rel-urls": {}
}</code></pre>
</div><!-- .card-block -->
<p class="card-footer">
It will be converted into this JSON by a parser.
</p>
</figure><!-- .card -->
</div><!-- .col -->
</div><!-- .row -->
</section><!-- #parsers -->
<section id="more">
<h2>More information</h2>
<ul>
<li>
For further reading, head over to the
<a href="https://microformats.org/wiki">Microformats community wiki</a>.
</li>
<li>
If you have questions,
<a href="https://chat.indieweb.org/microformats">join the #microformats chat</a>.
</li>
<li>
If you have your own personal website (or want to!), check out the
<a href="https://indieweb.org">#indieweb community wiki</a> and
<a href="https://chat.indieweb.org">join the chat</a>.
</li>
</ul>
</section><!-- #parsing -->
</div><!-- .container -->
</main>
<div class="container">
<footer class="text-center my-5">
<a href="https://creativecommons.org/publicdomain/zero/1.0" rel="license" class="text-muted">CC0</a>
</footer>
</div><!-- .container -->
</body>
</html>