From f2dbfbfcecd41c19438b22f6d1b25e9583a10867 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Wed, 26 Feb 2020 18:54:05 +0000 Subject: [PATCH] Docs: Add info about pelican-quickstart command path flag. (#2675) --- docs/install.rst | 7 +++++++ pelican/tools/pelican_quickstart.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/install.rst b/docs/install.rst index 2da7b9be..d683ed8f 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -102,6 +102,13 @@ your site:: pelican-quickstart +If run inside an activated virtual environment, ``pelican-quickstart`` will +look for an associated project path inside ``$VIRTUAL_ENV/.project``. If that +file exists and contains a valid directory path, the new Pelican project will +be saved at that location. Otherwise, the default is the current working +directory. To set the new project path on initial invocation, use: +``pelican-quickstart --path /your/desired/directory`` + Once you finish answering all the questions, your project will consist of the following hierarchy (except for *pages* — shown in parentheses below — which you can optionally add yourself if you plan to create non-chronological diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index a7801866..63b32417 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -200,7 +200,7 @@ needed by Pelican. no_path_was_specified = hasattr(args.path, 'is_default_path') if os.path.isfile(project) and no_path_was_specified: CONF['basedir'] = open(project, 'r').read().rstrip("\n") - print('Using project associated with current virtual environment.' + print('Using project associated with current virtual environment. ' 'Will save to:\n%s\n' % CONF['basedir']) else: CONF['basedir'] = os.path.abspath(os.path.expanduser(