1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
Bernhard Scheirle af0899ae2a Fixes wrongly generated relative urls for pagination.
When `RELATIVE_URLS` is `True` and the `PAGINATION_PATTERNS` adds folder to the path, the relative urls to these pages does not respect these additional folders.

Example:
	Settings:
			RELATIVE_URLS = True
			PAGINATION_PATTERNS = (
					(1, '{base_name}/', '{base_name}/index.html'),
					(2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),)

	Theme:
			<link href="{{ SITEURL }}/theme/css/style.css" rel="stylesheet">

If you are on page 2 then "{{ SITEURL }}/theme/css/style.css" expands to "./theme/css/style.css" instead of "./../../theme/css/style.css".

Fix:
Simply compute the relative url from the paginated url instead of the not paginated one.
2014-07-12 21:10:42 +02:00
..
tests Fix test_direct_templates_save_as_false test case 2014-06-27 14:54:18 +02:00
themes Run tag name through escape filter to avoid invalid HTML 2014-02-18 15:01:31 +01:00
tools Merge pull request #1372 from Railslide/make_github_commit_message 2014-07-08 12:46:00 +01:00
__init__.py Increment development version to 3.5.dev 2014-07-01 16:03:02 -07:00
contents.py Fix #1198, enable custom locale in template rendering, fixes links 2014-06-26 00:00:19 -04:00
generators.py Generator.get_files backwards compatibility for 1 path 2014-06-27 20:18:17 +02:00
log.py Minor text changes to log message limitation 2014-04-14 16:18:07 -04:00
paginator.py Fix Issue #1165 allows extensions to be set by certain settings 2014-03-08 20:33:23 -05:00
readers.py Merge pull request #1380 from avaris/py34_warnings 2014-06-27 05:49:03 -07:00
rstdirectives.py Support for pygment defaults and relevant documentation 2013-09-15 23:13:17 -07:00
server.py Allow socket address reuse; fixed #1264 2014-02-14 14:20:38 -08:00
settings.py Merge pull request #1322 from smartass101/get_files_multiple_paths 2014-06-25 07:29:22 -07:00
signals.py add get_writer signal and unify with get_generators 2014-04-27 14:25:08 +02:00
urlwrappers.py Allow text substitutions when generating slugs 2013-07-04 12:17:21 +01:00
utils.py Fix test errors on OSX 2014-06-26 01:01:42 -04:00
writers.py Fixes wrongly generated relative urls for pagination. 2014-07-12 21:10:42 +02:00