diff --git a/docs/settings.rst b/docs/settings.rst index 99e99c6f..f1ae827a 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -160,9 +160,9 @@ Setting name (default value) what does it do? `DEFAULT_ORPHANS` (0) The minimum number of articles allowed on the last page. Use this when you don't want to have a last page with very few articles. -`DEFAULT_PAGINATION` (5) The maximum number of articles to include on a - page, not including orphans. -`WITH_PAGINATION` (``False``) Activate pagination. +`DEFAULT_PAGINATION` (False) The maximum number of articles to include on a + page, not including orphans. False to disable + pagination. ================================================ ===================================================== Tag cloud diff --git a/pelican/settings.py b/pelican/settings.py index f74e085d..cf6b23e5 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -38,8 +38,7 @@ _DEFAULT_CONFIG = {'PATH': None, 'DATE_FORMATS': {}, 'JINJA_EXTENSIONS': [], 'LOCALE': '', # default to user locale - 'WITH_PAGINATION': False, - 'DEFAULT_PAGINATION': 5, + 'DEFAULT_PAGINATION': False, 'DEFAULT_ORPHANS': 0, 'DEFAULT_METADATA': (), 'FILES_TO_COPY': (), diff --git a/pelican/themes/notmyidea/templates/pagination.html b/pelican/themes/notmyidea/templates/pagination.html index 74699c4e..83c587ac 100644 --- a/pelican/themes/notmyidea/templates/pagination.html +++ b/pelican/themes/notmyidea/templates/pagination.html @@ -1,4 +1,4 @@ -{% if WITH_PAGINATION %} +{% if DEFAULT_PAGINATION %}

{% if articles_page.has_previous() %} {% if articles_page.previous_page_number() == 1 %} @@ -12,4 +12,4 @@ » {% endif %}

-{% endif %} \ No newline at end of file +{% endif %} diff --git a/pelican/writers.py b/pelican/writers.py index 21bb899d..baf20408 100644 --- a/pelican/writers.py +++ b/pelican/writers.py @@ -127,7 +127,7 @@ class Writer(object): for key in paginated.iterkeys(): object_list = paginated[key] - if self.settings.get('WITH_PAGINATION'): + if self.settings.get('DEFAULT_PAGINATION'): paginators[key] = Paginator(object_list, self.settings.get('DEFAULT_PAGINATION'), self.settings.get('DEFAULT_ORPHANS')) diff --git a/tools/pelican-quickstart b/tools/pelican-quickstart index 5d708038..ef6dff53 100755 --- a/tools/pelican-quickstart +++ b/tools/pelican-quickstart @@ -86,7 +86,6 @@ SOCIAL = ( ('You can add links in your config file', '#'), ) -WITH_PAGINATION = $with_pagination DEFAULT_PAGINATION = $default_pagination @@ -104,7 +103,6 @@ CONF = { 'ssh_user': 'root', 'ssh_target_dir': '/var/www', 'dropbox_dir' : '~/Dropbox/Public/', - 'with_pagination' : True, 'default_pagination' : 7, 'lang': 'en' } @@ -221,10 +219,12 @@ Please answer the following questions so this script can generate the files need CONF['author'] = ask('Who will be the author of this Web site ?', answer=str, default=args.author) CONF['lang'] = ask('What will be the default language of this Web site ?', str, args.lang or CONF['lang'], 2) - CONF['with_pagination'] = ask('Do you want to enable article pagination ?', bool, CONF['with_pagination']) + CONF['with_pagination'] = ask('Do you want to enable article pagination ?', bool, bool(CONF['default_pagination'])) if CONF['with_pagination']: CONF['default_pagination'] = ask('So how many articles per page do you want ?', int, CONF['default_pagination']) + else: + CONF['default_pagination'] = False mkfile = ask('Do you want to generate a Makefile to easily manage your website ?', bool, True)