diff --git a/.gitignore b/.gitignore index 1bfc03b..ba40cca 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ blog.sublime-project blog.sublime-workspace ssl/ .python-version -poetry.toml \ No newline at end of file +poetry.toml +.local \ No newline at end of file diff --git a/Makefile b/Makefile index 55c2887..8047570 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,23 @@ -site: +# Makefile +# + +# if a file .local exists run site locally +ifeq ($(wildcard .local),) + TARGET = site_remote +else + TARGET = site_local +endif + +site: $(TARGET) + echo $(TARGET) + +site_remote: git pull makesite systemctl reload nginx -site_local: +site_local: ./makesite.py --params params-local.json - -serve: site_local cd _site && python -m SimpleHTTPServer 2> /dev/null || python3 -m http.server dock: site_local