diff --git a/Makefile b/Makefile index f071905..4ca734a 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,11 @@ OUTPUTDIR=$(BASEDIR)/output CONFFILE=$(BASEDIR)/pelicanconf.py PUBLISHCONF=$(BASEDIR)/publishconf.py +SSH_HOST=bxxa.cc +SSH_PORT=2231 +SSH_USER=homepage +SSH_TARGET_DIR=/var/www/localhost/htdocs/ + DEBUG ?= 0 ifeq ($(DEBUG), 1) @@ -39,6 +44,9 @@ help: @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 ' @echo ' make devserver [PORT=8000] serve and regenerate together ' @echo ' make devserver-global regenerate and serve on 0.0.0.0 ' + @echo ' make ssh_upload upload the web site via SSH ' + @echo ' make sftp_upload upload the web site via SFTP ' + @echo ' make rsync_upload upload the web site via rsync+ssh ' @echo ' ' @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html ' @echo 'Set the RELATIVE variable to 1 to enable relative urls ' @@ -68,5 +76,14 @@ devserver-global: publish: "$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(PUBLISHCONF)" $(PELICANOPTS) +ssh_upload: publish + scp -P $(SSH_PORT) -r "$(OUTPUTDIR)"/* "$(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)" + +sftp_upload: publish + printf 'put -r $(OUTPUTDIR)/*' | sftp $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + +rsync_upload: publish + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --include tags --cvs-exclude --delete "$(OUTPUTDIR)"/ "$(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)" + -.PHONY: html help clean regenerate serve serve-global devserver publish \ No newline at end of file +.PHONY: html help clean regenerate serve serve-global devserver publish ssh_upload rsync_upload \ No newline at end of file diff --git a/pelicanconf.py b/pelicanconf.py index e07cabb..03ac9de 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -1,6 +1,6 @@ AUTHOR = 'cinnaboot' -SITENAME = 'blah' -SITEURL = 'https://bxxa.cc/homepage/output' +SITENAME = 'blech' +SITEURL = '' PATH = 'content' @@ -8,7 +8,7 @@ TIMEZONE = 'US/Eastern' DEFAULT_LANG = 'en' -THEME = 'themes/notmyidea-custom' +THEME = './themes/notmyidea-custom' # Feed generation is usually not desired when developing FEED_ALL_ATOM = None @@ -30,4 +30,4 @@ AUTHOR_FEED_RSS = None DEFAULT_PAGINATION = 10 # Uncomment following line if you want document-relative URLs when developing -RELATIVE_URLS = True +#RELATIVE_URLS = True diff --git a/tasks.py b/tasks.py index c7c6c46..d7b0c98 100644 --- a/tasks.py +++ b/tasks.py @@ -25,6 +25,11 @@ CONFIG = { 'settings_publish': 'publishconf.py', # Output path. Can be absolute or relative to tasks.py. Default: 'output' 'deploy_path': SETTINGS['OUTPUT_PATH'], + # Remote server configuration + 'ssh_user': 'homepage', + 'ssh_host': 'bxxa.cc', + 'ssh_port': '2231', + 'ssh_path': '/var/www/localhost/htdocs/', # Host and port for `serve` 'host': 'localhost', 'port': 8000,