Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The blog plugin doesn't respect the hide property of an index.md page when pagination is in effect. #4396

Closed
5 tasks done
hellt opened this issue Sep 24, 2022 · 2 comments
Closed
5 tasks done
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@hellt
Copy link
Contributor

hellt commented Sep 24, 2022

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The blog plugin doesn't respect hide property of an index.md page when using pagination.

Expected behaviour

Elements that are marked to be hidden in index.md continue to be hidden on paginated views (/page/X).

Actual behaviour

navigation and toc elements are not following the parameters set in index.md

Steps to reproduce

  1. add more posts to trigger paginated view
  2. see the result

Package versions

  • Material: 8.5.3-insiders-4.23.6

Configuration

blog pluging enabled.

index.md contents


---
hide:
  - navigation

---
# Blog


### System information

- Operating system: Mac OS
- Browser: Chrome
@squidfunk squidfunk added the bug Issue reports a bug label Sep 25, 2022
@squidfunk
Copy link
Owner

Thanks for reporting. I agree that the paginated pages should inherit the metadata from the blog index page. Fixed in squidfunk/mkdocs-material-insiders@a9af801412007f99f384ced687dc09c1bfeb4b69. Additionally, there's a new setting called pagination_keep_content, that specifies whether the paginated pages should also include the content of the blog/index.md, defaulting to false:

plugins:
  - blog:
      pagination_keep_content: true

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Sep 27, 2022
@squidfunk
Copy link
Owner

squidfunk commented Sep 27, 2022

The fix was released as part of 8.5.3+insiders-4.24.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants