do single-language only and link both

This commit is contained in:
AntonObersteiner 2024-06-05 12:38:35 +02:00
parent b4104d1717
commit e71e30ce86
3 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View file

@ -2,5 +2,4 @@
*.swo *.swo
__pycache__ __pycache__
deploy/index.html
deploy/*/index.html deploy/*/index.html

8
deploy/index.html Normal file
View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<a href="/de/index.html"> Deutsch </a>
<br />
<a href="/en/index.html"> English </a>
</body>
</html>

View file

@ -242,7 +242,7 @@ def write_index(text, filename = "./deploy/index.html"):
def main(): def main():
template = read_template() template = read_template()
for language in ["", "de", "en"]: for language in ["de", "en"]:
generated = generate_text(language = language) generated = generate_text(language = language)
generated = greeting[language] + "\n" + generated generated = greeting[language] + "\n" + generated
text = template.replace("<replace with text>", generated) text = template.replace("<replace with text>", generated)