Hi Mario

>  1) the slug-field is optional
>  2) the slug character set is limited to eg: latin characters, digits, and 
> hyphen "-" ... nothing else

Actually, there’s no reason to ban other characters; they will just lead to 
ugly URLs because of the encoding.

>  3) if no slug field is present, use the permalink mechanism as it is today. 
>  4) The whole slug creation process is manual ... so the OT thoughts about 
> some helper functions doesn't apply. 

The slug creation process doesn’t need to be manual. We could have a checkbox 
in the edit template whereby the “slug” field is automatically updated via a 
transliteration macro each time the draft title is changed.

> My concern here is point 4). Since an automatic slug creation process is 
> language specific, it is plugin territory. eg: Cyrillic needs different 
> handling than German.
> If we don't provide best practice documentation, we will end up with an 
> unpredictable mess. 

We could, of course, make the transliteration function be part of the 
translation plugin.

> As soon as the slug field is implemented, we will get feature requests about 
> auto-creation. So imo it's worth to think about it now already. see OT
> 
> ------------- OT ----------------
> 
> Some plugin implementation thoughts 
> 
> add 1) 
>  1.1 If the slug-filed is empty for eg: "Hello World", what happens if the 
> user opens a permalink +#hello-world?

Nothing.

>  1.2 how is duplication like: "Hello World" vs "hello world" resolved? it 
> creates the same slug: #hello-world

If multiple slugs match we could actually open all of them. But obviously when 
using this mechanism in the context of generating static HTML files, then just 
the first matching slug would be used.

>  1.3 How do we resolve transliteration in a human predictable way. .. This is 
> language dependent. see OP or for German:  Hände vs hande vs haende

You’re saying that the same character would be transliterated differently in 
different contexts? Does that even lend itself to an algorithm?

One benefit of decoupling the slug handling from the creation is that the 
author would always be able to adjust an inappropriate transliteration.

> 
> add 2) 
>  2.1 The URI-fragment definition allows URLencoded chars. ... We don't want 
> this. 

Why not? The spec says that the fragment is URL encoded, why wouldn’t we go 
along with that?

>  2.2 So we will limit it to: ALPHA / DIGIT / "-"
>  2.3 how do we resolve duplications? see 1.2

As I say, I don’t think we should get too hung up about this when we’re already 
stuck with HTML’s behaviour in this regard.

Best wishes

Jeremy

>        
> links: 
>  - URI fragment is defined at: RFC3986 
> <https://tools.ietf.org/html/rfc3986#section-3.5> see: appendix A 
> <https://tools.ietf.org/html/rfc3986#appendix-A> for the chars allowed.
> 
> ------------- OT end ----------------
> 
> have fun!
> mario
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <https://groups.google.com/group/tiddlywiki>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/d4aa9d88-3e9a-47ea-b78b-762fd1cc9fad%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/d4aa9d88-3e9a-47ea-b78b-762fd1cc9fad%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/63A2C21C-6AD6-415D-8DDB-A10AD39AD68C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to