chore: use jean-website to generate site (#6)

This commit is contained in:
Corentin 2024-05-20 15:56:04 +02:00
parent 7cf6de22f7
commit dd76a16223
23 changed files with 39 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
build
__pycache__

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 204 KiB

35
noxfile.py Normal file
View File

@ -0,0 +1,35 @@
"""Nox configuration file."""
from shutil import copytree
from nox import Session, session
@session()
def lint(session: Session) -> None:
session.install("ruff")
session.run("ruff", "check", "--fix")
session.run("ruff", "format")
@session()
def mypy(session: Session) -> None:
session.install("-e", ".[dev]", "mypy", "types-PyYAML", "types-Markdown")
session.run("mypy")
@session
def build(session: Session) -> None:
"""Run unit tests."""
session.install("nodeenv", "git+https://git.collectivit.org/collectivit/jean-website")
session.run_install("nodeenv", "-p")
session.log("Building website...")
session.run("jwebsite", "build")
session.log("Copying static files to build directory...")
copytree("assets", "build", dirs_exist_ok=True)
@session()
def devenv(session: Session) -> None:
session.install("-e", ".[dev]")

1
site.py Normal file
View File

@ -0,0 +1 @@
site.render('index.html.j2', 'index.html')

View File

@ -198,3 +198,4 @@
</div>
</body>
</html>