Refactoring: Build.py/MakeSite(), and minor modules

This commit is contained in:
2023-02-23 17:05:36 +01:00
parent c35aa94345
commit f43026b13b
13 changed files with 254 additions and 171 deletions

View File

@ -12,12 +12,12 @@
import os
from Modules.Utils import *
def PugCompileList(OutputDir, Pages, LimitFiles):
def PugCompileList(OutDir:str, Pages:list, LimitFiles):
# Pug-cli seems to shit itself with folder paths as input, so we pass ALL the files as arguments
Paths = ''
for File, Content, Titles, Meta in Pages:
if File.lower().endswith('.pug') and (LimitFiles == False or File in LimitFiles):
Path = f'{OutputDir}/{File}'
Path = f'{OutDir}/{File}'
WriteFile(Path, Content)
Paths += f'"{Path}" '
if Paths: