Esta documentación solo está disponible en inglés.
Install on WordPress
This hook goes in the theme's functions.php or a site plugin. It prints the card tags for the current request path.
add_action('wp_head', function () {
$path = wp_parse_url(home_url(add_query_arg([], $GLOBALS['wp']->request)), PHP_URL_PATH) ?: '/';
$card = 'https://linkmag.net/v1/og/YOUR_SITE_ID?path=' . rawurlencode($path);
printf('<meta property="og:image" content="%s">' . "\n", esc_url($card));
echo '<meta property="og:image:width" content="1200">' . "\n";
echo '<meta property="og:image:height" content="630">' . "\n";
echo '<meta name="twitter:card" content="summary_large_image">' . "\n";
}, 5);An SEO plugin that already prints og:image needs its image output turned off or pointed at the same URL. With Yoast SEO, the wpseo_opengraph_image filter can return the card URL instead of this hook printing the tag.
Los agentes pueden pedir cualquier página de este sitio en markdown enviando Accept: text/markdown.