From 3f22b56c09feb6b0ebcba377993de7909b88e657 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 7 Mar 2020 09:50:03 -0600 Subject: [PATCH] prepend 'journal/' to resolved files this is where the markdown files will go inside the instance dir --- incorporealcms/journal.py | 2 +- tests/test_journal.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/incorporealcms/journal.py b/incorporealcms/journal.py index 68a7a33..9777026 100644 --- a/incorporealcms/journal.py +++ b/incorporealcms/journal.py @@ -20,5 +20,5 @@ def journal_file_resolver(path): """ if path.endswith('/'): path = f'{path}index' - path = f'{path}.md' + path = f'journal/{path}.md' return path diff --git a/tests/test_journal.py b/tests/test_journal.py index ceeb2ce..9b02d58 100644 --- a/tests/test_journal.py +++ b/tests/test_journal.py @@ -3,12 +3,12 @@ from incorporealcms.journal import journal_file_resolver def test_journal_file_resolver_dir_to_index(): - assert journal_file_resolver('foo/') == 'foo/index.md' + assert journal_file_resolver('foo/') == 'journal/foo/index.md' def test_journal_file_resolver_subdir_to_index(): - assert journal_file_resolver('foo/bar/') == 'foo/bar/index.md' + assert journal_file_resolver('foo/bar/') == 'journal/foo/bar/index.md' def test_journal_file_resolver_other_requests_fine(): - assert journal_file_resolver('foo/baz') == 'foo/baz.md' + assert journal_file_resolver('foo/baz') == 'journal/foo/baz.md'