diff --git a/README.md b/README.md index bd5d30b..5b4c9e2 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,7 @@ Okay this has been updated towards being statically generated and served by ngin ic web server you like). I have made a fancy schmancy STATIC SITE GENERATOR in `generate.ignore.py` , which basically just renders jinja templates for appropriate files! it's pretty self-explanatory, use -h to get help on the args, it's a great time. + +shooflenet.service is no longer necessary because this is all run through nginx + +nginx needs to be updated to handle -/_ inconsistencies in file names diff --git a/generate.ignore.py b/generate.ignore.py index 8c1f0b0..0822e31 100644 --- a/generate.ignore.py +++ b/generate.ignore.py @@ -28,14 +28,19 @@ for path_to_source in source.glob("**/*"): if ".ignore" in str(rel_path): continue + if ".git" in str(rel_path): + continue if path_to_source.is_dir(): pass elif ".article.html" in str(path_to_source): - path_to_output = path_to_output.parent / path_to_output.name.replace(".article","") + folder_name = path_to_output.parent / path_to_output.name.replace(".article.html","") + os.makedirs(folder_name, exist_ok=True) # make the folder /var/www/shoofle.net/articles/circle_script + + path_to_output = folder_name / "index.html" + with open(path_to_output, "w") as output_file: - os.makedirs(path_to_output.parent, exist_ok=True) output_file.write(article_template.render(title="Article", target=str(rel_path))) elif ".renderme" in str(path_to_source):