mirror of
https://github.com/rjNemo/vf-site
synced 2026-06-06 01:16:38 +00:00
20 lines
451 B
Python
20 lines
451 B
Python
from os import path
|
|
|
|
from loguru import logger
|
|
|
|
from lib.config import load
|
|
from lib.engine import render
|
|
|
|
|
|
def main():
|
|
config = load()
|
|
logger.info("🏁 Start building site")
|
|
for template in config["templates"]:
|
|
logger.info(f"📃Render '{template}'")
|
|
with open(path.join(config["outDir"], template), "w") as f:
|
|
f.write(render(template))
|
|
logger.info("🎉 Done…")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|