smed-vaktis/src/smed_vaktis/plugin.py

58 lines
1.5 KiB
Python
Raw Normal View History

2026-04-06 12:21:04 +02:00
from pathlib import Path
def vaktis():
def callback(items, _metadata):
items = list(items)
items.append(
(
Path("/index.md"),
{
"template": "home.html.j2",
"_destination": Path("/index.md"),
},
)
)
items.append(
(
Path("/webblogg.md"),
{
"template": "blog.html.j2",
"_destination": Path("/webblogg/index.md"),
},
)
)
items.append(
(
Path("/inlagg.md"),
{
"template": "blog.html.j2",
"select": "articles",
"_destination": Path("/inlagg/index.md"),
},
)
)
items.append(
(
Path("/lanktips.md"),
{
"template": "blog.html.j2",
"select": "links",
"_destination": Path("/lanktips/index.md"),
},
)
)
items.append(
(
Path("/evenemang.html"),
{
"template": "blog.html.j2",
"select": "events",
"_destination": Path("/evenemang/index.md"),
},
)
)
return map(lambda i: i, items), _metadata
return callback