PrettyLink syntax: Creole compatibility

12 views
Skip to first unread message

FND

unread,
Aug 22, 2007, 5:24:33 AM8/22/07
to Tiddly...@googlegroups.com
As discussed on [tw], we should consider changing the PrettyLink syntax from
[[label|target]]
to
[[target|label]]

== Reasoning ==

a) standards
both Creole and the MediaWiki use the latter order, making that syntax
much more familiar to a great number of (potential) users

b) usability
This might be my subjective opinion, but I think adding the target first
and the label/description later is much more logical and usable.
(e.g. you would usually grab an URL and only then add a description -
which requires some going back-and-forth with the current syntax)

== Issues ==

a) backwards compatibility
For obvious reasons, having both formats simultaneously wouldn't work
too well (even though Martin's CreoleFormatterPlugin has some code to
automatically determine the correct format, I think we should have a
single, consistent syntax for the core).

Thus we have two options:

1. legacy override (i.e. LegacyPrettyLinksPlugin; similar to
LegacyStrikeThroughPlugin)
This would override the new PrettyLink syntax to retain the old one
(maybe only for tiddlers tagged with a certain keyword).

2. conversion
A plugin for automatically transforming old PrettyLinks to the new
format could most of these problems; it'd only require a one-time run to
convert existing contents to the new format.
This should be simple with a tiny bit of RegEx magic (simply swap $0 and
$1), and we might also incorporate Martin's code for checking the format
before transforming it.

b) user information
There would have to be some kind of announcement and/or warning when
upgrading, detailing the options/procedures outlined above and giving
some optional background info (reasoning).

== Support ==

Judging from the discussion on [tw], I would count Martin and Simon (and
myself, obviously) as proponents of this suggestion.
No objections have been raised yet - though I'm sure there'll be plenty
here now; "bring 'em on"...


-- F.


* http://tinyurl.com/2py9kt
(http://groups.google.com/group/TiddlyWiki/browse_thread/thread/bdc287b4ef381d97/)

BJ

unread,
Aug 22, 2007, 6:02:59 AM8/22/07
to TiddlyWikiDev
Count me in favor of this, just for reason "a" by itself. As for
backward compatibility, I think the precedent set by the
LegacyStrikeThroughPlugin is the way to go.

-- BJ (TampaGeek)

FND

unread,
Aug 22, 2007, 6:09:34 AM8/22/07
to Tiddly...@googlegroups.com
> I think the precedent set by the
> LegacyStrikeThroughPlugin is the way to go.

That alone isn't enough; otherwise, 95% of all users would eternally
keep the old (deprecated) syntax.
Thus we need to offer a conversion tool (which, as I've said, shouldn't
be a big issue; even I could do that, I guess).


-- F.

Saq Imtiaz

unread,
Aug 22, 2007, 6:13:46 AM8/22/07
to Tiddly...@googlegroups.com
How about getting user feedback on TiddlyWiki and not just developer feedback here? It's the end users I would worry most about with this change.

Saq
--
TiddlyThemes.com ( http://tiddlythemes.com ) : a gallery of TiddlyWiki themes.
TiddlySnip ( http://tiddlysnip.com ) : a firefox extension that turns TiddlyWiki into a scrapbook!
LewcidTW ( http://tw.lewcid.org ) : a repository of extensions for TiddlyWiki

FND

unread,
Aug 22, 2007, 8:11:46 AM8/22/07
to Tiddly...@googlegroups.com
> How about getting user feedback on TiddlyWiki and not just developer
> feedback here? It's the end users I would worry most about with this change.

Our friend Morris has taken care of this already, posting his own
thoughts on this issue in the following thread:
http://tinyurl.com/2xsg62
(http://groups.google.com/group/TiddlyWiki/browse_thread/thread/3a7115fb85461b3f)

(Just trying to cross-link all relevant threads here... )


-- F.

Xavier Verges

unread,
Sep 18, 2007, 4:21:22 AM9/18/07
to TiddlyWikiDev
If changes are finally going to happen in how TW handles links, it
would be worth giving a thought to wether it is possible to change how
external links are stored. If instead of storing links as [[url|
title]] or [[title|url]] we could store them with something that had
<a href=url>title</a> (with whatever regexp-friendly wrapping) we
would become nicer players with search engines and linked sites.

-Xv

> (http://groups.google.com/group/TiddlyWiki/browse_thread/thread/bdc287...)

schilke

unread,
Sep 18, 2007, 5:00:53 AM9/18/07
to TiddlyWikiDev
> <a href=url>title</a> (with whatever regexp-friendly wrapping) we
> would become nicer players with search engines and linked sites.

as long as those hrefs sit within a commented javascript - I would say
it doesn't matter, if you use either beans or peas...

However if someone fiddles out a way (hack) to let the links slip out
of the commented code if javascript isn't activated/interpreted - that
might be interesting. In other words: if there's a possibility to mix
some comments together in a way that the link will be processed by the
script but also be shown in the HTML code...
Too early for me to think about things with such complexity ;)
Additionally I doubt it to work stable with all browsers :-/

To write a plugin which simply puts all links (probably also internal
links) into the <noscript></noscript> section might be a workaround -
but that would certainly affect filesize and performance.

Just my 0.02 EUR

--
schilke

Xavier Verges

unread,
Sep 18, 2007, 5:10:39 AM9/18/07
to TiddlyWikiDev

> as long as those hrefs sit within a commented javascript - I would say
> it doesn't matter, if you use either beans or peas...

schilke , as far as I understand, tiddlers are stored in html, <div>s
holding their metadata and <pre>s their contents. Tiddlers are
processed by google, but [[title|url]] does not mean anything to it,
while <a>s do.

-Xv

schilke

unread,
Sep 18, 2007, 5:56:35 AM9/18/07
to TiddlyWikiDev
> schilke , as far as I understand, tiddlers are stored in html, <div>s
> holding their metadata and <pre>s their contents

yes, you're right. I haven't really thought about that. What I don't
know for the moment are two things: If I simulate a text browser by
disabling javascript and styles I end up scrolling through a lot of
css statements. I don't know if it might really be useful to have that
indexed by Google (hmm, although I doubt that it's indexed). This
leads to the second question: what does the Google spiders do if they
find a <noscript> section? I'm not sure at the moment although I
believe it won't stop them from indexing...

--
schilke

Martin Budden

unread,
Sep 18, 2007, 5:58:56 AM9/18/07
to Tiddly...@googlegroups.com
Xavier,

you are correct, tiddlers are stored in html <div> with their contents
in a <pre> block. The trouble is we don't know what google does. It
may or may not recognize the url in

[[title|http://www.example.com]]

Martin

Xavier Verges

unread,
Sep 18, 2007, 6:20:22 AM9/18/07
to TiddlyWikiDev
I never gave a thought to google + links in TWs until I stumbled upon
http://faq.tiddlyspot.com/#%5B%5BWill%20my%20site%20be%20indexed%20by%20Google%3F%5D%5D

But I guess that Daniel/Simon are right, according to this search on
google
http://www.google.com/search?q=link%3Atiddlywiki.org+site%3Atiddlywiki.com
the links from tiddlywiki.com to tiddlywiki.org are ignored by google.

-Xv

On Sep 18, 11:58 am, "Martin Budden" <mjbud...@gmail.com> wrote:
> Xavier,
>
> you are correct, tiddlers are stored in html <div> with their contents
> in a <pre> block. The trouble is we don't know what google does. It
> may or may not recognize the url in
>
> [[title|http://www.example.com]]
>
> Martin
>

schilke

unread,
Sep 18, 2007, 7:44:18 AM9/18/07
to TiddlyWikiDev
> The trouble is we don't know what google does

I would say we at least know what Google does *not*: the spiders don't
index any TiddlyWiki content. I already made some remarks in a few seo
related threads - e.g. here: "search engine tiddlywiki issue"
http://groups.google.com/group/TiddlyWiki/msg/d9ee8fc963705e00

And if you play around a bit, it turns out that not a single tiddler
of all those TW's out there is indexed.

Besides Fabrice's cloaking approach "SEO TiddlyWiki Plugin"
http://www.superphysique.net/#[[SEO%20TiddlyWiki%20Plugin]]
(which I suspect to become dangerous under certain circumstances
regarding getting banned) there's only one chance to get at least the
titles into the Google index: generate a feed and let Google know
about it. This won't boost your site (because Google still treats it
as one page) but it certainly has some impact on ranking due to the
fact that there's more content rather than the title (plus some
links)***.

The only possibility to improve that sparse result is the cloaking
attempt: Your TW has to show up as multiple pages - static or dynamic,
doesn't matter, but they have to exist. Once you have different pages
for the content you easily could redirect a human visitor (with js
enabled) to the respective tiddler in your TW.

Due to the fact that the Google spiders can't read javascript it
shouldn't make any problems - but I am aware of similar cases in the
past where websites have been banned for violating Googles TOS with
similar techniques...

Probably someone comes up with some sneaky ideas how the feed
generation could be improved...

*** = if you search for tiddlyspot sites (I don't know exactly how
many TW's are up there at the moment) and filter by the blog entries
(that's WordPress) and the title of the indexed TW's (plus <noscript>
content), you will end up with 2 results, both of which are feeds:
"Portable Software"
http://tiddlyspot.com/portableSoftware/index.xml
"Music Matched Filter"
http://earpriority.tiddlyspot.com/#Wolves

--
schilke

Xavier Verges

unread,
Sep 18, 2007, 7:59:57 AM9/18/07
to TiddlyWikiDev
> I would say we at least know what Google does *not*: the spiders don't
> index any TiddlyWiki content. I already made some remarks in a few seo
> related threads - e.g. here: "search engine tiddlywiki issue"http://groups.google.com/group/TiddlyWiki/msg/d9ee8fc963705e00
>
> And if you play around a bit, it turns out that not a single tiddler
> of all those TW's out there is indexed.

I don't think this is true. Look for the UploadPlugin url (text, not
link) in tiddlyspot and you get several hits.

http://www.google.com/search?q=http://tiddlywiki.bidix.info+site:tiddlyspot.com&filter=0

One problem is that google hits the file, not the tiddler, but files
are really indexed

-Xv

Xavier Verges

unread,
Sep 18, 2007, 4:24:53 PM9/18/07
to TiddlyWikiDev
> However if someone fiddles out a way (hack) to let the links slip out
> of the commented code if javascript isn't activated/interpreted - that
> might be interesting.

> Too early for me to think about things with such complexity ;)


> Additionally I doubt it to work stable with all browsers :-/
>

> but that would certainly affect filesize and performance.

This approach looks simpler than changing how the text is stored. If
you look a TW with DOM Inspector (no matter if javascript is enabled
or not), you'll see a <div> with id "storeArea". There you have lots
of <div> nodes, one per tiddler, that are seen by google.

When those divs are filled, in
TW21Saver.prototype.externalizeTiddler(), if the new internal format
for contents in a <pre> section is used, it would not hurt to append
to it a <div> with a list of <a> links. The list of links could be
created with the same regular expression magic that creates links from
plain text urls, using [1],[2]...[n] for the internal text of the
created <a> nodes, ignoring whatever wiki syntax is used.

Definitely looks like non-core material, because it would not be wise
to increase the size of TWs that are not intended to be published and
indexed. More things for my todo list that are unlikely to be cleared
any time soon :-(

-Xv

Eric Shulman

unread,
Sep 18, 2007, 10:00:38 PM9/18/07
to TiddlyWikiDev
> > However if someone fiddles out a way (hack) to let the links slip out
> > of the commented code if javascript isn't activated/interpreted - that
> > might be interesting.

Try this inline script:
http://www.TiddlyTools.com/#ShowAllPermalinks

It generates and displays a list of permalinks, one for each tiddler
in the document. You can copy/paste this list into a separate
index.html document that the search engines can crawl through, or even
embed it directly in your TW document, by pasting it into
MarkupPreBody (wrapped in a hidden span):

<span style="display:none">
... paste permalink URLs here...
</span>

HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Xavier Verges

unread,
Sep 19, 2007, 2:29:41 AM9/19/07
to TiddlyWikiDev
Eric,

we were talking about external links, and how TW fails to let know
search engines the sites that it links to. This is a bad thing for the
TW-ecosystem.

A sample:
112 TWs in tiddlyspot.com crawled by google mention your
tiddlytools.com
http://www.google.com/search?&q=tiddlytools.com%20site%3Atiddlyspot.com
but you don''t get a single googleable backlink from them
http://www.google.com/search?&q=link%3Atiddlytools.com%20site%3Atiddlyspot.com

The effect is that tiddlytools.com (and any site providing plugins,
and, for that matter, any site pointed from a TW) does not get the
proper credit in terms of PageRank.

The logical/good/fair thing would be that googling for
NestedSlidersPlugin would bring your site as the first hit, wouldn't
it? Well, you are nowhere near the top

-Xavier

schilke

unread,
Sep 19, 2007, 4:33:57 AM9/19/07
to TiddlyWikiDev
> we were talking about external links, and how TW fails to let know
> search engines the sites that it links to

true, however ShowAllPermalinks could be of some help here, too, if
you have your own server - or key hosters like tiddlyspot will
implement a simple rewrite rule (for use with mod_rewrite, for
example)...

If ShowAllPermalinks would serve a list like that:

<a href="/tiddlywiki/
MyMusingsAroundTiddlyWiki">MyMusingsAroundTiddlyWiki</a>
<a href="/tiddlywiki/UploadPlugin">UploadPlugin</a>
<a href="/tiddlywiki/NestedSlidersPlugin">NestedSlidersPlugin</a>

it should be pretty easy to redirect to the proper location:

#redirect fake urls to the TW file with the respective tiddlers open:
RewriteEngine On
RewriteRule ^tiddlywiki/([a-zA-Z0-9_]+{1})$ /TiddlyWiki.html#$1 [L]

(quick&dirty - untested!)

That would be nice for getting individual tiddlers indexed.
Due to the fact that keywords in links are highly weighted by Google
that should already help if the tiddler titles are a good description
of its contents.

For the second part, how to get the contents indexed by search engine
spiders, an experienced TW developer and javascript guru will be
needed - I can't help here ;)

--
schilke

Daniel Baird

unread,
Sep 19, 2007, 6:55:34 PM9/19/07
to Tiddly...@googlegroups.com
Maybe the solution is to dump a huge pile of individual HTML files,
and always serve a static HTML file whatever.html whenever anyone goes
to /tw.html#whatever. Then do a javascript redirect inside
whatever.html that redirects to the actual tw.html.

weird, but it'd work for google..

;D


--
Daniel Baird
http://tiddlyspot.com (free, effortless TiddlyWiki hosting)
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
Things That Suck)

schilke

unread,
Sep 19, 2007, 7:55:41 PM9/19/07
to TiddlyWikiDev
> Maybe the solution is to dump a huge pile of individual HTML files,
> and always serve a static HTML file whatever.html whenever anyone
> goes to /tw.html#whatever

the anchor URLs aren't helpful with Google - as Google treats the file
as what it actually is: a single HTML file :-/

> Then do a javascript redirect inside
> whatever.html that redirects to the actual tw.html

that's exactly what Pascal's "SEO TiddlyWiki Plugin" does ;)
http://kurl.de/seotiddlywikiplugin

(generating whatever.html and redirecting human visitors from
whatever.html to MyTiddlyWiki.html#whatever)

But I'm much more used to server side redirects in general (if I ever
would make a website with a TiddlyWiki) plus - I already mentioned
that before - a heavy load of cloaking javascript might become
suspicious what eventually leads into getting banned from Google ;)

--
schilke

Reply all
Reply to author
Forward
0 new messages