add .md in journal_file_resolver
I'm confident enough that this is what I want to do for resolving content, at least at the moment
This commit is contained in:
parent
1d446436ad
commit
2d3a5c10aa
@ -20,4 +20,5 @@ def journal_file_resolver(path):
|
|||||||
"""
|
"""
|
||||||
if path.endswith('/'):
|
if path.endswith('/'):
|
||||||
path = f'{path}index'
|
path = f'{path}index'
|
||||||
|
path = f'{path}.md'
|
||||||
return path
|
return path
|
||||||
|
@ -3,12 +3,12 @@ from incorporealcms.journal import journal_file_resolver
|
|||||||
|
|
||||||
|
|
||||||
def test_journal_file_resolver_dir_to_index():
|
def test_journal_file_resolver_dir_to_index():
|
||||||
assert journal_file_resolver('/foo/') == '/foo/index'
|
assert journal_file_resolver('/foo/') == '/foo/index.md'
|
||||||
|
|
||||||
|
|
||||||
def test_journal_file_resolver_subdir_to_index():
|
def test_journal_file_resolver_subdir_to_index():
|
||||||
assert journal_file_resolver('/foo/bar/') == '/foo/bar/index'
|
assert journal_file_resolver('/foo/bar/') == '/foo/bar/index.md'
|
||||||
|
|
||||||
|
|
||||||
def test_journal_file_resolver_other_requests_fine():
|
def test_journal_file_resolver_other_requests_fine():
|
||||||
assert journal_file_resolver('/foo/baz') == '/foo/baz'
|
assert journal_file_resolver('/foo/baz') == '/foo/baz.md'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user