aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/postsparkline_and_calendar_archive_do_not_respect_meta_directives.mdwn
blob: f41f802203cabc2e597b3896ed80c4369eb318e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
On my [blog](http://anarc.at/blog), i have setup a simple calendar and sparkline on the sidebar, similar to [joey's](http://joeyh.name/blog/). Unfortunately, in my case it looks like all posts were done in february, date at which i [converted from drupal](http://anarc.at/blog/2015-02-06-migrating-drupal-ikiwiki/).

This is how i did the directives:

<pre>
\[[!calendar pages="blog/* and !blog/*/* and !*/Discussion"]]

\[[!calendar pages="blog/* and !blog/*/* and !*/Discussion" month=-1]]

Temps passé entre les articles: 
\[[!postsparkline pages="blog/* and !blog/*/* and !link(foo) and
!link(unfinished)" max=50
formula=interval style=bar barwidth=2 barspacing=1 height=13]]  
Articles par mois:
\[[!postsparkline pages="blog/* and !blog/*/* and !link(foo) and
!link(unfinished)" max=23 formula=permonth style=bar barwidth=2 barspacing=1 height=13]]  
</pre>

Is it possible the `meta(date)` directives are being ignored by those plugins? --[[anarcat]]

> For background, each page has two dates: creation date (`ctime`, `meta(date)`)
> and last modification date (`mtime`, `meta(updated)`). postsparkline
> defaults to showing the ctime but can be configured to use the mtime
> instead; calendar always uses ctime. So what you're doing *should* work
> like you expect.
>
> The plugins don't get to choose whether they ignore meta(date);
> the effect of a meta(date) directive in `$page` is to set `$pagectime{$page}`
> during scanning (overriding whatever was found in the filesystem), and
> that data structure is what the plugins read from. So the first thing to
> investigate is whether the ctime
> [[in your .ikiwiki/indexdb|tips/inside_dot_ikiwiki]] is correct. --[[smcv]]