forked from github/pelican
Merge pull request #775 from lexual/s3_support_for_quickstart
Added S3 support for pelican quickstart.
This commit is contained in:
commit
5dbb8c3041
2 changed files with 10 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ CONF = {
|
|||
'ssh_port': 22,
|
||||
'ssh_user': 'root',
|
||||
'ssh_target_dir': '/var/www',
|
||||
's3_bucket': 'my_s3_bucket',
|
||||
'dropbox_dir': '~/Dropbox/Public/',
|
||||
'default_pagination': 10,
|
||||
'siteurl': '',
|
||||
|
|
@ -204,6 +205,8 @@ needed by Pelican.
|
|||
CONF['ssh_target_dir'] = ask('Where do you want to put your web site on that server?', str_compat, CONF['ssh_target_dir'])
|
||||
if ask('Do you want to upload your website using Dropbox?', answer=bool, default=False):
|
||||
CONF['dropbox_dir'] = ask('Where is your Dropbox directory?', str_compat, CONF['dropbox_dir'])
|
||||
if ask('Do you want to upload your website using S3?', answer=bool, default=False):
|
||||
CONF['s3_bucket'] = ask('What is the name of your S3 bucket?', str_compat, CONF['s3_bucket'])
|
||||
|
||||
try:
|
||||
os.makedirs(os.path.join(CONF['basedir'], 'content'))
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ SSH_PORT=$ssh_port
|
|||
SSH_USER=$ssh_user
|
||||
SSH_TARGET_DIR=$ssh_target_dir
|
||||
|
||||
S3_BUCKET=$s3_bucket
|
||||
|
||||
DROPBOX_DIR=$dropbox_dir
|
||||
|
||||
help:
|
||||
|
|
@ -33,6 +35,7 @@ help:
|
|||
@echo ' rsync_upload upload the web site via rsync+ssh '
|
||||
@echo ' dropbox_upload upload the web site via Dropbox '
|
||||
@echo ' ftp_upload upload the web site via FTP '
|
||||
@echo ' s3_upload upload the web site via S3 '
|
||||
@echo ' github upload the web site via gh-pages '
|
||||
@echo ' '
|
||||
|
||||
|
|
@ -75,8 +78,11 @@ dropbox_upload: publish
|
|||
ftp_upload: publish
|
||||
lftp ftp://$$(FTP_USER)@$$(FTP_HOST) -e "mirror -R $$(OUTPUTDIR) $$(FTP_TARGET_DIR) ; quit"
|
||||
|
||||
s3_upload: publish
|
||||
s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed
|
||||
|
||||
github: publish
|
||||
ghp-import $$(OUTPUTDIR)
|
||||
git push origin gh-pages
|
||||
|
||||
.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload github
|
||||
.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload github
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue