aboutsummaryrefslogtreecommitdiff
path: root/blog_experiment/blog/html.py
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-10-08 16:07:44 +0200
committeralex <alex@pdp7.net>2023-10-08 16:08:07 +0200
commit63b0946233b06735b8403c2f67acc7b706195909 (patch)
tree733fcc31a37fdb0837d1a7133994b8d070483b21 /blog_experiment/blog/html.py
parent177079699d7b81c81976a529ab1f3205abc1a17e (diff)
Add titles to HTML blog entries pages
Diffstat (limited to 'blog_experiment/blog/html.py')
-rw-r--r--blog_experiment/blog/html.py7
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"),