浏览代码

At some point, I should write some tests

master
David Larlet 2 年前
父节点
当前提交
0921cb1c89
找不到此签名对应的密钥
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5
    2
      site.py

+ 5
- 2
site.py 查看文件

@@ -25,7 +25,7 @@ DOMAIN = "https://larlet.fr"
LOCAL_DOMAIN = "http://larlet.test:3579"
# Hardcoding publication at 12 in Paris timezone.
NORMALIZED_STRFTIME = "%Y-%m-%dT12:00:00+01:00"
TODAY = date.today() - timedelta(hours=6)
TODAY = datetime.today() + timedelta(hours=6)


class CustomHTMLRenderer(mistune.HTMLRenderer):
@@ -117,7 +117,10 @@ class Page:

@property
def is_draft(self):
return self.date > TODAY
return (
datetime(year=self.date.year, month=self.date.month, day=self.date.day)
> TODAY
)


@cli

正在加载...
取消
保存