aboutsummaryrefslogtreecommitdiff
path: root/blog_experiment/blog/html.py
blob: 6c3b00993d134dfa3b73edb0e95f1099b79eeef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import bs4
import htmlgenerator as h


def html_template(*content):
    return bs4.BeautifulSoup(h.render(
        h.HTML(
            h.HEAD(h.TITLE("El blog es mío")),
            h.BODY(
                h.H1("El blog es mío"),
                h.H2("Hay otros como él, pero este es el mío"),
                *content,
            ),
            doctype="html",
        ),
        {},
    ), features="html.parser").prettify()