mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Added the delevop_server script
This script and the small changes to quick start's makefile make for easily launching and killing of pelican --debug --autoreload and SimpleHTTPServer. This is extra useful for working on templates.
This commit is contained in:
parent
dc21efbe10
commit
38ffcfd4c4
3 changed files with 95 additions and 2 deletions
|
|
@ -160,7 +160,7 @@ Please answer the following questions so this script can generate the files need
|
|||
else:
|
||||
CONF['default_pagination'] = False
|
||||
|
||||
mkfile = ask('Do you want to generate a Makefile to easily manage your website?', bool, True)
|
||||
mkfile = ask('Do you want to generate a Makefile and develop server script to easily manage your website?', bool, True)
|
||||
|
||||
if mkfile:
|
||||
if ask('Do you want to upload your website using FTP?', answer=bool, default=False):
|
||||
|
|
@ -214,4 +214,13 @@ Please answer the following questions so this script can generate the files need
|
|||
except OSError, e:
|
||||
print('Error: {0}'.format(e))
|
||||
|
||||
try:
|
||||
with open(os.path.join(CONF['basedir'], 'develop_server.sh'), 'w') as fd:
|
||||
for line in get_template('develop_server.sh'):
|
||||
template = string.Template(line)
|
||||
fd.write(template.safe_substitute(CONF))
|
||||
fd.close()
|
||||
except OSError, e:
|
||||
print('Error: {0}'.format(e))
|
||||
|
||||
print('Done. Your new project is available at %s' % CONF['basedir'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue