Questo sito è stato creato con l’aiuto di un semplice script python con qualche piccola modifica manuale.
#!/usr/bin/env python3
"""
- Date: 22 Aprile 2026
- Author: spartaco
- Site: https://spartaco.neocities.org
- Desc: Un semplice generatore di pagine web statiche
Il funzionamento di questo script è molto semplice.
È stato pensato per essere usato in combinazione con pandoc,
anche se si può passare il contenuto della pagina direttamente
da file (incluso stdin) senza formattazione o con formattazione
manuale.
Per creare una semplice pagina statica basta editare un file
e passarlo in ingresso a pandoc.
---- usage ----------
$ cat - | python script.py > output.page (Ctrl+D per terminare l'input)
qualora si volesse usare pandoc da stdin
$ pandoc - | python thisscript.py > output_page.html
oppure da file
$ pandoc content.md | python thisscript.py > output_page.html
----------------------
"""
# script begin
import sys
title = "my website" # Da cambiare
body_content = sys.stdin.read() or ""
style= "layout.css"
doctype = "<!doctype html>"
meta_default = """
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
"""
head = f"""<head>
{meta_default}
<title>{title}</title>
<link rel="stylesheet" href="{style}" />
</head>"""
flex_container = f"""<div id="container">
{body_content}
</div>"""
body = f"""<body>
{flex_container}
</body>
"""
html = f"""{doctype}
<html>
{head}
{body}
</html>"""
if __name__ == '__main__':
# test
print(html)
# script end.
"""
/* A minimal CSS for this page
* You can save it as layout.css
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
}
body {
display: flex;
flex-direction: column;
gap: 10px;
font-family: system-ui, -apple-system, sans-serif;
align-items: center;
background: beige;
}
#container {
max-width: 960px;
width: 100%;
margin: 2rem auto;
padding: 0 1rem;
line-height: 1.6;
}
pre {
margin-top: 2em;
background: #f3f3f3;
padding: 2em;
border: 2px solid black;
overflow-x: auto;
max-height: 600px;
line-height: 1.6em;
}
code {
color: brown;
font-family: 'Courier New', monospace;
font-size: 1em;
}
"""