shinyseoThis page is written so another agent can use the package without reading the source.
social_meta(meta)There are no other exported helpers.
social_meta() returns a shiny::tags$head()
fragment.
You normally place it inside a Shiny UI definition, for example:
meta can be one of:
If meta is a character string, the package reads it with
yaml::read_yaml().
If the file does not exist, the function stops with:
Meta file not found: <path>These keys must exist in the final metadata object:
titledescriptionurlimageThe function checks only that the names exist. It does not currently validate that the values are non-empty strings.
If any required key is missing, the function stops with:
Missing required meta fields: ...The package fills these defaults when the key is missing or
NULL:
locale = "en_US"robots = "index,follow,max-image-preview:large,max-snippet:-1,max-video-preview:-1"twitter_card = "summary_large_image"schema_type = "WebApplication"operating_system = "Any"author_type = "Person"publisher_type = "Organization"in_language = localeImportant detail:
schema is enabled unless it is exactly
FALSEschema = TRUE, schema = NULL, or an
omitted schema field all result in JSON-LD outputschema = FALSE suppresses JSON-LD| Key | Used for |
|---|---|
title |
Page title, Open Graph title, Twitter title, schema name |
description |
Meta description, Open Graph description, Twitter description, schema description |
url |
Canonical URL, Open Graph URL, Twitter URL, schema URL |
image |
Open Graph image, Twitter image |
locale |
Open Graph locale, schema language default |
robots |
Robots meta tag |
twitter_card |
Twitter card type |
twitter_site |
Twitter site handle |
twitter_creator |
Twitter creator handle |
twitter_image_alt |
Twitter image alt text |
image_alt |
Open Graph image alt text |
image_width |
Open Graph image width |
image_height |
Open Graph image height |
image_type |
Open Graph image MIME type |
bing_site_verification |
Bing Webmaster verification |
google_site_verification |
Google Search Console verification |
schema_type |
Schema.org @type |
application_category |
Schema.org applicationCategory |
operating_system |
Schema.org operatingSystem |
educational_use |
Schema.org educationalUse |
is_accessible_for_free |
Schema.org isAccessibleForFree |
disclaimer |
Schema.org disclaimer |
author_name |
Schema.org author.name |
author_type |
Schema.org author.@type |
publisher_name |
Schema.org publisher.name |
publisher_type |
Schema.org publisher.@type |
in_language |
Schema.org inLanguage |
schema |
Turns JSON-LD on or off |
fluidPage(), navbarPage(), or any other UI
container that accepts head tags.