12 lines
300 B
Python
12 lines
300 B
Python
# Eryn Wells <eryn@erynwells.me>
|
|
|
|
import datetime
|
|
import os.path as osp
|
|
from typing import Optional
|
|
from . import paths
|
|
|
|
|
|
def post_path(name, *, year: Optional[int] = None):
|
|
if not year:
|
|
year = datetime.date.today().year
|
|
return osp.join(paths.content_path(), 'blog', str(year), name)
|