]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/edittemplate_should_support_uuid__44___date_variables.mdwn
fix link
[ikiwiki.git] / doc / todo / edittemplate_should_support_uuid__44___date_variables.mdwn
index 4f83c8bf555139f7f9d6c27f32e70ba93b401e18..6d702fedf1032c9398f80cc526237307e6ee2149 100644 (file)
@@ -46,3 +46,42 @@ Changes to the structure of `$pagestate{$registering_page}{edittemplate}{$pagesp
 >> v3/v5 UUIDs, please describe it and I'll try to suggest some
 >> better way based on that, maybe global configuration in `$config`.
 >> --[[smcv]]
+
+>>> [[!template id=gitbranch branch=smcv/ready/edittemplate2
+  browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/edittemplate2
+  author="Jonathon Anderson, [[smcv]]"]]
+>>> Here is a version of that branch that I [[would merge|users/smcv/ready]] if I could.
+>>> Changes since Jonathon's version:
+>>>
+>>> * only generate a UUID if needed
+>>> * read `/proc/sys/kernel/random/uuid` instead of using [[!cpan UUID::Tiny]]
+>>>   if available, to avoid the dependency on at least Linux
+>>> * remove v3/v5 UUID support since I don't really see the point,
+>>>   and if included, it would need a migration path for `$pagestate`
+>>> * use RFC 3339 time format for `time` to make the timezone unambiguous
+>>> * add `html_time` which is the output of `IkiWiki::displaytime`, e.g.
+>>>   a `<time>` element on HTML5 wikis
+>>>
+>>> I'm not entirely sure what the use-case is for `formatted_time`,
+>>> so perhaps either `html_time` or `formatted_time` should be
+>>> removed; but it's not as if they really cost anything.
+>>>
+>>> There doesn't seem to be any strong convention for how we name
+>>> timestamp variables/objects, so I left the naming as it was.
+>>>
+>>> --[[smcv]]
+
+>>>> the ready/edittemplate branch looks good to me too. `formatted_time` and
+>>>> `html_time` probably don't hurt, but personally i'd not add either and
+>>>> instead expose displaytime as a directive, for otherwise migrating to
+>>>> html5 would leave old evaluations of displaytime around in the repository.
+>>>> (example template: `\[[!meta date="<TMPL_VAR time>"]]I wrote this post at
+>>>> \[[!displaytime "<TMPL_VAR time>"]]`). --[[chrysn]]
+
+>>>>> That's a very good point; and Joey added `\[[!date "<TMPL_VAR time">]]`,
+>>>>> which does the same thing as your hypothetical `\[[!displaytime]]`,
+>>>>> almost 5 years ago. Branch replaced by `smcv/ready/edittemplate2`
+>>>>> which drops `formatted_time` and `html_time`, and adds a suggestion
+>>>>> to use `\[[!date]]`. --[[smcv]]
+
+>>>>>> [[merged|done]] --[[smcv]]