Metadata
Glossary
Formats
Google intro to structured data
I’ve opted to use both JSON-LD and Microdata, and ignore RDFa which seems to have fallen out of fashion with XML.
The reason I’m using Microdata is I’ve found it an aid in keeping my HTML templates logical and neat, though it does sometimes confuse Google’s scrapers in that two different Metadata formats on the same page invites contradictions. For me, Microdata is in lieu of cluttering the HTML code with classes. I get the CSS to reference elements by itemprop rather than class.
Controlled Vocabularies
microdata
schema-org
Most Search structured data uses schema.org vocabulary, but you should rely on the Google Search Central documentation as definitive for Google Search behavior, rather than the schema.org documentation. There are more attributes and objects on schema.org that aren’t required by Google Search; they may be useful for other search engines, services, tools, and platforms. — Introduction to structured data markup in Google Search
schema.org type hierarchy
https://schema.org/docs/datamodel.html
Types
json-ld
Google page on Event structured data
JSON-LD keywords start with an ampersand.
@context
Every JSON-LD entry must have a "@context": "https://schema.org"
at the top level.
The @context
is assumed to be inheritted by all descendents, so only needs to appear once.
@type
Something like "@type": "MusicEvent"
, ie something in the schema.org vocabulary.
but each child object must have "@type" : "Place"
or "@type" : "Offer"
etc.
@id
There’s a bit of overlap between JSON-LD and schema.org keywords, and the rule seems to be JSON-LD is higher up in the hierarchy and should be prefered given the choice.
html5
- application-name
- author
- description
- generator Hugo inserts
<meta name="generator" content="Hugo 0.122.0">
- keywords
- referrer
- theme-color
- color-scheme
https://www.dublincore.org/specifications/dublin-core/dc-html/
Using lighthouse output, these are what Google considers important:
- Has a
<meta name="viewport">
tag withwidth
orinitial-scale
+34m - The document does not use
<meta http-equiv="refresh">
+26ms [user-scalable="no"]
is not used in the<meta name="viewport">
element and the[maximum-scale]
attribute is not less than 5. +77ms- Document has a meta description +6ms
dublin-core
- Every element is repeatable, so have to handle array, object, or atom.
15 Elements
- Contributor
- Coverage
- Creator
- Date
- Description
- Format
- Identifier
- Language
- Publisher
- Relation
- Rights
- Source
- Subject
- Title
- Type
https://www.dublincore.org/specifications/dublin-core/dc-html/