Add .. link.
This commit is contained in:
parent
5cd856073c
commit
2e68c0bba7
1 changed files with 3 additions and 0 deletions
|
@ -740,6 +740,9 @@ def markdown_flask(core_filename, port, *args, **kwargs):
|
||||||
|
|
||||||
if path.is_dir:
|
if path.is_dir:
|
||||||
atags = []
|
atags = []
|
||||||
|
if path in cwd:
|
||||||
|
parent = path.parent.relative_to(cwd, simple=True)
|
||||||
|
atags.append(f'<a href="/{parent}">..</a>')
|
||||||
children = sorted(path.listdir(), key=lambda p: (p.is_file, p.basename.lower()))
|
children = sorted(path.listdir(), key=lambda p: (p.is_file, p.basename.lower()))
|
||||||
for child in children:
|
for child in children:
|
||||||
relative = child.relative_to(cwd, simple=True)
|
relative = child.relative_to(cwd, simple=True)
|
||||||
|
|
Loading…
Reference in a new issue