Skip to content

Commit cfec39d

Browse files
committed
add: structured data
1 parent 3b41596 commit cfec39d

9 files changed

+161
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ You can see all installed snippets in `Tools > Snippets...`, in the sublime text
2525
- [HTML - hc*](snippets/comment/html)
2626
- [CSS - cc*](snippets/comment/css)
2727
- [JavaScript - jc*](snippets/comment/js)
28+
- [Structure data](snippets/structured-data) ***examples***
29+
- [Schema](snippets/structured-data/schema)
30+
- [JSON-LD](snippets/structured-data/json-ld)
31+
- [RDFa](snippets/structured-data/rdfa)
2832

2933
## References
3034

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<snippet>
2+
<content><![CDATA[
3+
itemscope="itemscope" itemtype="http://schema.org/Action"
4+
]]></content>
5+
<tabTrigger>saction</tabTrigger>
6+
<description>s - Action</description>
7+
</snippet>

snippets/structured-data/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Structure data
2+
3+
- [Schema](schema/)
4+
-
5+
- [JSON-LD](rdfa/)
6+
-
7+
- [RDFa](json-ld/)
8+
-
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# JSON-LD
2+
3+
key: `datajsonld`
4+
5+
### Logotype
6+
7+
```html
8+
<script type="application/ld+json">
9+
{
10+
"@context": "http://schema.org",
11+
"@type": "Organization",
12+
"url": "http://www.example.com",
13+
"logo": "http://www.example.com/images/logo.png"
14+
}
15+
</script>
16+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<script type="application/ld+json">
4+
{
5+
"@context": "http://schema.org",
6+
"@type": "Organization",
7+
"url": "http://www.example.com",
8+
"logo": "http://www.example.com/images/logo.png"
9+
}
10+
</script>
11+
]]></content>
12+
<tabTrigger>datajsonld</tabTrigger>
13+
<description>Logotype</description>
14+
</snippet>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# RDFa
2+
3+
key: `datardfa`
4+
5+
### Breadcrumb
6+
7+
```html
8+
<div xmlns:v="http://rdf.data-vocabulary.org/#">
9+
<span typeof="v:Breadcrumb">
10+
<a href="http://www.example.com/dresses" rel="v:url" property="v:title">
11+
Dresses
12+
</a> ›
13+
</span>
14+
<span typeof="v:Breadcrumb">
15+
<a href="http://www.example.com/dresses/real" rel="v:url" property="v:title">
16+
Real Dresses
17+
</a> ›
18+
</span>
19+
<span typeof="v:Breadcrumb">
20+
<a href="http://www.example.com/dresses/real/green" rel="v:url" property="v:title">
21+
Real Green Dresses
22+
</a> ›
23+
</span>
24+
</div>
25+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<div xmlns:v="http://rdf.data-vocabulary.org/#">
4+
<span typeof="v:Breadcrumb">
5+
<a href="http://www.example.com/dresses" rel="v:url" property="v:title">
6+
Dresses
7+
</a> ›
8+
</span>
9+
<span typeof="v:Breadcrumb">
10+
<a href="http://www.example.com/dresses/real" rel="v:url" property="v:title">
11+
Real Dresses
12+
</a> ›
13+
</span>
14+
<span typeof="v:Breadcrumb">
15+
<a href="http://www.example.com/dresses/real/green" rel="v:url" property="v:title">
16+
Real Green Dresses
17+
</a> ›
18+
</span>
19+
</div>
20+
]]></content>
21+
<tabTrigger>datardfa</tabTrigger>
22+
<description>Breadcrumb</description>
23+
</snippet>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Schema (microdata)
2+
3+
key: `dataschema`
4+
5+
### Organization
6+
7+
```html
8+
<div itemscope itemtype="http://schema.org/Organization">
9+
<span itemprop="name">Google.org (GOOG)</span>
10+
Contact Details:
11+
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
12+
Main address:
13+
<span itemprop="streetAddress">38 avenue de l'Opera</span>
14+
<span itemprop="postalCode">F-75002</span>
15+
<span itemprop="addressLocality">Paris, France</span>
16+
,
17+
</div>
18+
Tel:<span itemprop="telephone">( 33 1) 42 68 53 00 </span>,
19+
Fax:<span itemprop="faxNumber">( 33 1) 42 68 53 01 </span>,
20+
E-mail: <span itemprop="email">secretariat(at)google.org</span>
21+
Members:
22+
- National Scientific Members in 100 countries and territories: Country1, Country2, ...
23+
- Scientific Union Members, 30 organizations listed in this Yearbook:
24+
List of Alumni:
25+
<span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
26+
<span itemprop="name">Jack Dan</span>
27+
</span>,
28+
<span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
29+
<span itemprop="name">John Smith</span>
30+
</span>,
31+
History:
32+
</div>
33+
```
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<snippet>
2+
<content><![CDATA[
3+
<div itemscope itemtype="http://schema.org/Organization">
4+
<span itemprop="name">Google.org (GOOG)</span>
5+
Contact Details:
6+
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
7+
Main address:
8+
<span itemprop="streetAddress">38 avenue de l'Opera</span>
9+
<span itemprop="postalCode">F-75002</span>
10+
<span itemprop="addressLocality">Paris, France</span>
11+
,
12+
</div>
13+
Tel:<span itemprop="telephone">( 33 1) 42 68 53 00 </span>,
14+
Fax:<span itemprop="faxNumber">( 33 1) 42 68 53 01 </span>,
15+
E-mail: <span itemprop="email">secretariat(at)google.org</span>
16+
Members:
17+
- National Scientific Members in 100 countries and territories: Country1, Country2, ...
18+
- Scientific Union Members, 30 organizations listed in this Yearbook:
19+
List of Alumni:
20+
<span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
21+
<span itemprop="name">Jack Dan</span>
22+
</span>,
23+
<span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
24+
<span itemprop="name">John Smith</span>
25+
</span>,
26+
History:
27+
</div>
28+
]]></content>
29+
<tabTrigger>dataschema</tabTrigger>
30+
<description>Organization</description>
31+
</snippet>

0 commit comments

Comments
 (0)