From 559a063c63f088f2f5ebba6d0032794bf9e4e9ae Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 9 Jan 2023 00:22:18 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=87=8D=E5=BB=BA=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E6=97=B6=E8=A1=A5=E5=85=A8=E6=96=87=E6=A1=A3=E6=A0=91=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84=20updated=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/index.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/model/index.go b/kernel/model/index.go index 3f0e64b3b..55b7995ba 100644 --- a/kernel/model/index.go +++ b/kernel/model/index.go @@ -78,6 +78,13 @@ func (box *Box) Index(fullRebuildIndex bool) (treeCount int, treeSize int64) { } docIAL := parse.IAL2MapUnEsc(tree.Root.KramdownIAL) + if "" == docIAL["updated"] { + updated := util.TimeFromID(tree.Root.ID) + tree.Root.SetIALAttr("updated", updated) + docIAL["updated"] = updated + writeJSONQueue(tree) + } + cache.PutDocIAL(p, docIAL) util.IncBootProgress(bootProgressPart, fmt.Sprintf(Conf.Language(92), util.ShortPathForBootingDisplay(tree.Path)))