]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/bugs/cannot_make_creation__95__before_work.mdwn
why do not we have the page path in the template variables?
[git.ikiwiki.info.git] / doc / bugs / cannot_make_creation__95__before_work.mdwn
1 I have this in my `ikiwiki.setup`:
3     comments_closed_pagespec: 'creation_before(comment_forbid_before)'
5 I was hoping it would forbid comments on pages older than `comment_forbid_before.mdwn`. I created the page, of which you can see a rendering here:
7 https://anarc.at/comment_forbid_before/
9 Notice how ikiwiki correctly parsed the `meta` directive to make the page as created about two years ago, as I have put this on top of `comment_forbid_before.mdwn`:
11     [[!meta date="2018-04-05"]]
13 Yet the following page, which gets mysteriously respammed all the time, keeps on getting spammed anyways:
15 https://anarc.at/blog/2006-07-04-vol-et-ralentissement-de-ce-blog/
17 I have since them removed the spam, and worked around the problem by doing this configuration instead:
19     comments_closed_pagespec: 'creation_before(comment_forbid_before) or creation_year(2006)'
21 But later pages, "created before" the flag page, still have comments allowed:
23 https://anarc.at/blog/2017-07-03-free-software-activities-june-2017/
25 Now I know that I could list every year my blog was in operation until now in that pagespec to workaround this, but I figured it would be nicer to fix this bug.
27 Alternatively, it would be great to have a `creation_before(2 years ago)` or `creation_older_than(2 years)` to do what I actually want here, which is to keep spam to newer pages, to reduce the attack surface.
29 Thanks!
31 -- [[anarcat]]