remove resolve_page_file, been refactored away
This commit is contained in:
@@ -125,20 +125,6 @@ def instance_resource_path_to_request_path(path):
|
||||
return re.sub(r'^pages/', '', re.sub(r'.md$', '', re.sub(r'index.md$', '', path)))
|
||||
|
||||
|
||||
def resolve_page_file(path):
|
||||
"""Manipulate the request path to find appropriate page file.
|
||||
|
||||
* convert dir requests to index files
|
||||
|
||||
Worth noting, Flask already does stuff like convert '/foo/../../../bar' to
|
||||
'/bar', so we don't need to take care around file access here.
|
||||
"""
|
||||
if path.endswith('/'):
|
||||
path = f'{path}index'
|
||||
path = f'pages/{path}.md'
|
||||
return path
|
||||
|
||||
|
||||
def generate_parent_navs(path):
|
||||
"""Create a series of paths/links to navigate up from the given resource path."""
|
||||
if path == 'pages/index.md':
|
||||
|
||||
Reference in New Issue
Block a user