diff options
| author | alex <alex@pdp7.net> | 2023-10-08 16:07:44 +0200 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2023-10-08 16:08:07 +0200 |
| commit | 63b0946233b06735b8403c2f67acc7b706195909 (patch) | |
| tree | 733fcc31a37fdb0837d1a7133994b8d070483b21 /blog_experiment/blog/html.py | |
| parent | 177079699d7b81c81976a529ab1f3205abc1a17e (diff) | |
Add titles to HTML blog entries pages
Diffstat (limited to 'blog_experiment/blog/html.py')
| -rw-r--r-- | blog_experiment/blog/html.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/blog_experiment/blog/html.py b/blog_experiment/blog/html.py index 6c3b0099..2ecf97a6 100644 --- a/blog_experiment/blog/html.py +++ b/blog_experiment/blog/html.py @@ -2,10 +2,13 @@ import bs4 import htmlgenerator as h -def html_template(*content): +def html_template(*content, page_title=None): + title = "El blog es mío" + if page_title: + title += f" - {page_title}" return bs4.BeautifulSoup(h.render( h.HTML( - h.HEAD(h.TITLE("El blog es mío")), + h.HEAD(h.TITLE(title)), h.BODY( h.H1("El blog es mío"), h.H2("Hay otros como él, pero este es el mío"), |
