forked from AFPy/afpy.org
Fix post images
This commit is contained in:
parent
08ba7bf35f
commit
c651cd4248
3
afpy.py
3
afpy.py
|
@ -2,6 +2,7 @@ import email
|
|||
import locale
|
||||
import os
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import docutils.core
|
||||
import docutils.writers.html5_polyglot
|
||||
|
@ -184,7 +185,7 @@ def posts(name, page=1):
|
|||
):
|
||||
timestamp = post[data.TIMESTAMP]
|
||||
posts[timestamp] = post
|
||||
if (timestamp / 'post.jpg').is_file():
|
||||
if (Path(str(timestamp)) / 'post.jpg').is_file():
|
||||
posts[timestamp]['image'] = '/'.join(
|
||||
(name, data.STATE_PUBLISHED, timestamp)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user