don't error on breadcrumbs if a dir doesn't have index.md

fixes #8
This commit is contained in:
2021-04-14 21:35:14 -05:00
parent ced67bec8b
commit be88c3c1bc
3 changed files with 20 additions and 6 deletions

View File

@@ -0,0 +1 @@
this is a test page

View File

@@ -35,6 +35,16 @@ def test_generate_page_navs_subdir_with_title_parsing_real_page(app):
]
def test_generate_page_navs_subdir_with_no_index(app):
"""Test that breadcrumbs still generate even if a subdir doesn't have an index.md."""
with app.app_context():
assert generate_parent_navs('pages/no-index-dir/page.md') == [
('incorporeal.org', '/'),
('/no-index-dir/', '/no-index-dir/'),
('page', '/no-index-dir/page')
]
def test_render_with_user_dark_theme(app):
"""Test that a request with the dark theme selected renders the dark theme."""
cookie = dump_cookie("user-style", 'dark')