Skip to content

mkdocs serve doesn't reload upon change anymoreΒ #8478

@Skaronator

Description

@Skaronator

Context

No response

Bug description

After upgrading the mkdocs-material Docker image from ghcr.io/squidfunk/mkdocs-material:9.6.20 to ghcr.io/squidfunk/mkdocs-material:9.6.21, the live-reloading feature has stopped working.

When running mkdocs serve --dev-addr=0.0.0.0:7070, the server starts and serves the site correctly. However, it no longer detects changes to source files (like Markdown files or mkdocs.yml). Consequently, the site does not rebuild, and the browser page does not auto-refresh.

To confirm this was not a container-specific issue, I performed A/B testing with a local Python virtual environment. The same bug occurs when using mkdocs-material==9.6.21 installed via pip, while version 9.6.20 works as expected.

My environment is Windows 11 with WSL2 (Debian 13), with all files and commands being executed within the Linux environment.

Related links

N/A

Reproduction

This is basically just 1:1 the original guide. No special changes required.

9.6.21-mkdocs-serve-no-longer-watches-for-filechanges.zip

Steps to reproduce

  1. Run mkdocs serve --dev-addr=0.0.0.0:7070
  2. Modify index.md
  3. Watch Log

with mkdocs-material==9.6.21

mkdocs serve --dev-addr=0.0.0.0:7070                           
INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  Documentation built in 0.22 seconds
INFO    -  [11:38:35] Serving on http://0.0.0.0:7070/

Nothing happens when modifing my index.md

with mkdocs-material==9.6.20

mkdocs serve --dev-addr=0.0.0.0:7070                           
INFO    -  Building documentation...
INFO    -  Cleaning site directory
INFO    -  Documentation built in 0.21 seconds
INFO    -  [11:37:24] Watching paths for changes: 'docs', 'mkdocs.yml'
INFO    -  [11:37:24] Serving on http://0.0.0.0:7070/
INFO    -  [11:37:28] Detected file changes
INFO    -  Building documentation...
INFO    -  [11:37:28] Reloading browsers
INFO    -  [11:37:30] Detected file changes
INFO    -  Building documentation...
INFO    -  [11:37:30] Reloading browsers

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugupstreamIssue must be taken upstream

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions