smed-vaktis/src/smed_vaktis/plugin.py

106 lines
3.4 KiB
Python
Raw Normal View History

2026-04-06 12:21:04 +02:00
from pathlib import Path
def vaktis():
def callback(items, _metadata):
2026-05-10 15:22:17 +02:00
items = [
2026-05-03 20:12:41 +02:00
(
Path("prenumerera.xml"),
{
"layout": "atom.xml.j2",
"_destination": Path("prenumerera.xml"),
"content": "",
},
2026-05-10 15:22:17 +02:00
),
2026-05-03 20:12:41 +02:00
(
Path("prenumerera/lanktips.xml"),
{
"layout": "atom.xml.j2",
"_destination": Path("prenumerera/lanktips.xml"),
"content": "",
"select": "links",
},
2026-05-10 15:22:17 +02:00
),
2026-05-03 20:12:41 +02:00
(
Path("prenumerera/inlagg.xml"),
{
"layout": "atom.xml.j2",
"_destination": Path("prenumerera/inlagg.xml"),
"content": "",
"select": "articles",
},
2026-05-10 15:22:17 +02:00
),
2026-05-03 20:12:41 +02:00
(
Path("prenumerera/evenemang.xml"),
{
"layout": "atom.xml.j2",
"_destination": Path("prenumerera/evenemang.xml"),
"content": "",
"select": "events",
},
2026-05-10 15:22:17 +02:00
),
2026-05-03 20:12:41 +02:00
(
Path("kommande-evenemang.ics"),
{
"layout": "events.ics.j2",
"_destination": Path("kommande-evenemang.ics"),
"content": "",
},
2026-05-10 15:22:17 +02:00
),
2026-04-06 12:21:04 +02:00
(
2026-04-06 12:46:49 +02:00
Path("index.md"),
2026-04-06 12:21:04 +02:00
{
2026-04-06 12:46:49 +02:00
"title": "Anders Englöf Ytterströms hemsida",
2026-04-06 13:07:05 +02:00
"layout": "home.html.j2",
2026-04-06 12:46:49 +02:00
"_destination": Path("index.md"),
"content": "",
2026-04-06 12:21:04 +02:00
},
2026-05-10 15:22:17 +02:00
),
2026-04-06 12:21:04 +02:00
(
2026-04-06 12:46:49 +02:00
Path("webblogg.md"),
2026-04-06 12:21:04 +02:00
{
2026-04-06 13:07:05 +02:00
"layout": "blog.html.j2",
2026-04-06 12:46:49 +02:00
"title": "Anders Englöf Ytterströms webblogg",
"_destination": Path("webblogg/index.md"),
"content": "",
2026-05-10 15:22:17 +02:00
"page": 0,
2026-04-06 12:21:04 +02:00
},
2026-05-10 15:22:17 +02:00
),
2026-04-06 12:21:04 +02:00
(
2026-04-06 12:46:49 +02:00
Path("inlagg.md"),
2026-04-06 12:21:04 +02:00
{
2026-05-10 15:22:17 +02:00
"layout": "blog.articles.html.j2",
2026-05-03 20:12:41 +02:00
"title": "Inlägg från Anders Englöf Ytterströms webblogg",
2026-04-06 12:21:04 +02:00
"select": "articles",
2026-04-06 12:46:49 +02:00
"_destination": Path("inlagg/index.md"),
"content": "",
2026-05-10 15:22:17 +02:00
"page": 0,
2026-04-06 12:21:04 +02:00
},
2026-05-10 15:22:17 +02:00
),
2026-04-06 12:21:04 +02:00
(
2026-04-06 12:46:49 +02:00
Path("lanktips.md"),
2026-04-06 12:21:04 +02:00
{
2026-05-10 15:22:17 +02:00
"layout": "blog.links.html.j2",
2026-05-03 20:12:41 +02:00
"title": "Länktips från Anders Englöf Ytterströms webblogg",
2026-04-06 12:21:04 +02:00
"select": "links",
2026-04-06 12:46:49 +02:00
"_destination": Path("lanktips/index.md"),
"content": "",
2026-05-10 15:22:17 +02:00
"page": 0,
2026-04-06 12:21:04 +02:00
},
2026-05-10 15:22:17 +02:00
),
2026-04-06 12:21:04 +02:00
(
2026-04-06 12:46:49 +02:00
Path("evenemang.html"),
2026-04-06 12:21:04 +02:00
{
2026-05-10 15:22:17 +02:00
"layout": "blog.events.html.j2",
2026-04-06 12:46:49 +02:00
"title": "Anders Englöf Ytterströms deltaganden i konserter och festivaler sedan 2000",
2026-04-06 12:21:04 +02:00
"select": "events",
2026-04-06 12:46:49 +02:00
"_destination": Path("evenemang/index.md"),
"content": "",
2026-05-10 15:22:17 +02:00
"page": 0,
2026-04-06 12:21:04 +02:00
},
2026-05-10 15:22:17 +02:00
),
] + list(items)
2026-04-06 12:46:49 +02:00
return map(lambda i: i, items)
2026-04-06 12:21:04 +02:00
return callback