1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
W. Trevor King ae4fc5a25e utils: Add path_to_url() and generalize get_relative_path()
The old get_relative_path() implementation assumed os.sep == '/',
which doesn't hold on MS Windows.  The new implementation uses
split_all() for a more general component count.

I added path_to_url(), because the:

  '/'.join(split_all(path))

idiom was showing up in a number of cases, and it's easier to
understand what's going on when that reads:

  path_to_url(path)

This will fix a number of places where I think paths and URLs were
conflated, and should improve MS Windows support.
2013-03-21 12:44:44 -04:00
..
plugins added unique filtering and config limit param 2013-03-03 22:18:59 -08:00
tests utils: Add path_to_url() and generalize get_relative_path() 2013-03-21 12:44:44 -04:00
themes External resources should be scheme-independent 2013-03-18 17:36:35 -07:00
tools Convert '.' and '..' to the less magical os.curdir and os.pardir 2013-03-21 12:44:44 -04:00
__init__.py Convert '.' and '..' to the less magical os.curdir and os.pardir 2013-03-21 12:44:44 -04:00
contents.py utils: Add path_to_url() and generalize get_relative_path() 2013-03-21 12:44:44 -04:00
generators.py utils: Add path_to_url() and generalize get_relative_path() 2013-03-21 12:44:44 -04:00
log.py Manual pass on sources for better standards. 2013-03-03 20:12:31 -08:00
paginator.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
readers.py Add the PATH_METADATA setting 2013-03-12 15:16:25 -07:00
rstdirectives.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
server.py Manual pass on sources for better standards. 2013-03-03 20:12:31 -08:00
settings.py Convert '.' and '..' to the less magical os.curdir and os.pardir 2013-03-21 12:44:44 -04:00
signals.py Add a pages_generator_finalized signal. 2013-02-10 12:42:54 -08:00
urlwrappers.py contents: Add URLWrapper.__repr__ 2013-03-12 20:41:56 -04:00
utils.py utils: Add path_to_url() and generalize get_relative_path() 2013-03-21 12:44:44 -04:00
writers.py utils: Add path_to_url() and generalize get_relative_path() 2013-03-21 12:44:44 -04:00