Titles, descriptions, sitemap and share cards
v0.0.1
Every document and every page of one gets its own head: a title, a description, structured data, a canonical address, language alternates and a share card, without any setup beyond the text you write. You can override each part in the SEO Tags field. This page explains what the head contains by default, what you can change, and what reaches the sitemap and share cards.
What the head contains by default
The head of a page is built from the document, the version being read and the page. Anything you set in SEO Tags or in the record's stored structured data wins over these defaults.
| Part | On a document's front page | On a page |
|---|---|---|
| Title | The document's name | The page's title |
| Description | The document's description | The start of the page's text, at most 160 characters, cut with an ellipsis |
| Type | article | article |
| Language | The document's language | The document's language |
| Canonical address | The document's own address when it has one, else its address in its own language under the documentation's path | The page's address under the document's own address when it has one, else the address asked |
| Structured data | A TechArticle and a BreadcrumbList | A TechArticle and a BreadcrumbList |
| Robots | The document's own robots meta | The page's, else the document's |
The BreadcrumbList runs from Documentation to the document to the page. The TechArticle has these keys:
| Key | Holds |
|---|---|
headline, description | The title and the description above. A description stored in SEO Tags replaces the default. |
image | The record's share image, once it is drawn, or the og:image stored in SEO Tags. |
datePublished | As an ISO 8601 date. For a page, the date its version was published, else the date the page was created. For a front page, the date the document was created. |
dateModified | As an ISO 8601 date. For a page, when its text or one of its notes last changed. For a front page, when the document last changed. |
version | The version number being read. |
inLanguage | The document's language, such as en. |
mainEntityOfPage | The canonical address. |
author | A Person, when a meta tag named author names one on the page, else on the document. Left out when neither does. |
publisher | The site as an Organization, with the site.title setting as its name and the site.logo setting as its logo. Left out when the site has no title. |
A record whose robots meta says noindex or none has no TechArticle. JSON-LD stored on the record replaces the TechArticle, and the BreadcrumbList stays. A document has a Schema (JSON) field for it.
Languages in the head
A document and its pages each have one language, and the head says which. inLanguage in the TechArticle is the document's language. og:locale is the same language as Open Graph writes a locale, such as en_US or fa_IR.
When the document, or the page, has two or more editions, the head also carries these tags:
- a
rel="alternate"link withhreflangfor each edition, at that edition's own address; - one
hreflang="x-default"link, at the edition in the site's first language, when there is one; - an
og:locale:alternatetag for each edition besides the one being read.
They come from the list the header's language switcher shows. On a document's front page that is each edition of the document. On a page it is each edition that has the page, and an edition without it is not listed. Search engines read the head as a guest, so an edition locked to permissions is not listed. See The translations entry and Languages and language editions.
The sitemap
The documentation adds itself to the site's /sitemap.xml. Each active document is listed at its front page, and each approved page of the version a reader is shown at its own address, in the document's language. The sitemap leaves out:
- a draft document and a page still in review;
- the pages of older versions that only
?v=reaches; - a document or a page locked to permissions, because the sitemap reads as a visitor who is not signed in;
- a document whose robots meta says
noindexornone, with all its pages that hold no robots meta of their own, and a single page whose own robots meta says so.
A document with no published version still draws its front page, and the sitemap lists that page alone. Writing a document, a version or a page rebuilds the site's sitemap. An address is listed only while the site serves a page at that path.