Note, Google now downrates meta keywords, so you should disable it to increase your PageRank?. -- SunirShah
# Minor options: ... $MetaKeywords = 1; # 1 = Google-friendly, 0 = search-engine averse
sub GetHtmlHeader { ... $html .= "<HTML><HEAD><TITLE>$title</TITLE>\n"; if( $MetaKeywords ) { my $keywords = $OpenPageName; $keywords =~ s/([a-z])([A-Z])/$1, $2/g; $html .= "<META NAME='KEYWORDS' CONTENT='$keywords'/>\n" if $keywords; } ... }
$html .= "<META NAME=\"KEYWORDS\" CONTENT=\"$keywords\">\n" if $keywords;This looks better in HTML code. --BernhardZechmann
See http://sunir.org/apps/refers.pl. Normally Google is the number one referrer. -- SunirShah
Simple idea: allow the meta tag to be placed on the wiki page, then the user can index whatever keywords they want. And, more to the point, pages are only indexed when the user so wishes. If I read your code correctly it will index every page. This would be somewhat along the lines of the following (untested) code
$pagetext =~ /^(<META *NAME=KEYWORDS *CONTENT=.*?>)/; $html .= $1;Or, maybe you don't want to give users HTML (too hard for newbies, too dangerous for sneaky hackers) then I suggest new wiki tag <SEARCHKEYS blah> with the (untested) code
$pagetext =~ /^<SEARCHKEYS\s\s*(.*?)\s*>//; $keywords = $1; $keywords =~ /=.*//; #makes sneaky hack stuff innocuous if ($keywords) { $keywords =~ s/([a-z])([A-Z])/$1, $2/g; $html .= "<META NAME='KEYWORDS' CONTENT='$keywords'/>\n"; }Just ideas...
(PS $pagetext is not the correct variable name, maybe I'll correct it later but fel free to do so yourself)
--RiVer
Don't add more pointy brackets. That's just annoying. Even the #REDIRECT idiom is annoying because it conflicts with ordered list syntax. Instead, use the LinkPattern:
---BEGIN--- MetaKeywords: this, is, a, list, of, keywords This is the beginning of the document. Notice now MetaKeywords is on the first line by itself. Don't emit that. ---END---
Sure this screws over the free link people, but... wait, I don't care. ;) -- SunirShah
Please don't call them MetaKeywords? - one of the nice things about wiki markup is it is not so geeky looking as HTML. I strongly agree that means no pointy brackets, but it also means we don't use words like META. Suggestions would therefore be
SearchKeys?: this, is, another, listor
SearchEngines?: and, so, is, this--RiVer
A way to allow keyword searches with no modification to the program is to use tight spacing:
keys,code,patch,upgrade
Then search with prepended commas, so you can find a patch by searching for ",upgrade" without getting every page that uses "upgrade" in its text -- only keywords have leading commas. --JerryMuelver
I've converged my syntax hacks into a square bracket syntax, so in Domesu's (still unbuilt within a single codebase) squaretags syntax, it would look like [%keywords list of keywords here] (All "compile time" metadata uses the syntax [%name val1 val2 ... valn]). They can be put anywhere in the page, as it assembles them all when the page is submitted. Bottom of page is recommended. --ChuckAdams