From fca2fde2ed651a5d503a8ae06cad0f9f27f86f6a Mon Sep 17 00:00:00 2001 From: Ilya Simpson Date: Sat, 31 May 2025 12:20:09 +1200 Subject: [PATCH] Change lists, not tuples, in config settings In the documentation, both `SOCIAL` and `LINKS` are described as a list of tuples, but all examples show them as tuples of tuples. It makes the most sense for them to be lists, so the examples should match the docs going forward. Similarly, `LOCALE` is described as a list, but the examples show it as a tuple. Likewise, the examples should be lists, in line with the description. --- docs/settings.rst | 4 ++-- pelican/tests/default_conf.py | 8 ++++---- pelican/tools/templates/pelicanconf.py.jinja2 | 8 ++++---- samples/pelican.conf.py | 8 ++++---- samples/pelican.conf_FR.py | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index c7e514b1..0ecb8fc1 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -819,9 +819,9 @@ Time and Date .. parsed-literal:: - LOCALE = ('usa', 'jpn', # On Windows + LOCALE = ['usa', 'jpn', # On Windows 'en_US', 'ja_JP' # On Unix/Linux - ) + ] For a list of available locales refer to `locales on Windows`_ or on Unix/Linux, use the ``locale -a`` command; see manpage diff --git a/pelican/tests/default_conf.py b/pelican/tests/default_conf.py index 583c3253..c675d9ab 100644 --- a/pelican/tests/default_conf.py +++ b/pelican/tests/default_conf.py @@ -12,20 +12,20 @@ DEFAULT_PAGINATION = 2 FEED_RSS = "feeds/all.rss.xml" CATEGORY_FEED_RSS = "feeds/{slug}.rss.xml" -LINKS = ( +LINKS = [ ("Biologeek", "http://biologeek.org"), ("Filyb", "http://filyb.info/"), ("Libert-fr", "http://www.libert-fr.com"), ("N1k0", "http://prendreuncafe.com/blog/"), ("Tarek Ziadé", "http://ziade.org/blog"), ("Zubin Mithra", "http://zubin71.wordpress.com/"), -) +] -SOCIAL = ( +SOCIAL = [ ("twitter", "http://twitter.com/ametaireau"), ("lastfm", "http://lastfm.com/user/akounet"), ("github", "http://github.com/ametaireau"), -) +] # global metadata to all the contents DEFAULT_METADATA = {"yeah": "it is"} diff --git a/pelican/tools/templates/pelicanconf.py.jinja2 b/pelican/tools/templates/pelicanconf.py.jinja2 index d2e92d4b..b2d41c78 100644 --- a/pelican/tools/templates/pelicanconf.py.jinja2 +++ b/pelican/tools/templates/pelicanconf.py.jinja2 @@ -16,18 +16,18 @@ AUTHOR_FEED_ATOM = None AUTHOR_FEED_RSS = None # Blogroll -LINKS = ( +LINKS = [ ("Pelican", "https://getpelican.com/"), ("Python.org", "https://www.python.org/"), ("Jinja2", "https://palletsprojects.com/p/jinja/"), ("You can modify those links in your config file", "#"), -) +] # Social widget -SOCIAL = ( +SOCIAL = [ ("You can add links in your config file", "#"), ("Another social link", "#"), -) +] DEFAULT_PAGINATION = {{default_pagination}} diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py index d10254e8..233a2061 100644 --- a/samples/pelican.conf.py +++ b/samples/pelican.conf.py @@ -17,20 +17,20 @@ DEFAULT_DATE = (2012, 3, 2, 14, 1, 1) FEED_ALL_RSS = "feeds/all.rss.xml" CATEGORY_FEED_RSS = "feeds/{slug}.rss.xml" -LINKS = ( +LINKS = [ ("Biologeek", "http://biologeek.org"), ("Filyb", "http://filyb.info/"), ("Libert-fr", "http://www.libert-fr.com"), ("N1k0", "http://prendreuncafe.com/blog/"), ("Tarek Ziadé", "http://ziade.org/blog"), ("Zubin Mithra", "http://zubin71.wordpress.com/"), -) +] -SOCIAL = ( +SOCIAL = [ ("twitter", "http://twitter.com/ametaireau"), ("lastfm", "http://lastfm.com/user/akounet"), ("github", "http://github.com/ametaireau"), -) +] # global metadata to all the contents DEFAULT_METADATA = {"yeah": "it is"} diff --git a/samples/pelican.conf_FR.py b/samples/pelican.conf_FR.py index cbca06df..f0872839 100644 --- a/samples/pelican.conf_FR.py +++ b/samples/pelican.conf_FR.py @@ -21,20 +21,20 @@ ARTICLE_SAVE_AS = ARTICLE_URL + "index.html" FEED_ALL_RSS = "feeds/all.rss.xml" CATEGORY_FEED_RSS = "feeds/{slug}.rss.xml" -LINKS = ( +LINKS = [ ("Biologeek", "http://biologeek.org"), ("Filyb", "http://filyb.info/"), ("Libert-fr", "http://www.libert-fr.com"), ("N1k0", "http://prendreuncafe.com/blog/"), ("Tarek Ziadé", "http://ziade.org/blog"), ("Zubin Mithra", "http://zubin71.wordpress.com/"), -) +] -SOCIAL = ( +SOCIAL = [ ("twitter", "http://twitter.com/ametaireau"), ("lastfm", "http://lastfm.com/user/akounet"), ("github", "http://github.com/ametaireau"), -) +] # global metadata to all the contents DEFAULT_METADATA = {"yeah": "it is"}