feat: added debug

This commit is contained in:
Hazel 2025-04-10 14:51:17 +02:00
parent fab58de71d
commit 8e64e48097
2 changed files with 29 additions and 10 deletions

View File

@ -3,20 +3,35 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Hello Bulma!</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css"
/>
<title>STSG</title>
<link rel="stylesheet" href="static/bulma.min.css" />
</head>
<body>
<!-- Header (Navbar) -->
<nav
class="navbar is-primary"
role="navigation"
aria-label="main navigation"
>
<div class="navbar-brand">
<a class="navbar-item" href="#">
<strong>Static Translated Site Generator</strong>
</a>
</div>
</nav>
<!-- Main Content -->
<section class="section">
<div class="container">
<h1 class="title">Hello World</h1>
<p class="subtitle">My first website with <strong>Bulma</strong>!</p>
<content />
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="content has-text-centered">
<p><strong>STSG</strong> by Hazel. &copy; 2025</p>
</div>
</footer>
</body>
</html>

View File

@ -72,9 +72,13 @@ def build():
copy_static()
context = Context()
print(context.get_text({
# debug
t = context.get_text({
"content": """
<h1 class="title">Hello World</h1>
<p class="subtitle">My first website with <strong>Bulma</strong>!</p>
"""
}))
})
with Path(DIST_DIRECTORY, "index.html").open("w") as f:
f.write(t)