Update console site build process

This commit is contained in:
Mark Qvist 2023-01-12 18:08:10 +01:00
parent 899263b390
commit a2a9b2f0a9
2 changed files with 19 additions and 3 deletions

View File

@ -2,16 +2,30 @@ clean:
@echo Cleaning... @echo Cleaning...
@-rm -rf ./build @-rm -rf ./build
site: dirs:
@mkdir -p ./build @mkdir -p ./build
@mkdir -p ./build/css @mkdir -p ./build/css
@mkdir -p ./build/gfx @mkdir -p ./build/gfx
@mkdir -p ./build/images @mkdir -p ./build/images
# @mkdir -p ./build/pkgs
pages:
python ./build.py python ./build.py
pages-debug:
python ./build.py --no-gz
data:
@echo Including assets...
@cp assets/css/* build/css/ @cp assets/css/* build/css/
@cp assets/gfx/* build/gfx/ @cp assets/gfx/* build/gfx/
# @cp assets/images/* build/images/ # @cp assets/images/* build/images/
# @cp assets/scripts/* build/scripts/ # @cp assets/scripts/* build/scripts/
# @cp -r ../../Reticulum/docs/manual/* build/reticulum_manual/ # @cp -r ../../Reticulum/docs/manual/* build/reticulum_manual/
# @cp -r ../../Reticulum/docs/Reticulum\ Manual.pdf build/reticulum_manual/ # @cp -r ../../Reticulum/docs/Reticulum\ Manual.pdf build/reticulum_manual/
site: dirs data pages
local: dirs data pages-debug
serve:
python -m http.server 7777 --bind 127.0.0.1 --directory ./build

View File

@ -1,5 +1,6 @@
import markdown import markdown
import os import os
import sys
import shutil import shutil
packages = { packages = {
@ -207,4 +208,5 @@ for mdf in source_files:
wf.write(html.encode(OUTPUT_ENCODING)) wf.write(html.encode(OUTPUT_ENCODING))
fetch_reticulum_site() fetch_reticulum_site()
if not "--no-gz" in sys.argv:
gz_all() gz_all()