From 0a8678a8ae8e08969e85221e4f82214b8057793a Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 11 Apr 2013 12:15:18 -0700 Subject: [PATCH] Change RELATIVE_URLS default to False - Fixes #829 --- docs/contribute.rst | 4 +- docs/settings.rst | 6 +- pelican/settings.py | 2 +- .../basic/a-markdown-powered-article.html | 30 +++--- pelican/tests/output/basic/archives.html | 40 ++++---- pelican/tests/output/basic/article-1.html | 26 ++--- pelican/tests/output/basic/article-2.html | 26 ++--- pelican/tests/output/basic/article-3.html | 26 ++--- .../output/basic/author/alexis-metaireau.html | 40 ++++---- pelican/tests/output/basic/categories.html | 30 +++--- pelican/tests/output/basic/category/bar.html | 30 +++--- pelican/tests/output/basic/category/cat1.html | 48 +++++----- pelican/tests/output/basic/category/misc.html | 46 ++++----- pelican/tests/output/basic/category/yeah.html | 30 +++--- .../basic/filename_metadata-example.html | 26 ++--- pelican/tests/output/basic/index.html | 94 +++++++++---------- pelican/tests/output/basic/oh-yeah.html | 30 +++--- .../tests/output/basic/override/index.html | 22 ++--- .../pages/this-is-a-test-hidden-page.html | 22 ++--- .../basic/pages/this-is-a-test-page.html | 22 ++--- .../tests/output/basic/second-article-fr.html | 30 +++--- .../tests/output/basic/second-article.html | 30 +++--- pelican/tests/output/basic/tag/bar.html | 50 +++++----- pelican/tests/output/basic/tag/baz.html | 30 +++--- pelican/tests/output/basic/tag/foo.html | 40 ++++---- pelican/tests/output/basic/tag/foobar.html | 30 +++--- pelican/tests/output/basic/tag/oh.html | 30 +++--- pelican/tests/output/basic/tag/yeah.html | 30 +++--- .../output/basic/this-is-a-super-article.html | 30 +++--- pelican/tests/output/basic/unbelievable.html | 30 +++--- pelican/tests/test_pelican.py | 2 +- pelican/tests/test_webassets.py | 6 +- pelican/tools/templates/pelicanconf.py.in | 3 + pelican/tools/templates/publishconf.py.in | 4 +- pelican/writers.py | 2 +- samples/pelican.conf.py | 3 + 36 files changed, 478 insertions(+), 472 deletions(-) diff --git a/docs/contribute.rst b/docs/contribute.rst index 2069765c..e53fabf5 100644 --- a/docs/contribute.rst +++ b/docs/contribute.rst @@ -54,9 +54,9 @@ If you have made changes that affect the output of a Pelican-generated weblog, then you should update the output used by functional tests. To do so, you can use the following two commands:: - $ LC_ALL="C" pelican -o pelican/tests/output/custom/ -s samples/pelican.conf.py \ + $ pelican -o pelican/tests/output/custom/ -s samples/pelican.conf.py \ samples/content/ - $ LC_ALL="C" pelican -o pelican/tests/output/basic/ samples/content/ + $ pelican -o pelican/tests/output/basic/ samples/content/ testing for python3 ------------------- diff --git a/docs/settings.rst b/docs/settings.rst index db5c0164..83348228 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -107,9 +107,9 @@ Setting name (default value) What doe `OUTPUT_SOURCES_EXTENSION` (``.text``) Controls the extension that will be used by the SourcesGenerator. Defaults to ``.text``. If not a valid string the default value will be used. -`RELATIVE_URLS` (``True``) Defines whether Pelican should use document-relative URLs or - not. If set to ``False``, Pelican will use the SITEURL - setting to construct absolute URLs. +`RELATIVE_URLS` (``False``) Defines whether Pelican should use document-relative URLs or + not. Only set this to ``True`` when developing/testing and only + if you fully understand the effect it can have on links/feeds. `PLUGINS` (``[]``) The list of plugins to load. See :ref:`plugins`. `SITENAME` (``'A Pelican Blog'``) Your site name `SITEURL` Base URL of your website. Not defined by default, diff --git a/pelican/settings.py b/pelican/settings.py index df1de0c7..319df7f8 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -66,7 +66,7 @@ _DEFAULT_CONFIG = {'PATH': os.curdir, 'YEAR_ARCHIVE_SAVE_AS': False, 'MONTH_ARCHIVE_SAVE_AS': False, 'DAY_ARCHIVE_SAVE_AS': False, - 'RELATIVE_URLS': True, + 'RELATIVE_URLS': False, 'DEFAULT_LANG': 'en', 'TAG_CLOUD_STEPS': 4, 'TAG_CLOUD_MAX_ITEMS': 100, diff --git a/pelican/tests/output/basic/a-markdown-powered-article.html b/pelican/tests/output/basic/a-markdown-powered-article.html index 251b3aab..021f2720 100644 --- a/pelican/tests/output/basic/a-markdown-powered-article.html +++ b/pelican/tests/output/basic/a-markdown-powered-article.html @@ -3,38 +3,38 @@ A markdown powered article - + + + +
diff --git a/pelican/tests/output/basic/archives.html b/pelican/tests/output/basic/archives.html index 06b3e6e6..c941849e 100644 --- a/pelican/tests/output/basic/archives.html +++ b/pelican/tests/output/basic/archives.html @@ -3,31 +3,31 @@ A Pelican Blog - + + + +
@@ -35,23 +35,23 @@
Fri 30 November 2012
-
FILENAME_METADATA example
+
FILENAME_METADATA example
Wed 29 February 2012
-
Second article
+
Second article
Wed 20 April 2011
-
A markdown powered article
+
A markdown powered article
Thu 17 February 2011
-
Article 1
+
Article 1
Thu 17 February 2011
-
Article 2
+
Article 2
Thu 17 February 2011
-
Article 3
+
Article 3
Thu 02 December 2010
-
This is a super article !
+
This is a super article !
Wed 20 October 2010
-
Oh yeah !
+
Oh yeah !
Fri 15 October 2010
-
Unbelievable !
+
Unbelievable !
diff --git a/pelican/tests/output/basic/article-1.html b/pelican/tests/output/basic/article-1.html index fb425644..a86bcbd0 100644 --- a/pelican/tests/output/basic/article-1.html +++ b/pelican/tests/output/basic/article-1.html @@ -3,38 +3,38 @@ Article 1 - + + + +

- Article 1

@@ -44,7 +44,7 @@ Thu 17 February 2011 -

In cat1.

+

In cat1.

Article 1

diff --git a/pelican/tests/output/basic/article-2.html b/pelican/tests/output/basic/article-2.html index 39d55c6b..da74685d 100644 --- a/pelican/tests/output/basic/article-2.html +++ b/pelican/tests/output/basic/article-2.html @@ -3,38 +3,38 @@ Article 2 - + + + +

- Article 2

@@ -44,7 +44,7 @@ Thu 17 February 2011 -

In cat1.

+

In cat1.

Article 2

diff --git a/pelican/tests/output/basic/article-3.html b/pelican/tests/output/basic/article-3.html index e7e59440..03641539 100644 --- a/pelican/tests/output/basic/article-3.html +++ b/pelican/tests/output/basic/article-3.html @@ -3,38 +3,38 @@ Article 3 - + + + +

- Article 3

@@ -44,7 +44,7 @@ Thu 17 February 2011 -

In cat1.

+

In cat1.

Article 3

diff --git a/pelican/tests/output/basic/author/alexis-metaireau.html b/pelican/tests/output/basic/author/alexis-metaireau.html index 8b83c8a6..9c47c7a0 100644 --- a/pelican/tests/output/basic/author/alexis-metaireau.html +++ b/pelican/tests/output/basic/author/alexis-metaireau.html @@ -3,31 +3,31 @@ A Pelican Blog - Alexis Métaireau - + + + + @@ -35,17 +35,17 @@
@@ -78,7 +78,7 @@
  • @@ -100,7 +100,7 @@
  • diff --git a/pelican/tests/output/basic/category/misc.html b/pelican/tests/output/basic/category/misc.html index cdf2a437..f966bf89 100644 --- a/pelican/tests/output/basic/category/misc.html +++ b/pelican/tests/output/basic/category/misc.html @@ -3,31 +3,31 @@ A Pelican Blog - misc - + + + + @@ -35,13 +35,13 @@