Skip to content
Permalink
Browse files

Update script and global gallery path docs

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 4, 2015
1 parent b23169c commit d637236b4538b115451278657498e92082afb491
Showing with 11 additions and 9 deletions.
  1. +4 −3 nikola/plugins/task/galleries.py
  2. +7 −6 scripts/document_path_handlers.py
@@ -137,14 +137,15 @@ def gallery_path(self, name, lang):
[self.site.config['INDEX_FILE']] if _f]

def gallery_global_path(self, name, lang):
"""Link to the global gallery path (in the site root), which contains all the images
in galleries (there is only one copy of an image on multilingual blogs)
"""Link to the global gallery path, which contains all the images in galleries.
There is only one copy of an image on multilingual blogs, in the site root.
link://gallery_global/london => /galleries/trips/london/index.html
link://gallery_global/trips/london => /galleries/trips/london/index.html
(a gallery link could lead to eg. /en/galleries/trips/london/index.html)
(a ``gallery`` link could lead to eg. /en/galleries/trips/london/index.html)
"""
gallery_path = self._find_gallery_path(name)
return [_f for _f in gallery_path.split(os.sep) +
13 scripts/document_path_handlers.py 100644 → 100755
@@ -1,20 +1,21 @@
#!/usr/bin/env python

from __future__ import print_function, unicode_literals
from nikola import nikola
n=nikola.Nikola()
n = nikola.Nikola()
n.init_plugins()

print """.. title: Path Handlers for Nikola
print(""".. title: Path Handlers for Nikola
.. slug: path-handlers
.. author: The Nikola Team
Nikola supports special links with the syntax ``link://kind/name``. Here is
the description for all the supported kinds.
"""
""")

for k in sorted(n.path_handlers.keys()):
v = n.path_handlers[k]
print k
print '\n'.join(' '+l.strip() for l in v.__doc__.splitlines())
print
print(k)
print('\n'.join(' '+l.strip() for l in v.__doc__.splitlines()))
print()

0 comments on commit d637236

Please sign in to comment.