Manual:$wgNoFollowLinks/pt-br

This page is a translated version of the page Manual:$wgNoFollowLinks and the translation is 42% complete.
Analisador: $wgNoFollowLinks
Se verdadeiro, os links externos no texto da wiki irão receber o atributo rel="nofollow"
Introduzido na versão:1.4.0 (r7174)
Removido na versão:ainda em uso
Valores permitidos:(boolean)
Valor padrão:true

Detalhes

Se verdadeiro, o link externo do seu texto wiki irá receber o código de atributo rel="nofollow" que irão indicar aos mecanismos de busca que eles não devem ser seguidos pelos propósitos de classificação, pois são fornecidos pelos usuários e estarão sujeitos a spam.

Porem se os usuários que podem editar possuem a seletividade de seus administradores será algo benéfico para a wiki ou em casos de wikis públicas nas quais seus administradores querem encorajar mais contribuições.

Setting nofollow for red links

It may be desirable to configure MW to append rel="nofollow" to internal links that point to pages that haven't yet been written (so-called "red links") for various reasons that include avoiding unnecessary crawler traffic to non-extant pages or for the possibility of improved SEO by avoiding punitive action against a site's ranking due to the presence of "broken links" that aren't broken, just not yet authored.

This may be accomplished by using the HtmlPageLinkRendererEnd hook as follows:

// Add rel="nofollow" to links to pages that don't exist (redlinks)
$wgHooks['HtmlPageLinkRendererEnd'][] = 'noFollowRedLinks';
function noFollowRedLinks(
    $linkRenderer, $target, $isKnown, &$text, &$attribs, &$ret)
{
    if (!$isKnown && preg_match('/\bnew\b/S', $attribs['class'] ?? "")) {
        $attribs['rel'] = 'nofollow';
    }
    return true;
}

Veja Também

  • meta:nofollow, Meta-Wiki discussion on nofollow's use on Wikimedia sites. Some of the arguments raised there may also applicable to other wikis' decisions concerning this configuration setting.