Skip to main content

Module seo

Module seo 

Source
Expand description

SEO metadata: Open Graph, Twitter Cards and the common <meta> block.

The free functions here build the tags; SeoBuilder is sugar over them, never a second implementation.

Structs§

SeoBuilder
A fluent builder for a page’s whole metadata block.

Constants§

DEFAULT_ROBOTS
The default robots directive.
DEFAULT_TWITTER_CARD
The default Twitter card type.
DEFAULT_VIEWPORT
The default viewport.

Functions§

common
The common <meta> block: charset, viewport, description, robots, keywords, author — plus the <title>.
json_ld
A <script type="application/ld+json"> carrying structured data for search engines.
meta_charset
A <meta charset="…">.
meta_http_equiv
A <meta http-equiv="…" content="…">.
meta_name
A <meta name="…" content="…">.
meta_property
A <meta property="…" content="…">, used by Open Graph.
open_graph
Open Graph tags for a page.
open_graph_article
Open Graph tags for an article, with the article:* extensions.
script_json
A <script type="…"> holding a JSON document, made safe to embed. See json_ld.
twitter_card
Twitter Card tags.