diff --git a/sigal/themes/galleria/templates/index.html b/sigal/themes/galleria/templates/index.html
index 7d01685..0a26e25 100644
--- a/sigal/themes/galleria/templates/index.html
+++ b/sigal/themes/galleria/templates/index.html
@@ -19,7 +19,7 @@
diff --git a/sigal/writer.py b/sigal/writer.py
index 3a39a34..54456c3 100644
--- a/sigal/writer.py
+++ b/sigal/writer.py
@@ -103,16 +103,15 @@ class Writer():
ctx = copy.deepcopy(self.ctx)
ctx['theme']['path'] = os.path.relpath(self.theme_path, path)
- ctx['home_path'] = os.path.join(
- os.path.relpath(self.output_dir, path), INDEX_PAGE)
+ ctx['index_url'] = os.path.relpath(self.output_dir, path) + '/'
# paths to upper directories (with titles and links)
tmp_path = relpath
- ctx['paths'] = do_link(INDEX_PAGE, paths[tmp_path]['title'])
+ ctx['paths'] = do_link('.', paths[tmp_path]['title'])
while tmp_path != '.':
tmp_path = os.path.normpath(os.path.join(tmp_path, '..'))
- link = os.path.relpath(tmp_path, relpath) + "/" + INDEX_PAGE
+ link = os.path.relpath(tmp_path, relpath) + '/'
ctx['paths'] = do_link(link, paths[tmp_path]['title']) + \
PATH_SEP + ctx['paths']
@@ -136,7 +135,7 @@ class Writer():
quality=self.settings['jpg_quality'])
ctx['albums'].append({
- 'path': os.path.join(d, INDEX_PAGE),
+ 'path': d + '/',
'title': paths[dpath]['title'],
'thumb': os.path.join(d, thumb_name)
})