forked from github/pelican
Give devserver its own make target
Restore "make serve" to a non-backgrounded SimpleHTTPServer process and give the develop_server.sh its own make target at "make devserver". Add a few missing make targets to the help list and re-order targets for consistency. Add note to docs regarding how to stop the devserver.
This commit is contained in:
parent
beb4dccc8c
commit
0c02536605
2 changed files with 25 additions and 9 deletions
|
|
@ -107,11 +107,21 @@ instead::
|
|||
|
||||
$ make regenerate
|
||||
|
||||
To serve the site so it can be previewed in your browser::
|
||||
To serve the site so it can be previewed in your browser at
|
||||
http://localhost:8000::
|
||||
|
||||
$ make serve
|
||||
|
||||
Visit http://localhost:8000 in your browser to see your site.
|
||||
Normally you would need to run ``make regenerate`` and ``make serve`` in two
|
||||
separate terminal sessions, but you can run both at once via::
|
||||
|
||||
$ make devserver
|
||||
|
||||
The above command will simultaneously run Pelican in regeneration mode as well
|
||||
as serve the output at http://localhost:8000. Once you are done testing your
|
||||
changes, you should stop the development server via::
|
||||
|
||||
$ ./develop_server stop
|
||||
|
||||
When you're ready to publish your site, you can upload it via the method(s) you
|
||||
chose during the ``pelican-quickstart`` questionnaire. For this example, we'll
|
||||
|
|
|
|||
|
|
@ -24,12 +24,15 @@ help:
|
|||
@echo 'Usage: '
|
||||
@echo ' make html (re)generate the web site '
|
||||
@echo ' make clean remove the generated files '
|
||||
@echo ' make regenerate regenerate files upon modification '
|
||||
@echo ' make publish generate using production settings '
|
||||
@echo ' make serve run develop_server.sh restart '
|
||||
@echo ' ftp_upload upload the web site via FTP '
|
||||
@echo ' make serve serve site at http://localhost:8000'
|
||||
@echo ' make devserver start/restart develop_server.sh '
|
||||
@echo ' ssh_upload upload the web site via SSH '
|
||||
@echo ' rsync_upload upload the web site via rsync+ssh '
|
||||
@echo ' dropbox_upload upload the web site via Dropbox '
|
||||
@echo ' rsync_upload upload the web site via rsync/ssh '
|
||||
@echo ' ftp_upload upload the web site via FTP '
|
||||
@echo ' github upload the web site via gh-pages '
|
||||
@echo ' '
|
||||
|
||||
|
||||
|
|
@ -46,20 +49,23 @@ regenerate: clean
|
|||
$$(PELICAN) -r $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS)
|
||||
|
||||
serve:
|
||||
cd $$(OUTPUTDIR) && python -m SimpleHTTPServer
|
||||
|
||||
devserver:
|
||||
$$(BASEDIR)/develop_server.sh restart
|
||||
|
||||
publish:
|
||||
$$(PELICAN) $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(PUBLISHCONF) $$(PELICANOPTS)
|
||||
|
||||
dropbox_upload: publish
|
||||
cp -r $$(OUTPUTDIR)/* $$(DROPBOX_DIR)
|
||||
|
||||
ssh_upload: publish
|
||||
scp -P $$(SSH_PORT) -r $$(OUTPUTDIR)/* $$(SSH_USER)@$$(SSH_HOST):$$(SSH_TARGET_DIR)
|
||||
|
||||
rsync_upload: publish
|
||||
rsync -e "ssh -p $(SSH_PORT)" -P -rvz --delete $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
|
||||
|
||||
dropbox_upload: publish
|
||||
cp -r $$(OUTPUTDIR)/* $$(DROPBOX_DIR)
|
||||
|
||||
ftp_upload: publish
|
||||
lftp ftp://$$(FTP_USER)@$$(FTP_HOST) -e "mirror -R $$(OUTPUTDIR) $$(FTP_TARGET_DIR) ; quit"
|
||||
|
||||
|
|
@ -67,4 +73,4 @@ github: publish
|
|||
ghp-import $$(OUTPUTDIR)
|
||||
git push origin gh-pages
|
||||
|
||||
.PHONY: html help clean regenerate serve publish ftp_upload ssh_upload rsync_upload dropbox_upload github
|
||||
.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload github
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue