mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed further regression in blog plugin navigation
This commit is contained in:
parent
752aa5ce88
commit
682d1761e7
@ -343,8 +343,11 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
||||
# view temporarily becomes the main view, and is reset after rendering
|
||||
assert isinstance(view, View)
|
||||
if view != page:
|
||||
prev = view.pages[view.pages.index(page) - 1]
|
||||
|
||||
# Replace previous page with current page
|
||||
items = self._resolve_siblings(view, nav)
|
||||
items[items.index(view)] = page
|
||||
items[items.index(prev)] = page
|
||||
|
||||
# Render excerpts and prepare pagination
|
||||
posts, pagination = self._render(page)
|
||||
|
@ -343,8 +343,11 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
||||
# view temporarily becomes the main view, and is reset after rendering
|
||||
assert isinstance(view, View)
|
||||
if view != page:
|
||||
prev = view.pages[view.pages.index(page) - 1]
|
||||
|
||||
# Replace previous page with current page
|
||||
items = self._resolve_siblings(view, nav)
|
||||
items[items.index(view)] = page
|
||||
items[items.index(prev)] = page
|
||||
|
||||
# Render excerpts and prepare pagination
|
||||
posts, pagination = self._render(page)
|
||||
|
Loading…
Reference in New Issue
Block a user