X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/e215d023e6e8ca672a77220f3e39904b28fba296..2fc21bff0adc27d9374aa6b5f5011ca422df47d8:/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 3da37f3d4..6b7739fd0 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -20,15 +20,17 @@ Do I have it right? > Some VCS, like git, set the file mtimes to the current time > when making a new checkout, so they will be lost if you do that. > The creation times can be retrived using the `--getctime` option. -> I suppose it might be nice if there were a `--getmtime` that pulled -> true modification times out of the VCS, but I haven't found it a big -> deal in practice for the last modification times to be updated to the -> current time when rebuilding a wiki like this. --[[Joey]] +> --[[Joey]] > > > Thanks for the clarification. I ran some tests of my own to make sure I understand it right, and I'm satisfied > > that the order of posts in my blog can be retrieved from the VCS using the `--getctime` option, at least if I > > choose to order my posts by creation time rather than modification time. But I now know that I can't rely on > > page modification times in ikiwiki as these can be lost permanently. +> +> > > Update: It's now renamed to `--gettime`, and pulls both the creation +> > > and modification times. Also, per [[todo/auto_getctime_on_fresh_build]], +> > > this is now done automatically the first time ikiwiki builds a +> > > srcdir. So, no need to worry about this any more! --[[Joey]] > > > > I would suggest that there should at least be a `--getmtime` option like you describe, and perhaps that > > `--getctime` and `--getmtime` be _on by default_. In my opinion the creation times and modification times of @@ -49,6 +51,7 @@ Do I have it right? > > Surely it is not the _last changed time_ but the _first seen time_ of each page that is pulled out of the VCS? > > If the aim is to get the real creation times of items in weblogs, then the last times that the items were > > changed in the VCS is not going to help. -- [[seanh]] +>>> Typo, fixed. --[[Joey]] > > > If you want to preserve the date of a page, the best way to do it is to > > > use [[ikiwiki/directive/meta]] date="foo". This will survive checkouts, @@ -79,10 +82,17 @@ Do I have it right? fi date=$(date) - echo '[[!template id=draft]]' >> "$pagename" - echo "[[!meta date=\"$date\"]]" >> "$pagename" - echo "[[!tag draft]]" >> "$pagename" + echo '\[[!template id=draft]]' >> "$pagename" + echo "\[[!meta date=\"$date\"]]" >> "$pagename" + echo "\[[!tag draft]]" >> "$pagename" git add "$pagename" $EDITOR "$pagename" >>>>> -- [[Jon]] + +> A quick workaround for me to get modification times right is the following +> little zsh script, which unfortunately only works for git: + +>> Elided; no longer needed since --gettime does that, and much faster! --[[Joey]] + +> --[[David_Riebenbauer]]