From 3b5f07fe1543bf4d207406ffc516ed57c93f8d43 Mon Sep 17 00:00:00 2001 From: Julien Iguchi-Cartigny Date: Mon, 14 Oct 2013 10:10:38 +0200 Subject: [PATCH 1/5] fix #1116, pages are not generated in version 3.3.0 Added output directory to build and generate commands of fabfile template --- pelican/tools/templates/fabfile.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/tools/templates/fabfile.py.in b/pelican/tools/templates/fabfile.py.in index 73c64ac8..eac167b9 100644 --- a/pelican/tools/templates/fabfile.py.in +++ b/pelican/tools/templates/fabfile.py.in @@ -22,14 +22,14 @@ def clean(): local('mkdir {deploy_path}'.format(**env)) def build(): - local('pelican -s pelicanconf.py') + local('pelican content/ -s pelicanconf.py') def rebuild(): clean() build() def regenerate(): - local('pelican -r -s pelicanconf.py') + local('pelican content/ -r -s pelicanconf.py') def serve(): local('cd {deploy_path} && python -m SimpleHTTPServer'.format(**env)) From 5d07d87f861c6731f3f34b0b9b09f78f849e37a2 Mon Sep 17 00:00:00 2001 From: Julien Iguchi-Cartigny Date: Mon, 14 Oct 2013 12:54:58 +0200 Subject: [PATCH 2/5] Adding CONTENT_PATH variable --- pelican/tools/templates/fabfile.py.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pelican/tools/templates/fabfile.py.in b/pelican/tools/templates/fabfile.py.in index eac167b9..ca0ab4f0 100644 --- a/pelican/tools/templates/fabfile.py.in +++ b/pelican/tools/templates/fabfile.py.in @@ -6,6 +6,9 @@ import os env.deploy_path = 'output' DEPLOY_PATH = env.deploy_path +# Content path configuration +CONTENT_PATH = 'content/' + # Remote server configuration production = '$ssh_user@$ssh_host:$ssh_port' dest_path = '$ssh_target_dir' @@ -22,14 +25,14 @@ def clean(): local('mkdir {deploy_path}'.format(**env)) def build(): - local('pelican content/ -s pelicanconf.py') + local('pelican ' + CONTENT_PATH + ' -s pelicanconf.py') def rebuild(): clean() build() def regenerate(): - local('pelican content/ -r -s pelicanconf.py') + local('pelican ' + CONTENT_PATH + ' -r -s pelicanconf.py') def serve(): local('cd {deploy_path} && python -m SimpleHTTPServer'.format(**env)) From 96e10875b2bf24b8a4db69fe4df421adacd51940 Mon Sep 17 00:00:00 2001 From: Julien Iguchi-Cartigny Date: Mon, 28 Oct 2013 14:02:49 +0100 Subject: [PATCH 3/5] Using PATH in pelicanconf.py template to set path to content directory. - declare default content directory to PATH in pelicanconf.py template - removing content path hardcoded in fafile.py template - removing previous commit --- pelican/tools/templates/fabfile.py.in | 7 ++----- pelican/tools/templates/pelicanconf.py.in | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pelican/tools/templates/fabfile.py.in b/pelican/tools/templates/fabfile.py.in index ca0ab4f0..73c64ac8 100644 --- a/pelican/tools/templates/fabfile.py.in +++ b/pelican/tools/templates/fabfile.py.in @@ -6,9 +6,6 @@ import os env.deploy_path = 'output' DEPLOY_PATH = env.deploy_path -# Content path configuration -CONTENT_PATH = 'content/' - # Remote server configuration production = '$ssh_user@$ssh_host:$ssh_port' dest_path = '$ssh_target_dir' @@ -25,14 +22,14 @@ def clean(): local('mkdir {deploy_path}'.format(**env)) def build(): - local('pelican ' + CONTENT_PATH + ' -s pelicanconf.py') + local('pelican -s pelicanconf.py') def rebuild(): clean() build() def regenerate(): - local('pelican ' + CONTENT_PATH + ' -r -s pelicanconf.py') + local('pelican -r -s pelicanconf.py') def serve(): local('cd {deploy_path} && python -m SimpleHTTPServer'.format(**env)) diff --git a/pelican/tools/templates/pelicanconf.py.in b/pelican/tools/templates/pelicanconf.py.in index 5d96051d..959c4da2 100644 --- a/pelican/tools/templates/pelicanconf.py.in +++ b/pelican/tools/templates/pelicanconf.py.in @@ -6,6 +6,8 @@ AUTHOR = $author SITENAME = $sitename SITEURL = '' +PATH = 'content/' + TIMEZONE = 'Europe/Paris' DEFAULT_LANG = $lang From 4351859c1228ae8796527903b64071c59a149440 Mon Sep 17 00:00:00 2001 From: Julien Iguchi-Cartigny Date: Mon, 28 Oct 2013 15:30:27 +0100 Subject: [PATCH 4/5] removing trailing slash --- pelican/tools/templates/pelicanconf.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/templates/pelicanconf.py.in b/pelican/tools/templates/pelicanconf.py.in index 959c4da2..00a7ec84 100644 --- a/pelican/tools/templates/pelicanconf.py.in +++ b/pelican/tools/templates/pelicanconf.py.in @@ -6,7 +6,7 @@ AUTHOR = $author SITENAME = $sitename SITEURL = '' -PATH = 'content/' +PATH = 'content' TIMEZONE = 'Europe/Paris' From cd7875821c167bcd7cbbb7d811abf440f563791d Mon Sep 17 00:00:00 2001 From: Julien Iguchi-Cartigny Date: Mon, 28 Oct 2013 15:33:27 +0100 Subject: [PATCH 5/5] Removing references to INPUT_DIR from Makefile template Input directory handled by PATH variable in pelicanconf.py --- pelican/tools/templates/Makefile.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pelican/tools/templates/Makefile.in b/pelican/tools/templates/Makefile.in index 524bf82e..cc6a6fcb 100644 --- a/pelican/tools/templates/Makefile.in +++ b/pelican/tools/templates/Makefile.in @@ -2,7 +2,6 @@ PELICAN=$pelican PELICANOPTS=$pelicanopts BASEDIR=$$(CURDIR) -INPUTDIR=$$(BASEDIR)/content OUTPUTDIR=$$(BASEDIR)/output CONFFILE=$$(BASEDIR)/pelicanconf.py PUBLISHCONF=$$(BASEDIR)/publishconf.py @@ -52,13 +51,13 @@ help: @echo ' ' html: - $$(PELICAN) $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS) + $$(PELICAN) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS) clean: [ ! -d $$(OUTPUTDIR) ] || rm -rf $$(OUTPUTDIR) regenerate: - $$(PELICAN) -r $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS) + $$(PELICAN) -r -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS) serve: ifdef PORT @@ -80,7 +79,7 @@ stopserver: @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' publish: - $$(PELICAN) $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(PUBLISHCONF) $$(PELICANOPTS) + $$(PELICAN) -o $$(OUTPUTDIR) -s $$(PUBLISHCONF) $$(PELICANOPTS) ssh_upload: publish scp -P $$(SSH_PORT) -r $$(OUTPUTDIR)/* $$(SSH_USER)@$$(SSH_HOST):$$(SSH_TARGET_DIR)