Skip to content

Commit a1319e7

Browse files
Create tag_from_path.py
1 parent e30681e commit a1319e7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/tag_from_path.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from pelican import signals
2+
from pelican.contents import Article
3+
4+
5+
def tag_from_path(article: Article) -> None:
6+
article.tags.append(article.tag)
7+
8+
9+
def register() -> None:
10+
signals.article_generator_write_article.connect(tag_from_path)

0 commit comments

Comments
 (0)