I have just installed TiddlyWiki: http://www.superphysique.net.
I am really happy with it, and would like to optimize it for google
and others search engine.
I have think about something like this:
A tool that would take every tiddler and export each of them in a file
with the same name that the tiddler, and in subdirectory according to
associated tags.
For exemple :
A tiddler "Bodybuilding" with tags : Pictures, training
Would be exported in \Pictures\bodybuilding.html and \Training
\bodybuilding.html
The files exported would have this look:
<html>
<head>
<title>Tiddler title</title>
<meta keywords="Tidler Tags">
<body>
<script>location.href = "MyTiddlyWebsite.com#TidlerName";</script>
<no script>
Tidler Content
Please click on MyTiddlyWebsite.com#TidlerName to access full
websites!
</noscript>
</body>
</html>
With the possibility to exclude from export some tiddlers that
contains a tag excludesFromExport (for ex).
It may be considered as duplicate content, but as a TiddlyWiki can be
very large and with tiddlers Plugin full of Javascript, I am not sure
that Google read all the content of the page (at a moment, I have
heard of a 80 ko indexation limit) and moreover can index it properly.
I am not that good in Javascript, so I though to develop the tool in C
as a command tool but maybe with some existing plugin it may be
possible to do this kind of stuff easily (I have read about a
ForEachTiddler and ExportTiddler plugin).
Please let me know what you think about that.
Regards from Paris,
Fabrice
I haven't tried the plugin myself yet (sorry Yann... ), but it sure
looks promising!
HTH.
-- F.
* http://yann.perrin.googlepages.com/twkd.html#PolyGlotPlugin
Olivier
The former is more appropriate for search engines since they will be
confused by TW's line escaping.
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
> To post to this group, send email to Tiddl...@googlegroups.com
> To unsubscribe from this group, send email to TiddlyWiki-...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
--
Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man."
-- George Bernard Shaw, Maxims for Revolutionists
-> Thanks Bob for the plugin. I probably will need it because at the
moment, I export tiddler as plain text.
-> Thanks Simon for the source code for Ruby.
Here is a "Release 0" for my first SEOHtmlPlugin :
0. CREATE A TIDDLER CALLED SEOHtmlPlugin WITH CONTENT BELOW AND WITH
systemConfig TAG
function generateSEOHtml()
{
var originalPath = document.location.toString();
if(originalPath.substr(0,5) != "file:")
{
alert(config.messages.notFileUrlError);
if(store.tiddlerExists(config.messages.saveInstructions))
story.displayTiddler(null,config.messages.saveInstructions);
return;
}
var y = [];
var g = [];
var localPath = getLocalPath(originalPath);
var c = store.getTiddlerText("SEOHtmlPluginConfig");
var u = store.getTiddlerText("SiteUrl");
var htmlPath = localPath.substr(0,localPath.lastIndexOf("\\"));
var tiddlers = store.getTiddlers("modified","excludeSearch");
for (var t=0; t<tiddlers.length; t++) {
var content = c;
var filename = tiddlers[t].title.htmlEncode();
filename = filename.replace(/ |\//gi, '-');
filename = filename.replace(/[-]+\//gi, '-');
content = content.replace(/TIDDLER_TITLE/gi,
tiddlers[t].title.htmlEncode());
content = content.replace(/TIDDLER_URL/gi, u.htmlEncode() + '#' +
String.encodeTiddlyLink(tiddlers[t].title));
content = content.replace(/TIDDLER_KEYWORDS/gi,
tiddlers[t].tags.join(',').htmlEncode());
content = content.replace(/TIDDLER_CONTENT/gi,
wikifyStatic(tiddlers[t].text,null,tiddlers[t]).htmlEncode());
for (var ta=0; ta<tiddlers[t].tags.length; ta++) {
g.push('<url><loc>' + u.htmlEncode() + tiddlers[t].tags[ta] + '/' +
filename + '.html' + '</loc></url>');
y.push(u.htmlEncode() + tiddlers[t].tags[ta] + '/' + filename +
'.html');
saveFile(htmlPath + '\\' + tiddlers[t].tags[ta] + '\\' + filename +
'.html', convertUnicodeToUTF8(content));
}
}
saveFile(htmlPath + '\\urllist.txt',
convertUnicodeToUTF8(y.join('\n')));
saveFile(htmlPath + '\\sitemap.xml', '<?xml version="1.0"
encoding="utf-8"?><urlset xmlns="http://www.google.com/schemas/sitemap/
0.84">\n' + convertUnicodeToUTF8(g.join('\n')) + '</urlset>');
displayMessage('SEO Html file(s) created', '');
}
1. CREATE A TIDDLER CALLED SEOHtmlPluginConfig WITH CONTENT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>TIDDLER_TITLE</title>
<meta name="keywords" content="TIDDLER_KEYWORDS">
<script language="JavaScript" type="text/javascript">
location.href = 'TIDDLER_URL';
</script>
</head>
<body>
TIDDLER_URL
TIDDLER_CONTENT
</body>
</html>
2. ADD TO AN EXISTING TIDDLER THE CONTENT
<html><a href="javascript:generateSEOHtml();">Generate SEO Html Files</
a></html>
3. BE SURE TO HAVE FILL IN THE SHADOW SiteUrl, AND TO HAVE PUT A / AT
THE END OF THE URL
4. SAVE YOUR TIDDLY WIKI AND OPEN IT LOCALY AND CLICK ON Generate SEO
Html Files
It will :
Generate files for all tiddlers except those with excludeSearch in
directory according to tags
Generate sitemap.xml file for Google
Generate urllist.txt file for Yahoo
There are many others things to do to improve, but this is the idea!
Better to see the plugin in action:
http://www.superphysique.net/#SEOHtmlPlugin
http://www.superphysique.net/#SEOHtmlPluginConfig
The link to generate files (you need to be on your localdrive)
http://www.superphysique.net/#COPYRIGHT
Results:
http://www.superphysique.net/Gallery/
http://www.superphysique.net/Super Physique/
http://www.superphysique.net/Materials/
Open one of the file of the directory and see what happens.
Save one of the file of the directory to see its content.
Test a keyword density checker http://www.webconfs.com/keyword-density-checker.php
on one of the file, and the all tiddly wiki...
See also:
http://www.superphysique.net/sitemap.xml