squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
21.2k stars 3.57k forks source link

Search disappears on activating Blog plugin #7682

Closed dashdesai closed 3 weeks ago

dashdesai commented 3 weeks ago

Context

I enabled the blog plugin on an existing MkDocs Material site and the search box disappeared from the main navigation.

Bug description

Search bar disappears on enabling the Blogs plugin.

Related links

Reproduction

A minimal reproduction has been created and attached. All version details, etc are included within the /docs/index.md. min-mm.zip

Steps to reproduce

  1. Add blog configuration to the mkdocs.yml file
  2. Run mkdocs serve
  3. Visit site
  4. Observe that the search box does not exist any more. Screenshot 2024-11-08 at 19 34 37

Browser

Chrome, Safari, Other

Before submitting

alexvoss commented 3 weeks ago

This is documented behavior. When you create a plugins section in the configuration you need to add all plugins that you want. I know it is somewhat surprising at first.

dashdesai commented 3 weeks ago

Thanks @alexvoss for the quick response. Adding search to the plugins fixed it beautifully!

For anyone else who stumbles upon this thread, the fix is as follows (the blog_toc is optional of course):

plugins: