It seems that Google encourages people to add semantics to their sites, by using either Microdata, Microformats, or RDFa [1]. Well, I tried adding RDFa tags from schema.org
and rdf.data-vocabulary.org
to my Google Site, as suggested by Google again [2], but it didn't work.
First, I added RDFa directly to my Google Site, but when I saved the changes, they were all discarded (<span>
tags were left without any attributes). Then, I added an HTML box with a <div hidden>
attribute and it was not discarded, but the RDFa that I added was still not recognized, according to Google Structured Data Testing Tool. When I tested manually my HTML code in this tool, it worked fine.
Here is a snippet of my RDFa:
<div hidden vocab="http://schema.org/" typeof="Person">
<span property="name">My name</span>
<span property="jobTitle">My job title</span>
<span property="affiliation">My university</span>
<span property="url">https://sites.google.com/site/myWebSite/</span>
</div>
So, my question is: (How) is it possible to add RDFa to Google sites?
Google Sites seems to remove some attributes (including those needed for RDFa and Microdata) when entering the markup in the HTML mode.
Workaround: Insert → HTML Box
This creates a box which seems to allow full HTML (and also CSS/JavaScript).