]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/inline_sort_order_and_meta_date_value.mdwn
6357acdee8fd4fe4d3209f1af00f043147e7468d
[ikiwiki.git] / doc / bugs / inline_sort_order_and_meta_date_value.mdwn
1 I have a directory containing two files. f1 (<http://alcopop.org/~jon/repro2/src/blog/debgtd.html>) has 
2
3     meta date="2008-07-02 14:13:17"
4
5 f2 (<http://alcopop.org/~jon/repro2/src/blog/moving.html>) has
6
7     meta date="2008-07-02 21:04:21"
8
9 They have both been modified recently:
10
11     >>> stat(f1)
12     (33188, 459250L, 65027L, 1, 1000, 1000, 1686L, 1227967177, 1227966706, 1227966706)
13     >>> stat(f2)
14     (33188, 458868L, 65027L, 1, 1000, 1000, 938L, 1227967187, 1227966705, 1227966705)
15
16 Note that f1 is fractionally newer than f2 in terms of ctime and mtime, but f2 is much newer in terms of the meta information.
17
18 Another page includes them both via inline:
19
20     inline pages="blog/*" show=5
21
22 The resulting page is rendered with f1 above f2, seemingly not using the meta directive information: <http://alcopop.org/~jon/repro2/dest/blog/>. The footer in the inline pages does use the correct time e.g. <em>Posted Wed 02 Jul 2008 14:13:17 BST</em>.
23
24 If I instead include them using creation_year in the pagespec, they are ordered correctly.
25
26 <http://alcopop.org/~jon/repro2/> contains the src used to reproduce this, the precise ikiwiki invocation (inside Makefile) and the results (dest).
27
28 -- [[users/Jon]]
29
30
31 > On Ikiwiki 2.53.3 (Debian Lenny), my inlines are also sorted using mtime
32 > by default -- despite what the [[documentation|/ikiwiki/directive/inline]]
33 > says -- but setting the supposed default sort order manually produces the
34 > correct results.  For example, the following inline sorts my blog
35 > entires using their meta date or ctime:
36
37 >     inline pages="blog/*" show="10" sort="age"
38
39 > I'll try to look at the code this weekend and see if age is really the
40 > default sort order.
41
42 > -- [David A. Harding](http://dtrt.org), 2008-12-20