Pārlūkot izejas kodu

TODO: choose my side (of the Atlantic ocean)

master
David Larlet pirms 1 gada
vecāks
revīzija
430bc0753d
Šim parakstam datu bāzē netika atrasta zināma atslēga
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3
    2
      site.py

+ 3
- 2
site.py Parādīt failu

@@ -4,7 +4,7 @@ import fnmatch
import locale
import os
from dataclasses import dataclass
from datetime import date, datetime
from datetime import date, datetime, timedelta
from html import escape
from pathlib import Path
from time import perf_counter
@@ -25,6 +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)


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

@property
def is_draft(self):
return self.date > date.today()
return self.date > TODAY


@cli

Notiek ielāde…
Atcelt
Saglabāt